:root {
  color-scheme: light;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg: #e5eef8;
  --surface: #ffffff;
  --surface-soft: rgba(255,255,255,0.92);
  --text: #0f172a;
  --muted: #475569;
  --border: rgba(71,85,105,0.18);
  --primary: #1d4ed8;
  --primary-soft: #bfdbfe;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow: 0 24px 60px rgba(15,23,42,0.08);
  --sidebar-gradient: linear-gradient(180deg, #0c2340 0%, #061324 100%);
  --card-gradient: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(59,130,246,0.08));
  --spotlight: rgba(255,255,255,0.16);
  --sidebar-border: rgba(59,130,246,0.22);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  transition: background .35s ease, color .35s ease;
}

body[data-theme='dark'] {
  color-scheme: dark;
  --bg: #090b14;
  --surface: rgba(15,23,42,0.92);
  --surface-soft: #111827;
  --text: #eff6ff;
  --muted: #94a3b8;
  --border: rgba(148,163,184,0.12);
  --primary: #38bdf8;
  --primary-soft: #0284c7;
  --accent: #06b6d4;
  --accent-soft: #0e7490;
  --danger: #f87171;
  --success: #4ade80;
  --shadow: 0 30px 70px rgba(0,0,0,0.45);
  --sidebar-gradient: linear-gradient(180deg, #09172e 0%, #030a17 100%);
  --sidebar-border: rgba(56,189,248,0.2);
  --card-gradient: linear-gradient(135deg, rgba(14,165,233,.14), rgba(6,182,212,.08));
  --spotlight: rgba(255,255,255,.08);
  background: radial-gradient(circle at 10% 10%, rgba(56,189,248,.08), transparent 16%), radial-gradient(circle at 90% 20%, rgba(6,182,212,.08), transparent 18%), linear-gradient(180deg, #04060f 0%, #090b14 100%);
}

* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.page-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: 260px;
  min-width: 260px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background: var(--sidebar-gradient);
  color: #e2e8f0;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 6px 0 30px rgba(0,0,0,.2);
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), padding 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: width, padding;
}

.main-content {
  flex: 1;
  margin-left: 260px;
  width: calc(100% - 260px);
  min-width: 0;
  padding: 28px 32px;
  transition: margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 100vh;
  will-change: margin-left, width;
}

@media (max-width: 1000px) {
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 16px;
    padding-top: 70px;
  }
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.sidebar-nav::-webkit-scrollbar { display: none !important; width: 0 !important; }

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 4px 10px 4px;
  flex-shrink: 0;
  min-height: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(37,99,235,0.35);
  transition: opacity 0.15s ease;
}

.brand-badge-icon svg {
  width: 18px;
  height: 18px;
}

.brand-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar .brand {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .brand-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#sidebar-toggle {
  min-width: 34px;
  min-height: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.85);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#sidebar-toggle:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.35);
  color: #ffffff;
}

#sidebar-toggle:active {
  transform: scale(0.96);
}

#sidebar-toggle svg {
  width: 18px;
  height: 18px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-section h3 {
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ══════════════════════════════════════════════════
   NAV MENU — clean left-aligned sidebar
   All items are <a class="nav-item"> with uniform 44px height.
   Dropdowns use .has-sub.open > .submenu CSS.
   ══════════════════════════════════════════════════ */

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-menu > li {
  width: 100%;
}

/* Every sidebar item: uniform 44px height, flex row, left-aligned */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: rgba(203,213,225,0.88);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item:hover {
  background: rgba(59,130,246,0.15);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(59,130,246,0.25);
  color: #ffffff;
  font-weight: 600;
}

/* Icon box: 28x28, square, left-fixed */
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.nav-icon svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  pointer-events: none;
}

/* Text label fills remaining space */
.nav-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

/* Chevron — rightmost inside .nav-item */
.nav-chev {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: rgba(148,163,184,0.6);
}

.nav-chev svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
  pointer-events: none;
  flex-shrink: 0;
}

.has-sub.open .nav-chev svg {
  transform: rotate(180deg);
}

.nav-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(148,163,184,0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 12px 6px 12px;
}

/* ── Submenu (hidden by default, CSS-driven) ──── */
.submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1),
              padding  0.2s ease,
              margin   0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.has-sub.open > .submenu {
  max-height: 400px;
  margin: 4px 0 8px 0;
  padding: 6px;
  background: rgba(3, 11, 26, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.submenu li {
  padding-left: 0;
  width: 100%;
}

.submenu a {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  color: rgba(203,213,225,0.85);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.submenu a .sub-bullet {
  font-size: 1.1rem;
  color: rgba(148,163,184,0.45);
  line-height: 1;
  margin-right: 2px;
}

.submenu a:hover {
  background: rgba(59,130,246,0.18);
  color: #ffffff;
}

.submenu a:hover .sub-bullet {
  color: #3b82f6;
}

.submenu a.active {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(2,132,199,0.35);
}

.submenu a.active .sub-bullet {
  color: #ffffff !important;
}

/* ── Filter bar active state (legacy) ─────────── */
.btn.filter-active,
.btn.secondary.filter-active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(37,99,235,0.3);
}

/* ═══════════════════════════════════════════════════════════════
   ADVANCED FILTER BAR  —  Premium Card-Based Design
   Each option is its own bordered card: icon + label + sub-label.
   Active card: vivid purple gradient (like reference image).
   ═══════════════════════════════════════════════════════════════ */

/* .advanced-filter-bar kept for customers.php search form compat */
.advanced-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Outer wrapper for the card-based filter */
.afb-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Horizontal row of cards */
.afb-cards-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Base card ─────────────────────────────────────── */
.afb-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease,
              transform 0.16s ease, box-shadow 0.16s ease;
  user-select: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.afb-card:hover {
  border-color: var(--primary);
  background: rgba(37,99,235,0.04);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37,99,235,0.12);
}

/* ── ACTIVE card — purple/violet gradient like reference image ── */
.afb-card.active {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(109,40,217,0.30);
}

.afb-card.active:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(109,40,217,0.40);
}

