/**
 * Carwash & Tire Sales Management System
 * SaaS Modern Theme Engine (Dark & Light)
 * Inspired by the Gym/Club Management System
 */

:root {
  --font-family-base: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: var(--font-family-base);
  --radius-xs: 0.35rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.35rem;
  --radius-full: 9999px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ==========================================================================
   Typography Theme Engine (Arabic Fonts & Proportional Sizing)
   ========================================================================== */
html[data-font-family="cairo"],
:root {
  --font-family-base: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: var(--font-family-base);
}

html[data-font-family="tajawal"] {
  --font-family-base: "Tajawal", "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: var(--font-family-base);
}

html[data-font-family="ibm_plex"] {
  --font-family-base: "IBM Plex Sans Arabic", "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: var(--font-family-base);
}

html[data-font-family="almarai"] {
  --font-family-base: "Almarai", "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: var(--font-family-base);
}

html[data-font-family="readex"] {
  --font-family-base: "Readex Pro", "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: var(--font-family-base);
}

html[data-font-family="alexandria"] {
  --font-family-base: "Alexandria", "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: var(--font-family-base);
}

/* System-wide Base Font Scaling (Affects all rem units proportionally) */
html[data-font-size="compact"] {
  font-size: 13.8px !important;
}

html[data-font-size="standard"],
html:not([data-font-size]) {
  font-size: 15px !important;
}

html[data-font-size="large"] {
  font-size: 16.5px !important;
}

body, button, input, select, textarea, table, kbd, h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-base) !important;
}

/* Dark Mode (Default / Sleek Obsidian & Cyber Blue) */
html {
  scroll-padding-top: 80px;
  scroll-behavior: smooth;
}

html,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090d14;
  --bg-gradient: radial-gradient(circle at 50% 0%, #111a28 0%, #090d14 75%);
  --surface: #111823;
  --surface-2: #16202e;
  --surface-card: #111823;
  --surface-elevated: #1c283a;
  --surface-hover: #1f2d42;
  --bg-card: #16202e;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.04);
  --border-focus: #0ea5e9;
  
  --brand: #0284c7;
  --brand-strong: #0369a1;
  --brand-light: #38bdf8;
  --brand-glow: rgba(2, 132, 199, 0.35);
  --brand-soft: rgba(2, 132, 199, 0.15);
  
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.15);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --info: #0ea5e9;
  --info-soft: rgba(14, 165, 233, 0.15);

  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --card-shadow-hover: 0 16px 40px -5px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(2, 132, 199, 0.3);
  --topbar-bg: rgba(17, 24, 35, 0.85);
  --focus-ring: 0 0 0 3px rgba(2, 132, 199, 0.35);
}

/* Light Mode */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-gradient: radial-gradient(circle at 50% 0%, #e2e8f0 0%, #f8fafc 75%);
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --surface-hover: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: #0284c7;
  
  --brand: #0284c7;
  --brand-strong: #0369a1;
  --brand-light: #38bdf8;
  --brand-glow: rgba(2, 132, 199, 0.2);
  --brand-soft: rgba(2, 132, 199, 0.1);
  
  --accent: #d97706;
  --accent-soft: rgba(217, 119, 6, 0.1);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.1);
  --info: #0284c7;
  --info-soft: rgba(2, 132, 199, 0.1);

  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 10px 30px -4px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--brand);
  --topbar-bg: rgba(255, 255, 255, 0.88);
  --focus-ring: 0 0 0 3px rgba(2, 132, 199, 0.25);
}

/* Base resets & typography */
* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  direction: rtl;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}


a {
  color: var(--brand-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand);
}

/* App Shell - Full Width Vertical Stack */
.app-shell,
.app-shell.app-shell--topbar {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  width: 100% !important;
  grid-template-columns: none !important;
}

/* Master Top Navigation Bar - 2-Tier Modern SaaS Header */
.app-top-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  min-height: auto !important;
  height: auto !important;
  padding: 0 !important;
  background: #0b111a !important;
  color: #f1f5f9 !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45) !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* Tier 1: Utility & Brand Bar (Top Row) */
.top-utility-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 52px;
  min-height: 52px;
  padding: 0 1.5rem !important;
  background: #0b111a !important; /* Premium deep dark obsidian */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-sizing: border-box;
  width: 100%;
}

/* Tier 2: Main Navigation Bar Row (Bottom Row) */
.top-navbar-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  height: 46px;
  min-height: 46px;
  padding: 0 1.5rem !important;
  background: #111a26 !important; /* Sleek navy */
  border-bottom: 2px solid var(--brand) !important;
  box-shadow: 0 2px 12px var(--brand-glow) !important;
  box-sizing: border-box;
  width: 100%;
  overflow: visible !important;
  position: relative;
  z-index: 990;
}

/* Brand */
.top-nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.top-nav-brand .brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-light), var(--brand)) !important;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 2px 10px var(--brand-glow) !important;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Navigation Links Row */
.top-nav-bar {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  justify-content: center;
  padding: 0;
  background: transparent !important;
  min-width: 0;
  overflow: visible !important;
  margin: 0 auto;
}

.top-nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  flex-wrap: nowrap;
  overflow: visible !important;
}

.top-nav-item {
  position: relative;
  flex-shrink: 0;
  overflow: visible !important;
}

.top-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.62rem;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.top-nav-link i {
  font-size: 1rem;
  color: #94a3b8;
  transition: color var(--transition-fast);
}

.top-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.top-nav-link:hover i {
  color: var(--brand-light);
}

.top-nav-link.is-active {
  color: #ffffff !important;
  background: var(--brand) !important;
  box-shadow: 0 2px 10px var(--brand-glow);
  border-color: var(--brand-light);
}

.top-nav-link.is-active i {
  color: #ffffff !important;
}

/* POS Button Highlight */
.top-nav-link--pos {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.35));
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
  font-weight: 800;
}

.top-nav-link--pos i {
  color: #34d399;
}

.top-nav-link--pos:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.top-nav-link--pos:hover i {
  color: #ffffff;
}

.top-nav-link--pos.is-active {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

/* Dropdown Group */
.top-nav-group {
  position: relative;
}

.top-nav-group > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.62rem;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.top-nav-group > summary::-webkit-details-marker {
  display: none;
}

.top-nav-group > summary .group-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.top-nav-group[open] > summary .group-arrow {
  transform: rotate(180deg);
}

.top-nav-group > summary:hover,
.top-nav-group[open]:not(.is-active) > summary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
}

.top-nav-group.is-active > summary {
  background: var(--brand-soft) !important;
  color: var(--brand-light) !important;
  border-color: var(--brand) !important;
  box-shadow: 0 0 10px var(--brand-glow) !important;
}

.top-nav-group.is-active > summary i {
  color: var(--brand-light) !important;
}

/* Dropdown Menu Panel */
.top-nav-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 235px;
  background: #152232;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  padding: 0.4rem;
  z-index: 2500 !important;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-nav-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 0;
  left: 0;
  height: 8px;
  background: transparent;
}

/* Prevent edge clipping on left-most items in RTL */
.top-nav-item:last-child .top-nav-menu,
.top-nav-item:nth-last-child(2) .top-nav-menu {
  right: auto;
  left: 0;
}

/* Desktop Hover & Open Synchronization */
@media (min-width: 993px) {
  .top-nav-group:hover > .top-nav-menu,
  .top-nav-group[open] > .top-nav-menu {
    display: flex !important;
  }

  .top-nav-group:hover > summary .group-arrow,
  .top-nav-group[open] > summary .group-arrow {
    transform: rotate(180deg);
  }

  .top-nav-group:hover > summary,
  .top-nav-group[open]:not(.is-active) > summary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.12);
  }
}

