/* -------------------------------------------------------------
   FONT IMPORTS
   - Plus Jakarta Sans (UI/English)
   - Cairo (Arabic support)
   - Bootstrap Icons
------------------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Cairo:wght@400;600;700&display=swap");
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css");

/* -------------------------------------------------------------
   CSS VARIABLES (THEME SYSTEM)
   - Colors
   - Radius
   - Surface styles
------------------------------------------------------------- */
:root {
  --primary: #c19965;
  --accent: #2bb3b1;
  --amber: #e6b35a;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --ink: #0f172a;
  --muted: #6b7280;
  --border: rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

/* -------------------------------------------------------------
   GLOBAL RESETS
------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

body {
  font-family: "Plus Jakarta Sans", "Cairo", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f4f6fb;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Accessibility focus styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* -------------------------------------------------------------
   UI COMPONENTS: GLASS CARD
------------------------------------------------------------- */
.glass-card {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.86));
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
}

/* -------------------------------------------------------------
   BUTTONS: Ghost & Primary
------------------------------------------------------------- */
.ghost-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s ease;
  min-height: 44px;
}

.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

/* Ghost Button Focus */
.ghost-btn:focus-visible,
.primary-btn:focus-visible {
  outline: 3px solid rgba(193, 153, 101, 0.25);
  outline-offset: 3px;
}

/* Danger Variant */
.ghost-btn.danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.2);
  background: rgba(254, 226, 226, 0.6);
}

/* PRIMARY BUTTON */
.primary-btn {
  border: none;
  background: linear-gradient(140deg, var(--primary), #d8b789);
  color: #fff;
  padding: 14px;
  border-radius: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(193, 153, 101, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 70px rgba(193, 153, 101, 0.45);
}

.primary-btn:active {
  transform: translateY(0);
  box-shadow: 0 12px 40px rgba(193, 153, 101, 0.35);
}

.admin-actions {
  gap: 12px;
  margin-top: 12px;
}

.admin-actions .admin-action {
  min-width: 180px;
  padding: 14px 22px;
  border-radius: 14px;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.admin-actions .admin-action i {
  font-size: 1rem;
}

.admin-actions .btn-branch {
  background: linear-gradient(135deg, #2bb3b1, #7fd6ce);
}

.admin-actions .btn-user {
  background: linear-gradient(135deg, #C19965, #d8b789);
}

/* -------------------------------------------------------------
   APPLICATION SHELL + WRAPPER
------------------------------------------------------------- */
.app-shell {
  background: radial-gradient(circle at 20% 20%, rgba(193, 153, 101, 0.16), transparent 35%),
              radial-gradient(circle at 80% 0%, rgba(43, 179, 177, 0.18), transparent 30%),
              #f6f1e7;
  min-height: 100vh;
  padding: 0;
}

.app-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 96px;
}

/* Pages that need centered layouts */
.page-standalone {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(32px + env(safe-area-inset-bottom, 0px));
}

.page-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -------------------------------------------------------------
   NAVIGATION BAR
------------------------------------------------------------- */
.app-nav {
  position: sticky;
  top: 12px;
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

/* Brand section */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1e8da;
  display: grid;
  place-items: center;
  padding: 6px;
  box-shadow: inset 0 0 0 1px rgba(193, 153, 101, 0.12);
}

.brand-title {
  margin: 0;
  font-weight: 800;
  color: var(--primary);
}

/* Small eyebrow text */
.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 2px;
}

/* NAV LINKS WRAPPER (scrollable on mobile) */
.nav-links-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  padding: 4px;
}

.nav-link-pills {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Hide scrollbar on WebKit */
.nav-link-pills::-webkit-scrollbar {
  display: none;
}

/* Individual links */
.nav-link-pills li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  font-weight: 600;
  transition: 0.18s ease;
  white-space: nowrap;
}

.nav-link-pills li a:hover {
  background: rgba(193, 153, 101, 0.06);
}

/* Active state */
.nav-link-pills li a.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 40px rgba(193, 153, 101, 0.25);
}

/* Right side: user profile chip */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  padding: 8px 10px;
  gap: 6px;
  white-space: nowrap;
}

.lang-toggle-wrap {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2000;
}

.user-chip {
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--ink);
}

