/* ============================================
   SELLERHYPE — Complete Stylesheet V2.0
   Design System + Layout + Components + Pages
   ============================================ */

/* ---- 1. FONT FACES ---- */
@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/webfonts/mulish-v18-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/webfonts/mulish-v18-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/webfonts/mulish-v18-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/webfonts/mulish-v18-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/webfonts/mulish-v18-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/webfonts/mulish-v18-latin-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/webfonts/Urbanist-Light.woff2') format('woff2');
}
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/webfonts/Urbanist-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/webfonts/Urbanist-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/webfonts/Urbanist-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/webfonts/Urbanist-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/webfonts/Urbanist-ExtraBold.woff2') format('woff2');
}


/* ============================================
   SECTION 1: PRELOADER SYSTEM V2.0
   ============================================
   Glass morphism preloader with real-time theme detection.
   Works with dark mode toggle and network-aware timeouts.
   ============================================ */

/* Preloader fade-out animation */
@keyframes preloaderFadeOut {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Spinner animation (fallback if inline style fails) */
@keyframes preloaderSpinFallback {
  to {
    transform: rotate(360deg);
  }
}

/* Light mode preloader (default) */
#sellerhype-preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease, visibility 300ms ease;
}

#sellerhype-preloader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #7c3aed;
  border-radius: 50%;
  animation: preloaderSpinFallback 0.8s linear infinite;
}

/* Dark mode preloader */
@media (prefers-color-scheme: dark) {
  #sellerhype-preloader {
    background: rgba(26, 26, 26, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
  }

  #sellerhype-preloader-spinner {
    border-color: #374151;
    border-top-color: #a78bfa;
  }
}

/* Override light mode when [data-theme="dark"] is set */
[data-theme="dark"] #sellerhype-preloader {
  background: rgba(26, 26, 26, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #sellerhype-preloader-spinner {
  border-color: #374151;
  border-top-color: #a78bfa;
}

/* Override dark mode when [data-theme="light"] is set */
[data-theme="light"] #sellerhype-preloader {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] #sellerhype-preloader-spinner {
  border-color: #e5e7eb;
  border-top-color: #7c3aed;
}

/* Error state styling */
#sellerhype-preloader-error {
  text-align: center;
  animation: fadeIn 300ms ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Retry button */
#preloader-retry-btn {
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 200ms ease;
}

#preloader-retry-btn:hover {
  background: #6d28d9;
}

#preloader-retry-btn:active {
  background: #5b21b6;
}

[data-theme="dark"] #preloader-retry-btn {
  background: #a78bfa;
  color: #1a1a1a;
}

[data-theme="dark"] #preloader-retry-btn:hover {
  background: #c4b5fd;
}


/* ============================================
   2. DESIGN TOKENS (LIGHT MODE)
   ============================================ */
:root {
  --font-body: "Mulish", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-heading: "Urbanist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --spacing: 0.25rem;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --main-padding: 16px;

  /* Background */
  --background: 0 0% 100%;
  --background-paper: 0 0% 100%;

  /* Gray Scale */
  --grey-25: 0 0% 97%;
  --grey-50: 0 0% 94%;
  --grey-100: 0 0% 89%;
  --grey-200: 0 0% 82%;
  --grey-300: 0 0% 74%;
  --grey-400: 0 0% 66%;
  --grey-500: 0 0% 58%;
  --grey-600: 0 0% 50%;
  --grey-700: 0 0% 42%;
  --grey-800: 0 0% 34%;
  --grey-900: 0 0% 26%;

  /* Text — WCAG AA compliant */
  --text-primary: 0 0% 15%;
  --text-primary-light: 0 0% 25%;
  --text-primary-dark: 0 0% 8%;
  --text-secondary: 0 0% 40%;
  --text-secondary-light: 0 0% 50%;
  --text-secondary-dark: 0 0% 30%;
  --text-disabled: 0 0% 58%;
  --text-disabled-light: 0 0% 68%;
  --text-disabled-dark: 0 0% 48%;
  --text-muted: 0 0% 50%;
  --text-muted-light: 0 0% 60%;
  --text-muted-dark: 0 0% 40%;
  --text-contrast: 0 0% 100%;
  --text-contrast-alternative: 0 0% 100%;

  /* Brand Colors — reduced saturation for professional feel */
  --primary: 278 65% 55%;
  --primary-light: 278 65% 65%;
  --primary-dark: 278 65% 45%;
  --secondary: 299 60% 53%;
  --secondary-light: 299 60% 63%;
  --secondary-dark: 299 60% 43%;
  --accent-1: 16 60% 60%;
  --accent-1-light: 16 60% 70%;
  --accent-1-dark: 16 60% 50%;
  --accent-2: 44 60% 53%;
  --accent-2-light: 44 60% 63%;
  --accent-2-dark: 44 60% 43%;
  --accent-3: 85 44% 48%;
  --accent-3-light: 85 44% 58%;
  --accent-3-dark: 85 44% 38%;
  --accent-4: 136 44% 48%;
  --accent-4-light: 136 44% 58%;
  --accent-4-dark: 136 44% 38%;
  --accent-5: 177 50% 52%;
  --accent-5-light: 177 50% 62%;
  --accent-5-dark: 177 50% 42%;
  --accent-6: 207 80% 62%;
  --accent-6-light: 207 80% 72%;
  --accent-6-dark: 207 80% 52%;

  /* Status Colors */
  --error: 347 64% 55%;
  --error-light: 347 64% 65%;
  --error-dark: 347 64% 45%;
  --success: 108 45% 58%;
  --success-light: 108 45% 68%;
  --success-dark: 108 45% 48%;
  --warning: 25 82% 60%;
  --warning-light: 25 82% 70%;
  --warning-dark: 25 82% 50%;
  --info: 193 72% 58%;
  --info-light: 193 72% 68%;
  --info-dark: 193 72% 48%;
  --rating: 35 99% 54%;
  --rating-light: 35 99% 64%;
  --rating-dark: 35 99% 44%;
  --destructive: 0 72% 55%;
  --destructive-light: 0 72% 65%;
  --destructive-dark: 0 72% 45%;


  /* Shadows — visible depth hierarchy */
  --shadow-2xs: 0 1px 2px hsl(0 0% 0% / 0.06);
  --shadow-xs: 0 1px 3px hsl(0 0% 0% / 0.08), 0 1px 2px hsl(0 0% 0% / 0.06);
  --shadow-sm: 0 2px 6px hsl(0 0% 0% / 0.08), 0 1px 3px hsl(0 0% 0% / 0.06);
  --shadow-md: 0 4px 12px hsl(0 0% 0% / 0.10), 0 2px 4px hsl(0 0% 0% / 0.06);
  --shadow-lg: 0 8px 24px hsl(0 0% 0% / 0.12), 0 4px 8px hsl(0 0% 0% / 0.08);
  --shadow-xl: 0 16px 32px hsl(0 0% 0% / 0.14), 0 8px 16px hsl(0 0% 0% / 0.08);
  --shadow-2xl: 0 24px 48px hsl(0 0% 0% / 0.16), 0 12px 24px hsl(0 0% 0% / 0.08);

  /* Darker shadows for colored cards */
  --shadow-darker-2xs: 0 1px 2px hsl(0 0% 0% / 0.10);
  --shadow-darker-xs: 0 1px 3px hsl(0 0% 0% / 0.14), 0 1px 2px hsl(0 0% 0% / 0.10);
  --shadow-darker-sm: 0 2px 6px hsl(0 0% 0% / 0.16), 0 1px 3px hsl(0 0% 0% / 0.10);
  --shadow-darker-md: 0 4px 12px hsl(0 0% 0% / 0.20), 0 2px 4px hsl(0 0% 0% / 0.10);
  --shadow-darker-lg: 0 8px 24px hsl(0 0% 0% / 0.24), 0 4px 8px hsl(0 0% 0% / 0.12);
  --shadow-darker-xl: 0 16px 32px hsl(0 0% 0% / 0.28), 0 8px 16px hsl(0 0% 0% / 0.14);
  --shadow-darker-2xl: 0 24px 48px hsl(0 0% 0% / 0.32), 0 12px 24px hsl(0 0% 0% / 0.16);
  --inner-shadow-opacity: 0.08;

  --shadow-inside: inset 0px 0px 160px 160px rgba(255, 255, 255, var(--inner-shadow-opacity));
  --line: hsl(0 0% 100%);

  /* Border Radius — consolidated to 5, preserving brand roundness */
  --radius-sm: 0.65rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-full: 9999px;

  --radius-btn: var(--radius-md);
  --radius-card: var(--radius-xl);
  --radius-chip: var(--radius-sm);
  --radius-input: var(--radius-lg);
  --radius-modal: var(--radius-xl);
  --radius-dropdown: var(--radius-lg);
  --radius-skeleton: var(--radius-md);
  --shadow-dropdown: var(--shadow-darker-md);

  /* Backward-compatible aliases for old token names */
  --border-radius-4xs: var(--radius-sm);
  --border-radius-3xs: var(--radius-sm);
  --border-radius-2xs: var(--radius-sm);
  --border-radius-xs: var(--radius-md);
  --border-radius-sm: var(--radius-md);
  --border-radius-md: var(--radius-md);
  --border-radius-lg: var(--radius-lg);
  --border-radius-xl: var(--radius-lg);
  --border-radius-2xl: var(--radius-xl);
  --border-radius-3xl: var(--radius-xl);
  --border-radius-4xl: var(--radius-xl);

  /* Transitions */
  --default-transition-duration: 0.15s;
  --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  --transition-base: 0.15s cubic-bezier(.4, 0, .2, 1);
  --transition-fast: 0.1s ease;

  /* Glass Effect */
  --blur-sm: 8px;
  --glass-blur: 15px;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --foreground-opacity: 0.08;

  /* Typography Scale — increased for accessibility */
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.125rem;
  --text-2xl: 1.25rem;
  --text-3xl: 1.625rem;

  --weight-thin: 100;
  --weight-extralight: 200;
  --weight-light: 300;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --z-header: 50;
  color-scheme: light;
}

/* ============================================
   3. DARK MODE
   ============================================ */
.dark,
[data-mode="dark"],
[data-theme="dark"] {
  --background: 226 4% 12%;
  --background-paper: 226 3% 15%;
  --grey-25: 226 3% 17%;
  --grey-50: 226 3% 20%;
  --grey-100: 226 3% 24%;
  --grey-200: 226 3% 28%;
  --grey-300: 226 3% 33%;
  --grey-400: 226 3% 38%;
  --grey-500: 226 3% 43%;
  --grey-600: 226 3% 48%;
  --grey-700: 226 3% 53%;
  --grey-800: 226 3% 58%;
  --grey-900: 226 3% 63%;

  --text-primary: 0 0% 92%;
  --text-primary-light: 0 0% 98%;
  --text-primary-dark: 0 0% 85%;
  --text-secondary: 0 0% 65%;
  --text-secondary-light: 0 0% 75%;
  --text-secondary-dark: 0 0% 55%;
  --text-disabled: 0 0% 45%;
  --text-disabled-light: 0 0% 55%;
  --text-disabled-dark: 0 0% 35%;
  --text-muted: 0 0% 50%;
  --text-muted-light: 0 0% 60%;
  --text-muted-dark: 0 0% 40%;
  --text-contrast: 0 0% 100%;
  --text-contrast-alternative: 0 0% 8%;

  --primary: 278 70% 62%;
  --primary-light: 278 70% 72%;
  --primary-dark: 278 70% 52%;
  --secondary: 299 65% 60%;
  --secondary-light: 299 65% 70%;
  --secondary-dark: 299 65% 50%;
  --accent-1: 16 65% 65%;
  --accent-1-light: 16 65% 75%;
  --accent-1-dark: 16 65% 55%;
  --accent-2: 44 65% 60%;
  --accent-2-light: 44 65% 70%;
  --accent-2-dark: 44 65% 50%;
  --accent-3: 85 40% 54%;
  --accent-3-light: 85 40% 64%;
  --accent-3-dark: 85 40% 44%;
  --accent-4: 136 40% 54%;
  --accent-4-light: 136 40% 64%;
  --accent-4-dark: 136 40% 44%;
  --accent-5: 177 48% 58%;
  --accent-5-light: 177 48% 68%;
  --accent-5-dark: 177 48% 48%;
  --accent-6: 207 85% 68%;
  --accent-6-light: 207 85% 78%;
  --accent-6-dark: 207 85% 58%;

  --shadow-2xs: 0 1px 2px hsl(0 0% 0% / 0.20);
  --shadow-xs: 0 1px 3px hsl(0 0% 0% / 0.25), 0 1px 2px hsl(0 0% 0% / 0.20);
  --shadow-sm: 0 2px 6px hsl(0 0% 0% / 0.25), 0 1px 3px hsl(0 0% 0% / 0.20);
  --shadow-md: 0 4px 12px hsl(0 0% 0% / 0.30), 0 2px 4px hsl(0 0% 0% / 0.20);
  --shadow-lg: 0 8px 24px hsl(0 0% 0% / 0.35), 0 4px 8px hsl(0 0% 0% / 0.25);
  --shadow-xl: 0 16px 32px hsl(0 0% 0% / 0.40), 0 8px 16px hsl(0 0% 0% / 0.30);
  --shadow-2xl: 0 24px 48px hsl(0 0% 0% / 0.45), 0 12px 24px hsl(0 0% 0% / 0.35);

  --shadow-darker-2xs: 0 1px 2px hsl(0 0% 0% / 0.35);
  --shadow-darker-xs: 0 1px 3px hsl(0 0% 0% / 0.40), 0 1px 2px hsl(0 0% 0% / 0.35);
  --shadow-darker-sm: 0 2px 6px hsl(0 0% 0% / 0.40), 0 1px 3px hsl(0 0% 0% / 0.35);
  --shadow-darker-md: 0 4px 12px hsl(0 0% 0% / 0.45), 0 2px 4px hsl(0 0% 0% / 0.35);
  --shadow-darker-lg: 0 8px 24px hsl(0 0% 0% / 0.50), 0 4px 8px hsl(0 0% 0% / 0.40);
  --shadow-darker-xl: 0 16px 32px hsl(0 0% 0% / 0.55), 0 8px 16px hsl(0 0% 0% / 0.45);
  --shadow-darker-2xl: 0 24px 48px hsl(0 0% 0% / 0.60), 0 12px 24px hsl(0 0% 0% / 0.50);
  --inner-shadow-opacity: 0.15;

  --shadow-inside: inset 0px 0px 160px 160px rgba(0, 0, 0, var(--inner-shadow-opacity));
  --line: hsl(0 0% 100% / 0.04);
  --glass-bg: rgba(30, 32, 40, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --foreground-opacity: 0.15;
  color-scheme: dark;
}

/* ============================================
   4. GLOBAL STYLES
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-body);
}

select,
select option,
input,
textarea,
button {
  font-family: inherit;
}

body {
  margin: 0;
  background-image: url('/assets/images/backgrounds/waves-light.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

[data-mode="dark"] body,
[data-theme="dark"] body {
  background-image: url('/assets/images/backgrounds/waves-dark.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.app-shell {
  overflow: hidden;
  height: 100vh;
}

/* FOCUS: Restored for accessibility with visible ring */
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

::selection {
  background-color: color-mix(in oklab, hsl(var(--primary)) 50%, transparent);
}

a {
  color: inherit;
  text-decoration: inherit;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: hsl(var(--primary));
  color: hsl(var(--text-contrast));
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
}

/* Prevent FOUC: hide content until shell builds */
.main-content {
  visibility: hidden;
}
html.shell-ready .main-content {
  visibility: visible;
}

/* ============================================
   5. REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   6. SCROLLBAR (V4.1 — Slim, consistent, app-wide)
   ============================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--grey-200)); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--grey-300)); }
::-webkit-scrollbar-button { visibility: hidden; }
* { scrollbar-width: thin; scrollbar-color: hsl(var(--grey-200)) transparent; }

/* ============================================
   7. RESPONSIVE MAIN PADDING
   ============================================ */
@media only screen and (width <= 960px) {
  :root {
    --main-padding: 12px;
  }
}
@media only screen and (width <= 540px) {
  :root {
    --main-padding: 12px;
  }
}

/* ============================================
   8. TYPOGRAPHY
   ============================================ */
h1, .MuiTypography-h1 {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  line-height: 1;
  font-weight: var(--weight-bold);
}
h2, .MuiTypography-h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  line-height: 1.11;
  font-weight: var(--weight-bold);
}
h3, .MuiTypography-h3 {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: var(--weight-bold);
}
h4, .MuiTypography-h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.33;
  font-weight: var(--weight-bold);
}
h5, .MuiTypography-h5 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: var(--weight-bold);
}
h6, .MuiTypography-h6 {
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: var(--weight-bold);
}

/* ============================================
   9. BUTTONS
   ============================================ */