.top-nav-menu a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.top-nav-menu a i {
  font-size: 1rem;
  color: var(--brand-light);
  transition: transform var(--transition-fast);
}

.top-nav-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.top-nav-menu a:hover i {
  transform: translateX(-2px);
}

.top-nav-menu a.is-active {
  background: var(--brand-soft);
  color: var(--brand-light);
  font-weight: 700;
}

/* Nested Dropdown Submenu & Subgroup (قوائم متداخلة) */
.top-nav-subgroup {
  position: relative;
  display: flex;
  flex-direction: column;
}

.top-nav-subgroup summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  user-select: none;
  border: 1px solid transparent;
}

.top-nav-subgroup summary::-webkit-details-marker {
  display: none;
}

.top-nav-subgroup summary:hover,
.top-nav-subgroup[open] > summary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.top-nav-subgroup.is-active > summary {
  color: var(--brand-light);
  background: var(--brand-soft);
  border-color: rgba(16, 185, 129, 0.4);
}

.top-nav-subgroup.is-active > summary .subgroup-arrow {
  color: var(--brand-light);
}

.subgroup-arrow {
  font-size: 0.72rem;
  color: #94a3b8;
  transition: transform var(--transition-fast);
}

.top-nav-subgroup[open] > summary .subgroup-arrow {
  transform: rotate(-90deg);
}

.top-nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.35rem 0.5rem 0.45rem 0.5rem;
  margin: 0.2rem 0.3rem 0.4rem 0.3rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  animation: fadeInDown 0.15s ease-out;
}

.top-nav-submenu a {
  padding: 0.45rem 0.65rem;
  font-size: 0.81rem;
  border-radius: 4px;
}

.top-nav-submenu a i {
  font-size: 0.9rem;
}



/* Actions on Left */
.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Branch Switcher Dropdown in Top Nav */
.top-branch-dropdown {
  position: relative;
  flex-shrink: 0;
}

.top-branch-dropdown summary.top-branch-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  color: #f1f5f9;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  height: 34px;
  user-select: none;
  list-style: none;
  transition: all var(--transition-fast);
}

.top-branch-dropdown summary.top-branch-summary::-webkit-details-marker {
  display: none;
}

.top-branch-dropdown summary.top-branch-summary:hover,
.top-branch-dropdown[open] summary.top-branch-summary {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(14, 165, 233, 0.5);
  color: #ffffff;
}

.top-branch-dropdown .top-branch-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  min-width: 210px;
  background: #152232;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  padding: 0.4rem;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-branch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.top-branch-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.top-branch-item.is-active {
  background: rgba(14, 165, 233, 0.16);
  color: #38bdf8;
  font-weight: 700;
}

.top-branch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  height: 34px;
  border-radius: 20px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.28);
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.top-branch-label {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.5);
}

.user-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), #0284c7);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.user-role-badge {
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
}

.logout-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.logout-button:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.top-nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all var(--transition-fast);
  flex-shrink: 0 !important;
}

.top-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: var(--brand);
}

/* Tablet & Small Laptop Adaptation (<= 1100px) */
@media (max-width: 1100px) {
  .top-utility-bar {
    padding: 0 1rem !important;
  }
  
  .top-navbar-row {
    padding: 0 1rem !important;
  }

  .top-nav-link,
  .top-nav-group > summary {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
    gap: 0.25rem;
  }
}