/* Subtle shimmer on active card */
.afb-card.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Card icon box ──────────────────────────────────── */
.afb-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(148,163,184,0.10);
  color: var(--muted);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.afb-card:hover .afb-card-icon {
  background: rgba(37,99,235,0.10);
  color: var(--primary);
}

.afb-card.active .afb-card-icon {
  background: rgba(255,255,255,0.20);
  color: #fff;
}

/* ── Card text ──────────────────────────────────────── */
.afb-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.afb-card-label {
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.15;
}

.afb-card-sub {
  font-size: 0.69rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
  line-height: 1.2;
}

.afb-card.active .afb-card-sub {
  color: rgba(255,255,255,0.68);
}

/* ── Custom Range card ──────────────────────────────── */
/* This card wraps a <form> and contains date inputs */
.afb-custom-card {
  align-items: flex-start;
  cursor: default;
  padding-bottom: 11px;
}

.afb-date-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}

.afb-date-in {
  height: 22px;
  width: 98px;
  padding: 0 5px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
  flex-shrink: 0;
}

.afb-date-in:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.14);
}

/* Date inputs on active (gradient) background */
.afb-custom-card.active .afb-date-in {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.30);
  color: #fff;
}

.afb-date-sep {
  font-size: 0.85rem;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
}

.afb-custom-card.active .afb-date-sep {
  color: rgba(255,255,255,0.60);
}

/* Apply button inside the custom card */
.afb-apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.71rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  flex-shrink: 0;
  transition: filter 0.14s, transform 0.14s;
}

.afb-apply-btn:hover {
  filter: brightness(1.14);
  transform: translateY(-1px);
}

/* Apply btn when custom card is active (gradient bg) */
.afb-custom-card.active .afb-apply-btn {
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.32);
  color: #fff;
}

/* ── Reset card ─────────────────────────────────────── */
.afb-reset-card {
  border-style: dashed;
  align-self: center;
}

.afb-reset-card:hover {
  border-color: var(--danger);
  background: rgba(220,38,38,0.05);
  color: var(--danger);
  box-shadow: 0 4px 14px rgba(220,38,38,0.12);
}

.afb-reset-card:hover .afb-card-icon {
  background: rgba(220,38,38,0.10);
  color: var(--danger);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .afb-cards-row { gap: 7px; }
}

@media (max-width: 860px) {
  .afb-card { padding: 8px 11px; }
  .afb-card-icon { width: 28px; height: 28px; }
  .afb-date-in { width: 84px; }
}

@media (max-width: 640px) {
  .afb-cards-row { gap: 6px; }
  .afb-card { flex: 1 1 130px; }
  .afb-custom-card { flex-basis: 100%; }
  .afb-date-row { flex-wrap: wrap; }
  .afb-date-in { flex: 1; width: auto; height: 26px; }
  .afb-date-sep { display: none; }
  .afb-apply-btn { flex: 1; height: 26px; }
}

@media (max-width: 400px) {
  .afb-cards-row { flex-direction: column; }
  .afb-card { width: 100%; flex: none; }
}


.filter-summary {
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(59,130,246,0.04));
  border: 1.5px solid rgba(37,99,235,0.16);
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
  overflow-x: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}

.filter-summary:hover {
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(59,130,246,0.08));
  border-color: rgba(37,99,235,0.24);
  box-shadow: 0 6px 16px rgba(37,99,235,0.14);
}

.filter-summary strong { 
  color: var(--primary);
  font-weight: 700;
}

body[data-theme='dark'] .filter-summary {
  background: linear-gradient(135deg, rgba(129,140,248,0.1), rgba(99,102,241,0.05));
  border-color: rgba(129,140,248,0.2);
}

body[data-theme='dark'] .filter-summary:hover {
  background: linear-gradient(135deg, rgba(129,140,248,0.15), rgba(99,102,241,0.1));
  border-color: rgba(129,140,248,0.3);
}

.sales-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sales-toolbar-actions .btn,
.sales-toolbar-actions .btn.secondary,
.sales-toolbar-actions .btn.btn-ghost {
  min-width: 138px;
  justify-content: center;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(99,102,241,0.18);
}

.sales-toolbar-actions .btn {
  background: linear-gradient(135deg, rgba(99,102,241,0.95), rgba(139,92,246,0.92));
  border-color: transparent;
}