.btn,
.MuiButtonBase-root {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 36px;
  border: 0;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
  text-decoration: none;
  white-space: nowrap;
  gap: 8px;
  outline: none;
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
  line-height: 1.4286;
  letter-spacing: normal;
  text-transform: none;
  border-radius: var(--radius-btn);
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform .1s ease, opacity var(--transition-fast);
  background-color: transparent;
  color: inherit;
  padding: 8px 20px;
}
.btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
.btn:active:not(:disabled) {
  transform: scale(.97);
}
.btn:disabled,
.btn.disabled,
.btn[disabled] {
  cursor: not-allowed;
  pointer-events: none;
  opacity: .45;
}
.btn-lg {
  padding: 10px 26px;
  font-size: .9375rem;
  min-width: 42px;
  border-radius: var(--radius-btn);
}
.btn-sm {
  padding: 6px 14px;
  font-size: .8125rem;
  min-width: 32px;
  border-radius: var(--radius-btn);
  gap: 6px;
}
.btn-xs {
  padding: 4px 12px;
  font-size: .75rem;
  min-width: 28px;
  border-radius: var(--radius-btn);
  gap: 4px;
}
.btn-icon-only {
  padding: 8px !important;
  min-width: auto !important;
  aspect-ratio: 1;
}
.btn-icon-only.btn-sm {
  padding: 6px !important;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.btn-sm svg {
  width: 16px;
  height: 16px;
}
.btn-xs svg {
  width: 14px;
  height: 14px;
}

/* Global: no buttons touching — use gap on parent containers instead */

/* Button Variants */
.btn-contained {
  color: hsl(var(--text-contrast));
  background-color: hsl(var(--primary));
  box-shadow: var(--shadow-2xs);
}
.btn-contained:hover:not(:disabled) {
  background-color: hsl(var(--primary-dark));
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outlined {
  color: hsl(var(--primary));
  background-color: transparent;
  border: 1px solid hsl(var(--primary));
  padding: 7px 19px;
}
.btn-outlined.btn-sm { padding: 5px 13px; }
.btn-outlined.btn-xs { padding: 3px 11px; }
.btn-outlined:hover:not(:disabled) {
  background-color: color-mix(in oklab, hsl(var(--primary)) 8%, transparent);
  transform: translateY(-1px);
}

.btn-pastel {
  color: hsl(var(--primary));
  background-color: color-mix(in oklab, hsl(var(--primary)) 12%, transparent);
  border: none;
}
.btn-pastel:hover:not(:disabled) {
  background-color: color-mix(in oklab, hsl(var(--primary)) 20%, transparent);
  transform: translateY(-1px);
}

.btn-text {
  color: hsl(var(--primary));
  background-color: transparent;
  border: none;
  min-width: auto;
  padding: 6px 10px;
}
.btn-text.btn-sm { padding: 4px 7px; }
.btn-text:hover:not(:disabled) {
  background-color: color-mix(in oklab, hsl(var(--primary)) 8%, transparent);
}

.btn-success {
  background-color: hsl(var(--success));
  color: hsl(var(--text-contrast));
}
.btn-success:hover { background-color: hsl(var(--success-light)); }

.btn-danger {
  background-color: hsl(var(--error));
  color: hsl(var(--text-contrast));
}
.btn-danger:hover { background-color: hsl(var(--error-light)); }

.btn-warning {
  background-color: hsl(var(--warning));
  color: hsl(var(--text-contrast));
}
.btn-warning:hover { background-color: hsl(var(--warning-light)); }

.btn-info {
  background-color: hsl(var(--info));
  color: hsl(var(--text-contrast));
}
.btn-info:hover { background-color: hsl(var(--info-light)); }

.btn-secondary {
  background-color: hsl(var(--grey-25));
  color: hsl(var(--text-primary));
  border: 1px solid hsl(var(--grey-100));
}
.btn-secondary:hover { background-color: hsl(var(--grey-50)); }

/* ============================================
   10. CARDS
   ============================================ */
.card,
.section-card,
.MuiCard-root {
  background-color: hsl(var(--background-paper));
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid hsl(var(--grey-50));
  box-shadow: var(--shadow-2xs);
  transition: box-shadow var(--transition-fast);
  overflow: visible;
}
.card:hover,
.section-card:hover {
  box-shadow: var(--shadow-darker-sm);
}
.section-card {
  padding: 16px;
  margin-bottom: var(--spacing-md);
  border-radius: var(--radius-md);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-link {
  font-size: var(--text-sm);
  color: hsl(var(--primary));
  font-weight: var(--weight-medium);
  text-decoration: none;
}
.panel-link:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .section-card {
    padding: 12px;
    margin-bottom: var(--spacing-md);
    overflow: visible;
  }
}

/* Cards containing tables — preserves border-radius */
.section-card-table {
  overflow: hidden;
}
.section-card-scroll {
  overflow-x: auto;
  border-radius: inherit;
}

/* Stat card active filter state — subtle border, no ring */
.stat-card-active {
  border-color: hsl(var(--primary));
  box-shadow: var(--shadow-darker-sm);
}

/* ============================================
   11. FORM INPUTS
   ============================================ */
input,
select,
textarea,
.MuiInputBase-input {
  background-color: hsl(var(--grey-25));
  border: none;
  border-radius: var(--radius-input);
  padding: .5rem 1rem;
  color: hsl(var(--text-primary));
  font-size: var(--text-base);
  font-family: var(--font-body);
  width: 100%;
  outline: 2px solid transparent;
  outline-offset: -1px;
  transition: background-color .15s cubic-bezier(.4, 0, .2, 1), border-color .15s cubic-bezier(.4, 0, .2, 1), box-shadow .15s cubic-bezier(.4, 0, .2, 1), outline .15s cubic-bezier(.4, 0, .2, 1);
}
input:focus,
select:focus,
textarea:focus,
.MuiInputBase-input:focus {
  outline: 2px solid hsl(var(--grey-300));
  border-color: transparent;
  background-color: hsl(var(--background-paper));
}
input:hover:not(:disabled):not(:focus),
select:hover:not(:disabled):not(:focus),
textarea:hover:not(:disabled):not(:focus),
.MuiInputBase-input:hover:not(:disabled):not(:focus) {
  background-color: hsl(var(--grey-50));
}
input::placeholder,
textarea::placeholder {
  color: hsl(var(--text-muted));
  opacity: 0.7;
}

.form-input.error,
.form-select.error {
  outline: 2px solid hsl(var(--error));
  border-color: hsl(var(--error));
  background-color: color-mix(in oklab, hsl(var(--error)) 5%, transparent);
}
input:disabled,
select:disabled,
textarea:disabled {
  color: hsl(var(--text-primary));
  opacity: .5;
}
.form-select {
  border-radius: var(--radius-input);
  min-height: 42px;
  position: relative;
  z-index: 1;
  padding: 8px 42px 8px 16px;
  line-height: 1.4;
}

/* ============================================
   12. TABLES
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
}
th,
.MuiTableCell-head {
  text-align: left;
  padding: 12px;
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  line-height: 1.5rem;
  border-color: hsl(var(--grey-50));
}
td,
.MuiTableCell-root {
  padding: 12px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5rem;
  border-color: hsl(var(--grey-50));
  text-align: start;
}
tr:hover td,
.MuiTableRow-hover:hover {
  background-color: hsl(var(--grey-25));
}

/* ============================================
   13. BADGES / CHIPS / STATUS (UNIFIED)
   ============================================ */
.badge,
.chip,
.MuiChip-root {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  background-color: hsl(var(--grey-25));
  border: none;
  box-shadow: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Unified status badges */
.badge-pending, .status-pending {
  background: color-mix(in oklab, hsl(var(--warning)) 15%, transparent);
  color: hsl(var(--warning-dark));
}
.badge-paid, .badge-completed, .badge-confirmed,
.status-completed, .status-verified, .status-confirmed, .status-delivered {
  background: color-mix(in oklab, hsl(var(--success)) 15%, transparent);
  color: hsl(var(--success-dark));
}
.badge-cancelled, .status-cancelled {
  background: color-mix(in oklab, hsl(var(--error)) 15%, transparent);
  color: hsl(var(--error-dark));
}
.badge-info, .status-dispatched, .status-ready {
  background: color-mix(in oklab, hsl(var(--info)) 15%, transparent);
  color: hsl(var(--info-dark));
}
.badge-delivered {
  background: color-mix(in oklab, hsl(var(--accent-2)) 15%, transparent);
  color: hsl(var(--accent-2-dark));
}
.badge-postponed, .status-postponed {
  background: color-mix(in oklab, hsl(var(--accent-1)) 15%, transparent);
  color: hsl(var(--accent-1-dark));
}
.badge-awaiting {
  background: color-mix(in oklab, hsl(var(--accent-3)) 15%, transparent);
  color: hsl(var(--accent-3-dark));
}
.badge-success, .MuiChip-filled.MuiChip-colorSuccess {
  background: color-mix(in oklab, hsl(var(--success)) 15%, transparent);
  color: hsl(var(--success-dark));
}
.badge-warning, .MuiChip-filled.MuiChip-colorWarning {
  background: color-mix(in oklab, hsl(var(--warning)) 15%, transparent);
  color: hsl(var(--warning-dark));
}
.badge-danger, .MuiChip-filled.MuiChip-colorError {
  background: color-mix(in oklab, hsl(var(--error)) 15%, transparent);
  color: hsl(var(--error-dark));
}
.MuiChip-filled.MuiChip-colorPrimary {
  background-color: hsl(var(--primary));
  color: hsl(var(--text-contrast));
}

/* Product badge pills — 30% transparency */
.badge-new {
  background: color-mix(in oklab, hsl(var(--info)) 30%, transparent);
  color: hsl(var(--info-dark));
}
.badge-bestseller {
  background: color-mix(in oklab, hsl(var(--warning)) 30%, transparent);
  color: hsl(var(--warning-dark));
}
.badge-limited {
  background: color-mix(in oklab, hsl(var(--error)) 30%, transparent);
  color: hsl(var(--error-dark));
}
.badge-featured {
  background: color-mix(in oklab, hsl(var(--accent-2)) 30%, transparent);
  color: hsl(var(--accent-2-dark));
}

/* Status pill style */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .625rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  font-family: var(--font-body);
}
.status-pending { background-color: color-mix(in oklab, hsl(var(--warning)) 15%, transparent); color: hsl(var(--warning-dark)); }
.status-verified, .status-confirmed { background-color: color-mix(in oklab, hsl(var(--info)) 15%, transparent); color: hsl(var(--info-dark)); }
.status-completed { background-color: color-mix(in oklab, hsl(var(--success)) 15%, transparent); color: hsl(var(--success-dark)); }
.status-cancelled { background-color: color-mix(in oklab, hsl(var(--error)) 15%, transparent); color: hsl(var(--error-dark)); }
.status-delivered { background-color: color-mix(in oklab, hsl(var(--accent-2)) 15%, transparent); color: hsl(var(--accent-2-dark)); }
.status-dispatched, .status-ready { background-color: color-mix(in oklab, hsl(var(--primary)) 15%, transparent); color: hsl(var(--primary-dark)); }
.status-postponed { background-color: color-mix(in oklab, hsl(var(--accent-1)) 15%, transparent); color: hsl(var(--accent-1-dark)); }

/* Badges inside tables */
td .badge, th .badge, table .badge {
  font-size: var(--text-xs) !important;
  padding: 4px 10px !important;
  border-radius: var(--radius-full) !important;
  line-height: 1.4 !important;
}

/* Compact text badge */
.badge-sm {
  padding: 0 4px;
  font-size: 0.5625rem;
  background: transparent;
  border: none;
  gap: 2px;
}
.badge-sm.badge-success { color: hsl(var(--success-dark)); }
.badge-sm.badge-cancelled { color: hsl(var(--error-dark)); }
.badge-sm.badge-info { color: hsl(var(--info-dark)); }
.badge-sm.badge-pending { color: hsl(var(--warning-dark)); }
.badge-sm.badge-awaiting { color: hsl(var(--accent-3-dark)); }
.badge-sm.badge-new { color: hsl(var(--info-dark)); }
.badge-sm.badge-bestseller { color: hsl(var(--warning-dark)); }
.badge-sm.badge-limited { color: hsl(var(--error-dark)); }
.badge-sm.badge-featured { color: hsl(var(--accent-2-dark)); }


/* ============================================
   14. NAVIGATION / SIDEBAR
   ============================================ */
.nav-item,
.MuiListItemButton-root {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-md);
  color: hsl(var(--text-primary));
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
  line-height: 1.25rem;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s cubic-bezier(.4, 0, .2, 1);
  box-shadow: none;
}
.nav-item:hover,
.MuiListItemButton-root:hover {
  background-color: color-mix(in oklab, hsl(var(--grey-500)) 10%, transparent);
  color: hsl(var(--text-primary));
}
.nav-item.active,
.MuiListItemButton-root.active,
.MuiListItemButton-root.Mui-selected {
  background-color: color-mix(in oklab, hsl(var(--primary)) 12%, transparent);
  color: hsl(var(--primary));
  border-left: 3px solid hsl(var(--primary));
}

/* ============================================
   15. SIDEBAR (Desktop)
   ============================================ */
.desktop-sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
}
.sidebar-panel-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.25rem;
  text-transform: none;
  letter-spacing: 0em;
  color: hsl(var(--text-secondary));
  padding: .5rem 1rem;
}

/* ============================================
   16. HEADER
   ============================================ */
.sh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 64px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ============================================
   17. MOBILE SIDEBAR
   ============================================ */
#mobile-sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}
.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid hsl(var(--grey-50));
}

/* ============================================
   18. PAGE HEADER
   ============================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0 0;
}
@media (max-width: 767px) {
  .page-header { padding: 14px 0 6px; }
}
.page-header h1 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  font-family: var(--font-heading);
  margin: 0 0 4px 0;
}
.page-header p {
  font-size: 13px;
  color: hsl(var(--text-secondary));
  margin: 0;
}
.breadcrumb {
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
  margin-top: 3px;
}
.breadcrumb b {
  color: hsl(var(--text-secondary));
  font-weight: var(--weight-medium);
}
@media (max-width: 768px) {
  .page-header { padding: 14px 16px 6px; }
  .page-header h1 { font-size: 19px; }
}

/* ============================================
   19. SECTION TITLE
   ============================================ */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
}
.section-title {
  font-size: 1.25rem;
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
  font-family: var(--font-heading);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================
   20. STATS CARDS — Global Standard
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .625rem;
  margin-bottom: var(--spacing-md);
}
.stats-grid > * { height: 100%; }

.stat-card {
  min-height: 88px;
  height: 100%;
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 0;
  padding: .25rem;
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-50));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-2xs);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  overflow: hidden;
  height: 96px;
  min-height: 96px;
  max-height: 96px;
  font-family: var(--font-body);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-darker-sm);
}
.stat-card:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

.stat-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  align-self: stretch;
  flex-shrink: 0;
  border-radius: var(--radius-xl);
  transition: background .2s ease;
  order: 2;
}
.stat-icon-box svg {
  width: 24px;
  height: 24px;
}

.icon-primary { background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent); color: hsl(var(--primary)); }
.icon-secondary { background: color-mix(in oklab, hsl(var(--secondary)) 10%, transparent); color: hsl(var(--secondary)); }
.icon-accent-1 { background: color-mix(in oklab, hsl(var(--accent-1)) 10%, transparent); color: hsl(var(--accent-1)); }
.icon-accent-2 { background: color-mix(in oklab, hsl(var(--accent-2)) 10%, transparent); color: hsl(var(--accent-2)); }
.icon-accent-3 { background: color-mix(in oklab, hsl(var(--accent-3)) 12%, transparent); color: hsl(var(--accent-3)); }
.icon-accent-4 { background: color-mix(in oklab, hsl(var(--accent-4)) 12%, transparent); color: hsl(var(--accent-4)); }
.icon-accent-5 { background: color-mix(in oklab, hsl(var(--accent-5)) 12%, transparent); color: hsl(var(--accent-5)); }
.icon-accent-6 { background: color-mix(in oklab, hsl(var(--accent-6)) 12%, transparent); color: hsl(var(--accent-6)); }
.icon-warning { background: color-mix(in oklab, hsl(var(--warning)) 10%, transparent); color: hsl(var(--warning)); }
.icon-info-status { background: color-mix(in oklab, hsl(var(--info)) 10%, transparent); color: hsl(var(--info)); }
.icon-error-status { background: color-mix(in oklab, hsl(var(--error)) 10%, transparent); color: hsl(var(--error)); }
.icon-success-status { background: color-mix(in oklab, hsl(var(--success)) 10%, transparent); color: hsl(var(--success)); }

.stat-content {
  padding: 1rem;
  flex: 1;
  min-width: 0;
  order: 1;
  overflow: hidden;
}
.stat-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: hsl(var(--text-secondary));
  line-height: 1.25;
  margin-bottom: 0;
}
.stat-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 2px;
}
.stat-value {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  line-height: 1.334;
  color: hsl(var(--text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-width: 0;
}

.stat-value[data-currency] {
  font-size: var(--text-xl);
  letter-spacing: -0.2px;
}

.stat-card-active {
  border-color: hsl(var(--primary));
  box-shadow: var(--shadow-darker-sm);
}

/* ============================================
   21. QUICK ACTIONS
   ============================================ */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  margin-bottom: var(--spacing-md);
}
@media (min-width: 640px) {
  .quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); }
}
.action-card {
  display: flex;
  align-items: center;
  gap: 0;
  padding: .25rem;
  background: hsl(var(--background-paper));
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
  border: 1px solid hsl(var(--grey-50));
}
.action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-darker-sm);
}
.action-card:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
.action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  align-self: stretch;
  flex-shrink: 0;
  border-radius: var(--radius-xl);
}
.action-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.action-content { padding: 1rem; flex: 1; min-width: 0; }
.action-title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1.25;
}
.action-desc {
  font-size: var(--text-sm);
  color: hsl(var(--text-secondary));
  line-height: 1.25;
  margin-top: 2px;
}

/* ============================================
   22. ALERT BANNER
   ============================================ */