/* ==========================================================================
   Mobile Bottom Navigation Bar & Mobile Navigation Drawer (<= 992px)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

.mobile-nav-backdrop {
  display: none;
}

.mobile-nav-drawer {
  display: none;
}

@media (max-width: 992px) {
  .top-nav-toggle {
    display: inline-flex !important;
  }
  
  .top-navbar-row {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border-bottom: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
    display: none !important;
  }

  /* Fixed Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60px !important;
    padding: 0 0.5rem calc(env(safe-area-inset-bottom, 0px)) !important;
    background: var(--surface) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25) !important;
    z-index: 1050 !important;
    align-items: center !important;
    justify-content: space-around !important;
    direction: rtl !important;
  }

  .mobile-bottom-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    height: 100% !important;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    gap: 0.2rem !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0.35rem 0 !important;
    transition: all var(--transition-fast) !important;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav-item i {
    font-size: 1.25rem !important;
    line-height: 1 !important;
    transition: transform var(--transition-fast);
  }

  .mobile-bottom-nav-item:hover,
  .mobile-bottom-nav-item:active {
    color: var(--text) !important;
  }

  .mobile-bottom-nav-item.is-active {
    color: var(--brand) !important;
  }

  .mobile-bottom-nav-item.is-active i {
    transform: translateY(-2px);
  }

  /* Highlighted Center POS Item */
  .mobile-bottom-nav-item--pos {
    position: relative !important;
  }

  .mobile-bottom-nav-item--pos .pos-pulse-circle {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--brand), #0284c7) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px var(--brand-glow, rgba(2, 132, 199, 0.45)) !important;
    margin-top: -18px !important;
    border: 3px solid var(--surface) !important;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s !important;
  }

  .mobile-bottom-nav-item--pos .pos-pulse-circle i {
    font-size: 1.2rem !important;
    color: #ffffff !important;
    transform: none !important;
  }

  .mobile-bottom-nav-item--pos:active .pos-pulse-circle {
    transform: scale(0.92) !important;
  }

  .mobile-bottom-nav-item--pos.is-active .pos-pulse-circle {
    box-shadow: 0 0 0 3px var(--brand-soft), 0 6px 18px var(--brand-glow) !important;
  }

  /* Slide-over Drawer Backdrop */
  .mobile-nav-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 2050 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
  }

  .mobile-nav-backdrop.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Slide-over Navigation Drawer */
  .mobile-nav-drawer {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    right: -100% !important;
    width: 88% !important;
    max-width: 370px !important;
    background: var(--surface) !important;
    border-left: 1px solid var(--border) !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5) !important;
    z-index: 2100 !important;
    flex-direction: column !important;
    transition: right 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    direction: rtl !important;
    text-align: right !important;
    overflow: hidden !important;
  }

  .mobile-nav-drawer.is-open {
    right: 0 !important;
  }

  /* Drawer Header */
  .drawer-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.9rem 1.15rem !important;
    border-bottom: 1px solid var(--border) !important;
    background: var(--surface-2) !important;
    flex-shrink: 0 !important;
  }

  .drawer-brand {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    min-width: 0 !important;
  }

  .drawer-logo-img {
    height: 34px !important;
    max-width: 100px !important;
    object-fit: contain !important;
    border-radius: 6px !important;
  }

  .drawer-logo-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: var(--radius-md) !important;
    background: var(--brand) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
  }

  .drawer-brand-text {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
  }

  .drawer-brand-name {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .drawer-brand-sub {
    font-size: 0.72rem !important;
    color: var(--text-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .drawer-close-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-muted) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 1.1rem !important;
    transition: all var(--transition-fast) !important;
    flex-shrink: 0 !important;
  }

  .drawer-close-btn:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
  }

  /* User Card in Drawer */
  .drawer-user-card {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.85rem 1.15rem !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid var(--border) !important;
    flex-shrink: 0 !important;
  }

  .drawer-user-avatar {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid var(--brand) !important;
    flex-shrink: 0 !important;
  }

  .drawer-user-avatar--text {
    background: var(--surface-2) !important;
    color: var(--brand) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
    font-size: 1.15rem !important;
  }

  .drawer-user-info {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    gap: 0.2rem !important;
  }

  .drawer-user-name {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .drawer-user-badges {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    flex-wrap: wrap !important;
  }

  .drawer-branch-tag {
    font-size: 0.72rem !important;
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.1) !important;
    padding: 0.1rem 0.45rem !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
  }

  /* Search Box in Drawer */
  .drawer-search-box {
    padding: 0.75rem 1.15rem !important;
    border-bottom: 1px solid var(--border) !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }

  .drawer-search-icon {
    position: absolute !important;
    right: 1.95rem !important;
    color: var(--text-dim) !important;
    font-size: 0.85rem !important;
    pointer-events: none !important;
  }

  .drawer-search-input {
    width: 100% !important;
    background: var(--surface-2) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.55rem 2.2rem 0.55rem 0.75rem !important;
    color: var(--text) !important;
    font-size: 0.85rem !important;
    outline: none !important;
    font-family: inherit !important;
    transition: border-color var(--transition-fast) !important;
  }

  .drawer-search-input:focus {
    border-color: var(--brand) !important;
    box-shadow: var(--focus-ring) !important;
  }

  .drawer-search-clear {
    position: absolute !important;
    left: 1.95rem !important;
    background: none !important;
    border: none !important;
    color: var(--text-dim) !important;
    cursor: pointer !important;
    font-size: 1.1rem !important;
    padding: 0 !important;
  }

  /* Drawer Body & Scrollable Sections */
  .drawer-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 0.85rem 1rem !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .drawer-nav-group {
    margin-bottom: 1.15rem !important;
  }

  .drawer-group-title {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    color: var(--brand) !important;
    letter-spacing: 0.03em !important;
    margin-bottom: 0.4rem !important;
    padding: 0.2rem 0.45rem !important;
  }

  .drawer-group-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.2rem !important;
  }

  .drawer-nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    padding: 0.55rem 0.75rem !important;
    border-radius: var(--radius-md) !important;
    color: var(--text) !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s !important;
  }

  .drawer-nav-link i {
    font-size: 1.05rem !important;
    color: var(--text-dim) !important;
    flex-shrink: 0 !important;
    transition: color 0.15s !important;
  }

  .drawer-nav-link:hover {
    background: var(--surface-hover) !important;
    color: var(--text) !important;
  }

  .drawer-nav-link:hover i {
    color: var(--brand) !important;
  }

  .drawer-nav-link.is-active {
    background: var(--brand-soft) !important;
    color: var(--brand) !important;
    font-weight: 700 !important;
  }

  .drawer-nav-link.is-active i {
    color: var(--brand) !important;
  }

  .drawer-nav-link--pos {
    color: var(--brand) !important;
    background: rgba(2, 132, 199, 0.08) !important;
    border: 1px solid rgba(2, 132, 199, 0.2) !important;
  }

  .drawer-empty-search {
    text-align: center !important;
    padding: 2.5rem 1rem !important;
    color: var(--text-dim) !important;
  }

  .drawer-empty-search i {
    font-size: 2.2rem !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
  }

  /* Drawer Footer */
  .drawer-footer {
    padding: 0.75rem 1.15rem !important;
    border-top: 1px solid var(--border) !important;
    background: var(--surface-2) !important;
    flex-shrink: 0 !important;
  }

  .drawer-footer-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
  }

  .drawer-action-btn,
  .drawer-logout-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    padding: 0.55rem 0.85rem !important;
    border-radius: var(--radius-md) !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
    font-family: inherit !important;
  }

  .drawer-action-btn {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  .drawer-action-btn:hover {
    background: var(--surface-hover) !important;
    color: var(--brand) !important;
  }

  .drawer-logout-btn {
    width: 100% !important;
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
  }

  .drawer-logout-btn:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
  }
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Layout Overhauls (<= 768px, <= 640px, <= 480px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Content container with safe bottom clearance for bottom nav bar */
  .content--fullwidth {
    padding: 1rem 0.85rem calc(75px + env(safe-area-inset-bottom, 16px)) !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  /* Page Header stacking & full width action buttons */
  .page-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    margin-bottom: 1.25rem !important;
    padding-bottom: 0.85rem !important;
  }

  .page-header__content {
    width: 100% !important;
  }

  .page-header__content h1,
  .page-title {
    font-size: 1.25rem !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
  }

  .page-header__content p,
  .page-subtitle {
    font-size: 0.82rem !important;
  }

  .page-actions {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
    justify-content: flex-start !important;
  }

  .page-actions .btn {
    flex: 1 1 auto !important;
    min-width: 110px !important;
    justify-content: center !important;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.84rem !important;
  }

  /* KPI Grid Responsive 2-Columns */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    margin-bottom: 1.25rem !important;
  }

  .kpi-card {
    padding: 0.85rem 0.95rem !important;
    border-radius: var(--radius-md) !important;
  }

  .kpi-card h3,
  .kpi-card .kpi-value {
    font-size: 1.35rem !important;
    line-height: 1.2 !important;
  }

  .kpi-card p,
  .kpi-card .kpi-label {
    font-size: 0.78rem !important;
  }

  /* Filter Toolbar Stack */
  .filter-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.85rem !important;
    gap: 0.65rem !important;
    margin-bottom: 1.25rem !important;
  }

  .filter-group,
  .filter-group--search,
  .filter-actions {
    width: 100% !important;
    min-width: 0 !important;
  }

  .filter-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
  }

  .filter-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.84rem !important;
  }

  /* Surface Cards */
  .surface-card,
  .card {
    padding: 1rem 0.85rem !important;
    border-radius: var(--radius-md) !important;
  }

  /* Table Container */
  .table-container {
    margin-bottom: 1.25rem !important;
    border-radius: var(--radius-md) !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .data-table th,
  .data-table td {
    padding: 0.55rem 0.65rem !important;
    font-size: 0.82rem !important;
  }

  /* Modal Dialog Full Width */
  .modal-dialog {
    margin: 0.5rem auto !important;
    max-width: calc(100vw - 1rem) !important;
    width: auto !important;
  }
}

/* Small Screens & Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  .top-utility-bar {
    padding: 0 0.6rem !important;
    height: 50px !important;
    min-height: 50px !important;
    gap: 0.35rem !important;
    overflow: hidden !important;
    max-width: 100vw !important;
  }

  .top-nav-brand {
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }

  .brand-name {
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 130px !important;
  }

  .brand-subtitle {
    display: none !important;
  }

  .top-nav-actions {
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .top-branch-dropdown .top-branch-summary {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.74rem !important;
  }

  .top-branch-label {
    max-width: 75px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .user-details {
    display: none !important;
  }

  .theme-toggle-btn {
    display: none !important; /* Accessible via drawer & user menu */
  }

  .top-nav-toggle {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 1.25rem !important;
  }
}

/* Extra Small Phones (<= 420px) */
@media (max-width: 420px) {
  .kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .brand-name {
    max-width: 95px !important;
    font-size: 0.78rem !important;
  }

  .top-branch-label {
    display: none !important;
  }

  .top-branch-dropdown .top-branch-summary {
    padding: 0.3rem 0.4rem !important;
  }

  .page-actions .btn {
    min-width: 100% !important;
  }
}


/* Main Content Area */
.content--fullwidth {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3.5rem;
}

/* Page Header & Breadcrumbs */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-header__content h1,
.page-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.page-header__content p,
.page-subtitle {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Cards & Surfaces */
.surface-card,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-normal);
}

.surface-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* KPI Strip & Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--brand);
  opacity: 0.8;
}

.kpi-card--success::before { background: var(--success); }
.kpi-card--warning::before { background: var(--warning); }
.kpi-card--danger::before { background: var(--danger); }
.kpi-card--info::before { background: var(--info); }

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(2, 132, 199, 0.4);
}

.kpi-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.kpi-card__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

.kpi-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.kpi-card--success .kpi-card__icon { background: var(--success-soft); color: var(--success); }
.kpi-card--warning .kpi-card__icon { background: var(--warning-soft); color: var(--warning); }
.kpi-card--danger .kpi-card__icon { background: var(--danger-soft); color: var(--danger); }
.kpi-card--info .kpi-card__icon { background: var(--info-soft); color: var(--info); }