.sales-toolbar-actions .btn.secondary {
  background: rgba(59,130,246,0.12);
  border-color: rgba(96,165,250,0.35);
  color: #e2e8f0;
}

.sales-toolbar-actions .btn.btn-ghost {
  background: rgba(148,163,184,0.06);
  border-color: rgba(148,163,184,0.18);
  color: #f8fafc;
}



/* ── SweetAlert2 — Zia theme ──────────────────── */
.swal2-popup.zia-swal {
  border-radius: 18px !important;
  border: 1px solid var(--border, rgba(148,163,184,0.2)) !important;
  font-family: inherit !important;
  padding: 28px 24px 22px !important;
}
body[data-theme='dark'] .swal2-popup.zia-swal {
  background: #1e2535 !important;
  color: #e2e8f0 !important;
}
.swal2-popup.zia-swal .swal2-title {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: var(--text, #0f172a) !important;
}
body[data-theme='dark'] .swal2-popup.zia-swal .swal2-title { color: #f1f5f9 !important; }
.swal2-popup.zia-swal .swal2-html-container {
  font-size: 0.95rem !important;
  color: var(--muted, #64748b) !important;
}
.swal2-popup.zia-swal .swal2-actions { gap: 10px !important; margin-top: 18px !important; }
.swal2-popup.zia-swal .swal2-confirm.btn {
  padding: 11px 24px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  min-width: 100px;
}
.swal2-popup.zia-swal .swal2-cancel.btn.secondary {
  padding: 11px 24px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  min-width: 100px;
}
.swal2-popup.zia-swal .swal2-icon { transform: scale(0.85); margin: 8px auto 14px !important; }
.swal2-popup.zia-swal .swal2-title,
.swal2-popup.zia-swal .swal2-html-container,
.swal2-popup.zia-swal .swal2-actions {
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: center !important;
}
.swal2-popup.zia-swal .swal2-actions {
  gap: 10px !important;
  justify-content: center !important;
}

/* ── Select / dropdown fix — always readable ─── */
select.input option {
  background: var(--surface, #1e2535);
  color: var(--text, #e2e8f0);
}
[data-theme="light"] select.input option {
  background: #ffffff;
  color: #0f172a;
}

/* ── Customer Autocomplete Dropdown ─────────── */
.cust-autocomplete {
  position: relative;
}
.cust-autocomplete-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface-soft, #1e2535);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  z-index: 1000;
  max-height: 220px;
  overflow-y: auto;
}
.cust-autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.12s;
  border-bottom: 1px solid var(--border);
}
.cust-autocomplete-item:last-child { border-bottom: none; }
.cust-autocomplete-item:hover,
.cust-autocomplete-item.selected {
  background: rgba(37,99,235,0.12);
  color: var(--primary);
}
.cust-autocomplete-item .cust-name { font-weight: 600; color: var(--text); }
.cust-autocomplete-item .cust-phone { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ── Sidebar Bottom ──────────────────────────── */
.sidebar-bottom {
  margin-top: auto;
  flex-shrink: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.sidebar-profile-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.profile-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.profile-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
}

.profile-online-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0f172a;
}

.profile-user-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.profile-user-name {
  font-weight: 700;
  font-size: 0.86rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-user-role {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.profile-logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  transform: scale(1.05);
}

.profile-logout-btn svg {
  width: 15px;
  height: 15px;
}

/* ── Opaque & Blurred Profile Dropdown Menu ── */
.profile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2), 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  z-index: 1050 !important;
  padding: 8px !important;
  flex-direction: column;
  gap: 3px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

body[data-theme='dark'] .profile-menu {
  background: #0f172a !important;
  background-color: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.profile-menu-header {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.profile-menu-item:hover {
  background: rgba(37, 99, 235, 0.12) !important;
  color: var(--primary) !important;
}

.profile-menu-item.logout-item {
  color: #ef4444 !important;
}

.profile-menu-item.logout-item:hover {
  background: rgba(239, 68, 68, 0.14) !important;
  color: #f87171 !important;
}

/* ── Brand Actions ────────────────────────────── */
.brand-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

/* ── Sidebar Scrollbar Hide ── */
.sidebar,
.sidebar-nav {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Smooth transition for internal sidebar text & badges */
.sidebar .brand-info,
.sidebar .nav-text,
.sidebar .nav-chev,
.sidebar .nav-section-title,
.sidebar .profile-user-details,
.sidebar .profile-logout-btn {
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
}

/* ── Sidebar Collapsed (Universal across all resolutions & scale factors) ── */
.sidebar.collapsed {
  width: 72px !important;
  min-width: 72px !important;
  padding: 14px 8px !important;
}

@media (min-width: 1001px) {
  .sidebar.collapsed ~ .main-content,
  .sidebar.collapsed + .sidebar-overlay + .mobile-topbar + .main-content {
    margin-left: 72px !important;
    width: calc(100% - 72px) !important;
  }
}

/* Header in collapsed mode: stack Phone Icon and 3-Dots Hamburger Button down exact vertical center line */
.sidebar.collapsed .sidebar-brand {
  border-bottom: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 0 6px 0 !important;
  width: 100% !important;
}

.sidebar.collapsed .brand-badge-icon {
  display: flex !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  margin: 0 auto !important;
  border-radius: 9px !important;
  align-items: center !important;
  justify-content: center !important;
}

.sidebar.collapsed .brand-info {
  opacity: 0 !important;
  pointer-events: none !important;
  display: none !important;
}

.sidebar.collapsed .brand-actions {
  width: 100% !important;
  justify-content: center !important;
  display: flex !important;
}

.sidebar.collapsed #sidebar-toggle {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border-radius: 8px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Nav Menu in collapsed mode: perfectly aligned vertical column */
.sidebar.collapsed .nav-menu {
  align-items: center !important;
  gap: 6px !important;
}

.sidebar.collapsed .nav-menu > li {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

.sidebar.collapsed .nav-item {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  margin: 0 auto !important;
  justify-content: center !important;
  align-items: center !important;
  border-radius: 12px !important;
  position: relative !important;
}

.sidebar.collapsed .nav-icon {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  margin: 0 !important;
  background: transparent !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.sidebar.collapsed .nav-item:hover .nav-icon {
  background: transparent !important;
}

.sidebar.collapsed .nav-icon svg {
  width: 20px !important;
  height: 20px !important;
}

/* Hide labels, chevrons, submenus, section titles ALWAYS in collapsed mode */
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-chev,
.sidebar.collapsed .submenu,
.sidebar.collapsed .nav-section-title {
  opacity: 0 !important;
  pointer-events: none !important;
  display: none !important;
}

/* Badge in collapsed mode: small dot/counter on top-right of nav item */
.sidebar.collapsed .nav-badge {
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
  margin-left: 0 !important;
  font-size: 0.65rem !important;
  padding: 1px 5px !important;
  min-width: 16px !important;
  height: 16px !important;
  line-height: 14px !important;
  border-radius: 99px !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7) !important;
  z-index: 2 !important;
}

/* ── Body-Level Fixed Floating Tooltip Badge ── */
#zia-floating-tooltip {
  display: none !important;
  position: fixed !important;
  z-index: 9999999 !important;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  color: #ffffff !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.15s ease, transform 0.15s ease !important;
  transform: translateX(-4px) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 14px rgba(37, 99, 235, 0.3) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
}

#zia-floating-tooltip.show {
  display: flex !important;
  align-items: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
}

/* Collapsed Profile Card */
.sidebar.collapsed .sidebar-profile-card {
  justify-content: center !important;
  padding: 4px !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  margin: 0 auto !important;
}

.sidebar.collapsed .profile-user-details,
.sidebar.collapsed .profile-logout-btn {
  display: none !important;
}

/* Header Dark/Light Theme Switch Button styling */
.theme-switch-btn,
#theme-switch {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  padding: 0 !important;
  outline: none !important;
}

html[data-theme='dark'] .theme-switch-btn,
html[data-theme='dark'] #theme-switch {
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25) !important;
}

html[data-theme='dark'] .theme-switch-btn svg,
html[data-theme='dark'] #theme-switch svg {
  stroke: #f59e0b !important;
  fill: none !important;
  width: 20px !important;
  height: 20px !important;
}

html[data-theme='light'] .theme-switch-btn,
html[data-theme='light'] #theme-switch {
  background: rgba(99, 102, 241, 0.14) !important;
  border: 1.5px solid rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2) !important;
}