/* -------------------------------------------------------------
   TAB SWITCHER (Two tabs)
------------------------------------------------------------- */
.tab-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 10px;
}

/* Individual tab pill */
.tab-pill {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ink);
  transition: 0.18s ease;
}

/* -------------------------------------------------------------
   TAB PILL (Active State)
   - Highlight the active tab visually
   - Adds deeper shadow, solid background, white text
------------------------------------------------------------- */
.tab-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 18px 50px rgba(193, 153, 101, 0.3);
}

/* -------------------------------------------------------------
   MAIN APP LAYOUT WRAPPER
   - Vertical stacking layout for sections/panels
------------------------------------------------------------- */
.app-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* -------------------------------------------------------------
   PANEL (Generic UI Container)
------------------------------------------------------------- */
.panel {
  padding: 18px;
  border-radius: var(--radius);
}

/* Panel header with title + actions */
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panel-head h3 {
  margin: 0;
  font-weight: 800;
}

/* -------------------------------------------------------------
   LEGEND (Used for status indicators)
------------------------------------------------------------- */
.legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 600;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Colored dot indicators */
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot.requested {
  background: var(--amber);
}

.dot.parked {
  background: var(--primary);
}

/* -------------------------------------------------------------
   STACKED LISTS (Used for lists of tickets)
------------------------------------------------------------- */
.stacked-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* -------------------------------------------------------------
   PAGINATION CONTROLS (Pager)
------------------------------------------------------------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.pager .ghost-btn {
  min-width: 44px;
  height: 44px;
  justify-content: center;
}

/* -------------------------------------------------------------
   PAGE DOTS (Indicator for page position)
------------------------------------------------------------- */
.page-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

/* Individual dot */
.page-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.15);
  transition: 0.2s ease;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* Active dot (elongated pill) */
.page-dots .dot.active {
  background: var(--primary);
  width: 16px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(193, 153, 101, 0.3);
}

/* -------------------------------------------------------------
   EMPTY STATE CARD (No data)
------------------------------------------------------------- */
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 26px 12px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
}

/* -------------------------------------------------------------
   TICKET CARD (Main ticket item)
------------------------------------------------------------- */
.ticket-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

/* Colored border on the left depending on status */
.ticket-card.requested {
  border-inline-start: 6px solid var(--amber);
}

.ticket-card.parked {
  border-inline-start: 6px solid var(--primary);
}

/* Ticket main info layout */
.ticket-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Car number badge */
.car-chip {
  min-width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0b1220;
  background: linear-gradient(135deg, #f6eee0, #f3e9dc);
  box-shadow: 0 10px 25px rgba(193, 153, 101, 0.16);
}

/* License plate text */
.plate {
  font-size: 1.05rem;
  font-weight: 800;
}

/* Ticket metadata: time, model, type, etc. */
.meta {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------
   STATUS CHIP (requested | parked)
------------------------------------------------------------- */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 800;
}

.status-chip.requested {
  background: #fef3c7;
  color: #92400e;
}

.status-chip.parked {
  background: #f1e8da;
  color: #c19965;
}

/* -------------------------------------------------------------
   TICKET ACTION BUTTONS (Deliver, etc.)
------------------------------------------------------------- */
.ticket-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 180px;
}

.btn-deliver {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 800;
  border-radius: 12px;
  padding: 10px 14px;
  min-height: 44px;
  box-shadow: 0 16px 40px rgba(43, 179, 177, 0.35);
}

.btn-deliver:hover {
  background: #1f7a73;
}

/* -------------------------------------------------------------
   FORM GRID
------------------------------------------------------------- */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Input card wrapper */
.input-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-card:hover {
  border-color: rgba(193, 153, 101, 0.25);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

/* Icon + input combo */
.input-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  background: #f8fafc;
}

.input-icon i {
  color: var(--muted);
}

.input-icon .form-control {
  border: none;
  background: transparent;
  padding: 8px 0;
  box-shadow: none;
}
.input-icon .form-select {
  border: none;
  background: transparent;
  padding: 8px 0;
  box-shadow: none;
}

/* -------------------------------------------------------------
   FORM CONTROLS (Input, select, textarea)
------------------------------------------------------------- */
.form-control {
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 14px;
  transition: all 0.2s ease-in-out;
}

.form-control:focus {
  background-color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(14, 163, 127, 0.25);
}