.kpi-card__value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.kpi-card__footer {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  table-layout: auto !important;
  border: 1px solid var(--border);
}

.data-table th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 700;
  text-align: right;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border-light);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table td:last-child,
.data-table th:last-child {
  padding-left: 1.25rem;
}

.data-table td.cell-wrap,
.data-table th.cell-wrap {
  white-space: normal;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

.data-table tfoot td {
  padding: 0.85rem 1.05rem;
  border-top: 2px solid var(--border);
  border-bottom: 3px double var(--border);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  font-weight: 700;
}

.price-value,
.num-cell {
  white-space: nowrap !important;
  font-weight: 700;
  display: inline-block;
  direction: ltr;
}

.management-table {
  table-layout: auto !important;
}

/* ==========================================================================
   Universal Table Sorter & Pagination Component
   ========================================================================== */
.data-table th[data-sortable="true"],
table th[data-sortable="true"] {
  cursor: pointer !important;
  user-select: none;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.data-table th[data-sortable="true"]:hover,
table th[data-sortable="true"]:hover {
  background: var(--surface-hover) !important;
  color: var(--brand) !important;
}

.sort-indicator,
.sort-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.55;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
  vertical-align: middle;
}

th[data-sortable="true"]:hover .sort-indicator,
th[data-sortable="true"]:hover .sort-icon {
  opacity: 1;
  color: var(--brand);
}

th[data-sort-dir="asc"] {
  color: var(--brand) !important;
  background: rgba(var(--brand-rgb, 2, 132, 199), 0.08) !important;
}

th[data-sort-dir="asc"] .sort-indicator,
th[data-sort-dir="asc"] .sort-icon {
  opacity: 1;
  color: var(--brand) !important;
}

th[data-sort-dir="desc"] {
  color: var(--brand) !important;
  background: rgba(var(--brand-rgb, 2, 132, 199), 0.08) !important;
}

th[data-sort-dir="desc"] .sort-indicator,
th[data-sort-dir="desc"] .sort-icon {
  opacity: 1;
  color: var(--brand) !important;
}

/* Pagination Bar Styles */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-bottom: 2rem;
}

.pagination-info {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-info strong {
  color: var(--text);
  font-family: var(--font-mono, monospace);
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 0.65rem;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.pagination-btn:hover:not(.is-disabled):not(.is-active) {
  background: var(--surface-hover);
  border-color: var(--brand);
  color: var(--brand);
}

.pagination-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(var(--brand-rgb, 2, 132, 199), 0.3);
  cursor: default;
}

.pagination-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--surface-muted, transparent);
  border-color: var(--border-light);
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 34px;
  color: var(--text-muted);
  font-weight: 700;
}

.pagination-per-page {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pagination-per-page select {
  padding: 0.3rem 0.6rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}


/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.status-badge--success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.25); }
.status-badge--danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.25); }
.status-badge--warning { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.25); }
.status-badge--info { background: var(--info-soft); color: var(--info); border: 1px solid rgba(14, 165, 233, 0.25); }
.status-badge--muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* Buttons */
.btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.2;
}

.btn:focus-visible,
.button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-primary,
.button-primary {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand-light);
  box-shadow: 0 4px 14px var(--brand-glow);
}

.btn-primary:hover,
.button-primary:hover {
  background: var(--brand-strong);
  color: #ffffff;
  box-shadow: 0 6px 20px var(--brand-glow);
  transform: translateY(-1px);
}

.btn-secondary,
.button-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover,
.button-secondary:hover {
  background: var(--surface-elevated);
  border-color: var(--brand-light);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-sm,
.button-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* Forms & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.form-label,
label {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: var(--focus-ring);
  background: var(--surface);
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.alert-success { background: var(--success-soft); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--success); }
.alert-danger, .alert-error { background: var(--danger-soft); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--danger); }
.alert-warning { background: var(--warning-soft); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--warning); }
.alert-info { background: var(--info-soft); border: 1px solid rgba(14, 165, 233, 0.3); color: var(--info); }

/* Filter Toolbar */
.filter-toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-group--search {
  flex: 1;
  min-width: 220px;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  right: 0.95rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  pointer-events: none;
}

.input-icon-wrapper .form-control,
.input-icon-wrapper input {
  padding-right: 2.5rem;
}

/* Secondary Outline & Icon Buttons */
.btn-outline-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-outline-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--brand-light);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.95rem;
}

.btn-icon:hover {
  background: var(--surface-hover);
  border-color: var(--brand);
  color: var(--brand-light);
  transform: translateY(-1px);
}

.btn-icon--edit:hover { border-color: var(--info); color: var(--info); }
.btn-icon--danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.btn-icon--success:hover { border-color: var(--success); color: var(--success); background: var(--success-soft); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

.badge--success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.25); }
.badge--danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.25); }
.badge--warning { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.25); }
.badge--info { background: var(--info-soft); color: var(--info); border: 1px solid rgba(14, 165, 233, 0.25); }

/* Table Density Support */
[data-table-density="compact"] .data-table th { padding: 0.55rem 0.85rem; font-size: 0.78rem; }
[data-table-density="compact"] .data-table td { padding: 0.55rem 0.85rem; font-size: 0.82rem; }

/* Form Grids */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.form-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.82rem;
  color: var(--danger);
  margin-top: 0.25rem;
}

/* User Accent Color Overrides */
html[data-accent="blue"] {
  --brand: #0284c7;
  --brand-strong: #0369a1;
  --brand-light: #38bdf8;
  --brand-glow: rgba(2, 132, 199, 0.35);
  --brand-soft: rgba(2, 132, 199, 0.15);
  --border-focus: #0ea5e9;
}

html[data-accent="emerald"] {
  --brand: #059669;
  --brand-strong: #047857;
  --brand-light: #34d399;
  --brand-glow: rgba(5, 150, 105, 0.35);
  --brand-soft: rgba(5, 150, 105, 0.15);
  --border-focus: #10b981;
}

html[data-accent="violet"] {
  --brand: #7c3aed;
  --brand-strong: #6d28d9;
  --brand-light: #a78bfa;
  --brand-glow: rgba(124, 58, 237, 0.35);
  --brand-soft: rgba(124, 58, 237, 0.15);
  --border-focus: #8b5cf6;
}

html[data-accent="amber"] {
  --brand: #d97706;
  --brand-strong: #b45309;
  --brand-light: #fbbf24;
  --brand-glow: rgba(217, 119, 6, 0.35);
  --brand-soft: rgba(217, 119, 6, 0.15);
  --border-focus: #f59e0b;
}

html[data-accent="rose"] {
  --brand: #e11d48;
  --brand-strong: #be123c;
  --brand-light: #fb7185;
  --brand-glow: rgba(225, 29, 72, 0.35);
  --brand-soft: rgba(225, 29, 72, 0.15);
  --border-focus: #f43f5e;
}

/* Monospace & Code Badges */
.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

.code-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.12);
  color: var(--brand-light);
  border: 1px solid rgba(59, 130, 246, 0.25);
  direction: ltr;
  white-space: nowrap;
}

.code-badge--muted {
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--border);
}

.code-badge--success {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.code-badge--danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.code-badge--warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}

/* Document & Voucher Layouts (Invoices, Credit Notes, Debit Notes) */
.document-card {
  max-width: 920px;
  margin: 0 auto 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 2.25rem;
}

.document-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.document-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.document-brand__mark {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand), #0284c7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  box-shadow: 0 4px 15px var(--brand-glow);
  flex-shrink: 0;
}

.document-brand__info h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.document-brand__info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.2rem 0;
}

