/* Ceylon Computer design system — built by scripts/build-design-system-css.js — do not edit */
/* --- tokens.css --- */
/**
 * Design system tokens — source of truth (Option A).
 * Channel RGB primitives enable Tailwind opacity modifiers (bg-primary/10).
 * Hex/rgb convenience aliases keep design-system component CSS on var(--accent) etc.
 */

:root {
  color-scheme: light;

  /* Channel primitives */
  --stage-bg-rgb: 236 234 250;
  --accent-rgb: 100 78 218;
  --accent-deep-rgb: 65 41 194;
  --ink-rgb: 23 22 31;
  --text-muted-rgb: 91 85 102;
  --surface-rgb: 251 250 254;
  --surface-2-rgb: 240 238 250;
  --page-bg-rgb: 245 244 251;
  --divider-rgb: 230 226 242;
  --on-accent-rgb: 247 246 254;
  --success-rgb: 46 158 122;
  --success-tint-rgb: 227 245 238;
  --warning-rgb: 201 138 29;
  --warning-tint-rgb: 251 240 218;
  --danger-rgb: 217 69 91;
  --danger-tint-rgb: 251 228 232;
  --info-rgb: 61 127 209;
  --info-tint-rgb: 229 239 251;
  --shadow-rgb: 23 22 31;

  /* Convenience aliases (design-system component CSS) */
  --stage-bg: rgb(var(--stage-bg-rgb));
  --accent: rgb(var(--accent-rgb));
  --accent-deep: rgb(var(--accent-deep-rgb));
  --ink: rgb(var(--ink-rgb));
  --text: var(--ink);
  --text-muted: rgb(var(--text-muted-rgb));
  --border: var(--ink);
  --shadow: rgb(var(--shadow-rgb));
  --surface: rgb(var(--surface-rgb));
  --surface-2: rgb(var(--surface-2-rgb));
  --page-bg: rgb(var(--page-bg-rgb));
  --divider: rgb(var(--divider-rgb));
  --on-accent: rgb(var(--on-accent-rgb));

  --success: rgb(var(--success-rgb));
  --success-tint: rgb(var(--success-tint-rgb));
  --warning: rgb(var(--warning-rgb));
  --warning-tint: rgb(var(--warning-tint-rgb));
  --danger: rgb(var(--danger-rgb));
  --danger-tint: rgb(var(--danger-tint-rgb));
  --info: rgb(var(--info-rgb));
  --info-tint: rgb(var(--info-tint-rgb));

  --font-display: 'Krona One', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-pill: 999px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --border-w: 2.5px;
  --border-w-sm: 2px;
  --shadow-hard: 4px 4px 0 var(--shadow);
  --shadow-hard-sm: 3px 3px 0 var(--shadow);
  --shadow-hard-xs: 2px 2px 0 var(--shadow);

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 96px;
}

:root.dark {
  color-scheme: dark;

  --stage-bg-rgb: 14 11 21;
  --accent-rgb: 155 137 250;
  --accent-deep-rgb: 126 104 243;
  --ink-rgb: 237 234 245;
  --text-muted-rgb: 156 148 173;
  --surface-rgb: 22 18 31;
  --surface-2-rgb: 29 24 41;
  --page-bg-rgb: 11 10 13;
  --divider-rgb: 42 36 51;
  --on-accent-rgb: 20 16 31;
  --success-rgb: 73 206 158;
  --success-tint-rgb: 18 51 40;
  --warning-rgb: 240 190 92;
  --warning-tint-rgb: 58 44 16;
  --danger-rgb: 242 105 79;
  --danger-tint-rgb: 58 27 16;
  --info-rgb: 127 180 245;
  --info-tint-rgb: 27 42 61;

  /* Chrome borders use accent in dark mode (sticker outlines + hard-shadow companion) */
  --border: var(--accent);

  /* Translucent accent glow — not opaque ink */
  --shadow: rgba(155, 137, 250, 0.4);
  --shadow-hard: 4px 4px 0 var(--shadow);
  --shadow-hard-sm: 3px 3px 0 var(--shadow);
  --shadow-hard-xs: 2px 2px 0 var(--shadow);
}

/* --- aliases.css --- */
/**
 * Material-ish Tailwind name aliases → design-system semantic tokens.
 * Used by existing Blade utilities (bg-primary-container, text-on-surface, …).
 * Extra tertiary/secondary-fixed hues fold onto nearest semantic surfaces/accent.
 */

:root {
  --alias-primary: var(--accent);
  --alias-primary-container: var(--accent);
  --alias-accent-deep: var(--accent-deep);
  --alias-secondary: var(--accent-deep);
  --alias-secondary-container: var(--surface-2);
  --alias-on-primary: var(--on-accent);
  --alias-on-primary-container: var(--on-accent);
  --alias-on-secondary: var(--on-accent);
  --alias-on-secondary-container: var(--text);
  --alias-on-surface: var(--text);
  --alias-on-surface-variant: var(--text-muted);
  --alias-outline: var(--text-muted);
  --alias-outline-variant: var(--divider);
  --alias-surface-container: var(--surface-2);
  --alias-surface-container-low: var(--surface);
  --alias-surface-container-high: var(--surface-2);
  --alias-surface-container-highest: var(--surface-2);
  --alias-surface-container-lowest: var(--surface);
  --alias-surface-variant: var(--surface-2);
  --alias-surface-bright: var(--surface);
  --alias-surface-dim: var(--surface-2);
  --alias-background: var(--page-bg);
  --alias-on-background: var(--text);
  --alias-inverse-surface: var(--ink);
  --alias-inverse-on-surface: var(--page-bg);
  --alias-inverse-primary: var(--accent);
  --alias-primary-fixed: var(--surface-2);
  --alias-primary-fixed-dim: var(--surface-2);
  --alias-on-primary-fixed: var(--text);
  --alias-on-primary-fixed-variant: var(--text-muted);
  --alias-secondary-fixed: var(--surface-2);
  --alias-secondary-fixed-dim: var(--surface-2);
  --alias-on-secondary-fixed: var(--text);
  --alias-on-secondary-fixed-variant: var(--text-muted);
  --alias-tertiary: var(--warning);
  --alias-tertiary-container: var(--warning);
  --alias-on-tertiary: var(--on-accent);
  --alias-on-tertiary-container: var(--on-accent);
  --alias-tertiary-fixed: var(--warning-tint);
  --alias-tertiary-fixed-dim: var(--warning-tint);
  --alias-on-tertiary-fixed: var(--text);
  --alias-on-tertiary-fixed-variant: var(--text-muted);
  --alias-error: var(--danger);
  --alias-error-container: var(--danger-tint);
  --alias-on-error: var(--on-accent);
  --alias-on-error-container: var(--danger);
  --alias-surface-tint: var(--accent);
}

/* --- base.css --- */
/* ============ BASE / RESET ============ */
/* Note: do not force global section/main layout — Laravel pages own their layout via Tailwind. */
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--text);
  background:var(--page-bg);
  -webkit-font-smoothing:antialiased;
  transition:background .3s ease, color .3s ease;
}
h1,h2,h3{font-family:var(--font-display);font-weight:400;margin:0;color:var(--text);}
code{font-family:var(--font-mono);}
a{color:inherit;}
button{font-family:var(--font-body);}
:focus-visible{outline:2.5px solid var(--accent);outline-offset:2px;}

/* --- components/_layout-primitives.css --- */
/* ============ LAYOUT PRIMITIVES: eyebrow, section head, stage container ============ */
.eyebrow{
  font-family:var(--font-mono); font-size:12px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--accent); font-weight:500;
  display:block; margin-bottom:var(--sp-2);
}
.section-head{margin-bottom:var(--sp-4);}
.section-head h2{font-size:22px;font-weight:400;letter-spacing:0;}
.section-head p{font-size:14.5px;color:var(--text-muted);margin-top:8px;max-width:640px;line-height:1.55;}

/* generic demo container used across every component section */
.stage{
  border:var(--border-w) solid var(--border);
  border-radius:16px;
  background:var(--stage-bg);
  padding:var(--sp-5);
}
.stage-flex{display:flex;flex-wrap:wrap;gap:20px;align-items:center;}
.stage-note{margin-top:14px;font-size:12.5px;color:var(--text-muted);line-height:1.6;}
.sub-label{font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;margin:28px 0 10px;}
.sub-label:first-child{margin-top:0;}

/* Gallery: color swatches */
.swatch-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--sp-3);}
.swatch-card{border:var(--border-w) solid var(--border);border-radius:16px;overflow:hidden;background:var(--surface);}
.swatch-block{height:110px;}
.swatch-info{padding:14px 16px;}
.swatch-name{font-weight:700;font-size:14.5px;color:var(--text);}
.swatch-hex{font-family:var(--font-mono);font-size:13px;color:var(--text-muted);margin-top:2px;}
.swatch-usage{font-size:12.5px;color:var(--text-muted);margin-top:8px;line-height:1.5;}
.gradient-demo{margin-top:var(--sp-4);border:var(--border-w) solid var(--border);border-radius:16px;overflow:hidden;}
.gradient-bar{height:64px;background:linear-gradient(180deg,#AEE4DC 0%,#9D7DC8 100%);display:flex;justify-content:space-between;align-items:center;padding:0 20px;font-family:var(--font-mono);font-size:12px;color:#17161A;}
.gradient-caption{padding:12px 20px;font-size:13px;color:var(--text-muted);background:var(--surface);}

/* Gallery: typography */
table.spec{width:100%;border-collapse:collapse;font-size:13.5px;}
table.spec th,table.spec td{text-align:left;padding:12px 14px;border-bottom:1px solid var(--divider);}
table.spec th{font-family:var(--font-mono);text-transform:uppercase;font-size:11px;letter-spacing:.08em;color:var(--text-muted);font-weight:500;}
table.spec td.role{font-weight:700;}
table.spec td.sample{font-family:var(--font-display);}
.type-sample{border:var(--border-w) solid var(--border);border-radius:16px;padding:var(--sp-5);background:var(--stage-bg);margin-bottom:var(--sp-4);}
.type-sample .headline{font-family:var(--font-display);font-weight:400;font-size:42px;line-height:1.15;letter-spacing:0;color:var(--text);}
.type-sample .headline .hl{color:var(--accent);}
.type-sample .sub{margin-top:14px;font-family:var(--font-body);font-size:15px;max-width:420px;line-height:1.6;color:var(--text);opacity:.8;}
.type-scale{display:flex;flex-direction:column;border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);overflow:hidden;margin-top:24px;background:var(--surface);}
.type-scale-row{display:flex;align-items:baseline;justify-content:space-between;gap:20px;padding:15px 20px;border-bottom:1px solid var(--divider);}
.type-scale-row:last-child{border-bottom:none;}
.type-scale-row .sample-text{color:var(--text);}
.type-scale-row .meta{font-family:var(--font-mono);font-size:10.5px;color:var(--text-muted);white-space:nowrap;flex:none;}

/* Gallery: logo / photo treatment / tokens dump */
.logo-stage{display:grid;grid-template-columns:auto 1fr;gap:var(--sp-4);align-items:center;border:var(--border-w) solid var(--border);border-radius:16px;padding:var(--sp-4);background:var(--stage-bg);}
.logo-box{width:110px;height:110px;border-radius:20px;border:var(--border-w) solid var(--border);background:var(--surface);display:grid;place-content:center;box-shadow:var(--shadow-hard-sm);}
.duo-stage{display:grid;grid-template-columns:1fr 1fr;gap:var(--sp-3);}
.duo-card{border:var(--border-w) solid var(--border);border-radius:16px;overflow:hidden;background:var(--surface);}
.duo-strip{height:140px;}
.duo-label{padding:14px 16px;font-size:13px;color:var(--text-muted);line-height:1.5;}
pre.tokens{margin:0;padding:var(--sp-4);border:var(--border-w) solid var(--border);border-radius:16px;background:var(--surface);font-family:var(--font-mono);font-size:12.5px;line-height:1.7;overflow:auto;color:var(--text);}
pre.tokens .c{color:var(--text-muted);}
pre.tokens .p{color:var(--accent);font-weight:600;}

/* --- components/theme-switch.css --- */
/* Theme switch */
.theme-switch{
  position:relative;flex:none;display:inline-flex;align-items:center;justify-content:space-between;
  width:56px;height:30px;border-radius:999px;border:var(--border-w-sm) solid var(--border);
  background:var(--surface-2);cursor:pointer;padding:0 6px;
}
/* Tailwind utilities in app.css (loaded after) win for .hidden / responsive display */
.theme-switch svg{width:13px;height:13px;position:relative;z-index:1;color:var(--text);}
.theme-switch .ts-thumb{
  position:absolute;top:2px;left:2px;width:22px;height:22px;border-radius:50%;
  background:var(--accent);transition:transform .25s cubic-bezier(.34,1.4,.64,1);
}
:root.dark .theme-switch .ts-thumb{transform:translateX(26px);}

/* Full-width segmented toggle — sticker pill in a bordered track (mobile menu) */
.theme-switch-wide{
  width:100%;min-height:52px;padding:5px;gap:0;
  display:grid;grid-template-columns:1fr 1fr;align-items:stretch;
  border-radius:var(--radius-pill);
  border:var(--border-w) solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow-hard-sm);
}
.theme-switch-wide .ts-thumb{display:none;}
.theme-switch-wide .ts-opt{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:40px;padding:8px 12px;
  border-radius:var(--radius-pill);border:2.5px solid transparent;
  font-family:var(--font-body);font-size:14px;font-weight:700;
  color:var(--text);background:transparent;box-shadow:none;
  transition:background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s cubic-bezier(.34,1.4,.64,1), transform .2s cubic-bezier(.34,1.4,.64,1);
}
.theme-switch-wide .ts-opt .material-symbols-outlined{font-size:18px;line-height:1;color:currentColor;}
.theme-switch-wide .ts-opt-label{letter-spacing:.01em;}
:root:not(.dark) .theme-switch-wide .ts-opt-dark,
:root.dark .theme-switch-wide .ts-opt-light{
  color:var(--text-muted);
}
:root:not(.dark) .theme-switch-wide .ts-opt-light,
:root.dark .theme-switch-wide .ts-opt-dark{
  background:var(--accent);color:var(--on-accent);
  border-color:var(--border);
  box-shadow:none;
}
.theme-switch-wide:active{
  transform:translate(1px,1px);
  box-shadow:1px 1px 0 var(--shadow);
}
@media (prefers-reduced-motion: reduce){
  .theme-switch .ts-thumb,.theme-switch-wide .ts-opt{transition:none;}
}