html[data-theme='light'] .theme-switch-btn svg,
html[data-theme='light'] #theme-switch svg {
  stroke: #6366f1 !important;
  fill: none !important;
  width: 20px !important;
  height: 20px !important;
}

.theme-switch-btn:hover,
#theme-switch:hover {
  transform: scale(1.1) rotate(15deg) !important;
}


.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 28px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(238,246,255,0.98) 100%);
  border: 1.5px solid rgba(37,99,235,0.22);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(37,99,235,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

body[data-theme='dark'] .topbar {
  background: linear-gradient(135deg, rgba(15,23,42,0.95) 0%, rgba(30,41,59,0.92) 100%);
  border: 1.5px solid rgba(99,102,241,0.35);
  box-shadow: 0 12px 35px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}

.topbar h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.topbar p {
  margin: 4px 0 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.topbar .actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.card-grid,
.chart-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  grid-auto-rows: 1fr;
}

@media (max-width: 1100px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Premium Advanced Metric Card Styling */
.dash-metric-card {
  background: var(--surface-card, #0e1322);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease-in-out;
  height: 100%;
}

html[data-theme='light'] .dash-metric-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.dash-metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.dash-metric-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

.dash-metric-header i,
.dash-metric-header svg {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2.3px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.dash-metric-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-metric-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

.dash-metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text, #f8fafc);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.dash-metric-footer {
  display: flex;
  align-items: center;
  margin-top: 6px;
  min-height: 20px;
}

.dash-metric-subbadge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  width: 100%;
}

@media (max-width: 900px) {
  .bottom-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.bottom-grid > .card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 24px;
  box-sizing: border-box;
}

.dash-bottom-card-body {
  flex: 1;
  overflow-y: auto;
  max-height: 380px;
  padding-right: 4px;
}

.dash-bottom-card-body::-webkit-scrollbar {
  width: 5px;
}

.dash-bottom-card-body::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.05);
  border-radius: 10px;
}