.document-info-box {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.doc-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.doc-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.doc-meta-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.doc-meta-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.doc-notes-callout {
  margin-bottom: 1.5rem;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  border-right: 4px solid var(--brand);
  background: rgba(59, 130, 246, 0.08);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

.doc-notes-callout--danger {
  border-right-color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

.doc-totals-summary {
  width: min(100%, 390px);
  margin-inline-start: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.doc-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.92rem;
  color: var(--text-muted);
}

.doc-totals-row:last-child {
  border-bottom: none;
}

.doc-totals-row--highlight {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  border-top: 2px solid var(--border);
  margin-top: 0.4rem;
  padding-top: 0.75rem;
}

.doc-signatures {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.doc-signature-block {
  text-align: center;
  width: 220px;
}

.doc-signature-line {
  border-bottom: 1px solid var(--text-muted);
  height: 45px;
  margin-bottom: 0.65rem;
}

.doc-signature-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Print Helpers (Screen vs Print) */
.print-only,
.only-print {
  display: none !important;
}
.print-only-flex {
  display: none !important;
}

/* Comprehensive Master Print Engine */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm;
  }

  /* Visibility toggles */
  .print-only,
  .only-print {
    display: block !important;
  }
  .print-only-flex {
    display: flex !important;
  }

  /* Strip all web application chrome, buttons, modals, toolbars & interactive forms */
  .app-top-header,
  .mobile-bottom-nav,
  .mobile-nav-backdrop,
  .mobile-nav-drawer,
  .no-print,
  .page-header,
  .page-actions,
  .header-actions,
  .btn,
  button,
  a.btn,
  .alert,
  .filter-toolbar,
  .filter-group,
  .nav-tabs,
  form:not(.printable-form),
  .pagination,
  .actions-col,
  th.actions-col,
  td.actions-col,
  .tax-mini-chip,
  .tax-popover-box,
  .modal,
  .modal-backdrop,
  .swal2-container,
  #cancelModal {
    display: none !important;
  }

  /* Reset document canvas to pure white & crisp text */
  body, html, .app-shell, .content, .content-wrapper, .page-container, .content--fullwidth {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    width: 100% !important;
  }

  /* Neutralize all surface containers, cards, and vouchers */
  .surface-card,
  .card,
  .document-card,
  .printable-voucher,
  .voucher-container,
  .invoice-surface {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  /* High contrast metadata boxes */
  .doc-meta-grid,
  .doc-totals-summary {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
  }

  .doc-meta-value,
  .doc-totals-row--highlight {
    color: #0f172a !important;
  }

  /* Table rendering in print */
  .table-container {
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 1.25rem !important;
  }

  .data-table, table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .data-table th, table th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    padding: 6px 8px !important;
    font-size: 0.85rem !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .data-table td, table td {
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    padding: 6px 8px !important;
    font-size: 0.85rem !important;
  }

  tr {
    page-break-inside: avoid !important;
  }

  .doc-signature-line {
    border-bottom-color: #64748b !important;
  }

  /* Official Certified Document Header */
  .official-print-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding-bottom: 1.25rem !important;
    border-bottom: 2px solid #0f172a !important;
    margin-bottom: 1.25rem !important;
  }

  /* Official Certified Document Signatures */
  .official-print-signatures {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    text-align: center !important;
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px dashed #94a3b8 !important;
    page-break-inside: avoid !important;
  }
}

/* ==========================================================================
   Phase 14: POS Variant Modal & Product Media Styling
   ========================================================================== */
.pos-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  cursor: pointer;
}

.pos-modal-backdrop[hidden] {
  display: none !important;
}

.pos-modal-box {
  background: var(--surface, #111823) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: posModalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  cursor: default;
  position: relative;
  z-index: 10000;
}

@keyframes posModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.pos-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2, #16202e);
}

.pos-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md, 8px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 1.35rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
}

.pos-modal-close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

.pos-variant-grid {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.95rem;
  background: var(--surface, #111823);
}

.pos-variant-card {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.2rem;
  background: var(--surface-2, #16202e);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md, 10px);
  cursor: pointer;
  text-align: right;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.pos-variant-card:hover {
  border-color: var(--brand);
  background: var(--surface-hover, #1f2d42);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--brand);
}

.pos-variant-card.is-empty {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.8);
}

.pos-variant-card__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.pos-variant-card__detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  line-height: 1.4;
}

.pos-variant-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}

.pos-variant-card__price {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--brand-light);
}