/* --- components/links.css --- */
/* ============ LINKS ============ */
.link-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
.link-basic{color:var(--accent);text-decoration:underline;text-underline-offset:3px;font-weight:600;cursor:pointer;font-size:14px;}
.link-basic:hover{opacity:.78;}
.link-quiet{color:var(--text);text-decoration:none;border-bottom:1.5px solid var(--divider);font-weight:600;cursor:pointer;font-size:14px;padding-bottom:1px;}
.link-quiet:hover{border-color:var(--accent);color:var(--accent);}
.link-external{display:inline-flex;align-items:center;gap:5px;color:var(--accent);font-weight:600;text-decoration:none;cursor:pointer;font-size:14px;}
.link-external svg{width:12px;height:12px;}
.link-external .material-symbols-outlined{font-size:14px;line-height:1;}
.link-disabled{color:var(--text-muted);text-decoration:none;opacity:.5;cursor:not-allowed;font-weight:600;font-size:14px;}
.link-label{font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);font-weight:700;width:100px;flex:none;}

/* --- components/buttons.css --- */
/* ============ BUTTONS ============ */
.btn{
  font-family:var(--font-body); font-weight:700; font-size:15px;
  border-radius:var(--radius-pill); border:var(--border-w) solid var(--border);
  padding:14px 30px; cursor:pointer; display:inline-flex; align-items:center; gap:8px;
  box-shadow:var(--shadow-hard-sm); transition:transform .12s ease, box-shadow .12s ease;
  background:var(--surface); color:var(--text);
}
.btn:hover{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--shadow);}
.btn:active{transform:translate(3px,3px);box-shadow:0 0 0 var(--shadow);}
.btn-primary{background:var(--accent);color:var(--on-accent);border-color:var(--border);}
.btn-primary:hover{background:var(--accent-deep);}
.btn-secondary{background:var(--surface);color:var(--text);}
.btn-ghost{background:transparent;border-color:transparent;box-shadow:none;color:var(--text);}
.btn-ghost:hover{background:var(--surface-2);transform:none;box-shadow:none;}
.btn-danger{background:var(--danger);color:var(--on-accent);}
.btn-danger:hover{background:#B23048;}
.btn-sm{padding:10px 22px;font-size:14px;}
.btn .play{width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:8px solid currentColor;}

/* Floating action — elevated primary CTA (Create Repair Job) */
.btn-fab{box-shadow:var(--shadow-hard);}
.btn-fab:hover{box-shadow:1px 1px 0 var(--shadow);}
.btn-fab:active{box-shadow:0 0 0 var(--shadow);}
.btn-fab-fixed{
  position:fixed;z-index:50;
  right:calc(var(--sp-3) + env(safe-area-inset-right,0px));
  bottom:calc(var(--sp-3) + env(safe-area-inset-bottom,0px));
  transition:opacity .28s ease, transform .32s cubic-bezier(.34,1.4,.64,1), visibility .28s ease;
}
/* Compact (M3 0–599): icon-only for thumb reach */
@media (max-width:599px){
  .btn-fab-fixed{padding:14px;min-width:52px;justify-content:center;}
  .btn-fab-fixed .btn-fab-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
}

/* --- components/actions.css --- */
/* ============ ACTIONS: split button / icon button / dropdown / inline edit ============ */
.icon-btn{
  width:38px;height:38px;border-radius:50%;border:var(--border-w) solid var(--border);
  background:var(--surface);color:var(--text);display:flex;align-items:center;justify-content:center;
  cursor:pointer;flex:none;box-shadow:var(--shadow-hard-sm);
  transition:transform .12s ease, box-shadow .12s ease;
}
.icon-btn:hover{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--shadow);}
.icon-btn:active{transform:translate(3px,3px);box-shadow:0 0 0 var(--shadow);}
.icon-btn.danger{color:var(--danger);}
.icon-btn.danger:hover{background:var(--danger-tint);}
.icon-btn svg{width:17px;height:17px;}
.icon-btn .material-symbols-outlined{font-size:17px;line-height:1;}

.dropdown{position:relative;display:inline-block;}
.dropdown-menu{
  display:none;position:absolute;top:calc(100% + 8px);right:0;min-width:190px;
  background:var(--surface);border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);
  box-shadow:var(--shadow-hard);padding:6px;z-index:30;
}
.dropdown.open .dropdown-menu{display:block;}
.dropdown-menu.dropdown-menu-portaled{
  position:fixed;display:block;z-index:50;
  right:auto;width:auto;
}
.dropdown-item{
  padding:10px 12px;border-radius:8px;font-size:13.5px;font-weight:600;color:var(--text);
  cursor:pointer;display:flex;align-items:center;gap:9px;text-decoration:none;
  width:100%;border:none;background:transparent;font-family:var(--font-body);text-align:left;
}
.dropdown-item:hover{background:var(--surface-2);}
.dropdown-item.danger{color:var(--danger);}
.dropdown-item svg{width:15px;height:15px;flex:none;}
.dropdown-item .material-symbols-outlined{font-size:15px;line-height:1;flex:none;}

.split-btn{display:inline-flex;border-radius:var(--radius-pill);border:var(--border-w) solid var(--border);overflow:hidden;box-shadow:var(--shadow-hard-sm);}
.split-btn .btn-main{border:none;border-radius:0;box-shadow:none;background:var(--accent);color:var(--on-accent);padding:14px 24px;font-weight:700;font-size:15px;cursor:pointer;font-family:var(--font-body);}
.split-btn .btn-main:hover{background:var(--accent-deep);}
.split-btn .btn-caret{border:none;border-left:var(--border-w) solid var(--border);border-radius:0;box-shadow:none;background:var(--accent-deep);color:var(--on-accent);padding:14px 16px;cursor:pointer;display:flex;align-items:center;}
.split-btn .btn-caret svg{width:12px;height:12px;}
.split-btn .btn-caret .material-symbols-outlined{font-size:14px;line-height:1;}

.inline-edit{display:inline-flex;align-items:center;gap:8px;}
.inline-edit-text{font-size:14.5px;font-weight:700;color:var(--text);}
.inline-edit .pencil{width:15px;height:15px;opacity:0;transition:opacity .15s ease;cursor:pointer;flex:none;color:var(--text-muted);font-size:15px;line-height:1;}
.inline-edit:hover .pencil{opacity:.8;}
.inline-edit .pencil:hover{opacity:1;color:var(--accent);}
.inline-edit-form{display:none;align-items:center;gap:8px;}
.inline-edit.editing .inline-edit-text,
.inline-edit.editing .pencil{display:none;}
.inline-edit.editing .inline-edit-form{display:inline-flex;}
.inline-edit-input{
  font-size:14px;padding:8px 12px;border-radius:8px;border:var(--border-w-sm) solid var(--accent);
  background:var(--surface);color:var(--text);width:150px;outline:none;
}
.inline-edit-save,.inline-edit-cancel{
  width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  cursor:pointer;flex:none;border:none;
}
.inline-edit-save{background:var(--success);color:var(--on-accent);}
.inline-edit-cancel{background:var(--surface-2);color:var(--text);}
.inline-edit-save svg,.inline-edit-cancel svg{width:12px;height:12px;}
.inline-edit-save .material-symbols-outlined,
.inline-edit-cancel .material-symbols-outlined{font-size:14px;line-height:1;}

/* --- components/navigation.css --- */
/* ============ NAVIGATION: primary bar ============ */
.nav-row{display:flex;align-items:center;justify-content:space-between;gap:20px;}
.nav-logo{display:flex;align-items:center;gap:10px;font-family:var(--font-display);font-weight:400;font-size:15px;color:var(--text);}
.nav-links{display:flex;gap:30px;font-size:14px;font-weight:500;color:var(--text);flex-wrap:wrap;}
.nav-links a{color:var(--text);text-decoration:none;}
.nav-links a.active{font-weight:700;text-decoration:underline;text-underline-offset:5px;}

/* --- components/nav-patterns.css --- */
/* ============ NAVIGATION PATTERNS: breadcrumbs / pagination / stepper ============ */
.breadcrumbs{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--text-muted);flex-wrap:wrap;}
.breadcrumbs a{color:var(--text-muted);text-decoration:none;font-weight:500;}
.breadcrumbs a:hover{color:var(--accent);}
.breadcrumbs .current{color:var(--text);font-weight:700;}
.breadcrumbs .sep{opacity:.5;}

/* Pill variant — public page header crumb (About, Services, etc.) */
.breadcrumbs-pill{
  display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;
  font-family:var(--font-mono);font-size:12px;letter-spacing:.14em;text-transform:uppercase;
  font-weight:500;color:var(--text-muted);
  background:var(--surface-2);border:var(--border-w-sm) solid var(--border);
  border-radius:var(--radius-pill);padding:8px 16px;
}
.breadcrumbs-pill a{color:var(--text-muted);text-decoration:none;font-weight:500;}
.breadcrumbs-pill a:hover{color:var(--accent);}
.breadcrumbs-pill .current{color:var(--accent);font-weight:700;}
.breadcrumbs-pill .sep{opacity:.5;letter-spacing:0;}
.breadcrumbs-pill .material-symbols-outlined{
  font-size:14px;line-height:1;letter-spacing:normal;text-transform:none;opacity:.75;
}

/* Mobile menu (public header) — fullscreen overlay on Compact–Expanded */
.mobile-nav-toggle{
  width:44px;height:44px;padding:0;flex:none;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:50%;border:var(--border-w) solid var(--border);
  background:var(--surface);color:var(--text);
  box-shadow:var(--shadow-hard-sm);cursor:pointer;
  transition:transform .2s cubic-bezier(.34,1.4,.64,1), box-shadow .2s ease, background .2s ease, color .2s ease;
  position:relative;z-index:60;
  overflow:hidden;
}
.mobile-nav-toggle:hover{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--shadow);}
.mobile-nav-toggle:active{transform:translate(3px,3px);box-shadow:0 0 0 var(--shadow);}
.mobile-nav-toggle .material-symbols-outlined{
  font-size:22px;line-height:1;display:block;
  transition:transform .35s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
.mobile-nav-toggle[aria-expanded="true"]{background:var(--accent);color:var(--on-accent);}
.mobile-nav-toggle.is-icon-spin .material-symbols-outlined{
  transform:rotate(90deg) scale(.6);opacity:0;
}

.mobile-nav-backdrop{
  position:fixed;inset:0;z-index:55;
  background:rgb(10 8 14 / .28);
  -webkit-backdrop-filter:blur(12px) saturate(1.15);
  backdrop-filter:blur(12px) saturate(1.15);
  opacity:0;pointer-events:none;visibility:hidden;
  transition:opacity .28s ease, visibility .28s ease;
}
.mobile-nav-backdrop.is-open{opacity:1;pointer-events:auto;visibility:visible;}
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  .mobile-nav-backdrop.is-open{background:rgb(var(--page-bg-rgb) / .92);}
}