.alert-banner {
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all .4s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.alert-banner.critical {
  background: linear-gradient(135deg, color-mix(in oklab, hsl(var(--error)) 12%, transparent), color-mix(in oklab, hsl(var(--error)) 4%, transparent));
  border: 1px solid color-mix(in oklab, hsl(var(--error)) 25%, transparent);
}
.alert-banner.warning {
  background: linear-gradient(135deg, color-mix(in oklab, hsl(var(--warning)) 12%, transparent), color-mix(in oklab, hsl(var(--warning)) 4%, transparent));
  border: 1px solid color-mix(in oklab, hsl(var(--warning)) 25%, transparent);
}
.alert-banner.success {
  background: linear-gradient(135deg, color-mix(in oklab, hsl(var(--success)) 10%, transparent), color-mix(in oklab, hsl(var(--success)) 4%, transparent));
  border: 1px solid color-mix(in oklab, hsl(var(--success)) 25%, transparent);
}
.alert-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.alert-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.alert-banner.critical .alert-banner-icon { background: color-mix(in oklab, hsl(var(--error)) 20%, transparent); color: hsl(var(--error)); }
.alert-banner.warning .alert-banner-icon { background: color-mix(in oklab, hsl(var(--warning)) 20%, transparent); color: hsl(var(--warning)); }
.alert-banner.success .alert-banner-icon { background: color-mix(in oklab, hsl(var(--success)) 20%, transparent); color: hsl(var(--success)); }
.alert-banner-icon svg { width: 22px; height: 22px; }
.alert-banner-content { flex: 1; min-width: 0; }
.alert-banner-content h4 {
  font-size: 1.0625rem;
  font-weight: var(--weight-bold);
  font-family: var(--font-heading);
  margin-bottom: 3px;
}
.alert-banner-content p {
  font-size: .8125rem;
  color: hsl(var(--text-secondary));
  line-height: 1.5;
  margin: 0;
}
.alert-banner-btn-wrap { flex-shrink: 0; }
@media (max-width: 768px) {
  .alert-banner { flex-direction: column; align-items: flex-start; }
  .alert-banner-btn-wrap { width: 100%; }
  .alert-banner-btn-wrap .btn { width: 100%; justify-content: center; }
}

/* ============================================
   23. DATE FILTER BUTTON — increased to 44px
   ============================================ */
.date-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid hsl(var(--grey-300));
  border-radius: var(--radius-md);
  background: transparent;
  color: hsl(var(--text-secondary));
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  position: relative;
}
.date-filter-btn:hover {
  background: color-mix(in oklab, hsl(var(--primary)) 8%, transparent);
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
  transform: scale(1.05);
  box-shadow: 0 2px 8px color-mix(in oklab, hsl(var(--primary)) 15%, transparent);
}
.date-filter-btn:active { transform: scale(0.95); }
.date-filter-btn:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.date-filter-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.date-filter-btn:hover svg { transform: rotate(-12deg); }
.dark .date-filter-btn,
[data-mode="dark"] .date-filter-btn,
[data-theme="dark"] .date-filter-btn {
  border-color: hsl(var(--grey-500));
  color: hsl(var(--text-secondary));
  background: transparent;
}
.dark .date-filter-btn:hover,
[data-mode="dark"] .date-filter-btn:hover,
[data-theme="dark"] .date-filter-btn:hover {
  background: transparent;
  border-color: hsl(var(--primary-light));
  color: hsl(var(--primary-light));
  box-shadow: 0 2px 12px color-mix(in oklab, hsl(var(--primary)) 20%, transparent);
}

/* ============================================
   24. DROPDOWN MENU
   ============================================ */
.dropdown-menu {
  position: absolute;
  min-width: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 96px);
  background: hsl(var(--background-paper));
  border-radius: var(--radius-dropdown);
  padding: 8px;
  outline: 1px solid hsl(var(--grey-50));
  box-shadow: var(--shadow-darker-md);
  z-index: 1300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 296ms cubic-bezier(.4, 0, .2, 1), transform 197ms cubic-bezier(.4, 0, .2, 1);
  transform: scale(.95);
  transform-origin: top right;
  top: calc(100% + 8px);
  right: 0;
}
.dropdown-menu.show {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: hsl(var(--text-primary));
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  transition: background .12s;
  white-space: nowrap;
}
.dropdown-menu-item:hover { background: color-mix(in oklab, hsl(var(--grey-500)) 10%, transparent); }
.dropdown-menu-item:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: -2px; }
.dropdown-menu-item.selected {
  background: color-mix(in oklab, hsl(var(--primary)) 12%, transparent);
  color: hsl(var(--primary));
  font-weight: var(--weight-semibold);
}

/* ============================================
   25. ORDER CARDS
   ============================================ */
.order-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--grey-50));
  box-shadow: var(--shadow-2xs);
  transition: box-shadow .15s;
  background: hsl(var(--background-paper));
  margin-bottom: 8px;
}
.order-card:last-child { margin-bottom: 0; }
.order-card:hover { box-shadow: var(--shadow-darker-sm); }
.order-card:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }

.order-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: color-mix(in oklab, hsl(var(--primary)) 8%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.order-thumb svg { width: 20px; height: 20px; color: hsl(var(--primary)); }

.order-col-info { min-width: 110px; flex-shrink: 0; }
.order-id {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
  font-family: var(--font-body);
}
.order-time { font-size: var(--text-sm); color: hsl(var(--text-muted)); margin-top: 1px; }
.order-customer-col { flex: 1; min-width: 0; padding-left: 8px; }
.order-customer {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: hsl(var(--text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-city {
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 1px;
}
.order-city svg { width: 12px; height: 12px; }
.order-amount {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
}
.order-delivery {
  font-size: var(--text-sm);
  color: hsl(var(--text-secondary));
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.order-delivery svg { width: 14px; height: 14px; }
@media (max-width: 768px) {
  #orders-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  #orders-list::-webkit-scrollbar { display: none; }
  .order-card { min-width: 680px; flex-shrink: 0; }
}

/* ============================================
   25b. ORDER MINI CARDS (Global Component)
   Preserves all original data, fixes mobile alignment
   ============================================ */
.order-mini-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--grey-50));
  border-left: 3px solid hsl(var(--primary));
  background: hsl(var(--background-paper));
  box-shadow: var(--shadow-2xs);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  overflow: hidden;
}
.order-mini-card:last-child { margin-bottom: 0; }
.order-mini-card:hover {
  box-shadow: var(--shadow-darker-sm);
  transform: translateY(-1px);
  border-color: hsl(var(--primary));
}
.order-mini-card:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

/* Thumb */
.omc-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.omc-thumb svg { width: 18px; height: 18px; color: hsl(var(--primary)); }

/* Main row */
.omc-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Order ID + Time column */
.omc-col-info {
  min-width: 105px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.omc-id {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: var(--weight-bold);
  color: hsl(var(--primary));
  white-space: nowrap;
}
.omc-time {
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
  white-space: nowrap;
}

/* Customer column */
.omc-customer {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.omc-customer-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: hsl(var(--text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.omc-city {
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
  display: flex;
  align-items: center;
  gap: 3px;
}
.omc-city svg { width: 11px; height: 11px; }

/* Amount */
.omc-amount {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
  white-space: nowrap;
  min-width: 75px;
  text-align: right;
  flex-shrink: 0;
}

/* Delivery */
.omc-delivery {
  font-size: var(--text-xs);
  color: hsl(var(--text-secondary));
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.omc-delivery svg { width: 12px; height: 12px; }

/* Status */
.omc-status { flex-shrink: 0; }

/* Menu */
.omc-menu { flex-shrink: 0; position: relative; }

/* --- Mobile: 2-row layout --- */
@media (max-width: 640px) {
  .order-mini-card {
    flex-wrap: wrap;
    gap: 0;
    padding: 10px 12px;
  }
  .omc-thumb { display: none; }
  .omc-main {
    flex-wrap: wrap;
    width: 100%;
    gap: 4px;
  }

  /* Row 1: Order ID + Time ... Status Badge ... Menu */
  .omc-col-info {
    flex: 1;
    min-width: 0;
    flex-direction: row;
    gap: 6px;
    align-items: center;
  }
  .omc-id { font-size: 0.75rem; }
  .omc-time { font-size: 0.6875rem; }
  .omc-status { margin-left: auto; }
  .omc-menu { margin-left: 2px; }

  /* Row 2: Customer + City ... Delivery ... Amount */
  .omc-customer {
    order: 10;
    width: 100%;
    flex: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid hsl(var(--grey-50));
    margin-top: 4px;
    justify-content: space-between;
  }
  .omc-customer-name { font-size: 0.8125rem; }
  .omc-city { display: none; }
  .omc-delivery {
    order: 11;
    font-size: 0.6875rem;
    padding-top: 4px;
    margin-top: 0;
  }
  .omc-amount {
    order: 12;
    font-size: 0.8125rem;
    min-width: auto;
    padding-top: 4px;
    margin-top: 0;
  }
}



/* ============================================
   26. THREE DOTS MENU — increased to 44px
   ============================================ */
.menu-wrap { position: relative; flex-shrink: 0; }
.dots-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: hsl(var(--text-primary));
  cursor: pointer;
  transition: background .15s;
}
.dots-btn:hover { background: hsl(var(--grey-25)); }
.dots-btn:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.dots-btn svg { width: 20px; height: 20px; }

.dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: hsl(var(--background-paper));
  border-radius: var(--radius-dropdown);
  box-shadow: var(--shadow-darker-md);
  padding: .5rem;
  min-width: 190px;
  z-index: 100;
  outline: 1px solid hsl(var(--grey-50));
}
.dropdown.open { display: block; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  font-size: var(--text-base);
  color: hsl(var(--text-primary));
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-md);
  transition: background .12s;
  font-family: var(--font-body);
  text-decoration: none;
}
.dropdown-item:hover { background: color-mix(in oklab, hsl(var(--grey-500)) 10%, transparent); }
.dropdown-item:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: -2px; }
.dropdown-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ============================================
   27. CHARTS
   ============================================ */
.charts-row-full { margin-bottom: 14px; }
.charts-row-full .section-card { margin-bottom: 0; }
.charts-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}
.charts-row-split .section-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  min-width: 0;
}
.charts-row-split .section-card .panel-head { flex-shrink: 0; }
@media (max-width: 900px) {
  .charts-row-split { grid-template-columns: 1fr; }
}
.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
  flex: none;
  min-height: 300px;
  max-height: 300px;
}
.doughnut-wrap {
  position: relative;
  width: 100%;
  height: 300px;
  flex: none;
  min-height: 300px;
  max-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doughnut-wrap canvas { max-width: 100%; max-height: 100%; }

/* ============================================
   28. BOTTOM GRID
   ============================================ */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 1024px) {
  .bottom-grid { grid-template-columns: 1fr; }
}

/* ============================================
   29. TIMELINE
   ============================================ */
.timeline-item {
  display: flex;
  gap: 0;
  padding-bottom: 4px;
}
.timeline-item:last-child .timeline-connector { display: none; }
.timeline-separator {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 24px;
  margin-right: 12px;
}
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid;
  flex-shrink: 0;
  margin-top: 6px;
  background: hsl(var(--background-paper));
}
.dot-info { border-color: hsl(var(--info)); }
.dot-success { border-color: hsl(var(--success)); }
.dot-warning { border-color: hsl(var(--warning)); }
.dot-error { border-color: hsl(var(--error)); }
.timeline-connector {
  width: 2px;
  flex: 1;
  min-height: 20px;
  background: hsl(var(--grey-200));
  margin-top: 4px;
}
.timeline-content { padding-bottom: 12px; flex: 1; min-width: 0; }
.timeline-title {
  font-size: .8125rem;
  font-weight: var(--weight-medium);
  color: hsl(var(--text-primary));
  margin-bottom: 2px;
}
.timeline-time {
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
  margin-top: 2px;
}

/* ============================================
   30. ALERTS LIST
   ============================================ */
.alert-list-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  border-radius: var(--radius-md);
  transition: background-color .15s;
  cursor: pointer;
  padding: 10px 12px;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.alert-list-item:hover { background-color: color-mix(in oklab, hsl(var(--grey-500)) 10%, transparent); }
.alert-list-item:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.alert-list-icon {
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.alert-list-text {
  flex: 1;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: hsl(var(--text-primary));
  font-family: var(--font-body);
}

/* ============================================
   31. REFERRAL BOX
   ============================================ */
.referral-box {
  background: linear-gradient(135deg, color-mix(in oklab, hsl(var(--success)) 8%, transparent), color-mix(in oklab, hsl(var(--success-dark)) 4%, transparent));
  border: 1px solid color-mix(in oklab, hsl(var(--success)) 20%, transparent);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: all .3s;
  margin-bottom: var(--spacing-md);
}
.ref-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}
.ref-header .earn-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 11px;
  color: hsl(var(--success-light));
  display: flex;
  align-items: center;
  gap: 4px;
}
.ref-stats-inline {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.ref-stat-mini { text-align: center; }
.ref-stat-mini-val { font-weight: var(--weight-bold); font-size: 16px; color: hsl(var(--primary)); }
.ref-stat-mini-lbl { font-size: var(--text-xs); color: hsl(var(--text-muted)); text-transform: uppercase; }
.ref-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.ref-code-text {
  font-size: 16px;
  font-weight: var(--weight-bold);
  font-family: var(--font-body);
  color: hsl(var(--primary));
  background: hsl(var(--grey-25));
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--grey-100));
  text-align: center;
  width: 100%;
}
.ref-link-input {
  flex: 1;
  min-width: 180px;
  background: hsl(var(--grey-25));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-input);
  padding: 8px 14px;
  color: hsl(var(--text-primary));
  font-size: var(--text-sm);
  font-family: var(--font-body);
}
@media (max-width: 768px) {
  .referral-box { padding: 16px 14px; }
  .ref-detail { flex-direction: column; align-items: stretch; }
  .ref-detail .btn { width: 100%; justify-content: center; }
  .ref-link-input { min-width: auto; }
}

/* ============================================
   32. RANK GRID
   ============================================ */
.rank-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.rank-card-sm {
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-50));
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.rank-card-sm:hover { transform: translateY(-2px); border-color: hsl(var(--primary)); }
.rank-card-sm:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
@media (max-width: 1024px) { .rank-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .rank-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================
   33. FILTER CHIPS
   ============================================ */
.filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background: hsl(var(--grey-25));
  color: hsl(var(--text-secondary));
  border: 1px solid hsl(var(--grey-100));
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-body);
  white-space: nowrap;
}
.filter-chip.active {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-dark)));
  color: hsl(var(--text-contrast));
  border-color: transparent;
}
.filter-chip:hover:not(.active) { background: hsl(var(--grey-50)); }
.filter-chip:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }

/* ============================================
   34. DATE FILTER BAR
   ============================================ */
.date-filter-bar {
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.date-preset-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  background: hsl(var(--grey-25));
  color: hsl(var(--text-secondary));
  border: 1px solid hsl(var(--grey-100));
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-body);
  white-space: nowrap;
}
.date-preset-btn:hover { background: hsl(var(--grey-50)); color: hsl(var(--text-primary)); }
.date-preset-btn:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.date-preset-btn.active {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-dark)));
  color: hsl(var(--text-contrast));
  border-color: transparent;
}

/* ============================================
   35. MODALS
   ============================================ */
.modal-overlay {
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(var(--glass-blur));
}
.modal-content,
.MuiDialog-container .MuiPaper-root {
  background-color: hsl(var(--background-paper));
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-darker-sm);
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(var(--glass-blur));
}
.modal.hidden { display: none; }
.modal-content {
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-modal);
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-darker-lg);
}

/* Standard Modal Structure */
.modal-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid hsl(var(--grey-50));
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: hsl(var(--background-paper));
  z-index: 10;
  border-radius: var(--radius-modal) var(--radius-modal) 0 0;
}
.modal-header h3 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: hsl(var(--text-primary));
  margin: 0;
}
.modal-body {
  padding: var(--spacing-lg);
}
.modal-footer {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid hsl(var(--grey-50));
  display: flex;
  gap: var(--spacing-sm);
  position: sticky;
  bottom: 0;
  background: hsl(var(--background-paper));
  border-radius: 0 0 var(--radius-modal) var(--radius-modal);
}
.modal-footer .btn {
  flex: 1;
}

@media (max-width: 767px) {
  .modal-content {
    margin: 0 var(--spacing-md);
    width: calc(100% - 32px);
    max-width: none;
  }
  .modal-header { padding: var(--spacing-md) var(--spacing-md); }
  .modal-body { padding: var(--spacing-md) var(--spacing-md); }
  .modal-footer { padding: var(--spacing-sm) var(--spacing-md); flex-direction: column; }
  .modal-footer .btn { width: 100%; justify-content: center; }
}

/* ============================================
   36. SKELETON / LOADING
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, hsl(var(--grey-25)) 25%, hsl(var(--grey-100)) 50%, hsl(var(--grey-25)) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
.skeleton-card {
  height: 80px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
}
.skeleton-stat {
  height: 100px;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Skeleton Stat Cards — matches .stat-card layout */
.skeleton-stat-card {
  display: flex;
  align-items: center;
  gap: 0;
  padding: .25rem;
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-50));
  border-radius: var(--radius-md);
  height: 96px;
  min-height: 96px;
  max-height: 96px;
  overflow: hidden;
}
.skeleton-stat-card .sk-stat-content {
  padding: 1rem;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-stat-card .sk-stat-label {
  width: 60%;
  height: 12px;
  border-radius: 6px;
}
.skeleton-stat-card .sk-stat-value {
  width: 40%;
  height: 22px;
  border-radius: 8px;
}
.skeleton-stat-card .sk-stat-icon {
  width: 4rem;
  align-self: stretch;
  flex-shrink: 0;
  border-radius: var(--radius-xl);
  margin: 0;
}

/* Skeleton Order Cards — matches .order-card layout */
.skeleton-order-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--grey-50));
  background: hsl(var(--background-paper));
  margin-bottom: 8px;
  height: 72px;
}
.skeleton-order-card .sk-order-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.skeleton-order-card .sk-order-info {
  min-width: 110px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.skeleton-order-card .sk-order-id {
  width: 80px;
  height: 14px;
  border-radius: 6px;
}
.skeleton-order-card .sk-order-time {
  width: 50px;
  height: 10px;
  border-radius: 5px;
}
.skeleton-order-card .sk-order-customer {
  flex: 1;
  min-width: 0;
  height: 14px;
  border-radius: 6px;
}
.skeleton-order-card .sk-order-amount {
  width: 80px;
  height: 14px;
  border-radius: 6px;
  flex-shrink: 0;
}
.skeleton-order-card .sk-order-badge {
  width: 70px;
  height: 24px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* Skeleton Chart */
.skeleton-chart {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-md);
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-50));
}