.dash-bottom-card-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 10px;
}

.dash-bottom-card-footer {
  flex-shrink: 0;
  text-align: center;
  padding-top: 14px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
}

.card {
  background: var(--surface);
  border-radius: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  color: var(--text);
}

/* Invoice specific styles */
.invoice-content {
  background: #ffffff;
  color: #0f172a;
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(2,6,23,0.06);
  max-width: 900px;
}
.invoice-header { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.invoice-company h2 { margin:0 0 6px 0; color:#0f172a }
.invoice-meta { display:flex; flex-direction:column; gap:8px; text-align:right }
.invoice-table th, .invoice-table td { padding:10px; }
.invoice-table thead th { background:#f1f5f9; color:#0f172a; font-weight:700 }
.invoice-table tbody tr td { border-bottom:1px solid #edf2f7 }
.invoice-summary { display:flex; justify-content:space-between; gap:20px; margin-top:14px }
.invoice-totals div { display:flex; justify-content:space-between; gap:12px; padding:6px 0 }
.invoice-note { margin-top:14px; color:#475569 }

@media print {
  body * { visibility: hidden }
  .invoice-content, .invoice-content * { visibility: visible }
  .invoice-content { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ── Brand Actions ────────────────────────────── */
.brand-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}




.card h2 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--muted);
}

.card p {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.status-badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-badge.success { background: rgba(22,163,74,.12); color: #a7f3d0; }
.status-badge.warning { background: rgba(250,204,21,.16); color: #92400e; }
.status-badge.danger { background: rgba(220,38,38,.12); color: #991b1b; }

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 18px;
  background: transparent;
  min-width: 600px; /* Ensure table doesn't squish too much */
}

.table th,
.table td {
  padding: 14px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.table th:last-child,
.table td:last-child {
  border-right: none !important;
}

.submenu a svg { pointer-events: none; }
.table th {
  background: rgba(148,163,184,0.1);
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
  border-right: 1px solid var(--border);
}
.table th:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.table th:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-right: none !important; }

.table tbody tr:hover {
  background: rgba(59,130,246,0.04);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Ensure labels in grid forms stack label text above inputs to avoid overlap */
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.form-grid label > .input,
.form-grid label > .select,
.form-grid label > .textarea {
  width: 100%;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
body[data-theme='dark'] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.select option,
.select optgroup {
  color: var(--text);
  background: var(--surface-soft);
}

.textarea { min-height: 140px; resize: vertical; }

/* ─────────────────────────────────────────────────────────
   ORIGINAL CLEAN ELEGANT BUTTON SYSTEM
   ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary, #38bdf8), var(--accent, #06b6d4));
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.93rem;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.25);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.35);
  color: #ffffff !important;
}

.btn:active {
  transform: translateY(1px);
}

/* Secondary Button */
.btn.secondary {
  background: rgba(148, 163, 184, 0.1) !important;
  color: var(--text) !important;
  box-shadow: none !important;
  border: 1px solid var(--border) !important;
}

.btn.secondary:hover {
  background: rgba(148, 163, 184, 0.2) !important;
  border-color: var(--primary) !important;
  color: var(--text) !important;
  transform: translateY(-2px);
}

/* PDF Download Button */
.btn.pdf-download,
.pdf-download {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.3) !important;
  border: none !important;
}

.btn.pdf-download:hover,
.pdf-download:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.4) !important;
  color: #ffffff !important;
}

/* Print Button */
.print-btn,
.btn.print-btn {
  background: linear-gradient(135deg, #06b6d4 0%, #38bdf8 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3) !important;
}

.print-btn:hover,
.btn.print-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.4) !important;
}

/* Customer Type Filter Cards */
.customer-type-card {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft, rgba(30, 41, 59, 0.4));
  transition: all 0.2s ease;
  cursor: pointer;
}

.customer-type-card.customer-active {
  background: linear-gradient(135deg, var(--primary, #38bdf8), var(--accent, #06b6d4)) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.28) !important;
}

.customer-type-card:hover:not(.customer-active) {
  border-color: var(--primary) !important;
  background: rgba(56, 189, 248, 0.08) !important;
}

/* Danger / Delete Buttons */
.btn.danger,
.btn-danger,
.btn-delete,
.btn-remove {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  box-shadow: none !important;
}

.btn.danger:hover,
.btn-danger:hover,
.btn-delete:hover,
.btn-remove:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #dc2626 !important;
  border-color: #ef4444 !important;
  transform: translateY(-2px);
}

/* Action Icon Buttons for Tables (Matches All Products Page) */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-icon:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.08);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.btn-icon.delete,
.btn-icon.btn-remove {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.btn-icon.delete:hover,
.btn-icon.btn-remove:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #dc2626 !important;
  border-color: #ef4444 !important;
  transform: scale(1.08);
}

/* ─────────────────────────────────────────────────────────
   ADVANCED POS CART EDIT & DELETE BUTTON SYSTEM
   ───────────────────────────────────────────────────────── */
.btn-cart-edit {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.15);
}

.btn-cart-edit:hover {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  transform: translateY(-2px) scale(1.14);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.45);
}

.btn-cart-del {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1.5px solid rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

.btn-cart-del:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  transform: translateY(-2px) scale(1.14);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

.pos-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.pos-qty-btn:hover {
  background: linear-gradient(135deg, var(--primary, #38bdf8), var(--accent, #06b6d4));
  color: #ffffff;
  border-color: transparent;
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}
.btn-icon.delete:hover,
.btn-icon.btn-remove:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #dc2626 !important;
  border-color: #ef4444 !important;
}

.btn.btn-ghost {
  background: rgba(255,255,255,.08);
  color: inherit;
  border: 1px solid rgba(255,255,255,.12);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.badge.success { background: rgba(22,163,74,.12); color: #166534; }
.badge.warning { background: rgba(250,204,21,.14); color: #ffffff; }
.badge.danger { background: rgba(220,38,38,.12); color: #ffffff; }

.notification-bell {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: rgba(248,250,252,.9);
  border-radius: 18px;
  border: 1px solid var(--border);
}

.notification-bell span {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 999px;
}

.chart-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 16px;
}

.chart-row .label {
  color: var(--muted);
  font-size: 0.92rem;
}

.chart-bar-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(148,163,184,.12);
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79,70,229,0.9), rgba(37,99,235,0.7));
}

.alert {
  border-radius: 18px;
  padding: 18px 20px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(254,226,226,.4);
  border: 1px solid rgba(220,38,38,.2);
  color: #991b1b;
  margin-bottom: 18px;
}

.alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(220,38,38,.12);
}

.filter-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
  color: var(--muted);
}

.quick-actions span {
  font-size: 0.95rem;
  color: var(--muted);
  margin-right: 8px;
}

.login-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, #0a1123 0%, #111827 50%, #161e2f 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(12, 32, 64, 0.92);
  border-radius: 28px;
  padding: 36px;
  box-shadow: 0 32px 72px rgba(10, 25, 54, 0.25);
  border: 1px solid rgba(255,255,255,0.12);
}

.login-brand {
  margin-bottom: 28px;
}

.brand {
  font-size: 1.8rem;
  letter-spacing: 0.14em;
  color: #e2e8f0;
}

.login-subtitle {
  margin: 12px 0 0;
  color: rgba(226, 232, 240, 0.8);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form .input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #f8fafc;
}

.login-form .input::placeholder {
  color: rgba(248,250,252,0.7);
}

.login-footer {
  margin-top: 20px;
  color: rgba(226, 232, 240, 0.74);
  font-size: 0.95rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 24px 0 12px;
}

.quick-action-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 18px;
  border-radius: 24px;
  background: rgba(30,41,59,0.9);
  color: #f8fafc;
  font-weight: 700;
  box-shadow: 0 22px 50px rgba(0,0,0,0.22);
  border: 1px solid rgba(148,163,184,0.12);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.quick-action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 64px rgba(0,0,0,0.28);
  background: rgba(59,130,246,0.18);
}