.mobile-nav-panel{
  position:fixed;left:0;right:0;bottom:0;
  top:var(--mobile-nav-top,4rem);
  z-index:56;
  display:flex;flex-direction:column;
  padding:var(--sp-3);
  padding-bottom:calc(var(--sp-3) + env(safe-area-inset-bottom,0px));
  overflow-y:auto;overscroll-behavior:contain;
  background:rgb(var(--page-bg-rgb) / .55);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  border-top:var(--border-w) solid var(--border);
  box-shadow:none;
  opacity:0;visibility:hidden;pointer-events:none;
  transform:translateY(-18px) scale(.97);
  transform-origin:top center;
  transition:
    opacity .28s cubic-bezier(.22,1,.36,1),
    transform .38s cubic-bezier(.34,1.4,.64,1),
    visibility .28s ease;
}
.mobile-nav-panel.is-open{
  opacity:1;visibility:visible;pointer-events:auto;
  transform:translateY(0) scale(1);
}
.mobile-nav-panel > nav{
  width:100%;max-width:var(--max-width,1120px);margin-inline:auto;
  display:flex;flex-direction:column;flex:1;
}
.mobile-nav-panel.hidden,
.mobile-nav-panel[hidden]{display:none !important;}
.mobile-nav-panel:not(.hidden):not([hidden]){display:flex;}

.mobile-nav-eyebrow{
  font-family:var(--font-mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  font-weight:500;color:var(--text-muted);margin:0 0 10px;
  opacity:0;transform:translateY(8px);
  transition:opacity .25s ease, transform .3s cubic-bezier(.34,1.4,.64,1);
}
.mobile-nav-panel.is-open .mobile-nav-eyebrow{
  opacity:1;transform:none;transition-delay:.05s;
}

.mobile-nav-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;}
.mobile-nav-link{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:48px;padding:12px 16px;
  border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);
  background:var(--surface);color:var(--text);text-decoration:none;
  font-family:var(--font-body);font-size:15px;font-weight:600;
  box-shadow:var(--shadow-hard-xs);
  opacity:0;transform:translateY(14px) scale(.96);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.mobile-nav-panel.is-open .mobile-nav-link{
  animation:mobile-nav-pop .42s cubic-bezier(.34,1.56,.64,1) both;
}
.mobile-nav-panel.is-open .mobile-nav-list li:nth-child(1) .mobile-nav-link{animation-delay:.06s;}
.mobile-nav-panel.is-open .mobile-nav-list li:nth-child(2) .mobile-nav-link{animation-delay:.1s;}
.mobile-nav-panel.is-open .mobile-nav-list li:nth-child(3) .mobile-nav-link{animation-delay:.14s;}
.mobile-nav-panel.is-open .mobile-nav-list li:nth-child(4) .mobile-nav-link{animation-delay:.18s;}
.mobile-nav-panel.is-open .mobile-nav-list li:nth-child(5) .mobile-nav-link{animation-delay:.22s;}
.mobile-nav-panel.is-open .mobile-nav-list li:nth-child(6) .mobile-nav-link{animation-delay:.26s;}
.mobile-nav-link:hover{
  transform:translate(2px,2px);box-shadow:1px 1px 0 var(--shadow);color:var(--text);
}
.mobile-nav-link.is-active{
  background:var(--accent);color:var(--on-accent);font-weight:700;
  box-shadow:var(--shadow-hard-sm);
}
.mobile-nav-link.is-active:hover{background:var(--accent-deep);}
.mobile-nav-link .material-symbols-outlined{font-size:18px;line-height:1;opacity:.7;}
.mobile-nav-link.is-active .material-symbols-outlined{opacity:1;color:var(--on-accent);}

.mobile-nav-actions{
  margin-top:auto;padding-top:var(--sp-3);
  border-top:var(--border-w-sm) solid var(--border);
  display:flex;flex-direction:column;gap:12px;
  opacity:0;transform:translateY(16px);
  transition:opacity .3s ease, transform .35s cubic-bezier(.34,1.4,.64,1);
}
.mobile-nav-panel.is-open .mobile-nav-actions{
  opacity:1;transform:none;transition-delay:.22s;
}
.mobile-nav-theme + .mobile-nav-account{margin-top:var(--sp-3);}
.mobile-nav-account + .mobile-nav-cta,
.mobile-nav-theme + .mobile-nav-cta{margin-top:2px;}
.mobile-nav-cta{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.mobile-nav-cta .btn{justify-content:center;width:100%;}

@keyframes mobile-nav-pop{
  from{opacity:0;transform:translateY(16px) scale(.92);}
  70%{opacity:1;transform:translateY(-3px) scale(1.02);}
  to{opacity:1;transform:translateY(0) scale(1);}
}

/* Hide FAB while mobile menu is open (menu sits above; FAB bows out) */
html.mobile-nav-open .btn-fab-fixed{
  opacity:0;visibility:hidden;pointer-events:none;
  transform:translateY(18px) scale(.82);
}

@media (prefers-reduced-motion: reduce){
  .mobile-nav-toggle,.mobile-nav-toggle .material-symbols-outlined,
  .mobile-nav-link,.mobile-nav-backdrop,.mobile-nav-panel,
  .mobile-nav-eyebrow,.mobile-nav-actions,.btn-fab-fixed{transition:none !important;animation:none !important;}
  .mobile-nav-panel{transform:none;}
  .mobile-nav-panel.is-open .mobile-nav-link{opacity:1;transform:none;animation:none;}
}
@media (prefers-reduced-transparency: reduce){
  .mobile-nav-backdrop.is-open,
  .mobile-nav-panel{
    -webkit-backdrop-filter:none;backdrop-filter:none;
    background:var(--page-bg);
  }
}

.pagination{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.page-btn{
  min-width:38px;height:38px;padding:0 6px;border-radius:50%;border:var(--border-w-sm) solid var(--border);
  background:var(--surface);display:flex;align-items:center;justify-content:center;font-weight:700;
  font-size:13px;color:var(--text);cursor:pointer;
}
.page-btn.active{background:var(--accent);color:var(--on-accent);}
.page-btn:disabled{
  opacity:.4;cursor:not-allowed;color:var(--text-muted);background:var(--surface-2);
}
.page-arrow{border-radius:var(--radius-pill);width:auto;padding:0 18px;gap:6px;}

.stepper{display:flex;align-items:center;flex-wrap:wrap;}
.step{display:flex;align-items:center;gap:10px;}
.step-circle{
  width:32px;height:32px;border-radius:50%;border:var(--border-w-sm) solid var(--border);
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;
  background:var(--surface);color:var(--text);flex:none;
}
.step.completed .step-circle{background:var(--accent);color:var(--on-accent);}
.step.active .step-circle{border-color:var(--accent);color:var(--accent);}
.step-label{font-size:12.5px;font-weight:600;color:var(--text-muted);margin-left:2px;}
.step.active .step-label,.step.completed .step-label{color:var(--text);}
.step-connector{width:56px;height:2.5px;background:var(--border);margin:0 12px;flex:none;}

/* --- components/sidebar.css --- */
/* ============ SIDEBAR ============ */
.app-sidebar{width:236px;background:var(--surface);border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-lg);display:flex;flex-direction:column;overflow:hidden;flex:none;}
.app-sidebar-head{display:flex;align-items:center;gap:10px;padding:18px 18px 14px;border-bottom:1px solid var(--divider);font-family:var(--font-display);font-weight:400;font-size:13.5px;color:var(--text);}
.app-sidebar-body{flex:1;padding:14px 10px;display:flex;flex-direction:column;gap:18px;}
.sidebar-group-label{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);font-weight:700;padding:0 10px;margin-bottom:6px;}
.sidebar-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;font-size:13px;font-weight:600;color:var(--text-muted);cursor:pointer;}
.sidebar-item svg{width:16px;height:16px;flex:none;}
.sidebar-item .material-symbols-outlined{font-size:16px;line-height:1;flex:none;}
.sidebar-item .count{margin-left:auto;background:var(--surface-2);color:var(--text-muted);font-size:10px;font-weight:700;padding:2px 7px;border-radius:999px;}
.sidebar-item.active{background:var(--accent);color:var(--on-accent);}
.sidebar-item.active .count{background:rgba(255,255,255,.28);color:var(--on-accent);}
.sidebar-item:not(.active):hover{background:var(--surface-2);color:var(--text);}
.app-sidebar-foot{display:flex;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--divider);}

/* --- components/tabs.css --- */
/* ============ TABS ============ */
.tabs{display:inline-flex;gap:4px;padding:5px;border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-pill);background:var(--surface);}
.tab{padding:9px 20px;border-radius:var(--radius-pill);font-weight:600;font-size:13.5px;color:var(--text-muted);cursor:pointer;border:none;background:transparent;font-family:var(--font-body);}
.tab.active{background:var(--accent);color:var(--on-accent);}
.tab.tab-icon{padding:9px 12px;display:inline-flex;align-items:center;justify-content:center;min-width:42px;}
.tab.tab-icon .material-symbols-outlined{font-size:18px;line-height:1;}

.tabs-underline{display:flex;gap:28px;border-bottom:var(--border-w-sm) solid var(--divider);flex-wrap:wrap;overflow:visible;}
.tab-underline{padding:0 0 12px;font-weight:600;font-size:14px;color:var(--text-muted);border:none;background:none;border-bottom:3px solid transparent;margin-bottom:-2px;cursor:pointer;font-family:var(--font-body);text-decoration:none;display:inline-block;}
.tab-underline.active{color:var(--text);border-bottom-color:var(--accent);}
.tab-underline:hover{color:var(--text);}

.tab-panel-text{font-size:13.5px;color:var(--text-muted);line-height:1.65;margin-top:18px;}

/* --- components/cards.css --- */
/* ============ CARD LAYOUT ============ */
.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--sp-3);}
.card{
  background:var(--surface);border:var(--border-w) solid var(--border);border-radius:var(--radius-lg);
  overflow:hidden;box-shadow:var(--shadow-hard-sm);transition:transform .15s ease, box-shadow .15s ease;
  display:flex;flex-direction:column;
}
/* Prefer app card-lift (same direction as design-system hover) */
.card.card-lift:hover,
.card:hover{transform:translate(-2px,-2px);box-shadow:5px 5px 0 var(--shadow);}
.card-media{
  height:120px;background:var(--stage-bg);
  display:flex;align-items:center;justify-content:center;border-bottom:var(--border-w) solid var(--border);position:relative;
  overflow:hidden;
}
.card-media.tall{height:12rem;}
.card-media img{width:100%;height:100%;object-fit:cover;display:block;}
.card-media svg{width:36px;height:36px;color:var(--accent);}
.card-media .material-symbols-outlined{font-size:36px;color:var(--accent);line-height:1;}
.card-body{padding:20px;display:flex;flex-direction:column;flex:1;}
.card-title{font-family:var(--font-display);font-weight:400;font-size:16px;color:var(--text);}
.card-desc{margin-top:8px;font-size:13px;color:var(--text-muted);line-height:1.55;flex:1;}
.card-footer{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-top:1px solid var(--divider);}
.card-price{font-family:var(--font-body);font-weight:700;color:var(--accent);font-size:15px;}
.card-badge{position:absolute;top:10px;right:10px;z-index:1;}

/* --- components/promo-cards.css --- */
/* ============ PROMO CARDS ============ */
.promo-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;}
.promo-card{display:flex;gap:18px;border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-lg);padding:18px;background:var(--surface);}
.promo-card.featured{border-color:var(--accent);border-width:var(--border-w);box-shadow:var(--shadow-hard-sm);}
.promo-media{width:120px;border-radius:14px;flex:none;background:var(--stage-bg);display:flex;align-items:center;justify-content:center;border:1.5px solid var(--border);}
.promo-media svg{width:32px;height:32px;color:var(--accent);}
.promo-media .material-symbols-outlined{font-size:32px;color:var(--accent);line-height:1;}
.promo-body{flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0;}
.promo-title{font-family:var(--font-display);font-weight:400;font-size:16px;color:var(--text);}
.promo-discount{display:flex;align-items:baseline;gap:5px;margin-top:10px;}
.promo-discount .num{font-family:var(--font-display);font-weight:400;font-size:21px;color:var(--accent);}
.promo-discount .off{font-size:10px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.03em;}
.promo-desc{font-size:12px;color:var(--text-muted);line-height:1.5;margin-top:4px;}
.promo-btn{display:inline-flex;align-items:center;gap:10px;padding:5px 6px 5px 18px;border-radius:var(--radius-pill);border:var(--border-w-sm) solid var(--border);background:var(--surface);font-weight:700;font-size:11px;letter-spacing:.03em;text-transform:uppercase;cursor:pointer;color:var(--text);margin-top:14px;width:fit-content;}
.promo-btn .arrow-circle{width:27px;height:27px;border-radius:50%;background:var(--accent);color:var(--on-accent);display:flex;align-items:center;justify-content:center;flex:none;}
.promo-btn .arrow-circle svg{width:12px;height:12px;}
.promo-btn .arrow-circle .material-symbols-outlined{font-size:12px;line-height:1;}