/* Skeleton Table Rows */
.skeleton-table-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid hsl(var(--grey-50));
}
.skeleton-table-row .sk-cell {
  height: 14px;
  border-radius: 6px;
}
.skeleton-table-row .sk-cell-sm { width: 40px; }
.skeleton-table-row .sk-cell-md { width: 80px; }
.skeleton-table-row .sk-cell-lg { width: 120px; }
.skeleton-table-row .sk-cell-xl { flex: 1; }

/* Skeleton Activity Timeline */
.skeleton-timeline-item {
  display: flex;
  gap: 0;
  padding-bottom: 4px;
}
.skeleton-timeline-item .sk-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
  margin-right: 12px;
}
.skeleton-timeline-item .sk-timeline-content {
  padding-bottom: 12px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.skeleton-timeline-item .sk-timeline-title {
  width: 70%;
  height: 13px;
  border-radius: 6px;
}
.skeleton-timeline-item .sk-timeline-time {
  width: 40%;
  height: 10px;
  border-radius: 5px;
}

/* ============================================
   37. PROGRESS BAR
   ============================================ */
.progress-bar-container {
  height: 8px;
  background: hsl(var(--grey-25));
  border-radius: 10px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--secondary)));
  border-radius: 10px;
  transition: width .8s;
}

/* ============================================
   38. LAYOUT
   ============================================ */
.main-content {
  margin-left: 16rem;
  width: calc(100% - 16rem);
}
@media (max-width: 767px) {
  .main-content { margin-left: 0 !important; width: 100% !important; }
}
#header-root { min-height: 56px; }

/* ============================================
   39. MERGED ORDER ITEMS
   ============================================ */
.merged-order-item {
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-md);
  transition: all .3s;
  box-shadow: var(--shadow-2xs);
  cursor: pointer;
  font-family: var(--font-body);
}
.merged-order-item:hover { border-color: hsl(var(--primary)); }

/* ============================================
   40. ALERT ITEM COMPACT
   ============================================ */
.alert-item-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: hsl(var(--grey-25));
  border-left: 3px solid;
  transition: all .2s;
  cursor: pointer;
}
.alert-item-compact:hover { background: hsl(var(--grey-50)); }
.alert-item-compact:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.alert-item-compact.urgent { border-left-color: hsl(var(--error)); }
.alert-item-compact.warning { border-left-color: hsl(var(--warning)); }
.alert-item-compact.info { border-left-color: hsl(var(--info)); }
.alert-item-compact.success { border-left-color: hsl(var(--success)); }

/* ============================================
   41. ACTIVITY INLINE ITEM
   ============================================ */
.activity-inline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: hsl(var(--grey-25));
  transition: all .15s;
}
.activity-inline-item:hover { background: hsl(var(--grey-50)); }

/* ============================================
   42. VERIFICATION CARD
   ============================================ */
.verification-card {
  background: linear-gradient(135deg, color-mix(in oklab, hsl(var(--primary)) 8%, transparent), color-mix(in oklab, hsl(var(--secondary)) 3%, transparent));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================
   43. RANK BENEFITS CARD
   ============================================ */
.rank-benefits-card {
  background: linear-gradient(135deg, hsl(var(--background-paper)), hsl(var(--grey-25)));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-xl);
  padding: 20px;
  transition: all .3s;
}
.rank-benefits-card:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--primary));
  box-shadow: 0 12px 20px -8px color-mix(in oklab, hsl(var(--primary)) 20%, transparent);
}

/* ============================================
   44. PROFILE SECTION
   ============================================ */
.profile-section {
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 20px;
  transition: all .3s;
  box-shadow: var(--shadow-2xs);
}
.profile-section:hover {
  box-shadow: 0 12px 20px -8px color-mix(in oklab, hsl(var(--primary)) 15%, transparent);
  border-color: hsl(var(--primary));
}

/* ============================================
   45. DANGER ZONE
   ============================================ */
.danger-zone {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid hsl(var(--grey-100));
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
.danger-zone h4 {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: hsl(var(--error));
  margin-bottom: var(--spacing-sm);
}
.danger-zone .btn {
  width: auto;
}

/* ============================================
   46. INFO GRID
   ============================================ */
.info-item {
  background: hsl(var(--grey-25));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: all .2s;
  font-family: var(--font-body);
}
.info-item:hover { border-color: hsl(var(--primary)); }
.info-label {
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.info-value {
  font-size: 15px;
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
}

/* ============================================
   47. NAV SUBMENU
   ============================================ */
.nav-submenu { padding-inline-start: 1rem; }
.nav-subitem {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-md);
  color: hsl(var(--text-primary));
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
  line-height: 1.25rem;
  text-decoration: none;
  transition: all .15s;
}
.nav-subitem:hover { background-color: color-mix(in oklab, hsl(var(--grey-500)) 10%, transparent); }
.nav-subitem.active {
  background-color: color-mix(in oklab, hsl(var(--primary)) 12%, transparent);
  color: hsl(var(--primary));
}

/* ============================================
   48. USER AVATAR
   ============================================ */
.sh-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: hsl(var(--primary));
  color: hsl(var(--text-contrast));
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sh-user-avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: hsl(var(--primary));
  color: hsl(var(--text-contrast));
  font-size: 1rem;
  font-weight: var(--weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   49. NOTIFICATION / USER DROPDOWNS
   ============================================ */
.sh-notif-dropdown,
.sh-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: hsl(var(--background-paper));
  border-radius: var(--radius-dropdown);
  outline: 1px solid hsl(var(--grey-50));
  box-shadow: var(--shadow-darker-sm);
  z-index: 100;
  overflow: hidden;
}
.sh-notif-dropdown { width: 380px; max-width: calc(100vw - 32px); }
.sh-user-dropdown { width: 240px; }

/* ============================================
   50. ICON BUTTONS — increased to 44px
   ============================================ */
.sh-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: hsl(var(--text-primary));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  padding: 0;
}
.sh-icon-btn:hover { background: hsl(var(--grey-25)); color: hsl(var(--primary)); }
.sh-icon-btn:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }

/* ============================================
   51. BOT PILL
   ============================================ */
.sh-bot-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: .5rem 1rem;
  border-radius: var(--radius-full);
  border: none;
  background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
  color: hsl(var(--primary));
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}
.sh-bot-pill:hover { background: color-mix(in oklab, hsl(var(--primary)) 18%, transparent); }

/* ============================================
   52. FORM CONTROLS
   ============================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: hsl(var(--text-secondary));
  margin-bottom: 6px;
  font-family: var(--font-body);
}
.form-input,
.form-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  border: 1px solid hsl(var(--grey-100));
  background: hsl(var(--grey-25));
  color: hsl(var(--text-primary));
  font-size: 16px;
  font-family: var(--font-body);
}
.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px color-mix(in oklab, hsl(var(--primary)) 15%, transparent);
}

/* ============================================
   53. UTILITY
   ============================================ */
.hidden,
.hb-hidden { display: none !important; }
.panel-hidden { display: none; }

/* ============================================
   54. LAYOUT SHELL
   ============================================ */
button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
a { text-decoration: none; color: inherit; }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: transparent;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  display: flex;
  align-items: center;
  padding: 0 var(--main-padding, 16px);
  gap: 4px;
  z-index: 400;
  border-bottom: none;
}
[data-mode="dark"] .topbar,
[data-theme="dark"] .topbar { background: transparent; border-bottom: none; }

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: hsl(var(--text-primary));
  font-weight: var(--weight-extrabold);
  font-size: 1.125rem;
  font-family: var(--font-heading);
  letter-spacing: -.6px;
}
.topbar-logo em { font-style: normal; color: hsl(var(--primary)); }

.tb-spacer { flex: 1; }
.tb-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--text-secondary));
  position: relative;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.tb-btn:hover { background: rgba(0, 0, 0, .04); color: hsl(var(--text-primary)); }
.tb-btn:hover svg { transform: scale(.85); }
[data-mode="dark"] .tb-btn:hover,
[data-theme="dark"] .tb-btn:hover { background: rgba(255, 255, 255, .06); color: hsl(var(--text-primary)); }
.tb-btn:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.tb-btn svg {
  width: 24px;
  height: 24px;
  transition: transform .2s ease;
}

.tb-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  background: hsl(var(--primary));
  color: hsl(var(--text-contrast));
  font-size: 0.625rem;
  font-weight: var(--weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  z-index: 401;
  pointer-events: none;
}

.tb-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: hsl(var(--text-primary));
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  transition: background .15s;
}
.tb-user:hover { background: rgba(0, 0, 0, .05); }
[data-mode="dark"] .tb-user:hover { background: rgba(255, 255, 255, .08); }

.tb-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--text-contrast));
  font-weight: var(--weight-bold);
  font-size: 14px;
  flex-shrink: 0;
}

.btn-ham {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  color: hsl(var(--text-secondary));
  flex-shrink: 0;
}
.btn-ham:hover { background: rgba(0, 0, 0, .05); }
[data-mode="dark"] .btn-ham:hover { background: rgba(255, 255, 255, .08); }
.btn-ham:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.btn-ham span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: .3s;
}

.page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: var(--text-sm);
  color: hsl(var(--text-muted));
  z-index: 400;
  pointer-events: none;
}
.page-footer a {
  pointer-events: all;
  transition: color .15s;
}
.page-footer a:hover { color: hsl(var(--primary)); }

.cards-layer {
  position: fixed;
  top: calc(64px + 8px);
  bottom: calc(40px + 8px);
  left: 16px;
  right: 16px;
  display: flex;
  gap: 16px;
  z-index: 200;
}
body:has(.cards-layer) { overflow: hidden; height: 100vh; }

.menu-card {
  width: 280px;
  min-width: 280px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  flex-shrink: 0;
  overflow: hidden;
  transition: width .22s ease, min-width .22s ease;
}
.menu-card.collapsed {
  width: 56px;
  min-width: 56px;
  align-items: center;
  padding: 1.5rem 6px;
}
.menu-card.collapsed .menu-label,
.menu-card.collapsed .nav-text,
.menu-card.collapsed .menu-footer-text,
.menu-card.collapsed .menu-footer-role {
  opacity: 0;
  pointer-events: none;
  width: 0;
  overflow: hidden;
}
.menu-card.collapsed .nav-btn { justify-content: center; padding: 9px; }
.menu-card.collapsed .menu-footer-user { justify-content: center; }

/* Tablet: icon-only sidebar with hover expand (768-1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .menu-card {
    width: 64px;
    min-width: 64px;
    align-items: center;
    padding: 1.5rem 8px;
    transition: width 0.15s ease, min-width 0.15s ease;
  }
  .menu-card .menu-label,
  .menu-card .nav-text,
  .menu-card .menu-footer-text,
  .menu-card .menu-footer-role {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
    transition: opacity 0.1s ease;
  }
  .menu-card .nav-btn { justify-content: center; padding: 10px 8px; }
  .menu-card .menu-footer-user { justify-content: center; }
  .menu-card .chevron { display: none; }
  .menu-card .accordion-content { display: none; }
  .menu-card .sub-link { display: none; }
  .menu-card:hover,
  .menu-card:focus-within {
    width: 280px;
    min-width: 280px;
    align-items: flex-start;
    padding: .6rem 1rem;
  }
  .menu-card:hover .menu-label,
  .menu-card:focus-within .menu-label,
  .menu-card:hover .nav-text,
  .menu-card:focus-within .nav-text,
  .menu-card:hover .menu-footer-text,
  .menu-card:focus-within .menu-footer-text,
  .menu-card:hover .menu-footer-role,
  .menu-card:focus-within .menu-footer-role {
    opacity: 1;
    pointer-events: auto;
    width: auto;
    overflow: visible;
    transition: opacity 0.15s ease 0.05s;
  }
  .menu-card:hover .nav-btn,
  .menu-card:focus-within .nav-btn { justify-content: flex-start; padding: .75rem 1rem; }
  .menu-card:hover .menu-footer-user,
  .menu-card:focus-within .menu-footer-user { justify-content: flex-start; }
  .menu-card:hover .chevron,
  .menu-card:focus-within .chevron { display: flex; }
  .menu-card:hover .accordion-content,
  .menu-card:focus-within .accordion-content { display: block; }
  .menu-card:hover .sub-link,
  .menu-card:focus-within .sub-link { display: flex; }
}

.menu-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-muted));
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 12px 1.375rem 8px;
  margin: 0;
  white-space: nowrap;
  font-family: var(--font-body);
}

.accordion {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}
.accordion-header { margin: 0; }
.accordion-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-align: left;
  outline: none;
}
.accordion-trigger:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: hsl(var(--text-primary));
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
  text-align: left;
  position: relative;
  min-width: 0;
  box-sizing: border-box;
  min-height: 44px;
}
.nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.8);
  color: hsl(var(--text-primary));
}
.nav-btn.active {
  background: color-mix(in oklab, hsl(var(--primary)) 8%, transparent);
  color: hsl(var(--primary));
  font-weight: var(--weight-semibold);
}

[data-theme="dark"] .nav-btn:hover { background-color: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .nav-btn.active { background: color-mix(in oklab, hsl(var(--primary)) 12%, transparent); color: hsl(var(--primary-light)); }
[data-theme="dark"] .nav-btn.active:hover { background: color-mix(in oklab, hsl(var(--primary)) 18%, transparent); }

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.nav-btn:hover .nav-icon { transform: scale(.85); }

.chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-left: auto;
  padding-right: 4px;
  transition: transform .3s ease;
}
.accordion.open .chevron { transform: rotate(90deg); }

.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s ease;
}
.accordion.open .accordion-content { max-height: 2000px; }

.accordion-body {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-top: .5rem;
  padding-left: 1.75rem;
  padding-bottom: .5rem;
}

.sub-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: hsl(var(--text-primary));
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: var(--weight-normal);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
  min-height: 40px;
}
.sub-link:hover { background-color: rgba(255, 255, 255, 0.8); }
.sub-link.active-sub {
  background: color-mix(in oklab, hsl(var(--primary)) 8%, transparent);
  color: hsl(var(--primary));
  font-weight: var(--weight-semibold);
}

[data-theme="dark"] .sub-link:hover { background-color: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .sub-link.active-sub { background: color-mix(in oklab, hsl(var(--primary)) 12%, transparent); color: hsl(var(--primary-light)); }

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 1.375rem;
  height: 100%;
  min-height: 100%;
}

.menu-footer {
  margin-top: auto;
  padding: 10px 1.375rem 0;
  border-top: 1px solid rgba(0, 0, 0, .06);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
[data-mode="dark"] .menu-footer { border-top-color: rgba(255, 255, 255, .08); }

.menu-footer-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .15s;
}
.menu-footer-user:hover { background: rgba(0, 0, 0, .04); }

.menu-footer-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--text-contrast));
  font-weight: var(--weight-bold);
  font-size: 11px;
  flex-shrink: 0;
}
.menu-footer-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
}
.menu-footer-role {
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
}

.main-card {
  flex: 1;
  min-width: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--glass-border);
  overflow-y: auto;
  overflow-x: hidden;
  transition: background .25s;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--grey-200)) transparent;
  scrollbar-gutter: stable;
}

.main-inner {
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: var(--main-padding);
}
@media (max-width: 960px) { .main-inner { padding: 14px 12px; } }
@media (max-width: 767px) { .main-inner { padding: 12px 8px; } }
@media (max-width: 480px) { .main-inner { padding: 12px 6px; } }

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 350;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.overlay.on { display: block; opacity: 1; pointer-events: all; }

/* Mobile sidebar */
@media (max-width: 768px) {
  #tb-search,
  #tb-theme { display: none; }
  .btn-ham { display: flex; }
  .tb-user .uname { display: none; }
  .menu-card {
    position: fixed !important;
    top: calc(64px + 6px);
    bottom: calc(40px + 6px);
    left: 6px;
    width: 280px !important;
    min-width: 280px !important;
    z-index: 360;
    transform: translateX(calc(-100% - 12px));
    transition: transform .3s ease;
    .tb-user, .tb-user .uname { color: hsl(var(--text-primary)); }
    border-radius: var(--radius-lg);
    align-items: flex-start !important;
    padding: 1rem 10px !important;
  }
  .menu-card.open { transform: translateX(0) !important; }
  .menu-card .menu-label,
  .menu-card .nav-text {
    opacity: 1 !important;
    pointer-events: auto !important;
    width: auto !important;
    overflow: visible !important;
  }
  .menu-card .nav-btn { justify-content: flex-start !important; padding: .75rem 1rem !important; }
  .cards-layer { gap: 0; }
  .main-card { border-radius: var(--radius-lg); }
}

/* Prevent FOUC: hide content until shell builds */
.main-content {
  visibility: hidden;
}
html.shell-ready .main-content {
  visibility: visible;
}

/* ============================================
   55. SEARCH DIALOG
   ============================================ */