.invoice-content {
  padding: 32px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(15,23,42,.16);
  border: 1px solid rgba(148,163,184,.14);
}

.invoice-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.invoice-company h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}

.invoice-meta {
  display: grid;
  gap: 12px;
  text-align: right;
}

.invoice-meta div {
  background: rgba(248,250,252,.9);
  border-radius: 18px;
  padding: 14px 18px;
}

.invoice-table th,
.invoice-table td {
  padding: 18px 16px;
}

.invoice-summary {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-top: 28px;
}

.invoice-totals {
  display: grid;
  gap: 12px;
}

.invoice-totals div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(248,250,252,.9);
}

.invoice-note {
  margin-top: 28px;
  color: var(--muted);
  line-height: 1.7;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  align-items: flex-end;
}

.report-panel {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.summary-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.summary-card h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.summary-card p {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 20px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 600;
}

/* Table Responsive Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Modern Filter Bar */
.modern-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  background: rgba(15,23,42,0.03);
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
}
body[data-theme='dark'] .modern-filter-bar {
  background: rgba(255,255,255,0.03);
}
.modern-filter-bar label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}
.modern-filter-bar .input {
  width: auto;
  padding: 10px 14px;
  border-radius: 12px;
}

/* PDF Download Button */
.btn.pdf-download {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
  border: none;
}
.btn.pdf-download:hover {
  box-shadow: 0 15px 30px rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}


/* ═══════════════════════════════════════════════════
   MOBILE TOPBAR & OVERLAY (≤1000px)
   Sticky top bar + side navigation overlay
   ═══════════════════════════════════════════════════ */

/* Smooth Scroll & Global Scrollbar Setup */
html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Elegant Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.45);
}

/* Mobile top header bar — hidden on desktop */
.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 990;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  backdrop-filter: blur(8px);
}

.mobile-brand-title {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

/* Mobile hamburger button */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(37,99,235,0.1);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.mobile-menu-btn:active {
  transform: scale(0.95);
}

.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
}