/* --- components/lists.css --- */
/* ============ LISTS ============ */
.list-plain{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.list-plain li{display:flex;align-items:center;gap:10px;font-size:13.5px;color:var(--text);}
.list-plain .bullet{width:6px;height:6px;border-radius:50%;background:var(--accent);flex:none;}
.list-check{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.list-check li{display:flex;align-items:center;gap:10px;font-size:13.5px;color:var(--text);}
.list-check svg{width:16px;height:16px;color:var(--success);flex:none;}
.list-check .material-symbols-outlined{font-size:16px;color:var(--success);flex:none;line-height:1;}
.list-interactive{border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);background:var(--surface);overflow:hidden;}
.list-row{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--divider);cursor:pointer;}
.list-row:last-child{border-bottom:none;}
.list-row:hover{background:var(--surface-2);}
.list-row-icon{width:36px;height:36px;border-radius:10px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--accent);flex:none;}
.list-row-icon svg{width:16px;height:16px;}
.list-row-icon .material-symbols-outlined{font-size:16px;line-height:1;}
.list-row-text{flex:1;min-width:0;}
.list-row-title{font-weight:700;font-size:13.5px;color:var(--text);}
.list-row-sub{font-size:11.5px;color:var(--text-muted);margin-top:1px;}
.list-row-chevron{width:8px;height:8px;border-right:2px solid var(--text-muted);border-bottom:2px solid var(--text-muted);transform:rotate(-45deg);flex:none;}

/* --- components/badges.css --- */
/* ============ TAGS & BADGES (app visual — bordered + hard shadow) ============ */
.badge{
  display:inline-flex;align-items:center;gap:5px;padding:4px 12px;border-radius:var(--radius-pill);
  font-family:var(--font-mono);font-weight:500;font-size:11px;letter-spacing:.08em;text-transform:uppercase;
  border:1.5px solid var(--border);box-shadow:var(--shadow-hard-xs);
  white-space:nowrap;flex-shrink:0;max-width:none;
}
.badge-accent{background:var(--accent);color:var(--on-accent);border-color:var(--border);}
.badge-success{background:var(--success-tint);color:var(--success);border-color:var(--success);}
.badge-warning{background:var(--warning-tint);color:var(--warning);border-color:var(--warning);}
.badge-danger{background:var(--danger-tint);color:var(--danger);border-color:var(--danger);}
.badge-info{background:var(--info-tint);color:var(--info);border-color:var(--info);}
.badge-outline{background:var(--surface);border-color:var(--border);color:var(--text);}
/* Solid stock-style badge used on product cards (app visual) */
.badge-solid-success{background:var(--success);color:var(--on-accent);border-color:var(--border);}
.badge-solid-danger{background:var(--danger);color:var(--on-accent);border-color:var(--border);}
/* Alias tones used by product stock pills */
.badge-in-stock{background:var(--success);color:var(--on-accent);border-color:var(--border);}
.badge-out-of-stock{background:var(--danger);color:var(--on-accent);border-color:var(--border);}

/* --- components/chips.css --- */
/* ============ FILTERS / CHIPS ============ */
.chip{
  display:inline-flex;align-items:center;gap:6px;padding:9px 18px;border-radius:var(--radius-pill);
  border:var(--border-w-sm) solid var(--border);background:var(--surface);color:var(--text);
  font-family:var(--font-body);font-weight:600;font-size:13.5px;cursor:pointer;transition:all .15s ease;user-select:none;
}
button.chip{appearance:none;-webkit-appearance:none;margin:0;}
.chip:hover{transform:translateY(-1px);}
.chip.selected{background:var(--accent);border-color:var(--border);color:var(--on-accent);box-shadow:var(--shadow-hard-xs);}
.chip .chip-x{font-size:14px;line-height:1;opacity:.85;}
.chip-count{background:rgba(0,0,0,.14);padding:1px 7px;border-radius:999px;font-size:11px;}
.chip.selected .chip-count{background:rgba(255,255,255,.25);}

/* --- components/forms.css --- */
/* ============ INPUT FIELDS (app settings visual) ============ */
/* Mobile-first: stack on Compact/Medium, 2-col from Tailwind md (768) */
.field-grid{display:grid;grid-template-columns:1fr;gap:var(--sp-3);}
@media (min-width:768px){
  .field-grid{grid-template-columns:1fr 1fr;}
}
.field{display:flex;flex-direction:column;gap:6px;}
.field label{
  font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
  color:var(--text-muted);font-family:var(--font-body);
}
.field-req{color:var(--danger);margin-left:2px;font-weight:700;}
.input, textarea.input, select.input{
  font-family:var(--font-body);font-size:14.5px;padding:12px 16px;border-radius:var(--radius-md);
  border:var(--border-w-sm) solid var(--border);background:var(--surface);color:var(--text);
  outline:none;transition:border-color .15s ease, box-shadow .15s ease;width:100%;
  box-shadow:var(--shadow-hard-xs);
}
.input::placeholder,textarea.input::placeholder{color:var(--text-muted);}
.input:focus, textarea.input:focus, select.input:focus{
  border-color:var(--accent-deep);box-shadow:var(--shadow-hard-xs);
}
.input:user-invalid:not(:placeholder-shown),
textarea.input:user-invalid:not(:placeholder-shown),
select.input:user-invalid,
.field-error .input,
.field-error textarea.input,
.field-error select.input{border-color:var(--danger);}
.input:user-valid:not(:placeholder-shown):not([type=password]),
textarea.input:user-valid:not(:placeholder-shown){/* keep default border — avoid green noise */}
textarea.input{resize:vertical;min-height:88px;}
.field-help{font-size:12px;color:var(--text-muted);}
.field-error .field-help{color:var(--danger);font-weight:600;}
.field-help[hidden]{display:none;}

/* Wide product modal — photo column + stacked fields */
.product-form{
  display:grid;
  grid-template-columns:minmax(200px, 240px) minmax(0, 1fr);
  gap:var(--sp-4);
  align-items:stretch;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.product-form-media{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.product-form-media .field{
  flex:1 1 auto;
  min-height:0;
}
.product-form-dropzone{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
}
.product-form-dropzone .dropzone-product{
  flex:1 1 auto;
  min-height:11.5rem;
  padding:18px 14px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.product-form-dropzone .dropzone-product .dropzone-icon{
  width:42px;height:42px;margin-bottom:10px;
}
.product-form-dropzone .dropzone-product .dropzone-title{font-size:13px;}
.product-form-dropzone .dropzone-product .dropzone-sub{font-size:11.5px;line-height:1.45;}
.product-form-dropzone:has(.has-file) .dropzone-product{display:none;}
.product-form-fields{
  display:flex;
  flex-direction:column;
  gap:var(--sp-3);
  min-width:0;
}
.product-form-fields textarea.product-form-description{
  min-height:4.5rem;
  resize:vertical;
}
.product-form-pricing{align-items:start;}
#productFormModal .modal-body{
  overflow-y:auto;
  padding:var(--sp-3) var(--sp-4);
}
@media (min-width:840px){
  #productFormModal .modal-body{overflow-y:hidden;}
}
@media (max-width:599px){
  .product-form{grid-template-columns:1fr;}
  .product-form-dropzone .dropzone-product{min-height:9rem;}
}

/* Password field with show/hide control */
.input-password-wrap{position:relative;}
.input-password-wrap .input{padding-right:48px;}
.input-password-wrap [data-toggle-password]{
  position:absolute;right:8px;top:50%;transform:translateY(-50%);
  border:none;background:transparent;color:var(--text-muted);cursor:pointer;
  padding:6px;border-radius:8px;line-height:0;
}
.input-password-wrap [data-toggle-password]:hover{color:var(--text);background:var(--surface-2);}
.input-password-wrap [data-toggle-password] .material-symbols-outlined{font-size:20px;}

/* Permission matrix in role modal */
.perm-row{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 0;border-bottom:1px solid var(--divider);
}
.perm-row:last-child{border-bottom:none;}
.perm-row-title{font-weight:700;font-size:13.5px;color:var(--text);}
.perm-row-options{display:flex;flex-wrap:wrap;gap:12px;}

.select-wrap{position:relative;}
.select-wrap select.input{padding-right:44px;appearance:none;-webkit-appearance:none;cursor:pointer;}
.select-wrap:after{
  content:'';position:absolute;right:17px;top:50%;width:8px;height:8px;
  border-right:2px solid var(--text);border-bottom:2px solid var(--text);
  transform:translateY(-60%) rotate(45deg);pointer-events:none;
}

/* App search bar — icon on the right, rounded rectangle + hard shadow */
.input-search-wrap{position:relative;width:100%;max-width:36rem;}
.input-search-wrap .material-symbols-outlined,
.input-search-wrap .search-icon{
  position:absolute;right:16px;top:50%;transform:translateY(-50%);
  color:var(--text);pointer-events:none;font-size:22px;line-height:1;
}
.input-search{
  border-radius:var(--radius-md);
  padding:12px 48px 12px 16px;
  box-shadow:var(--shadow-hard-xs);
}

/* Compact filter toolbar (admin list pages) — denser on narrow viewports */
.filter-bar .input,
.filter-bar select.input,
.filter-bar .input-search{
  font-size:13.5px;padding:10px 14px;
}
.filter-bar .input-search{padding-right:42px;}
.filter-bar .input-search-wrap .material-symbols-outlined,
.filter-bar .input-search-wrap .search-icon{font-size:20px;right:14px;}
.filter-bar .select-wrap select.input{padding-right:40px;}
.filter-bar .select-wrap:after{right:14px;}
.filter-bar .btn-sm{padding:8px 16px;font-size:13px;}
@media (min-width:600px){
  .filter-bar .input,
  .filter-bar select.input,
  .filter-bar .input-search{
    font-size:14.5px;padding:12px 16px;
  }
  .filter-bar .input-search{padding-right:48px;}
  .filter-bar .input-search-wrap .material-symbols-outlined,
  .filter-bar .input-search-wrap .search-icon{font-size:22px;right:16px;}
  .filter-bar .select-wrap select.input{padding-right:44px;}
  .filter-bar .select-wrap:after{right:17px;}
  .filter-bar .btn-sm{padding:10px 22px;font-size:14px;}
}

.checkbox-row,.radio-row{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--text);cursor:pointer;font-weight:500;}
.checkbox-row input[type=checkbox]{
  appearance:none;-webkit-appearance:none;width:20px;height:20px;border:var(--border-w-sm) solid var(--border);
  border-radius:6px;background:var(--surface);display:grid;place-content:center;cursor:pointer;flex:none;margin:0;
  transition:border-color .12s ease, background-color .12s ease;
}
.checkbox-row input[type=checkbox]::before{
  content:'';width:11px;height:11px;transform:scale(0);background:var(--accent);
  clip-path:polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);transition:transform .12s ease, background-color .12s ease;
}
.checkbox-row input[type=checkbox]:hover{border-color:var(--accent);}
.checkbox-row input[type=checkbox]:checked{border-color:var(--accent);background:var(--surface);}
.checkbox-row input[type=checkbox]:checked::before{transform:scale(1);}
.checkbox-row input[type=checkbox]:checked:hover,
.checkbox-row input[type=checkbox]:checked:focus,
.checkbox-row input[type=checkbox]:checked:focus-visible{
  background:var(--surface);border-color:var(--accent-deep);
}
.checkbox-row input[type=checkbox]:checked:hover::before,
.checkbox-row input[type=checkbox]:checked:focus::before,
.checkbox-row input[type=checkbox]:checked:focus-visible::before{
  background:var(--accent);
}
.checkbox-row input[type=checkbox]:focus-visible{outline:2.5px solid var(--accent);outline-offset:2px;}

.radio-row input[type=radio]{
  appearance:none;-webkit-appearance:none;width:20px;height:20px;border:var(--border-w-sm) solid var(--border);
  border-radius:50%;background:var(--surface);display:grid;place-content:center;cursor:pointer;flex:none;margin:0;
}
.radio-row input[type=radio]::before{content:'';width:10px;height:10px;border-radius:50%;transform:scale(0);background:var(--accent);transition:transform .12s ease;}
.radio-row input[type=radio]:checked::before{transform:scale(1);}
.radio-row input[type=radio]:checked{border-color:var(--accent);}