.search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.search-backdrop.on { display: flex; }
.search-dialog {
  background-color: hsl(var(--background-paper));
  color: hsl(var(--text-primary));
  position: relative;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 64px);
  max-width: 960px;
  width: calc(100% - 64px);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-darker-md);
  margin: 32px;
  margin-top: calc(var(--spacing) * 16);
  animation: searchFadeIn .2s ease-out;
}
@keyframes searchFadeIn {
  from { opacity: 0; transform: scale(.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.dialog-title { border-bottom: 1px solid hsl(var(--grey-100)); padding: 0; }
.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  width: 100%;
}
.search-input-wrapper .search-icon {
  display: flex;
  align-items: center;
  color: hsl(var(--text-secondary));
}
.search-input-wrapper .search-icon svg,
.search-input-wrapper .search-icon i { width: 20px; height: 20px; }

.search-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: hsl(var(--text-secondary));
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.search-close-btn:hover {
  background: hsl(var(--grey-25));
  color: hsl(var(--text-primary));
}
.search-close-btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
.search-close-btn svg,
.search-close-btn i { width: 18px; height: 18px; }
.search-input {
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  color: hsl(var(--text-primary));
  background: transparent;
  padding: 6px 0;
  flex: 1;
  width: 100%;
}
.search-input:focus { outline: none; box-shadow: none; background: transparent; }
.search-input:hover { background: transparent; }
.search-input::placeholder { color: hsl(var(--text-disabled)); }

.search-tabs {
  flex: none;
  padding: 10px 20px;
  border-bottom: none;
}
.tabs-scroll { overflow-x: auto; scrollbar-width: none; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.search-tabs .tabs-list {
  display: flex;
  gap: 4px;
  position: relative;
  border-bottom: none;
  min-width: max-content;
}
.search-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid hsl(var(--grey-200));
  border-radius: var(--radius-full);
  background: transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--weight-medium);
  color: hsl(var(--text-secondary));
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.search-tab-btn svg { width: 14px; height: 14px; }
.search-tab-btn:hover {
  color: hsl(var(--text-primary));
  border-color: hsl(var(--grey-300));
  background: hsl(var(--grey-25));
}
.search-tab-btn:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.search-tab-btn.active {
  color: hsl(var(--primary));
  border-color: hsl(var(--primary));
  background: color-mix(in oklab, hsl(var(--primary)) 6%, transparent);
}

.dialog-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 20px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dialog-content::-webkit-scrollbar { width: 6px; }
.dialog-content::-webkit-scrollbar-track { background: transparent; }
.dialog-content::-webkit-scrollbar-thumb { background: hsl(var(--grey-200)); border-radius: 10px; }

.result-section { margin-bottom: 0; }
.result-section h6 {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: .5px;
  color: hsl(var(--text-secondary));
  margin-bottom: 12px;
}
.result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background .15s;
}
.result-item:hover { background: hsl(var(--grey-25)); }
.result-item:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.result-item-clickable {
  cursor: pointer;
}
.result-item-selected {
  background: color-mix(in oklab, hsl(var(--primary)) 8%, transparent);
  border-radius: var(--radius-md);
}

.empty-search {
  text-align: center;
  padding: 40px 20px;
}

.result-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: hsl(var(--grey-25));
  position: relative;
}
.result-avatar img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.result-avatar-fallback {
  display: none;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: hsl(var(--primary));
  background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
}
.result-avatar img:not([src]) + .result-avatar-fallback,
.result-avatar img[src=""] + .result-avatar-fallback {
  display: flex;
}
.result-info { flex: 1; min-width: 0; }
.result-title {
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  color: hsl(var(--text-primary));
  line-height: 1.4;
}
.result-subtitle {
  font-size: var(--text-sm);
  color: hsl(var(--text-secondary));
  margin-top: 2px;
}
.result-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}
.result-badge.active {
  background: color-mix(in oklab, hsl(var(--success)) 10%, transparent);
  color: hsl(var(--success));
}
.result-badge.inactive { background: hsl(var(--grey-25)); color: hsl(var(--text-secondary)); }
@media (max-width: 768px) {
  .search-dialog { margin: 36px; width: calc(100% - 72px); max-height: calc(100vh - 72px); }
}

/* Close button */
.search-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: hsl(var(--text-secondary));
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.search-close-btn:hover {
  background: hsl(var(--grey-25));
  color: hsl(var(--text-primary));
}
.search-close-btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
.search-close-btn svg,
.search-close-btn i { width: 18px; height: 18px; }

/* Search icon sizing for Lucide */
.search-input-wrapper .search-icon svg,
.search-input-wrapper .search-icon i { width: 20px; height: 20px; }



/* ============================================
   56. NOTIFICATIONS PANEL V3 (COMPACT — HORIZONTAL CARDS)
   ============================================ */

.notif-dropdown-container {
  position: fixed;
  top: 56px;
  width: 380px;
  max-width: calc(100vw - 24px);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-darker-lg);
  border: 1px solid var(--glass-border);
  z-index: 9999;
  overflow: hidden;
  display: none;
  animation: notif-slide-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-direction: column;
}

@keyframes notif-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-dropdown-container.show { display: flex; }

.notif-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Permission message */
.notif-permission-msg {
  display: none;
  align-items: center;
  gap: 8px;
  background: color-mix(in oklab, hsl(var(--warning)) 10%, transparent);
  border-bottom: 1px solid color-mix(in oklab, hsl(var(--warning)) 20%, transparent);
  padding: 8px 14px;
  color: hsl(var(--warning-dark));
  font-size: 11px;
  font-family: var(--font-body);
}
.notif-permission-msg.show { display: flex; }
.notif-permission-content {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.notif-permission-link {
  color: hsl(var(--warning-dark));
  text-decoration: underline;
  cursor: pointer;
  font-weight: var(--weight-semibold);
}

/* Header */
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  gap: 12px;
}
.notif-header h5 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: var(--weight-bold);
  color: hsl(var(--text-primary));
  margin: 0;
}
.notif-header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.notif-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: hsl(var(--text-secondary));
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
  text-decoration: none;
}
.notif-icon-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: hsl(var(--text-primary));
}
.notif-icon-btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
.notif-icon-btn.muted { color: hsl(var(--primary)); }
.notif-icon-btn svg { width: 16px; height: 16px; }

/* Tabs */
.notif-tabs {
  padding: 10px 14px;
}
.tabs-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.notif-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid hsl(var(--grey-200));
  border-radius: var(--radius-full);
  background: transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--weight-medium);
  color: hsl(var(--text-secondary));
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.notif-tab-btn svg { width: 14px; height: 14px; }
.notif-tab-btn:hover {
  color: hsl(var(--text-primary));
  border-color: hsl(var(--grey-300));
  background: hsl(var(--grey-25));
}
.notif-tab-btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
.notif-tab-btn.active {
  color: hsl(var(--primary));
  border-color: hsl(var(--primary));
  background: color-mix(in oklab, hsl(var(--primary)) 6%, transparent);
}

/* List container */
.notif-list-container {
  flex: 1;
  overflow: hidden;
  display: flex;
  max-height: 380px;
}
.notif-list {
  list-style: none;
  width: 100%;
  overflow-y: auto;
  padding: 10px 12px;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--grey-200)) transparent;
}
.notif-list::-webkit-scrollbar { width: 5px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb {
  background: hsl(var(--grey-200));
  border-radius: 3px;
}
.notif-list::-webkit-scrollbar-thumb:hover { background: hsl(var(--grey-300)); }

/* Notification item */
.notif-item {
  position: relative;
  margin-bottom: 4px;
  animation: notif-item-fade-in 0.2s ease;
}
@keyframes notif-item-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card — HORIZONTAL layout */
.notif-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}
.notif-card:hover { background: hsl(var(--grey-25)); }
.notif-card:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

/* Unread state — light purple background */
.notif-card.unread {
  background: color-mix(in oklab, hsl(var(--primary)) 6%, transparent);
}
.notif-card.unread:hover {
  background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
}

/* Avatar — CIRCULAR */
.notif-avatar { flex-shrink: 0; }
.notif-avatar-system {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklab, hsl(var(--primary)) 12%, transparent);
  color: hsl(var(--primary));
}
.notif-avatar-system svg { width: 18px; height: 18px; }
.notif-avatar-image {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}
.notif-avatar-image img { width: 100%; height: 100%; object-fit: cover; }
.notif-avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--weight-bold);
  color: hsl(var(--text-contrast));
}

/* Content */
.notif-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notif-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
  margin: 0;
  line-height: 1.3;
}
.notif-message {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--weight-normal);
  color: hsl(var(--text-secondary));
  margin: 0;
  line-height: 1.4;
}
.notif-time {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: var(--weight-normal);
  color: hsl(var(--text-muted));
  margin: 0;
}

/* Tags */
.notif-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.notif-tag {
  display: inline-block;
  padding: 2px 7px;
  background: hsl(var(--grey-100));
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: var(--weight-medium);
  color: hsl(var(--text-secondary));
  white-space: nowrap;
}

/* Actions */
.notif-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.notif-action-btn {
  padding: 4px 10px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.notif-action-primary {
  background: hsl(var(--primary));
  color: hsl(var(--text-contrast));
}
.notif-action-primary:hover { background: hsl(var(--primary-dark)); }
.notif-action-secondary {
  background: transparent;
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary));
}
.notif-action-secondary:hover {
  background: color-mix(in oklab, hsl(var(--primary)) 8%, transparent);
}

/* Three-dot menu button — CIRCULAR */
.notif-menu-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: hsl(var(--text-muted));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  opacity: 0;
  flex-shrink: 0;
  position: relative;
}
.notif-card:hover .notif-menu-btn { opacity: 1; }
.notif-menu-btn:hover {
  background: hsl(var(--grey-50));
  color: hsl(var(--text-primary));
}
.notif-menu-btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
.notif-menu-btn svg { width: 14px; height: 14px; }

/* Menu popup */
.notif-menu-popup {
  position: absolute;
  right: 0;
  top: calc(100% + 2px);
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-dropdown);
  box-shadow: var(--shadow-darker-md);
  z-index: 100;
  min-width: 160px;
  padding: 4px 0;
  display: none;
}
.notif-menu-popup.show { display: block; }
.notif-menu-popup button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--weight-medium);
  color: hsl(var(--text-primary));
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.notif-menu-popup button:hover { background: hsl(var(--grey-25)); }
.notif-menu-popup button.danger { color: hsl(var(--error)); }
.notif-menu-popup button.danger:hover { background: color-mix(in oklab, hsl(var(--error)) 6%, transparent); }

/* More notifications */
.notif-more-item { padding: 6px 10px; }
.notif-more-text {
  padding: 10px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-secondary));
  background: hsl(var(--grey-25));
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.15s ease;
}
.notif-more-text:hover { background: hsl(var(--grey-50)); }

/* Empty state */
.notif-skeleton,
.notif-empty {
  padding: 20px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  color: hsl(var(--text-muted));
}

/* Footer */
.notif-footer {
  padding: 10px 14px;
  border-top: 1px solid hsl(var(--grey-50));
  background: transparent;
}
.notif-view-all-btn {
  width: 100%;
  padding: 8px 16px;
  border: 1px solid hsl(var(--grey-200));
  border-radius: var(--radius-btn);
  background: transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.notif-view-all-btn:hover {
  background: hsl(var(--grey-25));
  border-color: hsl(var(--grey-300));
}

/* Bell icon active state */
#tb-bell.notif-bell-active {
  color: hsl(var(--primary));
}
#tb-bell.notif-bell-active svg {
  fill: hsl(var(--primary));
}

/* Mobile */
@media (max-width: 768px) {
  .notif-dropdown-container {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100vw - 24px);
    max-width: 400px;
  }
  .notif-list-container { max-height: 320px; }
}
@media (max-width: 480px) {
  .notif-dropdown-container {
    width: calc(100vw - 16px);
    left: 8px;
    right: auto;
    transform: none;
    top: 52px;
    border-radius: var(--radius-lg);
  }
  .notif-header { padding: 12px 14px 10px; }
  .notif-header h5 { font-size: 14px; }
  .notif-tabs { padding: 8px 12px; }
  .notif-tab-btn { padding: 5px 10px; font-size: 11px; }
  .notif-list { padding: 8px 10px; }
  .notif-card { padding: 8px 10px; gap: 8px; }
  .notif-avatar-system,
  .notif-avatar-image,
  .notif-avatar-initials { width: 32px; height: 32px; }
  .notif-title { font-size: 12px; }
  .notif-message { font-size: 11px; }
  .notif-footer { padding: 8px 12px; }
}

/* Dark mode */
[data-theme="dark"] .notif-dropdown-container {
  background: var(--glass-bg);
  border-color: hsl(var(--grey-700));
  box-shadow: var(--shadow-darker-xl);
}
[data-theme="dark"] .notif-footer { border-color: hsl(var(--grey-700)); }
[data-theme="dark"] .notif-card:hover { background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .notif-card.unread {
  background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
}
[data-theme="dark"] .notif-card.unread:hover {
  background: color-mix(in oklab, hsl(var(--primary)) 16%, transparent);
}
[data-theme="dark"] .notif-icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: hsl(var(--text-primary)); }

[data-theme="dark"] .notif-tag { background: hsl(var(--grey-700)); }
[data-theme="dark"] .notif-view-all-btn { border-color: hsl(var(--grey-600)); }
[data-theme="dark"] .notif-view-all-btn:hover { background: hsl(var(--grey-800)); }
[data-theme="dark"] .notif-more-text { background: hsl(var(--grey-800)); }
[data-theme="dark"] .notif-more-text:hover { background: hsl(var(--grey-700)); }
[data-theme="dark"] .notif-avatar-system {
  background: color-mix(in oklab, hsl(var(--primary)) 18%, transparent);
  color: hsl(var(--primary-light));
}
[data-theme="dark"] .notif-menu-btn { color: hsl(var(--text-muted)); }
[data-theme="dark"] .notif-menu-btn:hover { background: hsl(var(--grey-800)); }
[data-theme="dark"] .notif-menu-popup {
  background: hsl(var(--background-paper));
  border-color: hsl(var(--grey-700));
}
[data-theme="dark"] .notif-menu-popup button:hover { background: hsl(var(--grey-800)); }
[data-theme="dark"] .notif-menu-popup button.danger:hover {
  background: color-mix(in oklab, hsl(var(--error)) 10%, transparent);
}

/* ============================================
   57. USER DROPDOWN
   ============================================ */
.user-dropdown-container {
  position: fixed;
  top: 64px;
  right: 16px;
  width: 240px;
  background: hsl(var(--background-paper));
  border-radius: var(--radius-dropdown);
  box-shadow: var(--shadow-darker-md);
  outline: 1px solid hsl(var(--grey-50));
  z-index: 9999;
  overflow: hidden;
  display: none;
}
.user-dropdown-container.show { display: block; }
.user-dd-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.user-dd-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  color: hsl(var(--text-contrast));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  font-size: 1rem;
}
.user-dd-name {
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
  font-size: var(--text-base);
}
.user-dd-role { font-size: var(--text-xs); color: hsl(var(--text-muted)); }
.user-dd-divider { height: 1px; background: hsl(var(--grey-100)); }
.user-dd-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 1rem;
  color: hsl(var(--text-primary));
  text-decoration: none;
  font-size: var(--text-base);
  font-family: var(--font-body);
  transition: background .15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.user-dd-item:hover { background: color-mix(in oklab, hsl(var(--grey-500)) 10%, transparent); }
.user-dd-item:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.user-dd-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.user-dd-item.logout { color: hsl(var(--error)); }

/* ============================================
   58. LANDING PAGE STYLES
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: hsl(var(--background));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: none;
  transition: all var(--transition-base);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
body.has-referral-banner .navbar { top: 42px; }
body.has-referral-banner { padding-top: 42px; }

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: hsl(var(--text-primary));
  font-weight: var(--weight-extrabold);
  font-size: 1.125rem;
  letter-spacing: -.6px;
  flex-shrink: 0;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: hsl(var(--primary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--text-contrast));
  font-size: 22px;
  box-shadow: 0 4px 12px color-mix(in oklab, hsl(var(--primary)) 30%, transparent);
}
.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: hsl(var(--text-secondary));
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
  padding: .5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.nav-links a:hover { color: hsl(var(--text-primary)); background: hsl(var(--grey-25)); }
.nav-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }

.mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: hsl(var(--text-primary));
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.mobile-menu-btn:hover { background: hsl(var(--grey-25)); }

.mobile-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: hsl(var(--background-paper));
  border-bottom: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
  box-shadow: var(--shadow-md);
}
.mobile-menu.show { max-height: 500px; }
.mobile-menu nav { padding: 1rem; }
.mobile-menu a {
  display: block;
  padding: .75rem 1rem;
  color: hsl(var(--text-secondary));
  text-decoration: none;
  border-radius: var(--radius-md);
  margin-bottom: .25rem;
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
}
.mobile-menu a:hover { background: hsl(var(--grey-25)); color: hsl(var(--text-primary)); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .lp-nav-links { display: none; }
  .lp-mobile-menu-btn { display: flex; }
}

.hero {
  padding: 140px 28px 100px;
  background: hsl(var(--background));
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, color-mix(in oklab, hsl(var(--primary)) 8%, transparent) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.25rem;
  border-radius: var(--radius-full);
  background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
  color: hsl(var(--primary));
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: 28px;
  animation: fadeInUp .6s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: var(--weight-extrabold);
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
  color: hsl(var(--text-primary));
  font-family: var(--font-heading);
  animation: fadeInUp .6s ease-out .1s both;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-dark)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.125rem;
  color: hsl(var(--text-secondary));
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.625;
  animation: fadeInUp .6s ease-out .2s both;
}
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp .6s ease-out .3s both;
}
.hero-stats {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin-top: 72px;
  flex-wrap: wrap;
  animation: fadeInUp .6s ease-out .4s both;
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-xl);
  background: hsl(var(--background-paper));
  box-shadow: var(--shadow-2xs);
  max-width: 640px;
  margin-inline: auto;
  overflow: hidden;
}
.stat-item {
  text-align: center;
  padding: 24px 32px;
  flex: 1;
  position: relative;
}
.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: hsl(var(--grey-100));
}

.section {
  padding: 100px 28px;
  background: hsl(var(--grey-25));
}
.section-container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem 1rem;
  border-radius: var(--radius-full);
  background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
  color: hsl(var(--primary));
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 1.25rem;
}
.section .section-title {
  font-size: 2.5rem;
  font-weight: var(--weight-extrabold);
  line-height: 1.2;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
  color: hsl(var(--text-primary));
  font-family: var(--font-heading);
}
.section-description {
  font-size: 1rem;
  color: hsl(var(--text-secondary));
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.625;
}
@media (max-width: 768px) {
  .section { padding: 70px 20px; }
  .section .section-title { font-size: 1.9rem; }
}

/* Landing page grids — using existing card/title classes, these are section-specific */
.lp-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-feature-card {
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-50));
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-2xs);
}
.lp-feature-card:hover { box-shadow: var(--shadow-darker-md); transform: translateY(-2px); border-color: color-mix(in oklab, hsl(var(--primary)) 20%, transparent); }
@media (max-width: 992px) { .lp-features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .lp-features-grid { grid-template-columns: 1fr; } }