.form-label {
  margin-bottom: 6px;
}

/* -------------------------------------------------------------
   MODERN MODALS (Admin)
------------------------------------------------------------- */
.modal-hero-card {
  background: linear-gradient(180deg, #fdfaf6, #f7f4ef);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
}

.modal-hero-header {
  position: relative;
  padding: 18px 20px;
  background: radial-gradient(circle at 20% 20%, rgba(43, 179, 177, 0.15), transparent 36%),
              radial-gradient(circle at 70% 0%, rgba(193, 153, 101, 0.18), transparent 32%),
              linear-gradient(135deg, #2bb3b1, #c19965);
  color: #fff;
  display: flex;
  gap: 14px;
  align-items: center;
}

.modal-hero-header .hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.modal-hero-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  text-align: start;
}

.modal-hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  opacity: 0.85;
  margin: 0 0 4px;
}

.modal-hero-title {
  margin: 0;
  font-weight: 800;
}

.modal-hero-subtitle {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.modal-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-soft {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 13px;
}

.badge-soft.alt {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border-color: transparent;
}

.modal-hero-body {
  padding: 18px 20px;
  background: #fdfcf9;
}

.modal-hero-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.modal-hero-section + .modal-hero-section {
  margin-top: 12px;
}

.modal-hero-section h6 {
  margin: 0 0 10px;
  font-weight: 800;
}

.modal-hero-foot {
  padding: 14px 20px 20px;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.field-note {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.modal-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1e8da;
  color: #7a5a2d;
  font-weight: 700;
  border: 1px solid rgba(193, 153, 101, 0.3);
  line-height: 1;
}

.modal-pill i {
  font-size: 14px;
}

.modal-pill span:last-child {
  letter-spacing: 0.02em;
}

@media (max-width: 576px) {
  .modal-hero-header {
    flex-wrap: wrap;
    padding: 16px;
  }
  .modal-hero-text {
    width: 100%;
  }
  .modal-hero-header .btn-close {
    margin-inline-start: auto;
  }
}

/* -------------------------------------------------------------
   MOBILE ACTIONS (Bottom padding for iPhones)
------------------------------------------------------------- */
.mobile-actions {
  position: static;
  padding: 16px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  margin-top: 16px;
  text-align: center;
}

/* -------------------------------------------------------------
   REQUEST POPUP (Animated top notification)
------------------------------------------------------------- */
.request-popup {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 540px);
  z-index: 2000;
  pointer-events: none;
}

/* Animation-ready card */
.request-popup-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(243, 237, 228, 0.92));
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 50px rgba(193, 153, 101, 0.25), 0 10px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(-140%);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.25s ease;
  pointer-events: auto;
  direction: ltr;
  backdrop-filter: blur(6px);
}

/* -------------------------------------------------------------
   REQUEST POPUP (Show State)
   - When .show is added, the popup slides down and becomes visible
------------------------------------------------------------- */
.request-popup.show .request-popup-card {
  transform: translateY(0);
  opacity: 1;
}

/* -------------------------------------------------------------
   REQUEST POPUP: Icon Ring
   - Circular animated icon background
   - Uses pulse animation (defined below)
------------------------------------------------------------- */
.request-popup .icon-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(193, 153, 101, 0.15));
  color: #c19965;
  box-shadow: inset 0 0 0 1px rgba(193, 153, 101, 0.35), 0 12px 32px rgba(193, 153, 101, 0.28);
  animation: pulse-ring 1.8s infinite;
}

/* Popup text elements */
.request-popup .request-popup-copy {
  color: #0f172a;
  text-align: start;
}

.request-popup .request-popup-body {
  font-weight: 700;
  font-size: 15px;
}

/* Close button appearance override */
.request-popup .btn-close {
  filter: invert(1) grayscale(1) brightness(0.3);
}

/* Hover effect for popup */
.request-popup:hover .request-popup-card {
  box-shadow: 0 22px 60px rgba(193, 153, 101, 0.3);
}

/* -------------------------------------------------------------
   TOAST COMPONENT
   - Min width ensures consistent size
------------------------------------------------------------- */
.toast {
  min-width: 320px;
}

/* -------------------------------------------------------------
   FOOTER
------------------------------------------------------------- */
.app-footer {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 24px;
  padding: 12px 8px calc(12px + env(safe-area-inset-bottom, 0px));
}