.switch{position:relative;display:inline-flex;align-items:center;width:48px;height:28px;flex:none;cursor:pointer;}
.switch input{opacity:0;width:0;height:0;position:absolute;}
.switch .track{position:absolute;inset:0;background:var(--surface-2);border:var(--border-w-sm) solid var(--border);border-radius:999px;transition:background .2s ease;}
.switch .thumb{position:absolute;top:2px;left:2px;width:20px;height:20px;background:var(--text);border-radius:50%;transition:transform .2s ease, background .2s ease;}
.switch input:checked ~ .track{background:var(--accent);}
.switch input:checked ~ .track .thumb{transform:translateX(20px);background:var(--on-accent);}

.combobox{position:relative;}
.combobox-list{
  position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--surface);
  border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-hard-sm);
  overflow:hidden;z-index:20;opacity:0;pointer-events:none;transform:translateY(-4px);transition:opacity .15s ease, transform .15s ease;
}
.combobox.open .combobox-list{opacity:1;pointer-events:auto;transform:translateY(0);}
.combobox-option{padding:11px 16px;font-size:14px;cursor:pointer;color:var(--text);}
.combobox-option:hover,.combobox-option.highlight{background:var(--accent);color:var(--on-accent);}

/* --- components/rating.css --- */
/* ============ RATING ============ */
.rating{display:inline-flex;gap:3px;align-items:center;}
.star-wrap{position:relative;display:inline-block;width:20px;height:20px;flex:none;}
.star-wrap svg{position:absolute;top:0;left:0;width:20px;height:20px;}
.star-wrap svg.bg{color:var(--divider);}
.star-wrap svg.fg{color:var(--warning);}
.star-wrap.full svg.fg{clip-path:inset(0 0 0 0);}
.star-wrap.half svg.fg{clip-path:inset(0 50% 0 0);}
.star-wrap.empty svg.fg{clip-path:inset(0 100% 0 0);}
.rating-lg{gap:4px;}
.rating-lg .star-wrap{width:28px;height:28px;}
.rating-lg .star-wrap svg{width:28px;height:28px;}
.rating-on-dark .star-wrap svg.bg{color:rgba(255,255,255,.28);}
.rating-on-dark .star-wrap svg.fg{color:var(--warning);}
.rating-interactive .star-wrap{cursor:pointer;}
.rating-interactive .star-wrap:hover svg{transform:scale(1.12);}
.rating-value{font-weight:700;font-size:13px;color:var(--text);margin-left:4px;}
.rating-count{font-size:12px;color:var(--text-muted);}

/* --- components/slider.css --- */
/* ============ SLIDER ============ */
.slider-row{display:flex;flex-direction:column;gap:10px;}
.slider-row-label{display:flex;justify-content:space-between;font-size:13px;font-weight:600;color:var(--text);}
.slider-row-label .val{color:var(--accent);font-weight:700;}
input[type=range].slider{-webkit-appearance:none;appearance:none;width:100%;height:6px;border-radius:999px;border:var(--border-w-sm) solid var(--border);outline:none;cursor:pointer;background:var(--surface-2);}
input[type=range].slider::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;border-radius:50%;background:var(--accent);border:var(--border-w-sm) solid var(--border);cursor:pointer;box-shadow:var(--shadow-hard-xs);margin-top:-1px;}
input[type=range].slider::-moz-range-thumb{width:22px;height:22px;border-radius:50%;background:var(--accent);border:var(--border-w-sm) solid var(--border);cursor:pointer;box-shadow:var(--shadow-hard-xs);}
input[type=range].slider::-moz-range-track{height:6px;border-radius:999px;background:transparent;}

.dual-slider{position:relative;height:24px;display:flex;align-items:center;}
.dual-slider .track-bg{position:absolute;left:0;right:0;height:6px;border-radius:999px;background:var(--surface-2);border:var(--border-w-sm) solid var(--border);}
.dual-slider .track-fill{position:absolute;height:6px;border-radius:999px;background:var(--accent);}
.dual-slider input[type=range]{position:absolute;width:100%;-webkit-appearance:none;appearance:none;background:transparent;pointer-events:none;margin:0;height:24px;}
.dual-slider input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;pointer-events:auto;width:22px;height:22px;border-radius:50%;background:var(--accent);border:var(--border-w-sm) solid var(--border);cursor:pointer;box-shadow:var(--shadow-hard-xs);}
.dual-slider input[type=range]::-moz-range-thumb{pointer-events:auto;width:22px;height:22px;border-radius:50%;background:var(--accent);border:var(--border-w-sm) solid var(--border);cursor:pointer;box-shadow:var(--shadow-hard-xs);}
.dual-slider input[type=range]::-moz-range-track{background:transparent;border:none;}

/* --- components/datetime.css --- */
/* ============ DATE & TIME: native inputs + wheel / spinner / slot pickers ============ */
.date-range{display:inline-flex;align-items:center;gap:10px;padding:10px 18px;border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-pill);background:var(--surface);font-size:13.5px;font-weight:600;color:var(--text);}
.date-range .arrow{color:var(--text-muted);}

.calendar{border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);background:var(--surface);padding:16px;width:272px;flex:none;}
.calendar-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.calendar-head .cal-title{font-weight:700;font-size:13.5px;color:var(--text);}
.calendar-head .cal-nav{display:flex;gap:6px;}
.calendar-head .cal-nav button{width:26px;height:26px;border-radius:50%;border:var(--border-w-sm) solid var(--border);background:var(--surface);cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text);}
.calendar-head .cal-nav svg{width:10px;height:10px;}
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;}
.calendar-dow{font-size:10px;font-weight:700;color:var(--text-muted);text-align:center;padding:4px 0;text-transform:uppercase;}
.calendar-day{aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:12.5px;font-weight:600;border-radius:8px;cursor:pointer;color:var(--text);}
.calendar-day:hover{background:var(--surface-2);}
.calendar-day.muted{color:var(--text-muted);opacity:.4;}
.calendar-day.today{border:1.5px solid var(--accent);}
.calendar-day.selected{background:var(--accent);color:var(--on-accent);}

.wheel-picker{display:flex;gap:2px;border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);background:var(--surface);padding:0 6px;position:relative;height:176px;width:260px;}
.wheel-col{flex:1;height:100%;overflow-y:auto;scroll-snap-type:y mandatory;padding:70px 0;text-align:center;scrollbar-width:none;
  -webkit-mask-image:linear-gradient(to bottom, transparent 0%, black 34%, black 66%, transparent 100%);
  mask-image:linear-gradient(to bottom, transparent 0%, black 34%, black 66%, transparent 100%);}
.wheel-col::-webkit-scrollbar{display:none;}
.wheel-item{height:36px;line-height:36px;scroll-snap-align:center;font-size:14.5px;font-weight:600;color:var(--text-muted);transition:color .15s ease, font-weight .15s ease;}
.wheel-item.is-center{color:var(--text);font-weight:700;}
.wheel-highlight{position:absolute;top:50%;left:6px;right:6px;height:36px;transform:translateY(-50%);border-top:1.5px solid var(--divider);border-bottom:1.5px solid var(--divider);pointer-events:none;}

.spinner-picker{display:flex;align-items:center;gap:16px;border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);background:var(--surface);padding:20px 26px;width:fit-content;}
.spinner-field{display:flex;flex-direction:column;align-items:center;gap:6px;}
.spinner-btn{width:30px;height:30px;border-radius:50%;border:var(--border-w-sm) solid var(--border);background:var(--surface);display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text);}
.spinner-btn:hover{background:var(--surface-2);}
.spinner-btn svg{width:11px;height:11px;}
.spinner-value{font-family:var(--font-display);font-weight:400;font-size:24px;color:var(--text);width:56px;text-align:center;}
.spinner-label{font-size:9.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);font-weight:700;}
.spinner-colon{font-family:var(--font-display);font-size:24px;color:var(--text-muted);align-self:center;}
.spinner-meridiem{display:flex;flex-direction:column;gap:6px;margin-left:4px;}
.spinner-meridiem button{padding:5px 10px;border-radius:8px;border:var(--border-w-sm) solid var(--border);background:var(--surface);font-size:10.5px;font-weight:700;cursor:pointer;color:var(--text-muted);}
.spinner-meridiem button.active{background:var(--accent);color:var(--on-accent);border-color:var(--border);}

.date-strip{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 8px;scrollbar-width:none;}
.date-strip::-webkit-scrollbar{display:none;}
.date-slot{flex:none;width:54px;padding:12px 0;border-radius:16px;border:var(--border-w-sm) solid var(--border);background:var(--surface);text-align:center;cursor:pointer;}
.date-slot .dow{font-size:9.5px;text-transform:uppercase;color:var(--text-muted);font-weight:700;}
.date-slot .num{font-family:var(--font-display);font-weight:400;font-size:17px;color:var(--text);margin-top:4px;}
.date-slot.selected{background:var(--accent);border-color:var(--border);}
.date-slot.selected .dow,.date-slot.selected .num{color:var(--on-accent);}
.time-slot-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px;}
.time-slot{padding:9px 16px;border-radius:var(--radius-pill);border:var(--border-w-sm) solid var(--border);background:var(--surface);font-size:12px;font-weight:600;color:var(--text);cursor:pointer;}
.time-slot.selected{background:var(--accent);color:var(--on-accent);}
.time-slot.disabled{opacity:.4;text-decoration:line-through;cursor:not-allowed;}

/* --- components/accordion.css --- */
/* ============ ACCORDION ============ */
.accordion{display:flex;flex-direction:column;gap:12px;}
.accordion-item{border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);background:var(--surface);overflow:hidden;}
.accordion-item summary{
  list-style:none;cursor:pointer;padding:16px 20px;display:flex;align-items:center;justify-content:space-between;
  font-weight:700;font-size:14.5px;color:var(--text);font-family:var(--font-body);
}
.accordion-item summary::-webkit-details-marker{display:none;}
.accordion-item .chev{width:10px;height:10px;border-right:2px solid var(--text);border-bottom:2px solid var(--text);transform:rotate(45deg);transition:transform .2s ease;flex:none;}
.accordion-item[open] .chev{transform:rotate(-135deg);}
.accordion-item[open] summary{border-bottom:1px solid var(--divider);}
.accordion-body{padding:16px 20px;font-size:13.5px;color:var(--text-muted);line-height:1.6;}

/* --- components/upload.css --- */
/* ============ FILE UPLOAD ============ */
.dropzone{border:2.5px dashed var(--border);border-radius:var(--radius-lg);padding:40px 20px;text-align:center;background:var(--surface);}
.dropzone-icon{width:46px;height:46px;margin:0 auto 14px;border:var(--border-w-sm) solid var(--border);border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--accent);}
.dropzone-icon svg{width:20px;height:20px;}
.dropzone-title{font-weight:700;font-size:14.5px;color:var(--text);}
.dropzone-sub{font-size:12.5px;color:var(--text-muted);margin-top:4px;}
.dropzone-compact{padding:24px 16px;}
.dropzone-compact .dropzone-icon{width:40px;height:40px;margin-bottom:10px;}
.dropzone-compact .dropzone-title{font-size:13.5px;}
.dropzone-compact .dropzone-sub{font-size:12px;}
.dropzone-dragover{border-color:var(--accent);background:var(--surface-2);}
[data-dropzone]{width:100%;min-width:0;}
[data-dropzone-trigger]{cursor:pointer;}
[data-dropzone].has-file [data-dropzone-trigger]{display:none;}
.file-list{display:flex;flex-direction:column;gap:10px;margin-top:var(--sp-3);width:100%;min-width:0;}
[data-dropzone].has-file .file-list{margin-top:0;}
.file-chip{
  display:flex;align-items:center;gap:12px;width:100%;min-width:0;box-sizing:border-box;
  padding:10px 12px;border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);
  background:var(--surface);box-shadow:var(--shadow-hard-xs);
}
.file-chip-icon{width:40px;height:40px;border-radius:9px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;flex:none;color:var(--accent);}
.file-chip-icon svg{width:16px;height:16px;}
.file-chip-icon.file-chip-thumb{padding:0;overflow:hidden;border-radius:9px;}
.file-chip-icon.file-chip-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.file-chip-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px;}
.file-chip-name{
  font-size:13px;font-weight:700;color:var(--text);
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.file-chip-size{font-size:11.5px;color:var(--text-muted);flex:none;white-space:nowrap;}
.file-chip-x{
  flex:none;width:28px;height:28px;display:flex;align-items:center;justify-content:center;
  cursor:pointer;color:var(--text-muted);border-radius:50%;
  border:none;background:transparent;padding:0;font-size:1.25rem;line-height:1;font-family:inherit;
}
.file-chip-x:hover{background:var(--surface-2);color:var(--text);}
.progress-track{height:6px;border-radius:999px;background:var(--surface-2);overflow:hidden;margin-top:6px;}
.progress-fill{height:100%;background:var(--accent);border-radius:999px;}

/* --- components/data-display.css --- */
/* ============ METRIC CARDS ============ */
.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--sp-3);}
.stat-card{border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);background:var(--surface);padding:18px 20px;}
.stat-label{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);font-weight:700;}
.stat-value{font-family:var(--font-display);font-weight:400;font-size:26px;margin-top:8px;color:var(--text);}
.stat-trend{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:700;margin-top:6px;}
.stat-trend.up{color:var(--success);}
.stat-trend.down{color:var(--danger);}
.stat-trend svg{width:11px;height:11px;}