/* ============================================
   58b. LANDING PAGE ALIASES (lp-* prefix)
   For pages using lp- prefixed class names
   ============================================ */
.lp-navbar { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-header); background: hsl(var(--background)); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: none; transition: all var(--transition-base); }
.lp-navbar.scrolled { box-shadow: var(--shadow-md); }
.lp-nav-container { max-width: 1280px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.lp-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: hsl(var(--text-primary)); font-weight: var(--weight-extrabold); font-size: 1.125rem; letter-spacing: -.6px; flex-shrink: 0; }
.lp-logo-icon { width: 44px; height: 44px; background: hsl(var(--primary)); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: hsl(var(--text-contrast)); font-size: 22px; box-shadow: 0 4px 12px color-mix(in oklab, hsl(var(--primary)) 30%, transparent); }
.lp-nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; }
.lp-nav-links a { text-decoration: none; color: hsl(var(--text-secondary)); font-weight: var(--weight-medium); font-size: var(--text-base); padding: .5rem 1rem; border-radius: var(--radius-md); transition: all var(--transition-fast); }
.lp-nav-links a:hover { color: hsl(var(--text-primary)); background: hsl(var(--grey-25)); }
.lp-nav-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.lp-mobile-menu-btn { display: none; width: 36px; height: 36px; border-radius: var(--radius-md); border: none; background: transparent; color: hsl(var(--text-primary)); cursor: pointer; align-items: center; justify-content: center; }
.lp-mobile-menu-btn:hover { background: hsl(var(--grey-25)); }
.lp-mobile-menu { position: fixed; top: 64px; left: 0; right: 0; background: hsl(var(--background-paper)); border-bottom: none; max-height: 0; overflow: hidden; transition: max-height var(--transition-base); box-shadow: var(--shadow-md); z-index: 49; }
.lp-mobile-menu.show { max-height: 500px; }
.lp-mobile-menu nav { padding: 1rem; }
.lp-mobile-menu a { display: block; padding: .75rem 1rem; color: hsl(var(--text-secondary)); text-decoration: none; border-radius: var(--radius-md); margin-bottom: .25rem; font-weight: var(--weight-medium); font-size: var(--text-base); }
.lp-mobile-menu a:hover { background: hsl(var(--grey-25)); color: hsl(var(--text-primary)); }
.lp-mobile-divider { border-top: 1px solid hsl(var(--grey-100)); margin: 8px 0; }
.lp-mobile-theme-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; }


/* ============================================
   SECTION 66: DISMISSIBLE BADGES
   ============================================ */
.dismissible-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs); font-weight: var(--weight-medium);
    font-family: var(--font-body); white-space: nowrap;
    cursor: default; user-select: none;
    background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
    color: hsl(var(--primary));
    border: 1px solid color-mix(in oklab, hsl(var(--primary)) 20%, transparent);
    transition: background-color 0.15s, border-color 0.15s;
}
.dismissible-badge:hover {
    background: color-mix(in oklab, hsl(var(--primary)) 18%, transparent);
}
.dismissible-badge .dismiss-badge-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    border: none; background: transparent;
    color: inherit; cursor: pointer; padding: 0;
    flex-shrink: 0; opacity: 0.65;
    transition: opacity 0.15s, background-color 0.15s;
}
.dismissible-badge .dismiss-badge-btn:hover {
    opacity: 1;
    background: color-mix(in oklab, hsl(var(--primary)) 25%, transparent);
}
.dismissible-badge .dismiss-badge-btn svg { width: 10px; height: 10px; }

/* Neutral variant */
.dismissible-badge.dismissible-neutral {
    background: hsl(var(--grey-25));
    color: hsl(var(--text-secondary));
    border-color: hsl(var(--grey-200));
}
.dismissible-badge.dismissible-neutral:hover {
    background: hsl(var(--grey-50));
}
.dismissible-badge.dismissible-neutral .dismiss-badge-btn:hover {
    background: hsl(var(--grey-200));
}


/* ============================================
   59. SPIN ANIMATION
   ============================================ */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spin-icon { animation: spin 1s linear infinite; }

/* ============================================
   60. TERMS CHECKBOX
   ============================================ */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, color-mix(in oklab, hsl(var(--primary)) 4%, transparent), color-mix(in oklab, hsl(var(--secondary)) 2%, transparent));
  border: 1px solid color-mix(in oklab, hsl(var(--primary)) 15%, transparent);
  border-radius: var(--radius-dropdown);
}
.terms-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid hsl(var(--grey-300));
  border-radius: 6px;
  background: hsl(var(--background-paper));
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.terms-check input[type="checkbox"]:checked {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
}
.terms-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid hsl(var(--text-contrast));
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.terms-check label {
  font-size: var(--text-sm);
  color: hsl(var(--text-secondary));
  line-height: 1.5;
  cursor: pointer;
  flex: 1;
}

/* ============================================
   61. DROPZONE
   ============================================ */
.dropzone {
  border: 2px dashed hsl(var(--grey-200));
  border-radius: var(--radius-dropdown);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: hsl(var(--grey-25));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dropzone:hover { border-color: hsl(var(--primary)); }

/* ============================================
   62. BOTTOM BAR (Mobile)
   ============================================ */
.bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: hsl(var(--background-paper));
  border-top: 1px solid hsl(var(--grey-100));
  padding: 10px 16px;
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}
.bottom-bar-inner { display: flex; align-items: center; gap: 10px; }
.bottom-bar-info { flex: 1; min-width: 0; }
.bottom-bar-total { font-weight: var(--weight-bold); font-size: .9375rem; color: hsl(var(--primary)); }
.bottom-bar-items { font-size: var(--text-xs); color: hsl(var(--text-muted)); }
@media (max-width: 1024px) { .bottom-bar { display: block; } }

/* ============================================
   63. DATE INPUT
   ============================================ */
input[type="date"] { color-scheme: light; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.5; }
[data-mode="dark"] input[type="date"],
[data-theme="dark"] input[type="date"] { color-scheme: dark; }

/* ============================================
   64. CATALOG / PRODUCT GRID
   ============================================ */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.catalog-card {
  background: hsl(var(--grey-25));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-dropdown);
  padding: 14px;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}
.catalog-card:hover { border-color: hsl(var(--primary)); box-shadow: var(--shadow-darker-sm); }
.catalog-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: hsl(var(--grey-200));
}
@media (max-width: 640px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); } }
.prod-card { border-radius: var(--radius-md); }
.prod-sidebar { border-radius: var(--radius-md); }

/* ============================================
   65. SWITCH COMPONENT
   ============================================ */
.sh-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.sh-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.sh-switch-track {
  width: 38px;
  height: 22px;
  background: hsl(var(--grey-300));
  border-radius: 12px;
  transition: background 0.2s ease;
  position: relative;
  flex-shrink: 0;
}
.sh-switch input:checked + .sh-switch-track { background: hsl(var(--primary)); }
.sh-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: hsl(var(--text-contrast));
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.sh-switch input:checked + .sh-switch-track .sh-switch-thumb { transform: translateX(16px); }
.sh-switch input:disabled + .sh-switch-track { opacity: 0.5; cursor: not-allowed; }

.sh-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: var(--text-sm);
  color: hsl(var(--text-secondary));
  white-space: nowrap;
}

/* Standard checkbox for selection lists and bulk mode — MUI-style rounded */
input[type="checkbox"].check-standard {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  margin: 0;
  border: 1.5px solid hsl(var(--grey-300));
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="checkbox"].check-standard:hover:not(:disabled) {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px color-mix(in oklab, hsl(var(--primary)) 12%, transparent);
}
input[type="checkbox"].check-standard:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
input[type="checkbox"].check-standard:checked {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
}
input[type="checkbox"].check-standard:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 5px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"].check-standard:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
input[type="checkbox"].check-standard:disabled:hover {
  border-color: hsl(var(--grey-300));
  box-shadow: none;
}

/* ============================================
   66. TOAST NOTIFICATIONS
   ============================================ */
.sh-toast-container {
  z-index: 99999 !important;
  position: fixed !important;
  top: 80px !important;
  right: 20px !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.sh-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: hsl(var(--background-paper));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-dropdown);
  box-shadow: var(--shadow-darker-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: hsl(var(--text-primary));
  min-width: 280px;
  max-width: 420px;
  animation: toastSlideIn 0.3s ease-out;
  transition: all 0.3s ease;
}
.sh-toast.success { border-left: 3px solid hsl(var(--success)); }
.sh-toast.success .sh-toast-icon { color: hsl(var(--success)); }
.sh-toast.error { border-left: 3px solid hsl(var(--error)); }
.sh-toast.error .sh-toast-icon { color: hsl(var(--error)); }
.sh-toast.warning { border-left: 3px solid hsl(var(--warning)); }
.sh-toast.warning .sh-toast-icon { color: hsl(var(--warning)); }
.sh-toast.info { border-left: 3px solid hsl(var(--info)); }
.sh-toast.info .sh-toast-icon { color: hsl(var(--info)); }
.sh-toast-icon { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.sh-toast-message { flex: 1; line-height: 1.4; }
.sh-toast-close {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: hsl(var(--text-muted));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.sh-toast-close:hover { background: hsl(var(--grey-25)); color: hsl(var(--text-primary)); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   67. STATUS FILTER CHIPS
   ============================================ */
.status-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  background: transparent;
  border: 1.5px solid hsl(var(--grey-300));
  color: hsl(var(--text-secondary));
}
.status-filter-chip:hover { background: hsl(var(--grey-25)); }
.status-filter-chip:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.status-filter-chip.active { color: hsl(var(--text-contrast)); border-color: transparent; }
.status-filter-chip[data-status="all"] { border-color: hsl(var(--primary)); color: hsl(var(--primary)); }
.status-filter-chip[data-status="all"].active { background: hsl(var(--primary)); color: hsl(var(--text-contrast)); }
.status-filter-chip[data-status="pending"] { border-color: hsl(var(--warning)); color: hsl(var(--warning)); }
.status-filter-chip[data-status="pending"].active { background: hsl(var(--warning)); color: hsl(var(--text-contrast)); }
.status-filter-chip[data-status="confirmed"] { border-color: hsl(var(--info)); color: hsl(var(--info)); }
.status-filter-chip[data-status="confirmed"].active { background: hsl(var(--info)); color: hsl(var(--text-contrast)); }
.status-filter-chip[data-status="delivered"] { border-color: hsl(var(--accent-2)); color: hsl(var(--accent-2)); }
.status-filter-chip[data-status="delivered"].active { background: hsl(var(--accent-2)); color: hsl(var(--text-contrast)); }
.status-filter-chip[data-status="awaiting-commission"] { border-color: hsl(var(--accent-3)); color: hsl(var(--accent-3)); }
.status-filter-chip[data-status="awaiting-commission"].active { background: hsl(var(--accent-3)); color: hsl(var(--text-contrast)); }
.status-filter-chip[data-status="completed"] { border-color: hsl(var(--success)); color: hsl(var(--success)); }
.status-filter-chip[data-status="completed"].active { background: hsl(var(--success)); color: hsl(var(--text-contrast)); }
.status-filter-chip[data-status="postponed"] { border-color: hsl(var(--accent-1)); color: hsl(var(--accent-1)); }
.status-filter-chip[data-status="postponed"].active { background: hsl(var(--accent-1)); color: hsl(var(--text-contrast)); }
.status-filter-chip[data-status="cancelled"] { border-color: hsl(var(--error)); color: hsl(var(--error)); }
.status-filter-chip[data-status="cancelled"].active { background: hsl(var(--error)); color: hsl(var(--text-contrast)); }

@media (min-width: 768px) {
  .status-filter-chip { flex: 1; }
}

/* ============================================
   68. DROPDOWN CLIPPING FIX
   ============================================ */
.section-card:has(.form-select),
.section-card:has(select) {
  overflow: visible !important;
  z-index: 10;
}

/* ============================================
   69. BRANDING ADDITIONS — Icon Sizes, Input Variants, Empty States, Skeleton
   ============================================ */

/* ---- 69a. STANDARDIZED ICON SIZES ---- */
.icon-sm {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.icon-md {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.icon-lg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.icon-xl {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

/* ---- 69b. INPUT SIZE VARIANTS ---- */
.input-sm {
  padding: 6px 10px;
  font-size: var(--text-sm);
  min-height: 36px;
  border-radius: var(--radius-md);
}
.input-lg {
  padding: 12px 16px;
  font-size: 16px;
  min-height: 48px;
  border-radius: var(--radius-lg);
}

/* ---- 69c. EMPTY STATE COMPONENT ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.4;
  color: hsl(var(--text-muted));
  flex-shrink: 0;
}
.empty-state-icon svg {
  width: 48px;
  height: 48px;
}
.empty-state-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
  margin-bottom: 8px;
  font-family: var(--font-heading);
}
.empty-state-desc {
  font-size: var(--text-sm);
  color: hsl(var(--text-secondary));
  max-width: 400px;
  margin: 0 auto 20px;
  line-height: 1.5;
  font-family: var(--font-body);
}
.empty-state-action {
  margin-top: 4px;
}

/* Unified branded spinner — auto-adaptive light + dark mode */
.spinner-brand {
  width: 48px;
  height: 48px;
  border: 4px solid hsl(var(--grey-200));
  border-top: 4px solid hsl(var(--primary));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
.spinner-brand-sm {
  width: 32px;
  height: 32px;
  border-width: 3px;
}
.spinner-brand-lg {
  width: 64px;
  height: 64px;
  border-width: 5px;
}

/* ---- 69d. BRANDED SKELETON SHIMMER ---- */
.skeleton-brand {
  background: linear-gradient(
    90deg,
    hsl(var(--grey-25)) 25%,
    color-mix(in oklab, hsl(var(--primary)) 8%, hsl(var(--grey-100))) 50%,
    hsl(var(--grey-25)) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
.skeleton-brand.skeleton-card {
  height: 80px;
  margin-bottom: 12px;
}
.skeleton-brand.skeleton-stat {
  height: 100px;
  border-radius: var(--radius-md);
}

/* ---- 69e. NORMALIZED CARD HOVER ---- */
.card,
.section-card,
.stat-card,
.action-card,
.order-card,
.merged-order-item,
.lp-feature-card,
.catalog-card,
.rank-benefits-card,
.profile-section {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover,
.section-card:hover,
.stat-card:hover,
.action-card:hover,
.merged-order-item:hover,
.lp-feature-card:hover,
.catalog-card:hover,
.rank-benefits-card:hover,
.profile-section:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-darker-sm);
}
.stat-card:hover,
.action-card:hover,
.lp-feature-card:hover,
.rank-benefits-card:hover,
.profile-section:hover,
.catalog-card:hover {
  border-color: color-mix(in oklab, hsl(var(--primary)) 20%, transparent);
}

/* ---- 69f. CARD BREATHING ROOM & GLOBAL ALIGNMENT ---- */

/* ===== STANDARDIZED CARD PADDING ===== */
.section-card,
.od-info-card,
.od-earn-card,
.od-comm-pend,
.od-comm-set,
.od-ledger-card {
  padding: 16px;
}

.od-item-card:last-child {
  margin-bottom: 12px;
}

.od-charges {
  margin-top: 16px;
  padding-top: 12px;
}

/* Ensure two-column layouts have equal height cards */
.mp-two-col {
  align-items: stretch !important;
}
.mp-two-col > .section-card,
.mp-two-col > div > .section-card {
  height: 100% !important;
}

/* ===== GLOBAL ALIGNMENT ===== */
.page-header,
#action-buttons,
.two-column-layout,
.charts-row-split,
.charts-row-full,
.bottom-grid,
.stats-grid,
.quick-actions,
#order-content > div,
.order-header-row,
.order-meta-row {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.section-card,
.od-info-card,
.stat-card,
.order-card,
.order-list-card {
  min-width: 0;
  overflow-wrap: break-word;
  margin-left: 0;
  margin-right: 0;
}

/* ===== PAGINATION ===== */
#pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* ===== STAT CARD EQUAL HEIGHT ===== */
.stats-grid {
  align-items: stretch;
}
.stats-grid > * {
  height: 100%;
}
.stat-card {
  min-height: 88px;
  height: 100%;
}

/* ===== STICKY FILTER BAR ===== */
.main-content > div:has(.status-filter-chip) {
  position: sticky;
  top: 64px;
  z-index: 45;
  background: hsl(var(--background-paper));
  padding: 8px 0;
  margin-bottom: 14px;
}

/* ===== GLOBAL: ICON + TEXT ALWAYS INLINE ===== */
.icon-text-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* ===== PREVIEW MODAL META ROW ===== */
.preview-meta-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
}

/* ===== LIST VIEW STATUS BADGE — BOTTOM RIGHT ===== */
.list-status-badge {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--spacing-sm);
}

/* ===== GLOBAL FILTER BAR — SEARCH + DROPDOWNS IN ONE ROW ===== */
.filter-bar {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  flex-wrap: wrap;
}
.filter-bar .filter-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.filter-bar .filter-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--text-muted));
  width: 16px;
  height: 16px;
  z-index: 1;
}
.filter-bar .filter-search input {
  padding-left: 38px;
}
.filter-bar .filter-select {
  max-width: 180px;
  flex-shrink: 0;
  font-size: var(--text-sm);
  padding: 6px 32px 6px 12px;
  min-height: auto;
  height: auto;
}

/* ===== MOBILE GLOBAL FIXES ===== */
@media (max-width: 767px) {
  .main-inner {
    padding: 16px 12px;
  }

  .main-inner > * {
    margin-bottom: 16px;
  }

  .main-inner > *:last-child {
    margin-bottom: 0;
  }

  .section-card,
  .od-info-card,
  .od-earn-card,
  .od-comm-pend,
  .od-comm-set,
  .od-ledger-card {
    padding: 12px;
    margin-left: 0;
    margin-right: 0;
  }

  .stat-card,
  .order-card,
  .order-list-card {
    margin-left: 0;
    margin-right: 0;
  }

  .two-column-layout {
    gap: 12px;
    padding-bottom: 24px;
  }

  .col-left,
  .col-right {
    gap: 12px;
  }

  .stat-value {
    font-size: 1.25rem;
  }
  .stat-label {
    font-size: var(--text-xs);
  }
  .section-title {
    font-size: 0.9375rem;
  }
  .badge {
    font-size: 0.6875rem;
    padding: 3px 8px;
  }
  .btn-sm {
    font-size: 0.75rem;
    padding: 5px 12px;
  }
  .btn-sm svg {
    width: 14px;
    height: 14px;
  }
  .stat-icon-box svg {
    width: 20px;
    height: 20px;
  }
  .page-header h1 {
    font-size: 1.25rem;
  }
  .page-header {
    padding: 14px 0 6px;
    margin-left: 0;
    margin-right: 0;
  }

  .dropdown {
    z-index: 9999;
  }
  .dropdown-item {
    font-size: 0.75rem;
    padding: 8px 14px;
  }
  .dropdown-item svg {
    width: 14px;
    height: 14px;
  }

  .status-filter-chip {
    flex: 1 0 auto;
    text-align: center;
    justify-content: center;
  }
  .status-filter-chip:last-child {
    flex: 0 0 auto;
  }

  #action-buttons {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 8px;
    padding: 8px 0;
    justify-content: flex-start;
  }
  #action-buttons .btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.8125rem;
    padding: 8px 12px;
  }
  #action-buttons .btn svg {
    width: 16px;
    height: 16px;
  }

  .filter-bar .filter-select {
    max-width: none;
    flex: 1;
    min-width: 120px;
  }
}