/* Sidebar backdrop overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Table Responsive Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
  border-radius: 12px;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.25);
  border-radius: 6px;
}

@media (max-width: 1000px) {
  .page-wrapper { flex-direction: column; }

  /* Display mobile topbar & hamburger menu button */
  .mobile-topbar { display: flex; }
  .mobile-menu-btn { display: inline-flex; }

  /* Hide page content theme button on mobile screens so only 1 theme button is shown in mobile topbar */
  .topbar #theme-switch,
  .topbar .theme-switch-btn,
  .topbar .header-theme-toggle {
    display: none !important;
  }

  /* Sidebar — fixed slide-in overlay from left */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 20px 16px !important;
    gap: 16px !important;
    box-shadow: 15px 0 50px rgba(0,0,0,0.3);
  }

  .sidebar.sidebar-open {
    transform: translateX(0);
  }

  .sidebar-nav { overflow-x: hidden; overflow-y: auto; }
  .nav-menu {
    flex-direction: column !important;
    display: flex;
    gap: 2px !important;
  }
  .nav-menu li { min-width: unset; }
  .nav-menu a {
    white-space: nowrap;
    font-size: 0.92rem;
  }
  .submenu { display: flex !important; }
  .has-sub:not(.open) > .submenu { max-height: 0 !important; display: flex !important; }
  .sidebar-bottom { display: flex; }
  .sidebar .brand { display: block; font-size: 1rem; }
  .sidebar .brand-sub { display: block; }

  /* Main content padding & margin adjustment for mobile */
  .main-content {
    padding: 18px 20px;
    margin-left: 0 !important;
    width: 100% !important;
  }

  .topbar h1 { font-size: 1.4rem; }
  .topbar p { font-size: 0.85rem; }
}

@media (max-width: 768px) {
  .main-content {
    padding: 14px 10px;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden;
  }
  
  .topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }
  .topbar .actions {
    width: auto;
    flex-wrap: nowrap;
    gap: 8px;
    display: flex;
    align-items: center;
  }
  .topbar .actions .btn:not(.theme-switch-btn):not(.icon-btn) {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 42px;
  }

  .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    margin-top: 12px;
  }

  .table th, .table td {
    padding: 10px 8px;
    font-size: 0.84rem;
  }

  .sales-toolbar-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .sales-toolbar-actions .btn,
  .sales-toolbar-actions .btn.secondary,
  .sales-toolbar-actions .btn.btn-ghost {
    min-width: unset;
    flex: 1 1 120px;
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .quick-action-card {
    padding: 14px 12px;
    font-size: 0.88rem;
  }

  .charts-grid,
  .bottom-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}

@media (max-width: 640px) {
  .topbar h1 { font-size: 1.2rem; }
  .topbar p { font-size: 0.8rem; }
  .filter-row { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; gap: 10px; }
  .summary-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .card { padding: 14px 12px; border-radius: 16px; }
  
  /* Touch target sizes for inputs and buttons */
  .btn {
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 44px;
    border-radius: 12px;
  }
  .input, .select, .textarea {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
    min-height: 44px;
  }
  .icon-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 576px) {
  .main-content { padding: 10px 8px; }
  .topbar h1 { font-size: 1.1rem; }
  .card { padding: 12px 10px; border-radius: 14px; }
  .actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  .actions-row .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .summary-grid { grid-template-columns: 1fr !important; }
  .afb-cards-row { flex-direction: column; }
  .afb-card { width: 100%; }
}

@media print {
  body { background: #fff; }
  .sidebar, .mobile-topbar, .topbar.no-print, .btn, .form-grid, .nav-menu, .notification-bell { display: none !important; }
  .main-content { padding: 0; }
  .invoice-print { page-break-inside: avoid; }
}

/* ──────────────────────────────────────────────────
   PREMIUM HOVER EFFECTS & INTERACTIONS
   ────────────────────────────────────────────────── */

/* Sidebar Navigation Items: Smooth 3D Spring Mouse Hover */
.nav-item {
  position: relative;
}

/* Button hover effects: premium scale, shadow drop, and shine reflection */
.btn, button, input[type="submit"] {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}

.btn:hover, button:hover:not(.btn-icon) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25) !important;
  filter: brightness(1.08);
}

.btn:active, button:active {
  transform: translateY(1px);
}

/* Card hover: elevation lift and soft spotlight border glow */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow), 0 12px 30px rgba(0, 0, 0, 0.12) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
}

/* Table rows: hover highlighting */
.table tbody tr {
  transition: background-color 0.2s ease !important;
}

.table tbody tr:hover {
  background-color: rgba(59, 130, 246, 0.04) !important;
}