/* Compact stack on narrow viewports (dashboard 1-col) */
@media (max-width:599.98px){
  .stat-card{padding:12px 14px;}
  .stat-card .material-symbols-outlined{font-size:1.5rem;line-height:1;}
  .stat-value{font-size:22px;margin-top:4px;line-height:1.15;}
  .stat-label{margin-top:2px;}
}

.detail-list{border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);background:var(--surface);overflow:hidden;}
.detail-row{display:flex;justify-content:space-between;gap:12px;padding:13px 18px;border-bottom:1px solid var(--divider);font-size:13.5px;}
.detail-row:last-child{border-bottom:none;}
.detail-row .k{color:var(--text-muted);}
.detail-row .v{font-weight:700;color:var(--text);text-align:right;}

/* --- components/tables.css --- */
/* ============ DATA TABLES ============ */
.table-wrap{
  border:var(--border-w) solid var(--border);border-radius:var(--radius-md);
  background:var(--surface);box-shadow:var(--shadow-hard);
}
.table-scroll{
  overflow-x:auto;max-width:100%;border-radius:inherit;
}

/* Fill remaining viewport — pair with a flex column page shell.
   Vertical scroll stays off until .is-scrollable-y is set (see scroll.css + table-scroll.js). */
.table-wrap.table-fill{
  flex:1 1 auto;min-height:0;display:flex;flex-direction:column;
}
.table-wrap.table-fill .table-scroll{
  flex:1 1 auto;min-height:0;
  overflow-x:auto;overflow-y:hidden;
}
.table-wrap.table-fill .table-scroll.is-scrollable-y{overflow-y:auto;}
.table-wrap.table-fill table.datatable thead th{
  position:sticky;top:0;z-index:2;
}

/* Admin page that pins table+pagination to the viewport bottom.
   Body is a column flex so the sticky mobile header (sibling of .admin-shell)
   keeps its height and the shell fills the remainder — avoids clipping .table-footer. */
body.admin-fill-page{
  height:100dvh;max-height:100dvh;overflow:hidden;
  display:flex;flex-direction:column;
}
body.admin-fill-page .admin-shell{
  flex:1 1 auto;min-height:0;height:auto;
}
body.admin-fill-page .admin-main,
body.admin-fill-page .admin-content{
  min-height:0;
}
.table-panel{
  flex:1 1 auto;min-height:0;min-width:0;
  display:flex;flex-direction:column;gap:var(--sp-4);
}
.table-panel > .table-footer{flex-shrink:0;}

table.datatable{width:100%;border-collapse:collapse;font-size:13.5px;}
table.datatable thead th{text-align:left;padding:12px 16px;background:var(--surface-2);font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);font-weight:700;border-bottom:var(--border-w-sm) solid var(--border);white-space:nowrap;}
table.datatable thead th:first-child{border-top-left-radius:calc(var(--radius-md) - 2px);}
table.datatable thead th:last-child{border-top-right-radius:calc(var(--radius-md) - 2px);}
table.datatable thead th svg{width:9px;height:9px;margin-left:3px;opacity:.6;vertical-align:middle;}
table.datatable tbody td{padding:10px 12px;border-bottom:1px solid var(--divider);color:var(--text);vertical-align:middle;}
table.datatable tbody tr:last-child td{border-bottom:none;}
table.datatable tbody tr:hover{background:var(--surface-2);}
.dt-user{display:flex;align-items:center;gap:10px;}
.dt-avatar{width:30px;height:30px;border-radius:50%;background:var(--stage-bg);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:var(--text);border:1.5px solid var(--border);flex:none;}
.dt-thumb{width:40px;height:40px;border-radius:var(--radius-sm,8px);background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--text-muted);border:1.5px solid var(--border);flex:none;overflow:hidden;}
.dt-thumb .material-symbols-outlined{font-size:18px;line-height:1;}
.dt-thumb-img{width:100%;height:100%;object-fit:cover;display:block;}
.dt-thumb-img.is-broken{display:none;}
.dt-thumb-placeholder{display:none;align-items:center;justify-content:center;width:100%;height:100%;background:var(--surface-2);color:var(--text-muted);}
.dt-thumb-has-img:has(.dt-thumb-img.is-broken) .dt-thumb-placeholder{display:flex;}
.dt-name{font-weight:700;}
.dt-sub{font-size:11.5px;color:var(--text-muted);}
.dt-row{cursor:pointer;}
.dt-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;}
.dt-actions{display:inline-flex;align-items:center;justify-content:flex-end;}

/* Long cell text — keep row height stable */
.dt-clamp{
  display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;
  overflow-wrap:anywhere;word-break:break-word;
  max-width:100%;
}
.dt-clamp-1{-webkit-line-clamp:1;line-clamp:1;}
.dt-clamp-2{-webkit-line-clamp:2;line-clamp:2;}
.dt-col-customer{max-width:11.5rem;}
.dt-col-service{max-width:14rem;}
.dt-col-device{max-width:12rem;}
.dt-col-contact{max-width:12.5rem;}
.dt-col-status{white-space:nowrap;width:1%;}
.dt-col-text{max-width:16rem;}
/* Keep status / type pills on one line even in narrow columns */
table.datatable td:has(> .badge),
table.datatable td:has(> .tooltip-wrap) .badge{
  white-space:nowrap;
}
table.datatable td:has(> .badge){white-space:nowrap;width:1%;}

.table-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;}
.table-footer span{font-size:12px;color:var(--text-muted);}

/* Row action cell — keep dropdown above sibling rows */
table.datatable td .dropdown{position:relative;z-index:1;}
table.datatable tr:hover td .dropdown,
table.datatable tr:focus-within td .dropdown,
table.datatable td .dropdown.open{z-index:5;}

/* --- components/scroll.css --- */
/* ============ SHARED SCROLLBARS ============ */
/* Neubrutalist scrollbar — thick track edge, hard accent thumb */
.ds-scroll,
.table-scroll,
.mobile-nav-panel,
html{
  scrollbar-width:thin;
  scrollbar-color:var(--border) var(--surface-2);
}
.ds-scroll::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar,
.mobile-nav-panel::-webkit-scrollbar,
html::-webkit-scrollbar{width:10px;height:10px;}
.ds-scroll::-webkit-scrollbar-track,
.table-scroll::-webkit-scrollbar-track,
.mobile-nav-panel::-webkit-scrollbar-track,
html::-webkit-scrollbar-track{
  background:var(--surface-2);
  border-left:var(--border-w-sm) solid var(--border);
  border-top:var(--border-w-sm) solid var(--border);
}
.ds-scroll::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb,
.mobile-nav-panel::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb{
  background:var(--accent);
  border:var(--border-w-sm) solid var(--border);
  border-radius:0;
  box-shadow:1px 1px 0 var(--shadow);
}
.ds-scroll::-webkit-scrollbar-thumb:hover,
.table-scroll::-webkit-scrollbar-thumb:hover,
.mobile-nav-panel::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:hover{background:var(--accent-deep);}
.ds-scroll::-webkit-scrollbar-corner,
.table-scroll::-webkit-scrollbar-corner,
.mobile-nav-panel::-webkit-scrollbar-corner,
html::-webkit-scrollbar-corner{
  background:var(--surface-2);
  border-left:var(--border-w-sm) solid var(--border);
  border-top:var(--border-w-sm) solid var(--border);
}

/* Fill / flex scroll regions — Y scroll only when content overflows */
.ds-scroll-fill{
  overflow-x:auto;
  overflow-y:hidden;
  min-height:0;
}
.ds-scroll-fill.is-scrollable-y{overflow-y:auto;}
/* Card grids with lift/shadow hover — inset content so shadows + scrollbar don’t collide */
.ds-scroll-fill.ds-scroll-cards{
  overflow-x:hidden;
  padding:8px 14px 12px 6px;
  scrollbar-gutter:stable;
}
.ds-scroll-fill.ds-scroll-cards > *{min-width:0;}

/* --- components/charts.css --- */
/* ============ CHARTS & GRAPHS ============ */
.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--sp-3);}
.chart-card{border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);background:var(--surface);padding:20px;}
.chart-title{font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:18px;}

.bar-chart-wrap{display:flex;gap:10px;height:130px;padding-bottom:22px;position:relative;align-items:flex-end;}
.bar-chart-wrap .bar{flex:1;background:var(--accent);border-radius:6px 6px 0 0;border:1.5px solid var(--border);position:relative;}
.bar-chart-wrap .bar-label{position:absolute;bottom:-22px;left:0;right:0;text-align:center;font-size:10px;color:var(--text-muted);font-weight:600;}

.donut-row{display:flex;align-items:center;gap:22px;}
.donut{width:112px;height:112px;border-radius:50%;display:flex;align-items:center;justify-content:center;position:relative;flex:none;}
.donut:before{content:'';position:absolute;inset:15px;border-radius:50%;background:var(--surface);}
.donut-center{position:relative;z-index:1;text-align:center;}
.donut-center .num{font-family:var(--font-display);font-weight:400;font-size:19px;color:var(--text);}
.donut-center .lbl{font-size:9px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.03em;}
.donut-legend{display:flex;flex-direction:column;gap:9px;}
.donut-legend-row{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text);}
.donut-dot{width:9px;height:9px;border-radius:50%;flex:none;}
.donut-legend-row .pct{margin-left:auto;font-weight:700;color:var(--text-muted);font-size:11.5px;}

.sparkline-wrap{padding-top:6px;}
.sparkline-meta{display:flex;align-items:baseline;gap:8px;margin-bottom:10px;}
.sparkline-meta .big{font-family:var(--font-display);font-weight:400;font-size:22px;color:var(--text);}
.sparkline-meta .delta{font-size:12px;font-weight:700;}
.sparkline-meta .delta.down{color:var(--success);}

.progress-rows{display:flex;flex-direction:column;gap:14px;}
.progress-row-label{display:flex;justify-content:space-between;font-size:12.5px;font-weight:600;color:var(--text);margin-bottom:6px;}
.progress-bar-track{height:9px;border-radius:999px;background:var(--surface-2);border:1.5px solid var(--border);overflow:hidden;}
.progress-bar-fill{height:100%;background:var(--accent);border-radius:999px;}

/* --- components/feedback.css --- */
/* ============ ALERTS / TOAST ============ */
.alert-stack{display:flex;flex-direction:column;gap:12px;}
.alert{display:flex;gap:12px;align-items:flex-start;padding:16px 18px;border-radius:var(--radius-md);border:var(--border-w-sm) solid;font-size:13.5px;line-height:1.55;}
.alert-success{background:var(--success-tint);border-color:var(--success);}
.alert-warning{background:var(--warning-tint);border-color:var(--warning);}
.alert-danger{background:var(--danger-tint);border-color:var(--danger);}
.alert-info{background:var(--info-tint);border-color:var(--info);}
.alert-icon{flex:none;width:20px;height:20px;margin-top:1px;font-size:20px;line-height:1;}
.alert-success .alert-icon{color:var(--success);}
.alert-warning .alert-icon{color:var(--warning);}
.alert-danger .alert-icon{color:var(--danger);}
.alert-info .alert-icon{color:var(--info);}
.alert-title{font-weight:700;margin-bottom:2px;color:var(--text);}
.alert-body{color:var(--text-muted);}
.alert-close{margin-left:auto;cursor:pointer;opacity:.55;flex:none;color:var(--text);background:none;border:none;font-size:16px;padding:0;line-height:1;}
.alert-close:hover{opacity:1;}