.availability--variant {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.pos-item-media {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.pos-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* POS Categories & Sub-Filters (Clean & Professional without Icons) */
.pos-categories-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.95rem;
}

.pos-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.4rem;
  align-items: center;
  background: var(--surface-2, #16202e);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border);
  white-space: normal;
}

.pos-category-tab {
  border: 1px solid var(--border) !important;
  background: var(--surface, #111823) !important;
  color: var(--text-muted) !important;
  padding: 0.4rem 0.85rem !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  border-radius: var(--radius-sm, 6px) !important;
  cursor: pointer;
  transition: all 0.15s ease !important;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.pos-category-tab:hover {
  background: var(--surface-hover, #1f2d42) !important;
  color: var(--text) !important;
  border-color: var(--brand-light) !important;
  transform: translateY(-1px);
}

.pos-category-tab.active {
  background: var(--brand, #0284c7) !important;
  color: #ffffff !important;
  border-color: var(--brand-light, #38bdf8) !important;
  box-shadow: 0 2px 10px var(--brand-glow, rgba(2, 132, 199, 0.4)) !important;
}

.pos-cat-count {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  line-height: 1;
}

.pos-category-tab.active .pos-cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.pos-sub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm, 6px);
  border: 1px dashed var(--border);
  white-space: normal;
}

.pos-sub-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.pos-sub-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.pos-sub-pill {
  border: 1px solid var(--border) !important;
  background: var(--surface, #111823) !important;
  color: var(--text-muted) !important;
  padding: 0.22rem 0.55rem !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
  cursor: pointer;
  transition: all 0.15s ease !important;
  user-select: none;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  flex-shrink: 0;
}

.pos-sub-pill:hover {
  background: var(--surface-hover, #1f2d42) !important;
  color: var(--text) !important;
  border-color: var(--brand-light) !important;
}

.pos-sub-pill.active {
  background: #0ea5e9 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.5) !important;
}

/* POS KBD Keyboard Shortcut Badges */
.pos-kbd {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 800;
  line-height: 1;
  color: var(--text-muted);
  background: var(--surface, #111823);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  vertical-align: middle;
}

.pos-kbd--submit {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.pos-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.pos-search-wrapper input {
  padding-left: 3rem !important;
}

.pos-search-kbd-badge {
  position: absolute;
  left: 0.75rem;
  pointer-events: none;
}

/* Shortcuts Modal */
.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}

.shortcuts-table th,
.shortcuts-table td {
  padding: 0.6rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.shortcuts-table th {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  background: var(--surface-2);
}

.shortcuts-table td {
  font-size: 0.88rem;
}

.pos-variant-card.is-matched {
  border-color: var(--brand-light, #38bdf8) !important;
  background: rgba(2, 132, 199, 0.12) !important;
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.35), 0 0 0 1px var(--brand-light) !important;
}

.pos-variant-matched-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.3);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-right: auto;
}

/* Strict visibility guarantees for hidden elements across POS */
.pos-cart-empty[hidden],
.pos-no-results[hidden],
.checkout-error[hidden],
.pos-item[hidden],
[data-pos-item][hidden],
[hidden] {
  display: none !important;
}

/* ==========================================================================
   Phase 25: Smart System Alerts & Notification Center
   ========================================================================== */
.notifications-bell-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notifications-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md, 8px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
  font-size: 1.1rem;
}

.notifications-trigger:hover,
.notifications-trigger.is-active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.notifications-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 0 2px #111823;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.notifications-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 340px;
  max-width: 92vw;
  background: var(--surface, #111823);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
  z-index: 1200;
  overflow: hidden;
}

[data-theme="light"] .notifications-panel {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1) !important;
}

.notifications-panel.is-open {
  display: block;
  animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notifications-panel-header {
  padding: 0.65rem 0.85rem 0.45rem;
  background: var(--surface-2, #16202e);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

[data-theme="light"] .notifications-panel-header {
  background: #f8fafc !important;
  border-bottom-color: #e2e8f0 !important;
}

.notifications-panel-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text, #f8fafc);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

[data-theme="light"] .notifications-panel-title {
  color: #0f172a !important;
}

#panel-total-count {
  background: var(--brand, #0284c7) !important;
  color: #ffffff !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  padding: 0.15rem 0.5rem !important;
  border-radius: 9999px !important;
}

.notifications-panel-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 2px;
  margin-top: 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  scrollbar-width: none;
}

[data-theme="light"] .notifications-panel-tabs {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}

.notifications-panel-tabs::-webkit-scrollbar {
  display: none;
}

.panel-tab-btn {
  background: transparent;
  border: none;
  border-radius: 5px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast, 0.15s ease);
}

[data-theme="light"] .panel-tab-btn {
  color: #64748b !important;
}

.panel-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

[data-theme="light"] .panel-tab-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.panel-tab-btn.is-active {
  background: var(--brand, #0284c7) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.3);
}

.notifications-panel-body {
  max-height: 330px;
  overflow-y: auto;
  padding: 0.35rem 0.45rem;
  background: var(--surface, #111823);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.notifications-panel-body::-webkit-scrollbar {
  width: 4px;
}

.notifications-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.notifications-panel-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 4px;
}

[data-theme="light"] .notifications-panel-body {
  background: #ffffff !important;
}

/* Compact Notification Item */
.notification-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.05));
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.22rem;
  transition: all var(--transition-fast, 0.15s ease);
  background: rgba(255, 255, 255, 0.02);
  border-right: 3px solid #64748b;
}

[data-theme="light"] .notification-item {
  background: #ffffff !important;
  border-color: #f1f5f9 !important;
  border-right-color: #94a3b8 !important;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border, rgba(255, 255, 255, 0.12));
}

[data-theme="light"] .notification-item:hover {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.notification-item.severity-critical {
  border-right-color: #ef4444 !important;
}

[data-theme="light"] .notification-item.severity-critical {
  background: #fff8f8 !important;
  border-color: #fee2e2 !important;
  border-right-color: #ef4444 !important;
}

.notification-item.severity-warning {
  border-right-color: #f59e0b !important;
}

[data-theme="light"] .notification-item.severity-warning {
  background: #fffdf5 !important;
  border-color: #fef3c7 !important;
  border-right-color: #f59e0b !important;
}

.notification-item.severity-info {
  border-right-color: #0284c7 !important;
}

[data-theme="light"] .notification-item.severity-info {
  background: #f8fbff !important;
  border-color: #e0f2fe !important;
  border-right-color: #0284c7 !important;
}

.notification-item-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  flex-shrink: 0;
}

.severity-critical .notification-item-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.severity-warning .notification-item-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.severity-info .notification-item-icon {
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
}

.notification-item-content {
  flex: 1;
  min-width: 0;
}

.notification-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  line-height: 1.2;
}

.notification-item-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .notification-item-title {
  color: #0f172a !important;
}

.notification-item-time {
  font-size: 0.65rem;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .notification-item-time {
  color: #64748b !important;
}

.notification-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: 1px;
  line-height: 1.2;
}

.notification-item-desc {
  font-size: 0.7rem;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

[data-theme="light"] .notification-item-desc {
  color: #475569 !important;
}

.notification-item-action {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--brand-light, #38bdf8);
  white-space: nowrap;
  flex-shrink: 0;
  margin-inline-start: 0.25rem;
}

[data-theme="light"] .notification-item-action {
  color: #0284c7 !important;
}

.notifications-panel-footer {
  padding: 0.45rem 0.75rem;
  background: var(--surface-2, #16202e);
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  text-align: center;
}

[data-theme="light"] .notifications-panel-footer {
  background: #f8fafc !important;
  border-top-color: #e2e8f0 !important;
}

.btn-all-notifications {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-light, #38bdf8);
  text-decoration: none;
  padding: 0.35rem;
  border-radius: var(--radius-md, 6px);
  transition: all var(--transition-fast, 0.15s ease);
}

[data-theme="light"] .btn-all-notifications {
  color: #0284c7 !important;
}

.btn-all-notifications:hover {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
}

[data-theme="light"] .btn-all-notifications:hover {
  background: #e0f2fe !important;
  color: #0369a1 !important;
}

/* Full Notifications Page Styling */
.notifications-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.notifications-stat-card {
  background: var(--surface-card, #1e293b);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-lg, 12px);
  padding: 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.notifications-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.notifications-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main, #f8fafc);
}

.notifications-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
}

/* ==========================================================================
   Phase 26: User Profile Dropdown Menu & Account Actions
   ========================================================================== */
.user-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-dropdown-trigger {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all var(--transition-fast, 0.15s ease);
  user-select: none;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-dropdown-trigger:hover,
.user-dropdown-trigger.is-active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

[data-theme="light"] .user-dropdown-trigger {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .user-dropdown-trigger:hover,
[data-theme="light"] .user-dropdown-trigger.is-active {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.16);
}

.user-dropdown-chevron {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-right: 0.15rem;
  transition: transform var(--transition-fast, 0.15s ease);
}

.user-dropdown-trigger.is-active .user-dropdown-chevron {
  transform: rotate(180deg);
  color: #38bdf8;
}

.user-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  max-width: 92vw;
  background: var(--surface-card, #1e293b);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  z-index: 1200;
  overflow: hidden;
}

[data-theme="light"] .user-dropdown-menu {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.user-dropdown-menu.is-open {
  display: block;
  animation: fadeInDown 0.2s ease-out;
}

.user-dropdown-header {
  padding: 1rem;
  background: var(--surface-2, #0f172a);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

[data-theme="light"] .user-dropdown-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

.user-dropdown-profile-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand, #0284c7), #06b6d4);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.user-dropdown-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.user-dropdown-fullname {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .user-dropdown-fullname {
  color: #0f172a;
}

.user-dropdown-username {
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
  font-family: var(--font-mono, monospace);
  direction: ltr;
  text-align: right;
}

.user-dropdown-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.user-role-pill {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  font-weight: 600;
  border-radius: 6px;
}

[data-theme="light"] .user-role-pill {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}

.user-online-badge {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
}

.user-online-badge i {
  font-size: 0.45rem;
  color: #10b981;
}

.user-dropdown-body {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--text-main, #e2e8f0);
  text-decoration: none;
  transition: all var(--transition-fast, 0.15s ease);
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

[data-theme="light"] .user-dropdown-item {
  color: #334155;
}

[data-theme="light"] .user-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

.user-dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.user-dropdown-icon--primary {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
}

.user-dropdown-icon--shield {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.user-dropdown-icon--success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.user-dropdown-icon--accent {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.user-dropdown-item-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.user-dropdown-item-content .item-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main, #f1f5f9);
}

[data-theme="light"] .user-dropdown-item-content .item-title {
  color: #0f172a;
}

.user-dropdown-item-content .item-desc {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-arrow {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  transition: transform var(--transition-fast, 0.15s ease);
}

.user-dropdown-item:hover .item-arrow {
  transform: translateX(-3px);
  color: var(--brand, #0284c7);
}

.user-dropdown-theme-row {
  margin-top: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="light"] .user-dropdown-theme-row {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.theme-row-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-switch-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  color: var(--text-main, #f1f5f9);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast, 0.15s ease);
}

[data-theme="light"] .theme-switch-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.theme-switch-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.4);
}

.user-dropdown-footer {
  padding: 0.6rem 0.75rem;
  background: var(--surface-2, #0f172a);
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

[data-theme="light"] .user-dropdown-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

.user-dropdown-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
}

.user-dropdown-logout-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   Split Authentication Shell (Inspired by Gym-System Premium Architecture)
   ========================================================================== */
html:has(.auth-product-shell--carwash),
body.auth-shell:has(.auth-product-shell--carwash) {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden !important;
  margin: 0;
  padding: 0 !important;
  background: #080d16;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html:has(.auth-product-shell--carwash)::-webkit-scrollbar,
body.auth-shell:has(.auth-product-shell--carwash)::-webkit-scrollbar,
.auth-product-shell--carwash::-webkit-scrollbar,
.auth-product-shell--carwash *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.auth-product-shell--carwash {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(26rem, 32rem);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden !important;
  background: #080d16;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.auth-product-shell--carwash .auth-card--login,
.auth-product-shell--carwash .auth-visual--carwash {
  min-width: 0;
  max-width: none;
  direction: rtl;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* --- 1. Interactive Login Card (Right Side) - Bright Crisp Premium Light Theme --- */
.auth-product-shell--carwash .auth-card--login {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: clamp(1rem, 2.5vh, 2.25rem) clamp(1.5rem, 3vw, 2.75rem);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  color: #07111f !important;
  border-left: 1px solid #e2e8f0 !important;
  box-shadow: -18px 0 46px rgba(7, 17, 31, 0.08) !important;
  overflow-y: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  z-index: 10;
}

.auth-brand--login {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(0.5rem, 1.6vh, 1.15rem);
}

.auth-brand--login .brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.auth-brand--login .brand-logo {
  width: 3.85rem;
  height: 3.85rem;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.auth-brand--login .brand-copy strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0a1730 !important;
  margin-bottom: 0.15rem;
}

.auth-brand--login .brand-copy small {
  display: block;
  font-size: 0.84rem;
  color: #64748b !important;
}

.auth-card__head {
  text-align: center;
  margin-bottom: clamp(0.55rem, 1.6vh, 1.1rem);
}

.auth-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  background: rgba(2, 132, 199, 0.08) !important;
  border: 1px solid rgba(2, 132, 199, 0.25) !important;
  color: #0284c7 !important;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.auth-card__head h1 {
  font-size: clamp(1.6rem, 2.2vw, 1.85rem);
  font-weight: 900;
  color: #06142b !important;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.auth-card__head p {
  font-size: 0.88rem;
  color: #52627a !important;
  margin: 0;
}

/* Form Styles */
.auth-form {
  display: grid;
  gap: clamp(0.6rem, 1.6vh, 0.95rem);
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
}

.auth-form .field-block {
  display: grid;
  gap: 0.45rem;
}

.auth-form .field-block label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1b2738 !important;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap .input-icon {
  position: absolute;
  inset-inline-start: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #55708e !important;
  font-size: 1.15rem;
  pointer-events: none;
  z-index: 2;
}

.input-icon-wrap .form-control {
  width: 100%;
  min-height: 2.95rem;
  padding-inline-start: 2.85rem !important;
  padding-inline-end: 2.85rem !important;
  border-radius: 0.85rem;
  border: 1.5px solid #cbd8e8 !important;
  background: #f9fbfd !important;
  color: #07111f !important;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.input-icon-wrap .form-control:focus {
  border-color: #0284c7 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2) !important;
  background: #ffffff !important;
}

.btn-toggle-password {
  position: absolute;
  inset-inline-end: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #64748b !important;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  transition: all 0.15s ease;
  z-index: 3;
}

.btn-toggle-password:hover {
  color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.08) !important;
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -0.2rem;
}

.auth-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155 !important;
  cursor: pointer;
  user-select: none;
}

.auth-remember-label input[type="checkbox"] {
  accent-color: #0284c7 !important;
  width: 17px;
  height: 17px;
  margin: 0;
  cursor: pointer;
}

.btn-auth-submit {
  width: 100%;
  min-height: 3.1rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
  margin-top: 0.25rem;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.48);
  filter: brightness(1.08);
}

.auth-footnote-wrap {
  text-align: center;
  margin-top: clamp(0.5rem, 1.5vh, 1.15rem);
}

.auth-footnote {
  margin: 0;
  font-size: 0.82rem;
  color: #7b8ba1 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* --- 2. Visual Showcase (Left Side) - Fully Centered High-End Layout --- */
.auth-visual--carwash {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: center;
  text-align: center;
  min-height: 100%;
  padding: clamp(1.5rem, 3.5vh, 2.75rem) clamp(1.75rem, 3.5vw, 3.5rem);
  background: #060a12;
  color: #ffffff;
  isolation: isolate;
  overflow: hidden;
}

.auth-visual__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  filter: saturate(1.05) contrast(1.02) brightness(1.02);
}

.auth-visual--carwash::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 21, 43, 0.45) 0%, rgba(8, 21, 43, 0.16) 36%, rgba(8, 21, 43, 0.52) 100%),
    radial-gradient(ellipse at center, rgba(14, 165, 233, 0.06) 0%, rgba(8, 21, 43, 0.28) 100%);
  pointer-events: none;
}

.auth-visual--carwash::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -28%;
  width: 40%;
  min-width: 18rem;
  height: 180%;
  background: linear-gradient(105deg, transparent 20%, rgba(56, 189, 248, 0.12) 46%, rgba(255, 255, 255, 0.22) 50%, rgba(56, 189, 248, 0.1) 54%, transparent 80%);
  filter: blur(12px);
  opacity: 0.75;
  transform: translateX(-55%) rotate(7deg);
  animation: carwashHeroLightSweep 8s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

.auth-brand--hero {
  position: relative;
  grid-row: 1;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
  margin: 0 auto;
}

.auth-brand--hero .brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-align: center;
  margin: 0 auto;
}

.auth-brand--hero .brand-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-brand--hero .brand-copy strong {
  display: block;
  font-size: 1.65rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 2px 16px rgba(245, 158, 11, 0.55), 0 3px 8px rgba(0, 0, 0, 0.95);
  margin-bottom: 0.25rem;
  text-align: center;
  letter-spacing: 0.4px;
}

.auth-brand--hero .brand-copy small {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  text-align: center;
}

.auth-visual__copy {
  position: relative;
  grid-row: 2;
  z-index: 2;
  align-self: center;
  justify-self: center;
  display: grid;
  justify-items: center;
  align-items: center;
  text-align: center;
  width: min(90%, 46rem);
  margin: 0 auto;
  padding: 1.25rem 1.75rem;
  border-radius: 1.5rem;
  background: radial-gradient(ellipse at center, rgba(10, 25, 47, 0.45) 0%, rgba(10, 25, 47, 0.08) 72%, transparent 100%);
}

.auth-visual__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  background: rgba(10, 25, 47, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.45);
  backdrop-filter: blur(10px);
  color: #f0f9ff;
  font-size: 0.86rem;
  font-weight: 700;
  margin: 0 auto 1.1rem auto;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.auth-visual__copy h2 {
  font-size: clamp(2.1rem, 3.2vw, 3rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
  margin: 0 auto 1rem auto;
  text-align: center;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.95);
  animation: heroTitleGentleVibe 4s ease-in-out infinite;
}

.auth-visual__copy p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #ffffff;
  margin: 0 auto;
  max-width: 38rem;
  text-align: center;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.95);
}

.auth-visual__footer {
  position: relative;
  grid-row: 3;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
}

.auth-feature-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.auth-feature-stack span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background: rgba(10, 25, 47, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  font-size: 0.85rem;
  font-weight: 700;
  color: #f8fafc;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.auth-feature-stack span i {
  color: #38bdf8;
  font-size: 1rem;
}

/* Animations */
@keyframes carwashHeroLightSweep {
  0%, 100% {
    transform: translateX(-65%) rotate(7deg);
    opacity: 0.35;
  }
  50% {
    transform: translateX(65%) rotate(7deg);
    opacity: 0.85;
  }
}

@keyframes heroTitleGentleVibe {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Responsive Overrides */
@media (max-width: 992px) {
  html:has(.auth-product-shell--carwash),
  body.auth-shell:has(.auth-product-shell--carwash) {
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
  }

  .auth-product-shell--carwash {
    grid-template-columns: 1fr !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
  }

  .auth-product-shell--carwash .auth-visual--carwash {
    display: none !important;
  }

  .auth-product-shell--carwash .auth-card--login {
    grid-column: 1 !important;
    max-width: 28rem !important;
    margin: 2.5rem auto !important;
    border-radius: 1.25rem !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
    padding: 2rem !important;
  }
}

/* ==========================================================================
   Standardized UI Utilities & Layout Foundation (Theme-Safe & Cross-Mode)
   ========================================================================== */

/* Display & Flexbox */
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-grid { display: grid !important; }
.d-none { display: none !important; }

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

/* Gaps */
.gap-1 { gap: 0.35rem !important; }
.gap-2 { gap: 0.65rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 2rem !important; }

/* Standardized CSS Grid Layouts */
.grid-2 {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
  gap: 1.25rem !important;
}

.grid-3 {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 1.25rem !important;
}

.grid-4 {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 1.25rem !important;
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }
}

/* Fallback Bootstrap-like Row & Col Grid (Safe & Responsive) */
.row {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-right: -0.5rem !important;
  margin-left: -0.5rem !important;
}

.row > * {
  box-sizing: border-box !important;
  padding-right: 0.5rem !important;
  padding-left: 0.5rem !important;
  width: 100% !important;
}

.row.g-1 { margin-right: -0.25rem !important; margin-left: -0.25rem !important; }
.row.g-1 > * { padding-right: 0.25rem !important; padding-left: 0.25rem !important; }
.row.g-2 { margin-right: -0.5rem !important; margin-left: -0.5rem !important; }
.row.g-2 > * { padding-right: 0.5rem !important; padding-left: 0.5rem !important; }
.row.g-3 { margin-right: -0.75rem !important; margin-left: -0.75rem !important; }
.row.g-3 > * { padding-right: 0.75rem !important; padding-left: 0.75rem !important; }
.row.g-4 { margin-right: -1rem !important; margin-left: -1rem !important; }
.row.g-4 > * { padding-right: 1rem !important; padding-left: 1rem !important; }

.col-12 { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }
.col-6 { flex: 0 0 50% !important; max-width: 50% !important; width: 50% !important; }
.col-4 { flex: 0 0 33.333% !important; max-width: 33.333% !important; width: 33.333% !important; }
.col-3 { flex: 0 0 25% !important; max-width: 25% !important; width: 25% !important; }

@media (min-width: 576px) {
  .col-sm-6 { flex: 0 0 50% !important; max-width: 50% !important; width: 50% !important; }
  .col-sm-4 { flex: 0 0 33.333% !important; max-width: 33.333% !important; width: 33.333% !important; }
  .col-sm-3 { flex: 0 0 25% !important; max-width: 25% !important; width: 25% !important; }
}

@media (min-width: 768px) {
  .col-md-6 { flex: 0 0 50% !important; max-width: 50% !important; width: 50% !important; }
  .col-md-4 { flex: 0 0 33.333% !important; max-width: 33.333% !important; width: 33.333% !important; }
  .col-md-3 { flex: 0 0 25% !important; max-width: 25% !important; width: 25% !important; }
  .col-md-2 { flex: 0 0 16.666% !important; max-width: 16.666% !important; width: 16.666% !important; }
  .col-md-8 { flex: 0 0 66.666% !important; max-width: 66.666% !important; width: 66.666% !important; }
  .col-md-9 { flex: 0 0 75% !important; max-width: 75% !important; width: 75% !important; }
}

@media (min-width: 992px) {
  .col-lg-3 { flex: 0 0 25% !important; max-width: 25% !important; width: 25% !important; }
  .col-lg-4 { flex: 0 0 33.333% !important; max-width: 33.333% !important; width: 33.333% !important; }
  .col-lg-6 { flex: 0 0 50% !important; max-width: 50% !important; width: 50% !important; }
  .col-lg-8 { flex: 0 0 66.666% !important; max-width: 66.666% !important; width: 66.666% !important; }
}

/* Theme-Safe Semantic Colors & Backgrounds (Works perfectly in Dark & Light) */
.text-heading,
.text-light { color: var(--text) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-dim) !important; }
.text-brand { color: var(--brand) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

.bg-dark,
.card.bg-dark,
.surface-card {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.bg-dark-subtle {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.border-secondary,
.border-secondary-subtle {
  border-color: var(--border) !important;
}

.bg-primary-subtle {
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
}

.bg-success-subtle {
  background: var(--success-soft) !important;
  color: var(--success) !important;
}

.bg-danger-subtle {
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
}

.bg-warning-subtle {
  background: var(--warning-soft) !important;
  color: var(--warning) !important;
}

.bg-info-subtle {
  background: var(--info-soft) !important;
  color: var(--info) !important;
}

/* Form Controls Theme Compatibility */
.form-control,
.form-select {
  background-color: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.55rem 0.85rem !important;
  font-family: inherit !important;
  font-size: 0.9rem !important;
  transition: all var(--transition-fast) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--border-focus) !important;
  box-shadow: var(--focus-ring) !important;
  outline: none !important;
}

.form-label {
  display: block !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 0.35rem !important;
}

/* Margin & Padding Utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }

.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

/* Font size utilities */
.fs-7 { font-size: 0.85rem !important; }
.fs-8 { font-size: 0.75rem !important; }

/* ==========================================================================
   Modern Multi-Tier Pricing Cards & Input Addon Groups
   ========================================================================== */
.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .pricing-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .pricing-cards-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.pricing-tier-card:hover {
  border-color: var(--border-hover, var(--brand-light));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.pricing-tier-card--cost {
  border-top: 3.5px solid #64748b;
}

.pricing-tier-card--retail {
  border-top: 3.5px solid var(--brand);
}

.pricing-tier-card--wholesale {
  border-top: 3.5px solid #3b82f6;
}

.pricing-tier-card--mega {
  border-top: 3.5px solid #8b5cf6;
}

.pricing-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 26px;
}

.pricing-tier-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tier-tag {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.tier-tag--retail {
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tier-tag--wholesale {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.tier-tag--mega {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.revalue-link-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.revalue-link-badge:hover {
  background: #f59e0b;
  color: #ffffff;
}

/* Input group with attached addon */
.pricing-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  direction: ltr;
  border-radius: var(--radius-md);
}

.pricing-input-group .pricing-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: 0 !important;
  text-align: left;
  direction: ltr;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
  background: var(--surface);
  padding: 0.45rem 0.85rem !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pricing-input-group .pricing-input:focus {
  z-index: 2;
  border-color: var(--border-focus) !important;
  box-shadow: var(--focus-ring) !important;
}

.pricing-input-group .pricing-input[readonly] {
  background: var(--surface-2) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
}

.pricing-input-group .pricing-currency-addon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.82rem;
  white-space: nowrap;
  user-select: none;
}

.addon--cost {
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--border);
}

.addon--retail {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: rgba(16, 185, 129, 0.35);
}

.addon--wholesale {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.35);
}

.addon--mega {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.35);
}

.pricing-tier-footer {
  min-height: 20px;
}

.pricing-tier-hint {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: block;
}