/* Action Icon Buttons: scale & color shift */
.btn-icon {
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-icon:hover {
  transform: scale(1.12);
  filter: brightness(1.15);
}

/* Compact Dark Mode Toggle Button for Header & Mobile Topbar */
#mobile-theme-switch,
.header-theme-toggle {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  background: rgba(148,163,184,0.1) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
}

#mobile-theme-switch:hover,
.header-theme-toggle:hover {
  background: rgba(59,130,246,0.15) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  transform: translateY(-1px) !important;
}

#mobile-theme-switch svg,
.header-theme-toggle svg,
.header-theme-toggle i {
  width: 17px !important;
  height: 17px !important;
}

/* Sidebar Bottom Admin Profile Card Alignment */
.sidebar-profile-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-top: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.profile-card-main {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 !important;
  min-width: 0 !important;
  text-decoration: none !important;
}

.profile-avatar-wrap {
  position: relative !important;
  width: 36px !important;
  height: 36px !important;
  flex-shrink: 0 !important;
}

.profile-avatar-img {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  object-fit: cover !important;
  background: rgba(37,99,235,0.2) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}

.profile-online-badge {
  position: absolute !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  border: 2px solid #0f172a !important;
}

.profile-user-details {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.profile-user-name {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
}

.profile-user-role {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #38bdf8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  margin-top: 1px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.profile-logout-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: rgba(239,68,68,0.12) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239,68,68,0.25) !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

.profile-logout-btn:hover {
  background: rgba(239,68,68,0.25) !important;
  color: #dc2626 !important;
}

.profile-logout-btn svg {
  width: 15px !important;
  height: 15px !important;
}

/* Profile Dropdown Menu Styling */
.profile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  z-index: 99999;
  backdrop-filter: blur(12px);
}

.profile-menu-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.profile-menu-item:hover {
  background: rgba(37,99,235,0.1);
  color: var(--primary);
}

.profile-menu-item.logout-item {
  color: #ef4444;
}

.profile-menu-item.logout-item:hover {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
}

/* ──────────────────────────────────────────────────
   LIGHTER COLORS & HEADER HOVER EFFECTS
   ────────────────────────────────────────────────── */

/* Header Titles Hover Color Effect */
.topbar h1,
.card h2,
.card-header h2,
.card-title {
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.topbar h1:hover,
.card h2:hover,
.card-header h2:hover,
.card-title:hover {
  color: var(--primary) !important;
  text-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

/* Stock Status Filter Buttons Hover */
.stock-tab-btn,
.catalog-tab-btn {
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.stock-tab-btn:hover:not(.active),
.catalog-tab-btn:hover:not(.active) {
  background: rgba(99, 102, 241, 0.12) !important;
  color: var(--primary) !important;
  border-color: rgba(99, 102, 241, 0.25) !important;
  transform: translateY(-1px);
}

/* Light Palette & Hover Effects for Critical Stock Items */
.stock-item-row[data-stock-status="out"] {
  background: rgba(239, 68, 68, 0.04) !important;
  border: 1px solid rgba(239, 68, 68, 0.12) !important;
  transition: all 0.22s ease !important;
}

.stock-item-row[data-stock-status="out"]:hover {
  background: rgba(239, 68, 68, 0.09) !important;
  border-color: rgba(239, 68, 68, 0.28) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.08);
}

.stock-item-row[data-stock-status="low"] {
  background: rgba(245, 158, 11, 0.04) !important;
  border: 1px solid rgba(245, 158, 11, 0.12) !important;
  transition: all 0.22s ease !important;
}

.stock-item-row[data-stock-status="low"]:hover {
  background: rgba(245, 158, 11, 0.09) !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08);
}

/* Product Catalog Table Rows Light Hover Effect */
.prod-row {
  transition: background 0.2s ease, transform 0.2s ease;
}

.prod-row:hover {
  background: rgba(99, 102, 241, 0.05) !important;
}

/* ─────────────────────────────────────────────────────────
   GLOBAL CLEAN SEARCH BAR STYLING & BLINKING CURSOR
   ───────────────────────────────────────────────────────── */

/* Universal Search Input Target */
input[type="search"],
input[id*="search"],
input[name*="search"],
input[class*="search"],
input[placeholder*="Search"],
input[placeholder*="search"],
input[placeholder*="Type"],
input[placeholder*="type"],
.pos-search-wrap #pos-search,
#loyal-search-input,
#cust-search-input,
#supp-search-input {
  background: var(--surface-soft, rgba(30, 41, 59, 0.5)) !important;
  border: 2px solid var(--border) !important;
  color: var(--text) !important;
  caret-color: #38bdf8 !important; /* Clean Sky Blue Blinking Cursor | */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.22s ease !important;
  font-weight: 600 !important;
}

/* Hover State */
input[type="search"]:hover,
input[id*="search"]:hover,
input[name*="search"]:hover,
input[class*="search"]:hover,
input[placeholder*="Search"]:hover,
input[placeholder*="search"]:hover,
input[placeholder*="Type"]:hover,
input[placeholder*="type"]:hover,
.pos-search-wrap #pos-search:hover,
#loyal-search-input:hover,
#cust-search-input:hover,
#supp-search-input:hover {
  border-color: #38bdf8 !important;
}

/* Focused State */
input[type="search"]:focus,
input[id*="search"]:focus,
input[name*="search"]:focus,
input[class*="search"]:focus,
input[placeholder*="Search"]:focus,
input[placeholder*="search"]:focus,
input[placeholder*="Type"]:focus,
input[placeholder*="type"]:focus,
.pos-search-wrap #pos-search:focus,
#loyal-search-input:focus,
#cust-search-input:focus,
#supp-search-input:focus {
  outline: none !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

/* Search Icon */
.pos-search-icon,
.search-icon,
[data-feather="search"] {
  color: #38bdf8 !important;
  transition: transform 0.2s ease;
}

/* ─────────────────────────────────────────────────
   Button Loading Spinner Disabled
   ───────────────────────────────────────────────── */
.btn-is-loading {
  /* Disabled per user request */
}