.toast{
  display:flex;align-items:center;gap:12px;padding:14px 18px;border-radius:var(--radius-md);
  border:var(--border-w-sm) solid var(--border);background:var(--surface);box-shadow:var(--shadow-hard-sm);max-width:340px;
}
.toast-icon{width:32px;height:32px;border-radius:50%;background:var(--success-tint);color:var(--success);display:flex;align-items:center;justify-content:center;flex:none;}
.toast-icon svg{width:16px;height:16px;}
.toast-icon .material-symbols-outlined{font-size:18px;line-height:1;}
.toast-text b{display:block;font-size:13.5px;}
.toast-text span{font-size:12px;color:var(--text-muted);}

/* --- components/result-states.css --- */
/* ============ FULL SUCCESS / ERROR STATES ============ */
.result-state{text-align:center;padding:var(--sp-6) var(--sp-4);border:var(--border-w) solid var(--border);border-radius:var(--radius-lg);background:var(--surface);}
.result-icon{width:60px;height:60px;margin:0 auto 20px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
.result-state.success .result-icon{background:var(--success-tint);color:var(--success);}
.result-state.error .result-icon{background:var(--danger-tint);color:var(--danger);}
.result-icon svg{width:28px;height:28px;}
.result-icon .material-symbols-outlined{font-size:28px;line-height:1;}
.result-title{font-family:var(--font-display);font-weight:400;font-size:19px;color:var(--text);}
.result-sub{font-size:14px;color:var(--text-muted);margin:10px auto 22px;max-width:360px;line-height:1.6;}
.result-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;}

/* --- components/empty-loading.css --- */
/* ============ EMPTY & LOADING STATES ============ */
.empty-state{text-align:center;padding:var(--sp-6) var(--sp-3);border:2.5px dashed var(--border);border-radius:var(--radius-lg);}
.empty-icon{width:52px;height:52px;margin:0 auto 18px;color:var(--accent);opacity:.9;display:flex;align-items:center;justify-content:center;}
.empty-title{font-family:var(--font-display);font-weight:400;font-size:16px;color:var(--text);}
.empty-sub{font-size:13.5px;color:var(--text-muted);margin:8px auto 20px;max-width:300px;line-height:1.55;}

.skeleton-card{border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);padding:18px;background:var(--surface);display:flex;flex-direction:column;gap:10px;}
.skeleton-line{height:13px;border-radius:6px;background:linear-gradient(90deg,var(--surface-2) 25%, var(--divider) 37%, var(--surface-2) 63%);background-size:400% 100%;animation:shimmer 1.4s ease infinite;}
@keyframes shimmer{0%{background-position:100% 0;}100%{background-position:0 0;}}
.spinner{width:28px;height:28px;border-radius:50%;border:3px solid var(--divider);border-top-color:var(--accent);animation:spin .8s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}

/* --- components/tooltip.css --- */
/* ============ TOOLTIP ============ */
.tooltip-wrap{position:relative;display:inline-flex;max-width:100%;min-width:0;}
.tooltip-trigger{display:block;max-width:100%;min-width:0;}
.tooltip-bubble{
  position:fixed;left:0;top:0;z-index:80;
  background:var(--text);color:var(--surface);padding:8px 12px;border-radius:8px;font-size:12px;font-weight:600;
  white-space:nowrap;opacity:0;pointer-events:none;
  transition:opacity .15s ease;
  box-shadow:var(--shadow-hard-sm);
  max-width:min(280px,72vw);
}
.tooltip-bubble.is-visible{opacity:1;}
.tooltip-bubble:after{
  content:'';position:absolute;left:var(--tooltip-arrow-x, 50%);transform:translateX(-50%);
  border:6px solid transparent;
}
.tooltip-bubble[data-placement="above"]:after{
  top:100%;border-top-color:var(--text);
}
.tooltip-bubble[data-placement="below"]:after{
  bottom:100%;border-bottom-color:var(--text);
}

/* Table / long-preview tooltips — wrap + hard cap (full text lives in drawers) */
.dt-cell-tip{display:block;width:100%;}
.dt-cell-tip .tooltip-trigger{width:100%;}
body > .tooltip-bubble.tooltip-multiline{
  white-space:normal;
  width:max-content;
  line-height:1.35;
  font-weight:500;
  text-align:left;
}

/* --- components/popover.css --- */
/* ============ NON-MODAL POPOVER ============ */
.popover-wrap{position:relative;display:inline-block;}
.popover{
  position:absolute;top:calc(100% + 14px);left:0;width:270px;background:var(--surface);
  border:var(--border-w-sm) solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-hard);
  padding:18px;z-index:40;opacity:0;transform:translateY(-6px);pointer-events:none;
  transition:opacity .15s ease, transform .15s ease;
}
.popover:before{content:'';position:absolute;bottom:100%;left:22px;border:7px solid transparent;border-bottom-color:var(--border);}
.popover:after{content:'';position:absolute;bottom:100%;left:22px;margin-bottom:-2.5px;border:7px solid transparent;border-bottom-color:var(--surface);}
.popover-wrap.open .popover{opacity:1;transform:translateY(0);pointer-events:auto;}
.popover-wrap.popover-end .popover{left:auto;right:0;}
.popover-wrap.popover-end .popover:before,
.popover-wrap.popover-end .popover:after{left:auto;right:22px;}
.popover-title{font-weight:700;font-size:13.5px;margin-bottom:8px;color:var(--text);}
.popover-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--divider);font-size:12.5px;color:var(--text);}
.popover-row:first-of-type{border-top:none;padding-top:2px;}
.popover-row .material-symbols-outlined{font-size:16px;line-height:1;color:var(--accent);flex:none;}
.popover-meta{font-size:11px;color:var(--text-muted);margin-top:2px;}

/* --- components/user-menu.css --- */
/* ============ ADMIN USER MENU (avatar popover) ============ */
.user-menu-wrap .popover{
  width:min(280px, calc(100vw - 2rem));
  padding:0;
  overflow:hidden;
}
.user-menu{display:flex;flex-direction:column;}
.user-menu-identity{
  display:flex;align-items:center;gap:12px;
  padding:16px 18px;
  background:var(--surface-2);
  border-bottom:var(--border-w-sm) solid var(--border);
}
.user-menu-avatar{
  background:var(--accent);
  color:var(--on-accent);
  border:var(--border-w-sm) solid var(--border);
  box-shadow:var(--shadow-hard-xs);
}
.user-menu-identity-text{display:flex;flex-direction:column;min-width:0;}
.user-menu-name{
  font-weight:700;font-size:14.5px;line-height:1.3;
  color:var(--text);
}
.user-menu-email{
  font-size:12px;line-height:1.35;color:var(--text-muted);
  margin-top:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.user-menu-role{margin-top:8px;align-self:flex-start;}
.user-menu-section{
  display:flex;flex-direction:column;gap:2px;
  padding:6px;
}
.user-menu-section + .user-menu-section{
  border-top:1px solid var(--divider);
}
.user-menu-section-foot{padding-top:8px;padding-bottom:8px;}
.user-menu-item{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:8px;
  font-size:13.5px;font-weight:600;color:var(--text);
  text-decoration:none;border:none;background:transparent;
  font-family:var(--font-body);text-align:left;cursor:pointer;
  transition:background-color .12s ease, transform .12s ease;
}
.user-menu-item:hover{background:var(--surface-2);}
.user-menu-item:focus-visible{
  outline:2px solid var(--accent);outline-offset:-2px;
}
.user-menu-item .material-symbols-outlined{
  font-size:18px;line-height:1;color:var(--accent);flex:none;
}
.user-menu-item-danger{color:var(--danger);}
.user-menu-item-danger .material-symbols-outlined{color:var(--danger);}
.user-menu-item-danger:hover{background:var(--danger-tint);}

/* --- components/profile.css --- */
/* ============ ACCOUNT PROFILE PAGE ============ */
.profile-page {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}

@media (min-width: 768px) {
  .profile-header {
    flex-direction: row;
    align-items: center;
  }
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

.profile-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  border: var(--border-w) solid var(--border);
  box-shadow: var(--shadow-hard-sm);
  overflow: hidden;
  flex: none;
  background: var(--surface-2);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-tabs {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.profile-tabs > .tabs {
  align-self: flex-start;
}

.profile-panel {
  display: block;
}

[data-tabs-animate] [data-tab-panel].is-active,
.profile-tabs [data-tab-panel].is-active {
  animation: profile-panel-in 0.3s ease-in-out;
}

@keyframes profile-panel-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: var(--border-w) solid var(--border);
  box-shadow: var(--shadow-hard);
  padding: var(--sp-4);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

@media (min-width: 768px) {
  .profile-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .profile-form-grid .field-span-2 {
    grid-column: 1 / -1;
  }
}

.profile-divider {
  border: 0;
  border-top: var(--border-w) solid var(--border);
  margin: 0;
}

.profile-accordion {
  border: var(--border-w-sm) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  overflow: hidden;
}

.profile-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.profile-accordion-trigger:hover {
  background: var(--surface-3, var(--surface-container));
}

.profile-accordion-trigger .material-symbols-outlined {
  transition: transform 0.3s ease;
}

.profile-accordion-trigger[aria-expanded='true'] .material-symbols-outlined {
  transform: rotate(180deg);
}

.profile-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: var(--bg, var(--background));
  border-top: 0 solid var(--border);
}

.profile-accordion-panel.is-open {
  max-height: 28rem;
  border-top-width: var(--border-w-sm);
}

.profile-accordion-body {
  padding: var(--sp-3) var(--sp-3) var(--sp-4);
}

.profile-form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.profile-job-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--sp-4);
}

.profile-job-filters .chip {
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  padding: 8px 16px;
}

.profile-jobs-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}

.profile-job-row[data-job-status] {
  transition: opacity 0.2s ease;
}

.profile-job-row.is-filtered-out {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-tabs-animate] [data-tab-panel].is-active,
  .profile-tabs [data-tab-panel].is-active {
    animation: none;
  }

  .profile-accordion-panel {
    transition: none;
  }

  .profile-accordion-trigger .material-symbols-outlined {
    transition: none;
  }
}

/* --- components/auth.css --- */
/* ============ AUTH PAGES ============ */
.auth-card {
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
  padding: var(--sp-5);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.auth-card-decor {
  position: relative;
  overflow: hidden;
}

.auth-card-decor::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--text) 2px, transparent 2.5px);
  background-size: 16px 16px;
}

.auth-card-glow {
  position: relative;
}

.auth-card-glow::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: calc(var(--radius-lg) + 4px);
  background: var(--accent);
  opacity: 0.18;
  transform: rotate(2deg);
  z-index: 0;
  pointer-events: none;
}

.auth-card-glow > .auth-card {
  position: relative;
  z-index: 1;
}

.auth-card-decor > .auth-card {
  position: relative;
  z-index: 1;
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-1);
}

.auth-brand {
  margin-bottom: var(--sp-1);
}

.auth-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.auth-footer {
  text-align: center;
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.auth-footer a {
  margin-left: 4px;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-back-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.auth-back-link .material-symbols-outlined {
  font-size: 14px;
  transition: transform 0.15s ease;
}

.auth-back-link:hover .material-symbols-outlined {
  transform: translateX(-2px);
}

/* Icon input affix */
.input-affix {
  position: relative;
  width: 100%;
}

.input-affix-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

.input-affix .input {
  width: 100%;
  padding-left: 42px;
}

.input-affix-pad-end .input {
  padding-right: 42px;
}

.input-affix-action {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.input-affix-action:hover {
  color: var(--text);
  background: var(--surface-2);
}

.input-affix-action .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}

/* Registration stepper */
.auth-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.auth-step {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: default;
  font-family: var(--font-body);
}

.auth-step:disabled {
  cursor: default;
}

.auth-step:not(:disabled) {
  cursor: pointer;
}

.auth-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: var(--border-w) solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-hard-xs);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.auth-step.is-active .auth-step-dot,
.auth-step.is-done .auth-step-dot {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-hard-xs);
}

.auth-step-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.auth-step.is-active .auth-step-label,
.auth-step.is-done .auth-step-label {
  color: var(--accent);
}

.auth-step-track {
  flex: 1 1 0;
  height: 2.5px;
  margin-top: 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 35%, transparent);
  overflow: hidden;
}

.auth-step-track-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s ease;
}

.auth-step-track-fill.is-full {
  width: 100%;
}

.auth-address-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

@media (min-width: 600px) {
  .auth-address-grid {
    grid-template-columns: 1fr 1fr;
  }

  .auth-address-grid .field-span-2 {
    grid-column: 1 / -1;
  }
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}

@media (min-width: 600px) {
  .auth-actions {
    flex-direction: row;
    align-items: stretch;
  }

  .auth-actions .auth-actions-back {
    width: auto;
    order: 1;
  }

  .auth-actions .auth-actions-primary {
    flex: 1 1 auto;
    order: 2;
  }
}