/* ---- 69g. DRAG-AND-DROP UTILITY CLASSES ---- */
.sv-value-item.sv-ghost {
  opacity: 0.4;
  background: hsl(var(--grey-100));
}
.sv-value-item.sv-drag {
  opacity: 0.8;
  box-shadow: var(--shadow-darker-md);
  background: hsl(var(--background-paper));
}

/* ============================================
   70. RANK COLORS (Global)
   ============================================ */
:root {
    --rank-starter: 84 80% 40%;
    --rank-riser: 199 89% 40%;
    --rank-maker: 33 90% 38%;
    --rank-leader: 271 70% 48%;
    --rank-legend: 173 75% 35%;
    --rank-master: 48 90% 40%;
}

/* Rank icon colors */
.rank-icon-starter { color: hsl(var(--rank-starter)); }
.rank-icon-riser { color: hsl(var(--rank-riser)); }
.rank-icon-maker { color: hsl(var(--rank-maker)); }
.rank-icon-leader { color: hsl(var(--rank-leader)); }
.rank-icon-legend { color: hsl(var(--rank-legend)); }
.rank-icon-master { color: hsl(var(--rank-master)); }

/* Rank text colors */
.rank-text-starter { color: hsl(var(--rank-starter)); }
.rank-text-riser { color: hsl(var(--rank-riser)); }
.rank-text-maker { color: hsl(var(--rank-maker)); }
.rank-text-leader { color: hsl(var(--rank-leader)); }
.rank-text-legend { color: hsl(var(--rank-legend)); }
.rank-text-master { color: hsl(var(--rank-master)); }

/* Rank background colors (light tint) */
.rank-bg-starter { background: color-mix(in oklab, hsl(var(--rank-starter)) 12%, transparent); }
.rank-bg-riser { background: color-mix(in oklab, hsl(var(--rank-riser)) 12%, transparent); }
.rank-bg-maker { background: color-mix(in oklab, hsl(var(--rank-maker)) 12%, transparent); }
.rank-bg-leader { background: color-mix(in oklab, hsl(var(--rank-leader)) 12%, transparent); }
.rank-bg-legend { background: color-mix(in oklab, hsl(var(--rank-legend)) 12%, transparent); }
.rank-bg-master { background: color-mix(in oklab, hsl(var(--rank-master)) 12%, transparent); }

/* Rank border colors */
.rank-border-starter { border-color: hsl(var(--rank-starter)); }
.rank-border-riser { border-color: hsl(var(--rank-riser)); }
.rank-border-maker { border-color: hsl(var(--rank-maker)); }
.rank-border-leader { border-color: hsl(var(--rank-leader)); }
.rank-border-legend { border-color: hsl(var(--rank-legend)); }
.rank-border-master { border-color: hsl(var(--rank-master)); }

/* Rank outlined circle (icon in colored border circle) */
.rank-circle-starter { color: hsl(var(--rank-starter)); border: 2px solid hsl(var(--rank-starter)); }
.rank-circle-riser { color: hsl(var(--rank-riser)); border: 2px solid hsl(var(--rank-riser)); }
.rank-circle-maker { color: hsl(var(--rank-maker)); border: 2px solid hsl(var(--rank-maker)); }
.rank-circle-leader { color: hsl(var(--rank-leader)); border: 2px solid hsl(var(--rank-leader)); }
.rank-circle-legend { color: hsl(var(--rank-legend)); border: 2px solid hsl(var(--rank-legend)); }
.rank-circle-master { color: hsl(var(--rank-master)); border: 2px solid hsl(var(--rank-master)); }

/* ============================================
   71. AUTH PAGES (login, signup, reset-password, verified)
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  font-family: var(--font-body);
  color: hsl(var(--text-primary));
}

.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-darker-lg);
  transition: all 0.3s ease;
}
.auth-card:hover {
  box-shadow: 0 30px 60px -12px color-mix(in oklab, hsl(var(--primary)) 30%, transparent);
  border-color: hsl(var(--primary));
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}
.auth-logo svg {
  color: hsl(var(--primary));
  width: 24px;
  height: 24px;
}
.auth-logo span {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: hsl(var(--text-primary));
  font-family: var(--font-heading);
}
.auth-logo span em {
  font-style: normal;
  color: hsl(var(--primary));
}

.auth-subtitle {
  text-align: center;
  color: hsl(var(--text-secondary));
  font-size: var(--text-sm);
  margin-bottom: 20px;
}

.auth-form-group {
  margin-bottom: 18px;
}
.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  margin-bottom: 18px;
}
.auth-form-row .auth-form-group {
  margin-bottom: 0;
}
.auth-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-secondary));
  margin-bottom: 5px;
  font-family: var(--font-body);
}
.auth-hint {
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
  margin-top: 4px;
  font-family: var(--font-body);
}
.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  border: 1.5px solid hsl(var(--grey-100));
  background: hsl(var(--grey-25));
  color: hsl(var(--text-primary));
  font-size: 16px;
  box-sizing: border-box;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}
.auth-input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px color-mix(in oklab, hsl(var(--primary)) 15%, transparent);
}
.auth-input::placeholder {
  color: hsl(var(--text-muted));
  opacity: 0.5;
}
.auth-input:read-only {
  opacity: 0.7;
}

.auth-password-wrap {
  position: relative;
}
.auth-password-wrap .auth-input {
  padding-right: 44px;
}
.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: hsl(var(--text-muted));
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-password-toggle:hover {
  color: hsl(var(--primary));
}

.auth-btn {
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  cursor: pointer;
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
  margin-top: 20px;
}
.auth-btn-contained {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-dark)));
  color: hsl(var(--text-contrast));
  box-shadow: 0 4px 12px color-mix(in oklab, hsl(var(--primary)) 30%, transparent);
}
.auth-btn-contained:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px color-mix(in oklab, hsl(var(--primary)) 40%, transparent);
}
.auth-btn-contained:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.auth-btn-success {
  background: linear-gradient(135deg, hsl(var(--success)), hsl(var(--success-dark)));
  color: hsl(var(--text-contrast));
  box-shadow: 0 4px 12px color-mix(in oklab, hsl(var(--success)) 30%, transparent);
}
.auth-btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px color-mix(in oklab, hsl(var(--success)) 40%, transparent);
}
.auth-btn-outlined {
  background: transparent;
  border: 1px solid hsl(var(--grey-100));
  color: hsl(var(--text-secondary));
  box-shadow: none;
}
.auth-btn-outlined:hover {
  background: hsl(var(--grey-25));
  transform: translateY(-1px);
}
.auth-btn-link {
  background: none;
  border: none;
  color: hsl(var(--primary));
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: color 0.2s;
  font-family: var(--font-body);
  padding: 0;
  width: auto;
  margin-top: 0;
}
.auth-btn-link:hover {
  text-decoration: underline;
  color: hsl(var(--primary-light));
}

.auth-msg {
  padding: 10px 14px;
  border-radius: var(--radius-btn);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin-top: var(--spacing-md);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
}
.auth-msg.show {
  opacity: 1;
  max-height: 80px;
}
.auth-msg.error {
  background: color-mix(in oklab, hsl(var(--error)) 10%, transparent);
  color: hsl(var(--error));
  border: 1px solid color-mix(in oklab, hsl(var(--error)) 20%, transparent);
}
.auth-msg.success {
  background: color-mix(in oklab, hsl(var(--success)) 10%, transparent);
  color: hsl(var(--success));
  border: 1px solid color-mix(in oklab, hsl(var(--success)) 20%, transparent);
}

/* Referral banner on signup */
.auth-ref-banner {
  background: color-mix(in oklab, hsl(var(--success)) 8%, transparent);
  border: 1px solid color-mix(in oklab, hsl(var(--success)) 20%, transparent);
  border-radius: var(--radius-btn);
  padding: 8px 14px;
  margin-bottom: var(--spacing-md);
  font-size: var(--text-sm);
  color: hsl(var(--success));
  display: none;
  text-align: center;
  font-family: var(--font-body);
}
.auth-ref-banner.show {
  display: block;
}
.auth-ref-banner svg {
  width: 14px;
  height: 14px;
  margin-right: 6px;
}

/* Icon circle (reset password, success screens) */
.auth-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
  border: 2px solid color-mix(in oklab, hsl(var(--primary)) 20%, transparent);
}
.auth-icon-circle svg {
  color: hsl(var(--primary));
  width: 28px;
  height: 28px;
}
.auth-icon-circle.success {
  background: color-mix(in oklab, hsl(var(--success)) 10%, transparent);
  border-color: color-mix(in oklab, hsl(var(--success)) 20%, transparent);
}
.auth-icon-circle.success svg {
  color: hsl(var(--success));
}

/* Success screen */
.auth-success-screen {
  display: none;
  text-align: center;
  padding: 12px 0;
}
.auth-success-screen.show {
  display: block;
}
.auth-success-screen .auth-btn {
  margin-top: 0;
}
.auth-success-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: color-mix(in oklab, hsl(var(--success)) 10%, transparent);
  border: 2px solid color-mix(in oklab, hsl(var(--success)) 30%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.auth-success-icon-circle svg {
  color: hsl(var(--success));
  width: 36px;
  height: 36px;
}
.auth-success-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: hsl(var(--text-primary));
  margin-bottom: 4px;
  font-family: var(--font-heading);
}
.auth-success-subtitle {
  font-size: var(--text-sm);
  color: hsl(var(--text-secondary));
  margin-bottom: 20px;
  font-family: var(--font-body);
}
.auth-success-email {
  background: hsl(var(--grey-25));
  border: 1px solid hsl(var(--grey-100));
  border-radius: var(--radius-btn);
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
}
.auth-success-email svg {
  color: hsl(var(--primary));
  width: 16px;
  height: 16px;
}
.auth-success-steps {
  text-align: left;
  margin-bottom: 24px;
}
.auth-success-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid hsl(var(--grey-50));
}
.auth-success-step:last-child {
  border-bottom: none;
}
.auth-success-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-dark)));
  color: hsl(var(--text-contrast));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  flex-shrink: 0;
  font-family: var(--font-heading);
}
.auth-success-step-text {
  flex: 1;
}
.auth-success-step-title {
  font-weight: var(--weight-semibold);
  color: hsl(var(--text-primary));
  font-size: var(--text-sm);
  margin-bottom: 3px;
  font-family: var(--font-body);
}
.auth-success-step-desc {
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
  line-height: 1.5;
  font-family: var(--font-body);
}
.auth-success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-success-footer {
  margin-top: var(--spacing-md);
  font-size: var(--text-xs);
  color: hsl(var(--text-muted));
  font-family: var(--font-body);
}
.auth-success-footer a {
  color: hsl(var(--primary));
  font-weight: var(--weight-semibold);
}
.auth-success-footer a:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: hsl(var(--text-muted));
  font-size: var(--text-xs);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid hsl(var(--grey-100));
}
.auth-divider span {
  padding: 0 10px;
}

.auth-hidden {
  display: none;
}
.auth-bottom-text {
  text-align: center;
  font-size: var(--text-sm);
  color: hsl(var(--text-secondary));
  margin-top: var(--spacing-md);
}
.auth-bottom-text a {
  color: hsl(var(--primary));
  font-weight: var(--weight-semibold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.auth-bottom-text a:hover {
  text-decoration: underline;
}

/* Theme toggle */
.auth-theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
}
.auth-theme-btn {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  cursor: pointer;
  color: hsl(var(--text-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  outline: none !important;
  box-shadow: none !important;
}
.auth-theme-btn:hover {
  color: hsl(var(--primary));
}
.auth-theme-btn .theme-icon-dark,
.auth-theme-btn .theme-icon-light {
  display: none;
}
[data-theme="dark"] .auth-theme-btn .theme-icon-dark {
  display: block;
}
[data-theme="light"] .auth-theme-btn .theme-icon-light {
  display: block;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 16px;
    border-radius: var(--radius-md);
  }
  .auth-logo span {
    font-size: 1.25rem;
  }
  .auth-form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   72. PROFILE PAGE
   ============================================ */

/* Cover Photo */
.mp-cover-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, color-mix(in oklab, hsl(var(--primary)) 20%, transparent), color-mix(in oklab, hsl(var(--secondary)) 15%, transparent));
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: var(--spacing-md);
}
.mp-cover-wrapper.has-cover { cursor: default; }
.mp-cover-img { width: 100%; height: 100%; object-fit: cover; display: none; }
.mp-cover-img.show { display: block; }
.mp-cover-upload-btn {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  border-radius: var(--radius-md); background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2); color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s; z-index: 2;
}
.mp-cover-upload-btn:hover { background: rgba(0,0,0,0.7); transform: scale(1.05); }
.mp-cover-upload-btn svg { width: 16px; height: 16px; }
.mp-cover-spinner { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); z-index: 3; }
.mp-cover-spinner.show { display: flex; }

/* Avatar Row — padding on sides and bottom only, top from cover margin */
.mp-avatar-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  padding: 0 20px var(--spacing-md) 20px;
}

/* Avatar */
.mp-avatar-wrapper { position: relative; cursor: pointer; flex-shrink: 0; }
.mp-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-dark)));
  display: flex; align-items: center; justify-content: center; color: hsl(var(--text-contrast));
  font-weight: var(--weight-bold); font-size: 32px; border: 3px solid hsl(var(--background-paper));
  overflow: hidden; box-shadow: 0 8px 20px color-mix(in oklab, hsl(var(--primary)) 30%, transparent);
  font-family: var(--font-heading); transition: all 0.2s;
}
.mp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mp-avatar-overlay { position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; color: white; }
.mp-avatar-wrapper:hover .mp-avatar-overlay { opacity: 1; }
.mp-avatar-spinner { position: absolute; inset: 0; border-radius: 50%; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); z-index: 2; }
.mp-avatar-spinner.show { display: flex; }

/* Profile Info */
.mp-profile-info { flex: 1; min-width: 0; }

/* Profile Header */
.mp-profile-name { font-size: var(--text-3xl); font-weight: var(--weight-bold); color: hsl(var(--text-primary)); font-family: var(--font-heading); margin-bottom: 2px; }
.mp-profile-role { font-size: var(--text-xs); color: hsl(var(--text-muted)); text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-body); }
.mp-profile-meta { display: flex; align-items: center; gap: var(--spacing-md); flex-wrap: wrap; margin-top: 6px; }
.mp-profile-meta span { font-size: var(--text-xs); color: hsl(var(--text-muted)); font-family: var(--font-body); }

/* Two Column — matches admin dashboard spacing */
.mp-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); align-items: stretch !important; margin-bottom: var(--spacing-md); }
.mp-col-left, .mp-col-right { display: flex; flex-direction: column; gap: var(--spacing-md); min-width: 0; }
.mp-col-left > .section-card,
.mp-col-right > .section-card {
  margin-bottom: 0 !important;
}

/* Info Rows */
.mp-info-grid { display: flex; flex-direction: column; gap: 0; }
.mp-info-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid hsl(var(--grey-50)); gap: var(--spacing-md); }
.mp-info-item:last-child { border-bottom: none; padding-bottom: 0; }
.mp-info-item:first-child { padding-top: 0; }
.mp-info-label { font-size: var(--text-xs); color: hsl(var(--text-muted)); font-weight: var(--weight-medium); font-family: var(--font-body); flex-shrink: 0; }
.mp-info-value { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: hsl(var(--text-primary)); text-align: right; word-break: break-word; font-family: var(--font-body); }