/* -------------------------------------------------------------
   ADMIN DASHBOARD STATS GRID
------------------------------------------------------------- */
.admin-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 12px 0;
}

/* Individual stat card */
.stat-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.stat-card h4 {
  margin: 0;
  font-weight: 800;
  color: var(--primary);
}

/* -------------------------------------------------------------
   TOOLBAR (Filters, actions)
------------------------------------------------------------- */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Select element with pill shape */
.pill-select {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  padding-inline: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

/* -------------------------------------------------------------
   MODERN TABLE STYLE
------------------------------------------------------------- */
.modern-table tbody tr {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

/* Row hover effect */
.modern-table tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.modern-table tbody tr td {
  border: none;
}

/* Small button inside table */
.modern-table .btn.btn-sm {
  border-radius: 10px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.modern-table .btn.btn-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

/* -------------------------------------------------------------
   LOGIN PAGE STYLES
------------------------------------------------------------- */
body.login-bg {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.login-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.login-logo {
  width: 80px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.btn-login {
  background-color: var(--accent);
  border: none;
  color: white;
  font-weight: 700;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.btn-login:hover {
  background-color: #1f7a73;
  transform: scale(1.02);
}

/* -------------------------------------------------------------
   SETTINGS PAGE (Admin)
------------------------------------------------------------- */
.settings-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.settings-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.settings-list .setting-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.25s, transform 0.2s;
}

.settings-list .setting-item:hover {
  background: #f0fdf4;
  transform: translateX(4px);
}

.setting-name {
  font-weight: 600;
  color: #1f2937;
}

.setting-value {
  background: #e9f5f4;
  color: #1f7a73;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
}

/* Edit button */
.btn-edit {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s;
}

.btn-edit:hover {
  background: #1f7a73;
}

/* -------------------------------------------------------------
   GLOBAL ANIMATIONS
------------------------------------------------------------- */
@keyframes pulse-ring {
  0%   { transform: scale(1);   box-shadow: inset 0 0 0 1px rgba(193, 153, 101, 0.35), 0 12px 32px rgba(193, 153, 101, 0.28); }
  50%  { transform: scale(1.06); box-shadow: inset 0 0 0 1px rgba(193, 153, 101, 0.45), 0 16px 38px rgba(193, 153, 101, 0.35); }
  100% { transform: scale(1);   box-shadow: inset 0 0 0 1px rgba(193, 153, 101, 0.35), 0 12px 32px rgba(193, 153, 101, 0.28); }
}

@keyframes pulse-badge {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.1); }
}

/* Notification badge animation */
#globalPendingBadge {
  animation: pulse-badge 2s infinite;
  box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

/* -------------------------------------------------------------
   PWA INSTALL BANNER (Add to Home Screen prompt)
------------------------------------------------------------- */
.pwa-install-banner {
  position: fixed;
  right: 16px;
  left: auto;
  bottom: 16px;
  z-index: 1080;
  display: grid;
  gap: 12px;
  padding: 16px;
  align-items: center;
  width: min(420px, calc(100% - 32px));
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Visible state */
.pwa-install-banner.visible {
  opacity: 1;
  transform: translateY(0);
}

.pwa-install-body {
  display: flex;
  gap: 12px;
  align-items: center;
}

.pwa-install-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #f6eee0, #f3e9dc);
  overflow: hidden;
}

.pwa-install-icon img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.pwa-install-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* -------------------------------------------------------------
   RESPONSIVE (Mobile & Sunmi devices)
------------------------------------------------------------- */
@media (max-width: 768px) {
  .app-wrapper {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 110px;
  }

  .app-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-right {
    width: 100%;
    justify-content: space-between;
  }

  /* Tabs become full width on mobile */
  .tab-switcher {
    grid-template-columns: 1fr;
  }

  .tab-pill {
    justify-content: space-between;
  }

  /* Ticket cards collapse to single column */
  .ticket-card {
    grid-template-columns: 1fr;
  }

  .ticket-actions {
    justify-content: flex-start;
  }

  /* Toast shrinks slightly */
  .toast {
    min-width: 260px;
  }

  /* PWA banner adjusts for small screens */
  .pwa-install-banner {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
  }

  .pwa-install-actions {
    flex-direction: row-reverse;
  }
}