/* --- components/logo.css --- */
/* ============ BRAND LOGO ============ */
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  max-width: 100%;
}

.brand-logo:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.brand-logo__img {
  height: var(--logo-h, 40px);
  width: auto;
  max-width: min(100%, 280px);
  object-fit: contain;
  object-position: left center;
}

.brand-logo--center .brand-logo__img {
  object-position: center;
}

.brand-logo--stacked .brand-logo__img {
  max-width: min(100%, 180px);
}

/* Theme-aware monochrome pair */
.brand-logo__img--for-light-bg {
  display: block;
}

.brand-logo__img--for-dark-bg {
  display: none;
}

.dark .brand-logo__img--for-light-bg,
html.dark .brand-logo__img--for-light-bg {
  display: none;
}

.dark .brand-logo__img--for-dark-bg,
html.dark .brand-logo__img--for-dark-bg {
  display: block;
}

/* Stacked variant: full-color mark on dark surfaces only */
.brand-logo--stacked-auto .brand-logo__img--stacked-color {
  display: none;
}

.dark .brand-logo--stacked-auto .brand-logo__img--stacked-color,
html.dark .brand-logo--stacked-auto .brand-logo__img--stacked-color {
  display: block;
}

.dark .brand-logo--stacked-auto .brand-logo__img--stacked-fallback,
html.dark .brand-logo--stacked-auto .brand-logo__img--stacked-fallback {
  display: none;
}

/* Size scale */
.brand-logo--xs {
  --logo-h: 28px;
}

.brand-logo--sm {
  --logo-h: 34px;
}

.brand-logo--md {
  --logo-h: 42px;
}

.brand-logo--lg {
  --logo-h: 52px;
}

.brand-logo--xl {
  --logo-h: 72px;
}

.brand-logo--nav-md {
  --logo-h: 38px;
}

@media (min-width: 1200px) {
  .brand-logo--nav-md {
    --logo-h: 44px;
  }
}

/* --- components/overlays.css --- */
/* ============ DIALOG / DRAWER ============ */
.overlay{
  position:fixed;inset:0;background:rgba(10,8,14,.55);display:flex;align-items:center;justify-content:center;
  opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:100;padding:20px;
}
.overlay.open{opacity:1;pointer-events:auto;}
.dialog{
  background:var(--surface);border:var(--border-w) solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-hard);max-width:420px;width:100%;transform:translateY(10px);transition:transform .2s ease;
}
.overlay.open .dialog{transform:translateY(0);}
.dialog-head{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid var(--divider);}
.dialog-title{font-family:var(--font-display);font-weight:400;font-size:16px;color:var(--text);}
.dialog-body{padding:22px;font-size:14px;color:var(--text-muted);line-height:1.6;}
.dialog-footer{display:flex;gap:12px;justify-content:flex-end;padding:18px 22px;border-top:1px solid var(--divider);}

/* Design-system drawer + admin drawers — cartoonish slide with light overshoot */
.drawer-overlay,
.admin-drawer-overlay{
  position:fixed;inset:0;z-index:100;
  display:flex;justify-content:flex-end;
  background:rgba(10,8,14,.45);
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .28s ease, visibility .28s ease;
}
.admin-drawer-overlay{z-index:70;}
.drawer-overlay.open,
.admin-drawer-overlay.is-open{
  opacity:1;visibility:visible;pointer-events:auto;
}
.drawer,
.admin-drawer{
  position:relative;top:auto;right:auto;height:100%;
  width:min(340px,88vw);
  background:var(--surface);
  border-left:var(--border-w) solid var(--border);
  box-shadow:-6px 0 0 var(--shadow);
  display:flex;flex-direction:column;gap:16px;padding:24px;
  transform:translateX(112%) rotate(1.4deg);
  transform-origin:bottom right;
  transition:transform .46s cubic-bezier(.34,1.56,.64,1);
  will-change:transform;
}
.admin-drawer{
  width:min(560px,100%);
  max-width:560px;
  gap:0;padding:0;
  box-shadow:-8px 0 0 var(--shadow);
  border-left-width:2.5px;
}
.drawer-overlay.open .drawer,
.admin-drawer-overlay.is-open .admin-drawer{
  transform:translateX(0) rotate(0);
}
.drawer-head{display:flex;align-items:center;justify-content:space-between;}
.drawer-title{font-family:var(--font-display);font-weight:400;font-size:16px;color:var(--text);}

/* Native <dialog data-modal> — keep scrollbar inside the panel, not on the dialog chrome */
dialog[data-modal]{
  border:none;padding:0;margin:auto;
  width:calc(100% - 1.5rem);
  max-height:min(90dvh, calc(100dvh - 2rem));
  overflow:hidden;
  background:transparent;
  color:inherit;
  border-radius:var(--radius-lg);
}
dialog[data-modal]::backdrop{
  background:rgba(23,22,31,.6);
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
}
.modal-shell{
  display:flex;flex-direction:column;
  max-height:min(90dvh, calc(100dvh - 2rem));
  min-height:0;
  overflow:hidden;
  background:var(--surface);
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:6px 6px 0 var(--shadow);
}
.modal-head,
.modal-foot{
  flex:none;
  display:flex;align-items:center;gap:12px;
  padding:var(--sp-3);
  background:var(--surface-2);
  border-color:var(--border);
}
.modal-head{justify-content:space-between;border-bottom:var(--border-w) solid var(--border);}
.modal-foot{justify-content:flex-end;flex-wrap:wrap;border-top:var(--border-w) solid var(--border);}
.modal-body{
  flex:1 1 auto;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  padding:var(--sp-4);
  background:var(--page-bg);
}

@media (prefers-reduced-motion: reduce){
  .drawer-overlay,.admin-drawer-overlay,.drawer,.admin-drawer{transition:none;}
  .drawer,.admin-drawer{transform:translateX(100%) rotate(0);}
  .drawer-overlay.open .drawer,
  .admin-drawer-overlay.is-open .admin-drawer{transform:none;}
}

/* --- components/carousel.css --- */
/* ============ CAROUSEL: basic / multi-item / peek ============ */
.carousel{position:relative;border:var(--border-w) solid var(--border);border-radius:var(--radius-lg);overflow:hidden;background:var(--surface);}
.carousel-viewport{overflow:hidden;}
.carousel-track{display:flex;transition:transform .35s ease;}
.carousel-slide{min-width:100%;padding:44px 64px;text-align:center;background:var(--stage-bg);}
.carousel-slide blockquote{font-family:var(--font-display);font-weight:400;font-size:18px;line-height:1.45;color:var(--text);margin:0;}
.carousel-slide cite{display:block;margin-top:16px;font-size:12.5px;color:var(--text);opacity:.75;font-style:normal;font-weight:700;}
.carousel-arrow{
  position:absolute;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;
  border:var(--border-w-sm) solid var(--border);background:var(--surface);display:flex;align-items:center;
  justify-content:center;cursor:pointer;z-index:5;color:var(--text);
}
.carousel-arrow svg{width:14px;height:14px;}
.carousel-arrow.prev{left:14px;}
.carousel-arrow.next{right:14px;}
.carousel-dots{display:flex;justify-content:center;gap:8px;padding:14px;background:var(--surface);}
.carousel-dot{width:8px;height:8px;border-radius:50%;background:var(--divider);cursor:pointer;border:none;padding:0;}
.carousel-dot.active{background:var(--accent);width:22px;border-radius:999px;transition:width .2s ease, background .2s ease;}

/* generic sub-heading used to separate style variants within one section */
.sub-label{font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;margin:28px 0 10px;}
.sub-label:first-child{margin-top:0;}

.carousel.multi .carousel-track{gap:14px;}
.carousel.multi .carousel-slide{min-width:calc(33.333% - 10px);background:var(--surface);padding:0;text-align:left;}
.mini-promo{padding:16px;height:100%;display:flex;flex-direction:column;gap:10px;}
.mini-promo .mp-icon{width:38px;height:38px;border-radius:10px;background:var(--stage-bg);border:1.5px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--accent);}
.mini-promo .mp-icon svg{width:18px;height:18px;}
.mini-promo .mp-title{font-family:var(--font-display);font-weight:400;font-size:14px;color:var(--text);}
.mini-promo .mp-desc{font-size:11.5px;color:var(--text-muted);line-height:1.5;}

.carousel-peek-wrap{position:relative;}
.carousel-peek{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;padding:4px 44px 10px;scrollbar-width:none;}
.carousel-peek::-webkit-scrollbar{display:none;}
.carousel-peek .peek-slide{flex:none;width:76%;scroll-snap-align:center;border-radius:var(--radius-lg);border:var(--border-w-sm) solid var(--border);overflow:hidden;background:var(--stage-bg);padding:32px 28px;text-align:center;}
.carousel-peek .peek-slide blockquote{font-family:var(--font-display);font-weight:400;font-size:16px;line-height:1.4;color:var(--text);margin:0;}
.carousel-peek .peek-slide cite{display:block;margin-top:12px;font-size:12px;color:var(--text);opacity:.75;font-style:normal;font-weight:700;}

/* --- components/avatars.css --- */
/* ============ AVATARS ============ */
.avatar{border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;color:var(--text);background:var(--stage-bg);border:1.5px solid var(--border);flex:none;position:relative;font-family:var(--font-body);}
.avatar-xs{width:24px;height:24px;font-size:9.5px;}
.avatar-sm{width:30px;height:30px;font-size:11px;}
.avatar-md{width:42px;height:42px;font-size:13.5px;}
.avatar-lg{width:58px;height:58px;font-size:18px;}
.avatar-status{position:absolute;bottom:-1px;right:-1px;width:11px;height:11px;border-radius:50%;border:2px solid var(--surface);}
.avatar-status.online{background:var(--success);}
.avatar-status.offline{background:var(--text-muted);}
.avatar-status.busy{background:var(--danger);}
.avatar-group{display:flex;align-items:center;}
.avatar-group .avatar{margin-left:-12px;border-width:2px;border-color:var(--surface);}
.avatar-group .avatar:first-child{margin-left:0;}
.avatar-group .avatar-more{background:var(--surface-2);color:var(--text-muted);font-size:11px;}
.avatar-badge-verified{position:absolute;bottom:-2px;right:-2px;width:17px;height:17px;border-radius:50%;background:var(--accent);border:2px solid var(--surface);display:flex;align-items:center;justify-content:center;}
.avatar-badge-verified svg{width:9px;height:9px;color:var(--on-accent);}

/* Clickable avatar control — matches .btn / .icon-btn chrome weight */
.avatar-btn{
  padding:0;margin:0;border:var(--border-w) solid var(--border);border-radius:50%;
  background:transparent;cursor:pointer;flex:none;line-height:0;
  box-shadow:var(--shadow-hard-sm);
  transition:transform .12s ease, box-shadow .12s ease;
}
.avatar-btn:hover{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--shadow);}
.avatar-btn:active{transform:translate(3px,3px);box-shadow:0 0 0 var(--shadow);}
.avatar-btn .avatar{
  border:none;
  background:var(--accent);
  color:var(--on-accent);
}

/* --- components/motion.css --- */
/* ============ RESPONSIVE & MOTION ============ */
@media (prefers-reduced-motion: reduce){
  .skeleton-line,.spinner{animation:none;}
  .overlay,.dialog,.drawer,.drawer-overlay,.admin-drawer,.admin-drawer-overlay,.dropdown-menu,.combobox-list,.tooltip-bubble{transition:none;}
  .carousel-track{transition:none;}
}
/* Align DS layout collapses with Tailwind md (768) / M3 Medium–Expanded band */
@media (max-width:767px){
  .card-grid{grid-template-columns:1fr 1fr;}
  .stat-grid{grid-template-columns:1fr 1fr;}
}
@media (max-width:599px){
  .swatch-grid{grid-template-columns:repeat(2,1fr);}
  .card-grid{grid-template-columns:1fr;}
  .logo-stage{grid-template-columns:1fr;}
  .duo-stage{grid-template-columns:1fr;}
  .nav-row{flex-direction:column;align-items:flex-start;gap:14px;}
  .nav-links{gap:16px;}
  .stat-grid{grid-template-columns:1fr;}
  .calendar{width:100%;}
  .carousel-slide{padding:36px 48px;}
  .promo-grid{grid-template-columns:1fr;}
  .chart-grid{grid-template-columns:1fr;}
  .carousel.multi .carousel-slide{min-width:calc(50% - 7px);}
  .carousel-peek .peek-slide{width:88%;}
  .donut-row{flex-direction:column;align-items:flex-start;}
  .type-sample .headline{font-size:30px;}
  .type-scale-row{flex-direction:column;align-items:flex-start;gap:8px;}
}