/* Verification */
.mp-verification-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--spacing-md) !important; padding: 14px 0; border-bottom: 1px solid hsl(var(--grey-50)); }
.mp-verification-row:last-child { border-bottom: none; padding-bottom: 0; }
.mp-verification-row:first-child { padding-top: 0; }
.mp-verification-icon-box { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mp-verification-icon-box.email { background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent); color: hsl(var(--primary)); }
.mp-verification-icon-box.bank { background: color-mix(in oklab, hsl(var(--info)) 10%, transparent); color: hsl(var(--info)); }
.mp-verification-icon-box svg { width: 16px; height: 16px; }
.mp-verification-text { flex: 1; min-width: 0; }
.mp-verification-label { font-weight: var(--weight-semibold); font-size: var(--text-sm); color: hsl(var(--text-primary)); margin-bottom: 2px; }
.mp-verification-value { font-size: var(--text-xs); color: hsl(var(--text-secondary)); }

/* Rank */
.mp-rank-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--weight-medium); font-family: var(--font-body); }
.mp-rank-journey { display: flex; justify-content: space-between; align-items: flex-start; margin-top: var(--spacing-md); padding-top: var(--spacing-md); border-top: 1px solid hsl(var(--grey-100)); overflow-x: auto; }
.mp-rank-step { text-align: center; flex: 1; position: relative; min-width: 40px; }
.mp-rank-step::before { content: ''; position: absolute; top: 14px; left: 50%; width: 100%; height: 2px; background: hsl(var(--grey-100)); z-index: 0; }
.mp-rank-step:first-child::before { left: 50%; width: 50%; }
.mp-rank-step:last-child::before { width: 50%; }
.mp-rank-step-dot { width: 28px; height: 28px; border-radius: 50%; margin: 0 auto 6px; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: var(--weight-semibold); background: hsl(var(--grey-25)); border: 2px solid hsl(var(--grey-100)); color: hsl(var(--text-muted)); font-family: var(--font-body); }
.mp-rank-step-dot.completed { background: hsl(var(--success)); border-color: hsl(var(--success)); color: hsl(var(--text-contrast)); }
.mp-rank-step-dot.current { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--text-contrast)); box-shadow: 0 0 12px color-mix(in oklab, hsl(var(--primary)) 50%, transparent); }
.mp-rank-step-name { font-size: var(--text-xs); color: hsl(var(--text-muted)); margin-top: 2px; white-space: nowrap; font-family: var(--font-body); }
.mp-rank-step-name.current { color: hsl(var(--primary)); font-weight: var(--weight-semibold); }

/* Benefits */
.mp-benefit-item { display: flex; align-items: center; gap: var(--spacing-md); padding: 10px 0; border-bottom: 1px solid hsl(var(--grey-50)); }
.mp-benefit-item:last-child { border-bottom: none; padding-bottom: 0; }
.mp-benefit-item:first-child { padding-top: 0; }
.mp-benefit-check { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); flex-shrink: 0; }
.mp-benefit-check.active { background: hsl(var(--success)); color: hsl(var(--text-contrast)); }
.mp-benefit-check.inactive { background: hsl(var(--grey-25)); color: hsl(var(--text-muted)); }

/* Danger Zone Actions */
.danger-zone-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Referral Box — matches my-referrals.html exactly */
.mr-ref-box {
  background: linear-gradient(135deg, color-mix(in oklab, hsl(var(--success)) 8%, transparent), color-mix(in oklab, hsl(var(--success)) 3%, transparent));
  border: 1px solid color-mix(in oklab, hsl(var(--success)) 20%, transparent);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: var(--spacing-md);
}
.mr-ref-code {
  background: hsl(var(--grey-25));
  border: 1px solid hsl(var(--grey-50));
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mr-ref-code-val {
  font-size: 1.25rem;
  font-weight: var(--weight-bold);
  color: hsl(var(--primary));
  font-family: var(--font-mono);
  letter-spacing: 2px;
  flex: 1;
}
.mr-ref-link-row {
  background: hsl(var(--grey-25));
  border: 1px solid hsl(var(--grey-50));
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mr-ref-link {
  flex: 1;
  border: none;
  background: transparent;
  color: hsl(var(--text-primary));
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  outline: none;
  padding: 0;
}

/* Photo Bottom Sheet */
#photo-sheet-preview {
  transition: all 0.2s;
}

@media (max-width: 767px) {
  .mp-cover-wrapper { height: 140px; }
  .mp-avatar { width: 80px; height: 80px; font-size: 28px; }
  .mp-two-col { grid-template-columns: 1fr; }
  .mp-avatar-row { padding: 0 var(--spacing-md) var(--spacing-md) var(--spacing-md); }
  .danger-zone-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .danger-zone-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .mr-ref-code-val { font-size: 1rem; }
  .mr-ref-link-row { flex-wrap: wrap; }
  .mr-ref-link { font-size: 0.6875rem; }
  #profile-content > .section-card:first-child {
    margin-top: -8px;
  }
}

/* ============================================
   73. VIEW TOGGLE (Grid/List) — Global
   ============================================ */
.view-toggle {
  display: inline-flex;
  gap: 4px;
  background: hsl(var(--grey-25));
  padding: 4px;
  border-radius: 10px;
  border: 1px solid hsl(var(--grey-100));
}
.view-toggle-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: hsl(var(--text-secondary));
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: var(--font-body);
}
.view-toggle-btn.active {
  background: hsl(var(--primary));
  color: hsl(var(--text-contrast));
}
.view-toggle-btn:hover:not(.active) {
  background: hsl(var(--grey-50));
}
.view-toggle-btn svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   74. RESPONSIVE SCALING — Tablet & Mobile
   ============================================ */
@media (max-width: 1024px) {
  .section-card { padding: 14px; }
  .page-header h1 { font-size: var(--text-2xl); }
  .section-title { font-size: 1rem; }
  .stat-value { font-size: 22px; }
  .form-input, .form-select { font-size: 15px; padding: 10px 12px; }
  .form-select { padding-right: 38px; }
  .btn { padding: 7px 16px; }
  .btn-sm { padding: 5px 12px; }
  .badge { font-size: 0.6875rem; }
  th, td { padding: 10px; }
}

@media (max-width: 767px) {
  .section-card { padding: 12px; }
  .page-header { padding: 14px 0 6px; }
  .page-header h1 { font-size: var(--text-xl); }
  .section-title { font-size: 0.9375rem; }
  .stat-value { font-size: 1.25rem; }
  .stat-label { font-size: var(--text-xs); }
  .form-input, .form-select { font-size: 14px; padding: 8px 12px; }
  .form-select { padding-right: 36px; }
  .btn { padding: 6px 14px; font-size: 0.875rem; }
  .btn-sm { padding: 5px 10px; font-size: 0.75rem; }
  .btn-sm svg { width: 14px; height: 14px; }
  .badge { font-size: 0.625rem; padding: 3px 8px; }
  th, td { padding: 8px; font-size: var(--text-xs); }
  .stat-icon-box svg { width: 20px; height: 20px; }
  .dropdown-item { font-size: 0.75rem; padding: 8px 14px; }
  .dropdown-item svg { width: 14px; height: 14px; }
}

/* ============================================
   75. GLOBAL SIZE VARIANTS — xs/sm/md/lg
   ============================================ */

/* Buttons */
.btn-xs { padding: 4px 10px; font-size: 0.6875rem; min-width: 24px; border-radius: var(--radius-sm); gap: 4px; }
.btn-xs svg { width: 12px; height: 12px; }
/* .btn-sm — defined in Section 9 */
/* .btn — default, defined in Section 9 */
.btn-lg { padding: 12px 24px; font-size: var(--text-base); min-width: 44px; border-radius: var(--radius-btn); gap: 10px; }
.btn-lg svg { width: 20px; height: 20px; }

/* Icon Buttons */
.sh-icon-btn-xs { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.sh-icon-btn-xs svg { width: 14px; height: 14px; }
.sh-icon-btn-sm { width: 38px; height: 38px; border-radius: var(--radius-md); }
.sh-icon-btn-sm svg { width: 16px; height: 16px; }
/* .sh-icon-btn — default, defined in Section 50 */
.sh-icon-btn-lg { width: 52px; height: 52px; border-radius: var(--radius-md); }
.sh-icon-btn-lg svg { width: 22px; height: 22px; }

/* Badges */
.badge-xs { font-size: 0.5625rem; padding: 1px 6px; gap: 2px; }
.badge-xs svg { width: 8px; height: 8px; }
.badge-sm { font-size: 0.625rem; padding: 2px 8px; gap: 3px; }
.badge-sm svg { width: 10px; height: 10px; }
/* .badge — default, defined in Section 13 */
.badge-lg { font-size: var(--text-sm); padding: 5px 14px; gap: 5px; }
.badge-lg svg { width: 14px; height: 14px; }

/* Form Inputs */
.input-xs { padding: 4px 8px; font-size: 0.6875rem; min-height: 28px; border-radius: var(--radius-sm); }
.input-sm { padding: 6px 10px; font-size: var(--text-xs); min-height: 34px; border-radius: var(--radius-md); }
/* .form-input — default, defined in Section 11 */
.input-lg { padding: 12px 16px; font-size: 16px; min-height: 48px; border-radius: var(--radius-lg); }

/* Form Selects */
.form-select-sm { min-height: 34px; padding: 5px 30px 5px 10px; font-size: var(--text-xs); }
/* .form-select — default, defined in Section 11 */
.form-select-lg { min-height: 48px; padding: 10px 44px 10px 18px; font-size: var(--text-base); }

/* Dropdowns */
.dropdown-sm { min-width: 140px; padding: 4px; }
/* .dropdown — default, defined in Section 26 */
.dropdown-lg { min-width: 260px; padding: 10px; }
.dropdown-item-sm { font-size: var(--text-xs); padding: 6px 10px; }
.dropdown-item-sm svg { width: 14px; height: 14px; }
/* .dropdown-item — default, defined in Section 26 */
.dropdown-item-lg { font-size: var(--text-base); padding: 12px 18px; }
.dropdown-item-lg svg { width: 18px; height: 18px; }

/* Section Titles */
.section-title-sm { font-size: var(--text-base); gap: 8px; }
/* .section-title — default, defined in Section 19 */
.section-title-lg { font-size: var(--text-xl); gap: 14px; }

/* ============================================
   76. TYPOGRAPHY UTILITY CLASSES
   ============================================ */

.text-caption { font-size: var(--text-xs); color: hsl(var(--text-muted)); font-family: var(--font-body); }
.text-body-sm { font-size: var(--text-sm); color: hsl(var(--text-secondary)); font-family: var(--font-body); }
.text-body { font-size: var(--text-base); color: hsl(var(--text-primary)); font-family: var(--font-body); }
.text-heading-sm { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: var(--weight-semibold); color: hsl(var(--text-primary)); }
.text-heading { font-family: var(--font-heading); font-size: var(--text-xl); font-weight: var(--weight-bold); color: hsl(var(--text-primary)); }


/* ============================================
   SECTION 78: DISMISSIBLE BADGES (G3)
   ============================================ */
.dismissible-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs); font-weight: var(--weight-medium);
    font-family: var(--font-body); white-space: nowrap;
    cursor: default; user-select: none;
    background: color-mix(in oklab, hsl(var(--primary)) 10%, transparent);
    color: hsl(var(--primary));
    border: 1px solid color-mix(in oklab, hsl(var(--primary)) 20%, transparent);
    transition: background-color 0.15s, border-color 0.15s;
}
.dismissible-badge:hover {
    background: color-mix(in oklab, hsl(var(--primary)) 18%, transparent);
}
.dismissible-badge .dismiss-badge-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    border: none; background: transparent;
    color: inherit; cursor: pointer; padding: 0;
    flex-shrink: 0; opacity: 0.65;
    transition: opacity 0.15s, background-color 0.15s;
}
.dismissible-badge .dismiss-badge-btn:hover {
    opacity: 1;
    background: color-mix(in oklab, hsl(var(--primary)) 25%, transparent);
}
.dismissible-badge .dismiss-badge-btn svg { width: 10px; height: 10px; }

.dismissible-badge.dismissible-neutral {
    background: hsl(var(--grey-25));
    color: hsl(var(--text-secondary));
    border-color: hsl(var(--grey-200));
}
.dismissible-badge.dismissible-neutral:hover {
    background: hsl(var(--grey-50));
}
.dismissible-badge.dismissible-neutral .dismiss-badge-btn:hover {
    background: hsl(var(--grey-200));
}


/* ============================================
   79. STAGGERED REVEAL ANIMATIONS (V1.0)
   Smooth page-load reveal for all dashboards & pages
   Triggered by .reveal-ready on .main-content
   ============================================ */

/* All major sections start hidden */
.main-content .stats-grid,
.main-content .section-card,
.main-content .charts-row-split,
.main-content .charts-row-full,
.main-content .bottom-grid,
.main-content .mp-two-col {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When shell is ready, reveal everything with staggered delays */
.main-content.reveal-ready .stats-grid,
.main-content.reveal-ready .section-card,
.main-content.reveal-ready .charts-row-split,
.main-content.reveal-ready .charts-row-full,
.main-content.reveal-ready .bottom-grid,
.main-content.reveal-ready .mp-two-col {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered timing — cards appear in reading order */
.main-content.reveal-ready .page-header          { transition-delay: 0s; }
.main-content.reveal-ready .stats-grid           { transition-delay: 0.05s; }
.main-content.reveal-ready #onboarding-container  { transition-delay: 0.08s; }
.main-content.reveal-ready #quick-actions-container { transition-delay: 0.1s; }
.main-content.reveal-ready #alert-ticker-container { transition-delay: 0.1s; }
.main-content.reveal-ready #date-filter-container { transition-delay: 0.12s; }
.main-content.reveal-ready .section-card:nth-of-type(1) { transition-delay: 0.12s; }
.main-content.reveal-ready .section-card:nth-of-type(2) { transition-delay: 0.18s; }
.main-content.reveal-ready .section-card:nth-of-type(3) { transition-delay: 0.24s; }
.main-content.reveal-ready .section-card:nth-of-type(4) { transition-delay: 0.3s; }
.main-content.reveal-ready .section-card:nth-of-type(5) { transition-delay: 0.35s; }
.main-content.reveal-ready .section-card:nth-of-type(6) { transition-delay: 0.4s; }
.main-content.reveal-ready .charts-row-full       { transition-delay: 0.3s; }
.main-content.reveal-ready .charts-row-split      { transition-delay: 0.35s; }
.main-content.reveal-ready .bottom-grid           { transition-delay: 0.4s; }
.main-content.reveal-ready .mp-two-col            { transition-delay: 0.15s; }
.main-content.reveal-ready #referral-container    { transition-delay: 0.42s; }
.main-content.reveal-ready .page-footer           { transition-delay: 0.45s; }

/* Ensure page header is always visible immediately */
.main-content .page-header {
    opacity: 1;
    transform: none;
}

/* Skeleton cards also animate out smoothly */
.main-content.reveal-ready .skeleton-order-card,
.main-content.reveal-ready .skeleton-timeline-item,
.main-content.reveal-ready .skeleton-table-row {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .main-content .stats-grid,
    .main-content .section-card,
    .main-content .charts-row-split,
    .main-content .charts-row-full,
    .main-content .bottom-grid,
    .main-content .mp-two-col {
        transition: opacity 0.15s ease;
        transform: none;
    }
    .main-content.reveal-ready .stats-grid,
    .main-content.reveal-ready .section-card,
    .main-content.reveal-ready .charts-row-split,
    .main-content.reveal-ready .charts-row-full,
    .main-content.reveal-ready .bottom-grid,
    .main-content.reveal-ready .mp-two-col {
        transition-delay: 0s;
    }
}



/* ============================================
   SECTION 80: MOBILE PERFORMANCE OPTIMIZATIONS
   Replace GPU-heavy effects with solid backgrounds
   on mobile/tablet for smooth 60fps scrolling.
   Desktop (1024px+) retains full glass effects.
   ============================================ */

/* ---- 80a. Replace glass blur with solid backgrounds on mobile ---- */
@media (max-width: 1024px) {
    .topbar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: hsl(var(--background-paper)) !important;
        border-bottom: 1px solid hsl(var(--grey-50)) !important;
    }

    .menu-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: hsl(var(--background-paper)) !important;
        border: 1px solid hsl(var(--grey-50)) !important;
    }

    .main-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: hsl(var(--background-paper)) !important;
        border: 1px solid hsl(var(--grey-50)) !important;
    }
}

/* Dark mode overrides for solid backgrounds */
[data-theme="dark"] .topbar,
[data-theme="dark"] .menu-card,
[data-theme="dark"] .main-card {
    background: hsl(var(--background-paper)) !important;
}
@media (max-width: 1024px) {
    [data-theme="dark"] .topbar {
        border-bottom-color: hsl(var(--grey-700)) !important;
    }
    [data-theme="dark"] .menu-card,
    [data-theme="dark"] .main-card {
        border-color: hsl(var(--grey-700)) !important;
    }
}

/* ---- 80b. Simplify shadows on mobile for GPU performance ---- */
@media (max-width: 767px) {
    .section-card,
    .stat-card,
    .action-card,
    .order-card,
    .order-list-card,
    .order-mini-card {
        box-shadow: var(--shadow-2xs) !important;
    }

    .modal-content,
    .search-dialog,
    .notif-dropdown-container,
    .user-dropdown-container {
        box-shadow: var(--shadow-md) !important;
    }
}

/* ---- 80c. Optimize chart containers on mobile ---- */
@media (max-width: 767px) {
    .chart-container {
        height: 250px !important;
        min-height: 250px !important;
        max-height: 250px !important;
    }

    .doughnut-wrap {
        height: 250px !important;
        min-height: 250px !important;
        max-height: 250px !important;
    }
}

/* ---- 80d. Smooth scrolling for all pages ---- */
.main-card {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* ---- 80e. Reduce paint areas on mobile ---- */
@media (max-width: 767px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }

    .page-footer {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}