/* ===================================================
   DIALER — AURORA DESIGN SYSTEM
   "Quiet enterprise": flat, low-chroma, OKLCH.
   Dark is the app default (:root); light is opt-in
   via [data-theme="light"]. Legacy token names are
   aliased onto the Aurora tokens so existing markup
   keeps working without edits.
   =================================================== */

/* ─── 1. DESIGN TOKENS ─────────────────────────────── */
:root {
  /* ── Aurora primitives ───────────────────────────── */
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, system-ui, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* type scale — modular 1.25, base 14 */
  --text-xs: 12px; --text-sm: 13px; --text-base: 14px; --text-md: 16px;
  --text-lg: 20px; --text-xl: 25px; --text-2xl: 31px; --text-3xl: 39px;
  --leading-tight: 1.2; --leading-normal: 1.5; --leading-relaxed: 1.65;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;

  /* radii */
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px;
  --radius-lg: 12px; --radius-xl: 16px; --radius-full: 9999px;

  /* z-index scale */
  --z-base: 0; --z-sticky: 100; --z-drawer: 300;
  --z-overlay: 400; --z-modal: 500; --z-toast: 600; --z-cmdk: 700;

  /* motion */
  --dur-1: 120ms; --dur-2: 180ms; --dur-3: 240ms; --dur-4: 360ms;
  --ease-standard: cubic-bezier(.2,0,0,1);
  --ease-spring:   cubic-bezier(.34,1.4,.5,1);
  --ease-out:      cubic-bezier(.16,1,.3,1);

  /* density — fixed at "comfortable" */
  --row-h: 44px; --control-h: 36px; --pad-card: 18px;
  --gap-grid: 16px; --text-data: 13px; --pad-cell: 10px 14px;

  /* ── Aurora semantic — DARK (app default) ────────── */
  color-scheme: dark;
  --color-bg:            oklch(0.178 0.005 260);
  --color-surface:       oklch(0.213 0.006 260);
  --color-surface-2:     oklch(0.246 0.007 260);
  --color-surface-3:     oklch(0.285 0.008 260);
  --color-border:        oklch(0.305 0.009 260);
  --color-border-strong: oklch(0.392 0.011 260);
  --color-text-primary:  oklch(0.955 0.004 260);
  --color-text-secondary:oklch(0.74 0.008 260);
  --color-text-tertiary: oklch(0.6 0.009 260);
  --color-text-inverse:  oklch(0.2 0.01 260);

  --color-accent:        oklch(0.685 0.155 250);
  --color-accent-hover:  oklch(0.74 0.15 250);
  --color-accent-active: oklch(0.79 0.14 250);
  --color-accent-fg:     oklch(0.16 0.02 260);
  --color-accent-subtle: oklch(0.31 0.06 250);
  --color-accent-border: oklch(0.42 0.09 250);
  --color-accent-text:   oklch(0.78 0.13 250);
  /* Gradient endpoints (avatars / logo / accent chips) — palette-fixed */
  --color-accent-2:  oklch(0.6 0.16 300);
  --color-success-2: oklch(0.5 0.13 152);

  --color-success: oklch(0.72 0.13 152); --color-success-subtle: oklch(0.33 0.06 152); --color-success-text: oklch(0.82 0.13 152);
  --color-warning: oklch(0.79 0.14 75);  --color-warning-subtle: oklch(0.36 0.06 70);  --color-warning-text: oklch(0.86 0.13 80);
  --color-danger:  oklch(0.68 0.17 25);  --color-danger-subtle:  oklch(0.34 0.08 25);  --color-danger-text:  oklch(0.8 0.14 25);
  --color-info:    oklch(0.72 0.13 240); --color-info-subtle:    oklch(0.33 0.06 240); --color-info-text:    oklch(0.82 0.12 240);

  --color-focus-ring: oklch(0.72 0.15 250 / 0.55);
  --color-overlay:    oklch(0.1 0.01 260 / 0.6);

  --shadow-xs: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.4), 0 0 0 1px oklch(1 0 0 / 0.02);
  --shadow-md: 0 2px 8px oklch(0 0 0 / 0.45), 0 0 0 1px oklch(1 0 0 / 0.03);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.55), 0 0 0 1px oklch(1 0 0 / 0.04);

  /* ── Aurora spacing scale (4px base) ─────────────── */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;

  /* ── Spacing (kept from prior system) ────────────── */
  --s1: 4px;  --s2: 8px;  --s3: 16px;  --s4: 24px;
  --s5: 32px; --s6: 48px; --s8: 64px;  --s10: 80px;

  /* ── Layout ──────────────────────────────────────── */
  --page-max:  1200px;
  --nav-h:     64px;
  --input-h:   var(--control-h);
  --input-hsm: 30px;

  /* ── Legacy aliases → Aurora tokens ──────────────── */
  --bg-base:    var(--color-bg);
  --bg-surface: var(--color-surface);
  --glass-1:    var(--color-surface);
  --glass-2:    var(--color-surface-2);
  --glass-3:    var(--color-surface-3);
  --glass-hover:      var(--color-surface-2);
  --glass-border:     var(--color-border);
  --glass-border-md:  var(--color-border);
  --glass-border-str: var(--color-border-strong);

  --accent:      var(--color-accent);
  --accent-lt:   var(--color-accent-text);
  --accent-glow: transparent;
  --accent-bg:   var(--color-accent-subtle);

  --success:     var(--color-success);
  --success-bg:  var(--color-success-subtle);
  --success-bd:  var(--color-success);
  --danger:      var(--color-danger);
  --danger-bg:   var(--color-danger-subtle);
  --danger-bd:   var(--color-danger);
  --warning:     var(--color-warning);
  --warning-bg:  var(--color-warning-subtle);
  --warning-bd:  var(--color-warning);

  --tx-1: var(--color-text-primary);
  --tx-2: var(--color-text-secondary);
  --tx-3: var(--color-text-tertiary);

  --bg-2: var(--color-surface-2);
  --bg-3: var(--color-surface-3);
  --bd:   var(--color-border);

  --r2:   var(--radius-md);
  --rsm:  var(--radius-md);
  --rmd:  var(--radius-lg);
  --rlg:  var(--radius-xl);
  --rxl:  var(--radius-xl);
  --r2xl: var(--radius-xl);

  --sh-sm:   var(--shadow-sm);
  --sh-md:   var(--shadow-md);
  --sh-lg:   var(--shadow-lg);
  --sh-glow: var(--shadow-md);

  --fxs:  var(--text-xs);
  --fsm:  var(--text-sm);
  --fmd:  var(--text-base);
  --flg:  var(--text-md);
  --fxl:  var(--text-lg);
  --f2xl: var(--text-xl);
  --f3xl: var(--text-2xl);
  --f4xl: var(--text-3xl);
}

/* ── Aurora semantic — LIGHT (opt-in) ──────────────── */
[data-theme="light"] {
  color-scheme: light;
  --color-bg:            oklch(0.985 0.002 260);
  --color-surface:       oklch(1 0 0);
  --color-surface-2:     oklch(0.971 0.003 260);
  --color-surface-3:     oklch(0.948 0.004 260);
  --color-border:        oklch(0.918 0.004 260);
  --color-border-strong: oklch(0.862 0.006 260);
  --color-text-primary:  oklch(0.235 0.012 260);
  --color-text-secondary:oklch(0.488 0.011 260);
  --color-text-tertiary: oklch(0.625 0.010 260);
  --color-text-inverse:  oklch(0.99 0 0);

  --color-accent:        oklch(0.548 0.171 250);
  --color-accent-hover:  oklch(0.492 0.176 250);
  --color-accent-active: oklch(0.44 0.176 250);
  --color-accent-fg:     oklch(0.99 0 0);
  --color-accent-subtle: oklch(0.948 0.035 250);
  --color-accent-border: oklch(0.86 0.07 250);
  --color-accent-text:   oklch(0.5 0.17 250);

  --color-success: oklch(0.585 0.13 152); --color-success-subtle: oklch(0.95 0.04 152); --color-success-text: oklch(0.46 0.11 152);
  --color-warning: oklch(0.70 0.14 75);   --color-warning-subtle: oklch(0.96 0.05 80);  --color-warning-text: oklch(0.52 0.11 60);
  --color-danger:  oklch(0.575 0.19 25);  --color-danger-subtle:  oklch(0.95 0.04 25);  --color-danger-text:  oklch(0.52 0.18 25);
  --color-info:    oklch(0.60 0.13 240);  --color-info-subtle:    oklch(0.95 0.035 240);--color-info-text:    oklch(0.5 0.13 240);

  --color-focus-ring: oklch(0.62 0.17 250 / 0.45);
  --color-overlay:    oklch(0.2 0.02 260 / 0.4);

  --shadow-xs: 0 1px 2px oklch(0.2 0.03 260 / 0.05);
  --shadow-sm: 0 1px 2px oklch(0.2 0.03 260 / 0.06), 0 1px 1px oklch(0.2 0.03 260 / 0.04);
  --shadow-md: 0 2px 4px oklch(0.2 0.03 260 / 0.05), 0 4px 12px oklch(0.2 0.03 260 / 0.08);
  --shadow-lg: 0 8px 16px oklch(0.2 0.03 260 / 0.08), 0 16px 40px oklch(0.2 0.03 260 / 0.12);
}

/* ─── 2. RESET & BASE ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  min-height: 100vh;
  color: var(--color-text-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--dur-2) var(--ease-standard),
              color var(--dur-2) var(--ease-standard);
}

/* Aurora is a flat system — no gradient backdrop, no glass blur. */

a { color: var(--color-accent-text); text-decoration: none; transition: color var(--dur-1) var(--ease-standard); }
a:hover { color: var(--color-accent-hover); }

img, svg { display: block; }

/* ─── 3. TYPOGRAPHY ────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--tx-1);
  letter-spacing: -0.02em;
}
h1 { font-size: var(--f3xl); }
h2 { font-size: var(--f2xl); }
h3 { font-size: var(--flg); }
h4 { font-size: var(--fmd); }
p  { color: var(--tx-2); }

.label {
  display: block;
  font-size: var(--fsm);
  font-weight: 500;
  color: var(--tx-2);
  margin-bottom: var(--s2);
}

.text-xs  { font-size: var(--fxs); }
.text-sm  { font-size: var(--fsm); }
.text-muted { color: var(--tx-3); }

/* ─── 4. LAYOUT HELPERS ────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--s4);
}

.main-content {
  flex: 1;
  padding: var(--s5) var(--s4);
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
}

.flex        { display: flex; }
.flex-col    { display: flex; flex-direction: column; }
.flex-between{ display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-end    { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); }
.items-center{ align-items: center; }
.gap-1 { gap: var(--s1); }
.gap-2 { gap: var(--s2); }
.gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--s4);
}
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--s2);
}

/* Spacing utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--s1); }
.mb-2 { margin-bottom: var(--s2); }
.mb-3 { margin-bottom: var(--s3); }
.mb-4 { margin-bottom: var(--s4); }
.mb-5 { margin-bottom: var(--s5); }
.mb-6 { margin-bottom: var(--s6); }
.mt-2 { margin-top: var(--s2); }
.mt-3 { margin-top: var(--s3); }
.mt-4 { margin-top: var(--s4); }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ─── 5. NAVBAR ────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--nav-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.navbar-inner {
  height: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--s4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--flg);
  font-weight: 700;
  color: var(--tx-1);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.navbar-brand .brand-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: var(--color-accent-fg);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.navbar-brand:hover { color: var(--tx-1); }

.navbar-right {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.navbar-user {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s1) var(--s3);
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--rxl);
  font-size: var(--fsm);
  color: var(--tx-2);
}
.navbar-user .user-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
}
.navbar-user .user-name { font-weight: 600; color: var(--tx-1); }

/* Subscription expiry banner */
.subscription-banner {
  background: var(--danger);
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  position: sticky;
  top: var(--nav-h);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-pay-banner {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  padding: 0 var(--s3);
  height: 30px;
  border-radius: var(--rmd);
  font-size: var(--fsm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.btn-pay-banner:hover {
  background: var(--glass-3);
  border-color: var(--glass-border-str);
}

/* Mobile menu button */
.nav-menu-btn {
  display: none;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--rsm);
  width: 40px; height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--tx-1);
  font-size: 20px;
  transition: background var(--dur-1) var(--ease-standard);
}
.nav-menu-btn:hover { background: var(--color-surface-2); }

/* ─── 6. PAGE HEADER ───────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s5);
  flex-wrap: wrap;
}
.page-header-left { flex: 1; min-width: 0; }
.page-header h1   { margin-bottom: var(--s1); color: var(--tx-1); font-size: var(--text-xl); font-weight: var(--fw-semibold); letter-spacing: -0.02em; }
.page-header p    { color: var(--color-text-secondary); font-size: var(--text-sm); }
.page-header h2   { color: var(--tx-1); }
.page-header h3   { color: var(--tx-1); }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fsm);
  color: var(--tx-3);
}
.breadcrumb a { color: var(--tx-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-lt); }
.breadcrumb-sep { color: var(--tx-3); }

/* ─── 7. GLASS PANELS ──────────────────────────────── */
.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--rlg);
  padding: var(--s4);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.panel-sm { padding: var(--s3); border-radius: var(--rmd); }
.panel-lg { padding: var(--s5); border-radius: var(--rxl); }

/* Card (clickable panel) */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--rlg);
  padding: var(--s4);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-2) var(--ease-standard),
              box-shadow var(--dur-2) var(--ease-standard);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

/* Upload card */
.card-upload {
  border: 2px dashed var(--glass-border-md);
  background: var(--glass-1);
}
.card-upload:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.card-upload .upload-zone {
  border: none;
  background: none;
  padding: var(--s3);
}
.card-upload .upload-zone:hover {
  background: none;
}

/* Stat card */
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--rmd);
  padding: var(--s2) var(--s3);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.stat-icon {
  width: 32px; height: 32px;
  border-radius: var(--rsm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.stat-icon.accent { background: var(--accent-bg); color: var(--accent-lt); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.danger  { background: var(--danger-bg);  color: var(--danger); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-value { font-size: var(--flg); font-weight: 700; line-height: 1; color: var(--tx-1); }
.stat-label { font-size: var(--fxs); color: var(--tx-3); margin-top: 2px; white-space: nowrap; }

/* Compact stat strip — inline, single-row alternative to stat cards */
.stat-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  padding: 12px var(--pad-card);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.stat-strip .si { display: inline-flex; align-items: center; gap: 8px; }
.stat-strip .si-ico { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: var(--radius-sm); flex-shrink: 0; }
.stat-strip .si-ico svg { display: block; }
.stat-strip .si-ico.accent  { background: var(--color-accent-subtle);  color: var(--color-accent-text); }
.stat-strip .si-ico.success { background: var(--color-success-subtle); color: var(--color-success-text); }
.stat-strip .si-ico.danger  { background: var(--color-danger-subtle);  color: var(--color-danger-text); }
.stat-strip .si-ico.warning { background: var(--color-warning-subtle); color: var(--color-warning-text); }
.stat-strip .si-val { font-weight: var(--fw-semibold); font-size: var(--text-md); font-variant-numeric: tabular-nums; }
.stat-strip .si-lbl { font-size: 12px; color: var(--color-text-tertiary); }

/* ─── DROPDOWN ─────────────────────────────────────── */
.dropdown {
  position: relative;
}
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--rmd);
  padding: var(--s1) 0;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-drawer);
}
.dropdown.open .dropdown-menu {
  display: block;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: 100%;
  padding: var(--s2) var(--s3);
  background: none;
  border: none;
  color: var(--tx-2);
  font-size: var(--fsm);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.dropdown-item:hover {
  background: var(--color-surface-2);
  color: var(--tx-1);
}

/* ─── 8. FORMS ─────────────────────────────────────── */
.form-group  { margin-bottom: var(--s3); }
.form-row    { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.form-inline { display: flex; gap: var(--s3); align-items: flex-end; flex-wrap: wrap; }
.form-inline .form-group { margin-bottom: 0; }

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"],
select,
textarea {
  display: block;
  width: 100%;
  height: var(--input-h);
  padding: 0 var(--s3);
  background-color: var(--color-surface-2);
  background-image: none;
  background-repeat: no-repeat;
  border: 1px solid var(--color-border);
  border-radius: var(--rmd);
  color: var(--color-text-primary);
  font-size: var(--fsm);
  font-family: inherit;
  outline: none;
  transition: border-color var(--dur-2) var(--ease-standard), box-shadow var(--dur-2) var(--ease-standard), background-color var(--dur-2) var(--ease-standard);
  -webkit-appearance: none;
  appearance: none;
}
select {
  padding-right: 36px;
  cursor: pointer;
}
textarea {
  height: auto;
  padding: var(--s3);
  resize: vertical;
  line-height: 1.5;
}
input::placeholder, textarea::placeholder { color: var(--tx-3); }
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"] {
  color-scheme: dark;
  min-width: 200px;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  letter-spacing: 0.02em;
}
input[type="datetime-local"] { min-width: 240px; }
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="datetime-local"],
[data-theme="light"] input[type="time"],
[data-theme="light"] input[type="month"],
[data-theme="light"] input[type="week"] { color-scheme: light; }

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  width: 18px;
  height: 18px;
  padding: 6px;
  margin-right: -6px;
  border-radius: var(--rsm);
  opacity: 0.85;
  /* Tint the native icon to the project accent (#6366f1) */
  filter: invert(40%) sepia(96%) saturate(2000%) hue-rotate(230deg) brightness(95%) contrast(95%);
  transition: all 0.15s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover,
input[type="week"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: var(--glass-2);
}
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="month"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="week"]::-webkit-calendar-picker-indicator {
  filter: invert(35%) sepia(85%) saturate(1800%) hue-rotate(225deg) brightness(90%) contrast(95%);
}

/* Numeric fields inside date/time inputs (spinners in some browsers) */
input[type="date"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit,
input[type="week"]::-webkit-datetime-edit {
  color: var(--tx-1);
  font-size: var(--fmd);
  font-family: inherit;
  padding: 0;
}
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper,
input[type="month"]::-webkit-datetime-edit-fields-wrapper,
input[type="week"]::-webkit-datetime-edit-fields-wrapper {
  color: var(--tx-1);
}
input[type="date"]::-webkit-datetime-edit-text,
input[type="datetime-local"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-text,
input[type="month"]::-webkit-datetime-edit-text,
input[type="week"]::-webkit-datetime-edit-text {
  color: var(--tx-3);
  padding: 0 2px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent);
  background-color: var(--color-surface);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}
input:hover:not(:focus),
select:hover:not(:focus) {
  border-color: var(--color-border-strong);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
select option { background: var(--color-surface); color: var(--color-text-primary); }

/* File drag-drop upload zone */
.upload-zone {
  position: relative;
  border: 2px dashed var(--glass-border-md);
  border-radius: var(--rlg);
  padding: var(--s6) var(--s4);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--glass-1);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.upload-zone input[type="file"] {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  height: 100%;
  width: 100%;
  border: none;
  background: none;
  box-shadow: none;
}
.upload-zone-wrapper { position: relative; }
.upload-icon { font-size: 36px; margin-bottom: var(--s3); line-height: 1; }
.upload-title { font-size: var(--flg); font-weight: 600; color: var(--tx-1); margin-bottom: var(--s1); }
.upload-sub   { font-size: var(--fsm); color: var(--tx-3); }
.upload-filename {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s3);
  padding: var(--s1) var(--s3);
  background: var(--accent-bg);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--rxl);
  font-size: var(--fsm);
  color: var(--color-accent-text);
  font-weight: 500;
}

/* ─── 9. BUTTONS ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: var(--input-h);
  padding: 0 var(--s4);
  border-radius: var(--rmd);
  font-weight: 600;
  font-size: var(--fsm);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.01em;
  line-height: 1;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}
.btn-sm {
  height: var(--input-hsm);
  padding: 0 var(--s3);
  font-size: var(--fxs);
  border-radius: var(--rsm);
}
.btn-lg {
  height: 52px;
  padding: 0 var(--s5);
  font-size: var(--fmd);
  border-radius: var(--rlg);
}

/* Primary */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-fg);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-accent-fg);
}
.btn-primary:active { background: var(--color-accent-active); border-color: var(--color-accent-active); }

/* Secondary */
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface-2);
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
}
.btn-secondary.active,
.btn-secondary.active:hover {
  background: var(--color-accent-subtle) !important;
  color: var(--color-accent-text) !important;
  border-color: var(--color-accent-border) !important;
  pointer-events: none;
}

/* Danger */
.btn-danger {
  background: var(--color-danger);
  color: oklch(0.99 0 0);
  border-color: var(--color-danger);
  box-shadow: var(--shadow-xs);
}
.btn-danger:hover {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: oklch(0.99 0 0);
  filter: brightness(1.08);
}
.btn-danger:active { filter: none; }

.btn-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-bd);
}
.btn-warning:hover {
  background: var(--warning);
  color: oklch(0.99 0 0);
  border-color: var(--warning);
}

/* Success */
.btn-success {
  background: var(--color-success);
  color: oklch(0.99 0 0);
  border-color: var(--color-success);
  box-shadow: var(--shadow-xs);
}
.btn-success:hover {
  background: var(--color-success);
  border-color: var(--color-success);
  color: oklch(0.99 0 0);
  filter: brightness(1.08);
}
.btn-success:active { filter: none; }

.btn:disabled, .btn[disabled] {
  background: var(--color-surface-2);
  color: var(--tx-3);
  border-color: var(--color-border);
  cursor: not-allowed;
  opacity: 0.5;
}
.btn:disabled:hover, .btn[disabled]:hover {
  background: var(--color-surface-2);
  color: var(--tx-3);
  transform: none;
  box-shadow: none;
  filter: none;
}

/* Icon button */
.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--rsm);
  flex-shrink: 0;
}

/* ─── 10. BADGES ───────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-pending {
  background: var(--color-warning-subtle);
  color: var(--color-warning-text);
  border: 1px solid transparent;
}
.badge-pending .badge-dot { background: var(--warning); }

.badge-success {
  background: var(--color-success-subtle);
  color: var(--color-success-text);
  border: 1px solid transparent;
}
.badge-success .badge-dot { background: var(--success); }

.badge-danger {
  background: var(--color-danger-subtle);
  color: var(--color-danger-text);
  border: 1px solid transparent;
}
.badge-danger .badge-dot { background: var(--danger); }

.badge-info {
  background: var(--color-info-subtle);
  color: var(--color-info-text);
  border: 1px solid transparent;
}
.badge-info .badge-dot { background: var(--color-info); }

.badge-accent {
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
  border: 1px solid transparent;
}

/* AMD hint tooltip */
.amd-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--glass-border-md);
  font-size: 10px;
  font-weight: 700;
  color: var(--tx-3);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-left: 4px;
  transition: border-color 0.15s, color 0.15s;
}
.amd-hint:hover {
  border-color: var(--accent);
  color: var(--accent-lt);
}
.amd-hint .amd-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 400;
  color: var(--tx-2);
  white-space: nowrap;
  z-index: var(--z-sticky);
  pointer-events: none;
}
.amd-hint:hover .amd-tooltip,
.amd-hint.active .amd-tooltip {
  display: block;
}

/* ─── 11. TABLES (Aurora data grid) ────────────────── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  font-size: var(--text-data);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: var(--pad-cell);
  text-align: start;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  background: var(--color-surface-2);
  /* box-shadow (not border) so the divider stays put while the header is sticky */
  box-shadow: inset 0 -1px 0 var(--color-border);
}
tbody td {
  padding: var(--pad-cell);
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  line-height: 1.4;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--dur-1) var(--ease-standard); }
tbody tr:hover td { background: var(--color-surface-2); }
tbody tr.selected td,
tbody tr[aria-selected="true"] td { background: var(--color-accent-subtle); }

/* Cell alignment & type conventions */
th.text-right, td.text-right { text-align: end; }
td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
th.col-check, td.col-check { width: 44px; text-align: center; }
th.col-actions, td.col-actions { width: 1%; white-space: nowrap; }
table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--color-accent); cursor: pointer; }

/* Sortable header */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--color-text-secondary); }
th.sortable .sort-ico { display: inline-flex; width: 13px; height: 13px; margin-inline-start: 4px; vertical-align: -2px; opacity: 0; transition: opacity var(--dur-1) var(--ease-standard); }
th.sortable:hover .sort-ico { opacity: .5; }
th[aria-sort="ascending"] .sort-ico,
th[aria-sort="descending"] .sort-ico { opacity: 1; }
th[aria-sort="descending"] .sort-ico { transform: rotate(180deg); }

/* Row action buttons (compact icon-first) */
.td-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s2);
}
.td-actions .btn { flex-shrink: 0; }
.td-actions .btn-sm:not(.btn-icon) { min-width: 72px; }
/* descendant (not child) so buttons wrapped in an inline <form> also match */
.td-actions .btn-icon,
.td-actions .icon-btn { width: 28px; min-width: 28px; height: 28px; padding: 0; }
.td-actions form { display: inline-flex; margin: 0; }
.td-actions .btn-placeholder {
  display: inline-block;
  visibility: hidden;
  pointer-events: none;
}

/* Table toolbar (title + count + search + filter), chips, bulk bar, footer */
.table-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px var(--pad-card); border-block-end: 1px solid var(--color-border);
}
.table-toolbar h3 { margin: 0; font-size: var(--text-md); font-weight: var(--fw-semibold); }
.table-count {
  font-size: 12px; color: var(--color-text-tertiary); font-family: var(--font-mono);
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); padding: 2px 9px;
}
.table-search { position: relative; display: inline-flex; align-items: center; }
.table-search > svg { position: absolute; inset-inline-start: 10px; width: 15px; height: 15px; color: var(--color-text-tertiary); pointer-events: none; }
.table-search input { height: var(--control-h); padding-inline-start: 32px; min-width: 200px; }
.filter-chips {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px var(--pad-card); border-block-end: 1px solid var(--color-border);
}
.bulk-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px var(--pad-card); background: var(--color-accent-subtle);
  border-block-end: 1px solid var(--color-accent-border);
  animation: om-overlay-in 160ms var(--ease-standard);
}
.bulk-bar .bulk-count { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--color-accent-text); }
.table-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px var(--pad-card); border-block-start: 1px solid var(--color-border);
}
.table-footer .table-summary { font-size: 12px; color: var(--color-text-tertiary); }

/* ─── 12. PAGINATION ───────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  padding-top: var(--s4);
  margin-top: var(--s4);
  border-top: 1px solid var(--glass-border);
  flex-wrap: wrap;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--s2);
  border-radius: var(--rsm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--tx-2);
  font-size: var(--fsm);
  font-weight: 500;
  transition: background var(--dur-1) var(--ease-standard), border-color var(--dur-1) var(--ease-standard), color var(--dur-1) var(--ease-standard);
}
.page-link:hover { background: var(--color-surface-2); border-color: var(--color-border-strong); color: var(--tx-1); }
.page-link.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-fg);
  font-weight: 700;
}
.page-link.disabled { opacity: 0.4; pointer-events: none; cursor: default; }
.page-ellipsis { padding: 0 6px; color: var(--color-text-tertiary); align-self: center; }

/* ─── Tooltip (replaces native title) ─── */
.au-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: 280px;
  padding: 6px 9px;
  border-radius: var(--rsm);
  background: var(--color-text-primary);
  color: var(--color-surface);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.12s var(--ease-standard), transform 0.12s var(--ease-standard);
  white-space: normal;
  word-break: break-word;
}
.au-tooltip.show { opacity: 1; transform: translateY(0); }
.au-tooltip::after {
  content: '';
  position: absolute;
  left: var(--au-tip-arrow, 50%);
  transform: translateX(-50%);
  border: 5px solid transparent;
}
.au-tooltip:not(.au-tooltip--below)::after { top: 100%; border-top-color: var(--color-text-primary); }
.au-tooltip.au-tooltip--below::after { bottom: 100%; border-bottom-color: var(--color-text-primary); }

/* ─── Enhanced select (Chosen-style) ─── */
select.aui-native-hidden { display: none !important; }
.aui-select {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  height: var(--input-h);
  padding: 0 36px 0 var(--s3);
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--rmd);
  color: var(--color-text-primary);
  font-size: var(--fsm);
  font-family: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color var(--dur-2) var(--ease-standard), box-shadow var(--dur-2) var(--ease-standard), background-color var(--dur-2) var(--ease-standard);
}
.aui-select:hover:not(.open) { border-color: var(--color-border-strong); }
.aui-select.open {
  border-color: var(--color-accent);
  background-color: var(--color-surface);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: none;
}
.aui-select:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: none;
}
.aui-select[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.aui-select__value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aui-select__value.placeholder { color: var(--tx-3); }
.aui-select__chev {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tx-3);
  display: inline-flex;
  pointer-events: none;
  transition: transform var(--dur-2) var(--ease-standard);
}
.aui-select.open .aui-select__chev { transform: translateY(-50%) rotate(180deg); }

.aui-select-pop {
  position: fixed;
  z-index: 10001;
  min-width: 140px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--rmd);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.12s var(--ease-standard), transform 0.12s var(--ease-standard);
}
.aui-select-pop.show { opacity: 1; transform: translateY(0); }
.aui-select-search {
  display: block;
  width: 100%;
  height: 34px;
  margin-bottom: 4px;
  padding: 0 10px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--rsm);
  color: var(--color-text-primary);
  font-size: var(--fsm);
  font-family: inherit;
  outline: none;
}
.aui-select-search:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-focus-ring); }
.aui-select-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--rsm);
  font-size: var(--fsm);
  color: var(--tx-1);
  cursor: pointer;
  white-space: nowrap;
}
.aui-select-opt:hover,
.aui-select-opt.active { background: var(--color-surface-2); }
.aui-select-opt.selected { color: var(--color-accent); font-weight: 600; }
.aui-select-opt.selected::after {
  content: '';
  margin-inline-start: auto;
  width: 15px; height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}
.aui-select-opt[data-disabled] { opacity: 0.4; cursor: default; }
.aui-select-empty { padding: 10px; text-align: center; color: var(--tx-3); font-size: var(--fsm); }
/* context sizing parity with the native select rules */
.filter-bar .aui-select { height: var(--control-h); font-size: var(--text-sm); border-radius: var(--radius-sm); width: 160px; flex-shrink: 0; }

/* ─── 13. MODAL ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--s4);
}
.modal-overlay.show { display: flex; }

.modal {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - var(--s4) * 2);
  overflow-y: auto;
  animation: modal-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s4);
}
.modal-header h2 { margin-bottom: 0; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--rsm);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--tx-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: background var(--dur-1) var(--ease-standard), color var(--dur-1) var(--ease-standard);
}
.modal-close:hover { background: var(--color-surface-3); color: var(--tx-1); }

/* Button loading state */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  top: 50%; left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--color-border-strong);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--s6);
  color: var(--tx-3);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--s3);
  opacity: 0.5;
}

/* ─── CUSTOM DIALOG (alert/confirm replacement) ────── */
#app-dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  background: var(--color-overlay);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}
#app-dialog-overlay.show { display: flex; }
#app-dialog {
  width: 100%;
  max-width: 400px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--rlg);
  box-shadow: var(--shadow-lg);
  padding: var(--s5);
  text-align: center;
  animation: modal-in 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dialog-icon { font-size: 40px; margin-bottom: var(--s3); }
.dialog-title { font-size: var(--flg); font-weight: 700; color: var(--tx-1); margin-bottom: var(--s2); }
.dialog-message { font-size: var(--fsm); color: var(--tx-3); margin-bottom: var(--s4); line-height: 1.5; }
.dialog-buttons { display: flex; gap: var(--s2); justify-content: center; }
.dialog-buttons .btn { min-width: 100px; }

/* ─── 14. ALERTS / FLASH ───────────────────────────── */
.alert {
  padding: var(--s3);
  border-radius: var(--rmd);
  font-size: var(--fsm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s4);
}
.alert-error {
  background: var(--color-danger-subtle);
  border: 1px solid transparent;
  color: var(--color-danger-text);
}
.alert-success {
  background: var(--color-success-subtle);
  border: 1px solid transparent;
  color: var(--color-success-text);
}

/* ─── 15. EMPTY STATE ──────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--s8) var(--s4);
}
.empty-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: var(--s3);
  opacity: 0.4;
}
.empty-state p { font-size: var(--fsm); color: var(--tx-3); max-width: 280px; margin: 0 auto; }

/* ─── 16. LOGIN PAGE ───────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s4);
}
.login-card {
  width: 100%;
  max-width: 380px;
}
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin-bottom: var(--s5);
}
.login-logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: var(--color-accent-fg);
  border-radius: var(--rmd);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.login-logo-text {
  font-size: var(--f2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--tx-1);
}
.login-tagline {
  text-align: center;
  color: var(--tx-3);
  font-size: var(--fsm);
  margin-bottom: var(--s5);
  margin-top: calc(-1 * var(--s3));
}

/* Agent login: design-system topbar (lang/theme) + centred, highlighted card */
.agent-auth { min-height: 100vh; display: flex; flex-direction: column; }
.agent-auth-top {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  height: 56px; padding: 0 16px; flex-shrink: 0;
  border-block-end: 1px solid var(--color-border);
}
.agent-auth-top-actions { display: flex; align-items: center; gap: 8px; }
.agent-auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--s4); }
.agent-auth-panel {
  border-block-start: 3px solid var(--color-accent);
  box-shadow: var(--shadow-lg);
}

/* ─── 17. SECTION HEADERS ──────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s4);
  flex-wrap: wrap;
}
.section-header h2,
.section-header h3 { margin-bottom: 0; }

/* ─── 18. FILTER BAR ───────────────────────────────── */
.filter-bar {
  display: flex;
  gap: var(--s2);
  align-items: center;
  flex-wrap: wrap;
}
.filter-bar input,
.filter-bar select {
  height: var(--control-h);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
}
.filter-bar .filter-search { flex: 1; min-width: 200px; }
.filter-bar .filter-status { width: 160px; flex-shrink: 0; }

/* ─── THEME TOGGLE COMPONENT ──────────────────────── */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--glass-2);
  border: 1px solid var(--glass-border-md);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  flex-shrink: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.theme-toggle:hover {
  border-color: var(--glass-border-str);
}
.theme-toggle-thumb {
  position: absolute;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tx-1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(20px);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  font-size: 12px;
  line-height: 1;
  transition: opacity 0.2s;
}
.theme-toggle .icon-moon {
  left: 5px;
  opacity: 0.5;
}
.theme-toggle .icon-sun {
  right: 4px;
  opacity: 0.3;
}
[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0.8;
}
[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0.2;
}

/* ─── LIGHT THEME ─────────────────────────────────── */
/* All light-mode values now come from the Aurora [data-theme="light"]
   token block near the top of the file: every component references
   --color-* / legacy aliases, so the theme flips automatically with no
   per-component overrides. Only genuinely theme-specific tweaks remain. */

/* Native <select> chevron reads on both themes (mid-gray), so no override. */

/* ─── 19. RESPONSIVE ───────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
  }

  h1 { font-size: var(--f2xl); }
  h2 { font-size: var(--fxl); }

  .main-content { padding: var(--s4) var(--s3); }

  .navbar-user .user-name { display: none; }

  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header > * { width: 100%; }

  .grid-cards { grid-template-columns: 1fr; }
  .grid-stats  { grid-template-columns: repeat(2, 1fr); }

  .form-inline { flex-direction: column; align-items: stretch; }
  .form-inline .form-group,
  .form-inline select,
  .form-inline input { width: 100%; }

  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .filter-search,
  .filter-bar .filter-status,
  .filter-bar .aui-select { width: 100%; }

  /* Stack table actions on mobile */
  .section-header { flex-direction: column; align-items: flex-start; }

  .panel, .panel-lg { padding: var(--s3); }

  /* Hide less important columns on mobile */
  .hide-mobile { display: none !important; }

  /* Modal responsive */
  .modal { max-width: calc(100vw - var(--s4) * 2); }

  /* Table font size on mobile */
  table { font-size: var(--fsm); }
  .pill { font-size: 11px; padding: 2px 8px; }
}

@media (max-width: 480px) {
  .grid-stats { grid-template-columns: 1fr; }
  .flex.gap-3 { gap: 8px; }
  .modal { max-width: calc(100vw - 16px); }
  h1 { font-size: var(--fxl); }
}

/* View toggle group */
.view-toggle {
  display: inline-flex;
  gap: 2px;
  background: var(--glass-1);
  border-radius: var(--rmd);
  padding: 2px;
}
.view-toggle .btn-icon {
  width: 32px;
  height: 32px;
  border-radius: calc(var(--rmd) - 2px);
}

/* CRM sidebar layout */
.page-crm .page-wrap { display: none; }

.crm-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-h));
}

.crm-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--glass-1);
  border-right: 1px solid var(--glass-border);
  padding: var(--s4) 0;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  z-index: 50;
  transition: width 0.2s, transform 0.2s;
  overflow-y: auto;
}
.crm-sidebar.collapsed {
  width: 56px;
}
.crm-sidebar.collapsed .crm-nav-item {
  justify-content: center;
  padding: var(--s2);
}
.crm-sidebar.collapsed .crm-nav-item span,
.crm-sidebar.collapsed .crm-nav-badge {
  display: none;
}
.crm-sidebar.collapsed .crm-nav-item svg {
  flex-shrink: 0;
}

.crm-main {
  flex: 1;
  padding: var(--s5) var(--s6);
  margin-left: 220px;
  transition: margin-left 0.2s;
  min-width: 0;
}
.crm-sidebar.collapsed + .crm-main {
  margin-left: 56px;
}

.crm-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--s2);
}

.crm-nav-item {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  border-radius: var(--rmd);
  color: var(--tx-2);
  font-size: var(--fsm);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.crm-nav-item:hover {
  background: var(--glass-2);
  color: var(--tx-1);
}
.crm-nav-item.active {
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
}
.crm-nav-item.active:hover {
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
}
.crm-nav-item.active svg,
.crm-nav-item.active:hover svg {
  stroke: currentColor;
}

.crm-nav-badge {
  margin-left: auto;
  background: var(--glass-2);
  color: var(--tx-3);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  line-height: 1.4;
}
.crm-nav-item.active .crm-nav-badge {
  background: var(--color-accent-border);
  color: var(--color-accent-text);
}

/* Nav groups & sub-items */
.crm-nav-group {
  margin-top: var(--s2);
}
.crm-nav-label {
  padding: var(--s2) var(--s3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-3);
  opacity: 0.7;
}
.crm-nav-sub {
  padding-left: var(--s4);
  font-size: 13px;
}
.crm-sidebar.collapsed .crm-nav-label {
  display: none;
}
.crm-sidebar.collapsed .crm-nav-sub {
  padding-left: var(--s3);
}

.crm-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--s2) var(--s3);
}
.crm-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--glass-border);
  border-radius: var(--rsm);
  background: var(--glass-2);
  color: var(--tx-2);
  cursor: pointer;
  transition: all 0.15s;
}
.crm-sidebar-toggle:hover {
  background: var(--glass-3);
  color: var(--tx-1);
}

/* User dropdown */
.crm-user-dropdown {
  position: relative;
}
.crm-user-btn {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--glass-border);
  border-radius: var(--rmd);
  background: var(--glass-2);
  color: var(--tx-1);
  font-size: var(--fsm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.crm-user-btn:hover {
  background: var(--glass-3);
  border-color: var(--glass-border-md);
}
.crm-user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--color-accent-fg); flex-shrink: 0;
}
.crm-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--rmd);
  box-shadow: var(--shadow-lg);
  padding: var(--s1) 0;
  z-index: var(--z-drawer);
}
.crm-dropdown-menu.show { display: block; }
.crm-dropdown-label {
  padding: var(--s1) var(--s3);
}
.crm-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: 100%;
  padding: var(--s2) var(--s3);
  border: none;
  background: none;
  color: var(--tx-2);
  font-size: var(--fsm);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.1s;
}
.crm-dropdown-item:hover {
  background: var(--color-surface-2);
  color: var(--tx-1);
}
.crm-dropdown-danger { color: var(--color-danger-text); }
.crm-dropdown-danger:hover { background: var(--danger-bg); color: var(--color-danger-text); }
.crm-dropdown-divider {
  height: 1px;
  background: var(--glass-border);
  margin: var(--s1) 0;
}

@media (max-width: 768px) {
  .crm-sidebar {
    width: 220px;
    transform: translateX(-100%);
  }
  .crm-sidebar.mobile-open {
    transform: translateX(0);
  }
  .crm-main {
    margin-left: 0;
    padding: var(--s4) var(--s3);
  }
}

/* Full-width layout */
.page-wide .navbar-inner,
.page-wide .main-content {
  max-width: none;
  padding-left: var(--s6);
  padding-right: var(--s6);
}
@media (max-width: 768px) {
  .page-wide .navbar-inner,
  .page-wide .main-content {
    padding-left: var(--s3);
    padding-right: var(--s3);
  }
}

@media (max-width: 480px) {
  .grid-stats { grid-template-columns: 1fr 1fr; }

  .btn-full-mobile { width: 100%; }

  .navbar-right .navbar-user { display: none; }
  .nav-menu-btn { display: flex; }
}

/* ─── 20. UPLOAD PRELOADER ─────────────────────────── */
.upload-preloader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--color-overlay);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: preloader-in 0.25s ease forwards;
}
.upload-preloader.show { display: flex; }

@keyframes preloader-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.upload-preloader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
  padding: var(--s6) var(--s8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--rxl);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: preloader-box-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes preloader-box-in {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.upload-preloader-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-strong), transparent);
}

/* Spinner ring */
.spinner {
  width: 56px;
  height: 56px;
  position: relative;
}
.spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
}
.spinner-ring:nth-child(1) {
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
.spinner-ring:nth-child(2) {
  inset: 8px;
  border-top-color: var(--color-accent-hover);
  animation: spin 1.3s linear infinite reverse;
}
.spinner-ring:nth-child(3) {
  inset: 16px;
  border-top-color: var(--color-accent-border);
  animation: spin 1.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.upload-preloader-title {
  font-size: var(--fxl);
  font-weight: 700;
  color: var(--tx-1);
  letter-spacing: -0.02em;
}
.upload-preloader-sub {
  font-size: var(--fsm);
  color: var(--tx-3);
  margin-top: calc(-1 * var(--s2));
}

/* Progress bar */
.upload-progress-wrap {
  width: 220px;
  height: 3px;
  background: var(--color-surface-3);
  border-radius: 3px;
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  border-radius: 3px;
  width: 0%;
  animation: progress-indeterminate 1.6s ease-in-out infinite;
}
@keyframes progress-indeterminate {
  0%   { width: 0%;   margin-left: 0%; }
  50%  { width: 60%;  margin-left: 20%; }
  100% { width: 0%;   margin-left: 100%; }
}

/* Filename chip inside preloader */
.upload-preloader-file {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fsm);
  color: var(--tx-2);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-preloader-file span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── 21. MISC UTILITIES ───────────────────────────── */
.divider {
  height: 1px;
  background: var(--glass-border);
  margin: var(--s4) 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: var(--s1) var(--s2);
  border-radius: var(--rxl);
  font-size: var(--fxs);
  font-weight: 600;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--tx-1);
}

/* Scroll bar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-tertiary); }

/* Selection */
::selection { background: var(--color-accent-subtle); color: var(--color-accent-text); }

/* ─── WEBHOOK HELP ────────────────────────────────── */
.webhook-help {
  margin-top: var(--s2);
  font-size: var(--fsm);
  color: var(--tx-3);
}
.webhook-help summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
  user-select: none;
}
.webhook-help summary:hover { text-decoration: underline; }
.webhook-help ol {
  margin: var(--s2) 0 0;
  padding-left: 1.4em;
  display: flex; flex-direction: column; gap: var(--s1);
  color: var(--tx-2);
  line-height: 1.6;
}
.webhook-help pre {
  margin: var(--s1) 0 0;
  padding: var(--s3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--r2);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  overflow: auto;
  max-height: 200px;
  color: var(--tx-2);
  white-space: pre;
}

/* ===================================================
   AURORA COMPONENT LAYER  (structural conformance)
   Class-based components mirroring the Aurora blueprint.
   Geometry is density-driven (--control-h/--pad-card/
   --gap-grid/--pad-cell) and uses logical properties.
   =================================================== */

/* ─── 22. DENSITY MODES ────────────────────────────── */
/* :root already carries the "comfortable" defaults; these
   let data-density on <html> switch the whole UI's sizing. */
[data-density="compact"] {
  --row-h: 34px; --control-h: 30px; --pad-card: 14px;
  --gap-grid: 12px; --text-data: 12px; --pad-cell: 6px 10px;
}
[data-density="comfortable"] {
  --row-h: 44px; --control-h: 36px; --pad-card: 18px;
  --gap-grid: 16px; --text-data: 13px; --pad-cell: 10px 14px;
}
[data-density="spacious"] {
  --row-h: 56px; --control-h: 44px; --pad-card: 24px;
  --gap-grid: 20px; --text-data: 14px; --pad-cell: 14px 18px;
}

/* ─── 23. AURORA HELPERS & KEYFRAMES ───────────────── */
.om-themed, .om-themed * {
  transition: background-color var(--dur-2) var(--ease-standard),
              border-color var(--dur-2) var(--ease-standard),
              color var(--dur-2) var(--ease-standard),
              box-shadow var(--dur-2) var(--ease-standard);
}
.om-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.om-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.om-scroll::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 99px; border: 3px solid var(--color-bg); }
.om-scroll::-webkit-scrollbar-track { background: transparent; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

:where(button,a,input,textarea,select,[tabindex],[role="button"]):focus-visible {
  outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: var(--radius-xs);
}
:where(button,a,input,textarea,select):focus:not(:focus-visible) { outline: none; }

@keyframes om-spin { to { transform: rotate(360deg); } }
@keyframes om-shimmer { 0% { background-position: -480px 0; } 100% { background-position: 480px 0; } }
@keyframes om-toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes om-overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes om-modal-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes om-drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes om-view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes om-pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, .om-themed * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ─── 24. APP SHELL (sidebar + topbar + main) ──────── */
.app-shell {
  display: flex; height: 100vh; width: 100%; overflow: hidden;
  background: var(--color-bg); color: var(--color-text-primary);
}
/* When a fixed top bar (impersonation) precedes the shell, make body a
   column so the banner sits above and the shell fills the remaining height. */
.app-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-page .app-shell { height: auto; flex: 1; min-height: 0; }

/* Impersonation banner ("viewing as …") */
.imp-banner {
  flex-shrink: 0; display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; font-size: var(--text-sm);
  background: var(--color-warning-subtle); color: var(--color-warning-text);
  border-block-end: 1px solid var(--color-warning);
  z-index: var(--z-toast);
}
.imp-banner .imp-ico { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; }
.imp-banner .imp-text { min-width: 0; }
.imp-banner .imp-admin { opacity: 0.85; }
.imp-banner .imp-form { margin: 0 0 0 auto; flex-shrink: 0; }
.imp-banner .imp-btn { background: var(--color-warning); color: oklch(0.99 0 0); border-color: var(--color-warning); }
.imp-banner .imp-btn:hover { background: var(--color-warning); border-color: var(--color-warning); color: oklch(0.99 0 0); filter: brightness(1.06); }

.app-sidebar {
  width: 248px; flex-shrink: 0; height: 100%;
  display: flex; flex-direction: column;
  background: var(--color-surface);
  border-inline-end: 1px solid var(--color-border);
  transition: width var(--dur-3) var(--ease-standard);
  overflow: hidden;
}
.app-shell.sidebar-collapsed .app-sidebar { width: 64px; }

.app-brand {
  display: flex; align-items: center; gap: 10px; height: 56px;
  padding-inline: 16px; border-block-end: 1px solid var(--color-border);
  flex-shrink: 0; text-decoration: none; color: var(--color-text-primary);
}
.app-brand-logo {
  width: 26px; height: 26px; border-radius: 7px; background: var(--color-accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.app-brand-logo > i { width: 11px; height: 11px; border-radius: 3px; background: var(--color-accent-fg); display: block; }
.app-brand-logo > img { width: 100%; height: 100%; object-fit: contain; }
.app-brand-text { display: flex; flex-direction: column; line-height: 1.1; overflow: hidden; }
.app-brand-name { font-weight: var(--fw-semibold); font-size: var(--text-sm); letter-spacing: -0.01em; white-space: nowrap; }
.app-brand-sub { font-size: 11px; color: var(--color-text-tertiary); white-space: nowrap; }
/* IQVoIP logo image (light background → rounded badge so it reads on dark surfaces).
   Height fills most of the 56–64px brand row without growing it. */
.brand-logo { display: block; height: 44px; width: auto; max-width: 100%; border-radius: 6px; object-fit: contain; flex-shrink: 0; }
.app-shell.sidebar-collapsed .app-brand .brand-logo { display: none; }

.app-nav { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.app-nav-label {
  font-size: 11px; font-weight: var(--fw-semibold); color: var(--color-text-tertiary);
  text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 10px 4px; white-space: nowrap;
}
.app-nav-label + .app-nav-label,
.app-nav-item + .app-nav-label { padding-block-start: 16px; }
.app-nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--fw-medium);
  text-align: start; line-height: 1; background: transparent; color: var(--color-text-secondary);
  text-decoration: none; transition: background var(--dur-1) var(--ease-standard), color var(--dur-1) var(--ease-standard);
}
.app-nav-item:hover { background: var(--color-surface-2); color: var(--color-text-primary); }
.app-nav-item.active { background: var(--color-accent-subtle); color: var(--color-accent-text); }
.app-nav-item .nav-ico { display: flex; width: 18px; height: 18px; flex-shrink: 0; align-items: center; justify-content: center; }
.app-nav-item .nav-ico svg { width: 18px; height: 18px; }
.app-nav-item .nav-txt { white-space: nowrap; overflow: hidden; }
.app-nav-badge {
  margin-inline-start: auto; font-size: 11px; font-family: var(--font-mono);
  background: var(--color-surface-2); color: var(--color-text-tertiary);
  border-radius: 99px; padding: 1px 7px; line-height: 1.4;
}
.app-nav-item.active .app-nav-badge { background: var(--color-accent-border); color: var(--color-accent-text); }

.app-sidebar-user {
  padding: 10px; border-block-start: 1px solid var(--color-border); flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
}
.app-user-text { display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; flex: 1; min-width: 0; }
.app-user-name { font-size: var(--text-sm); font-weight: var(--fw-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-user-role { font-size: 11px; color: var(--color-text-tertiary); white-space: nowrap; }

/* Collapsed rail: hide all text, center icons */
.app-shell.sidebar-collapsed .app-nav-label,
.app-shell.sidebar-collapsed .nav-txt,
.app-shell.sidebar-collapsed .app-nav-badge,
.app-shell.sidebar-collapsed .app-brand-text,
.app-shell.sidebar-collapsed .app-user-text { display: none; }
.app-shell.sidebar-collapsed .app-nav-item { justify-content: center; gap: 0; }
.app-shell.sidebar-collapsed .app-brand { justify-content: center; padding-inline: 0; }
.app-shell.sidebar-collapsed .app-sidebar-user { justify-content: center; }

.app-body { display: flex; flex-direction: column; flex: 1; min-width: 0; height: 100%; }
.app-topbar {
  display: flex; align-items: center; gap: 12px; height: 56px;
  padding-inline: 16px 20px; border-block-end: 1px solid var(--color-border);
  background: var(--color-surface); flex-shrink: 0; z-index: var(--z-sticky);
}
.app-topbar-title { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.app-topbar-title .t1 { font-size: var(--text-md); font-weight: var(--fw-semibold); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-topbar-title .t2 { font-size: 11px; color: var(--color-text-tertiary); white-space: nowrap; }
.app-spacer { flex: 1; }
.app-main { flex: 1; overflow-y: auto; min-height: 0; }
.app-view {
  padding: var(--space-6); max-width: 1320px; margin-inline: auto; width: 100%;
  display: flex; flex-direction: column; gap: var(--gap-grid);
  animation: om-view-in var(--dur-3) var(--ease-out);
}

/* Generic icon button (topbar / headers / rows) */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid var(--color-border);
  background: var(--color-surface-2); color: var(--color-text-secondary);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--dur-1) var(--ease-standard), color var(--dur-1) var(--ease-standard), border-color var(--dur-1) var(--ease-standard);
}
.icon-btn:hover { background: var(--color-surface-3); color: var(--color-text-primary); border-color: var(--color-border-strong); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.ghost:hover { background: var(--color-surface-2); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn svg, .icon-btn i { display: block; }

/* Command trigger + keyboard hint */
.cmdk-trigger {
  display: flex; align-items: center; gap: 8px; height: 34px; padding-inline: 10px;
  border: 1px solid var(--color-border); background: var(--color-surface-2);
  color: var(--color-text-tertiary); border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-sans); font-size: var(--text-sm);
}
.cmdk-trigger:hover { border-color: var(--color-border-strong); color: var(--color-text-secondary); }
kbd, .kbd {
  font-family: var(--font-mono); font-size: 11px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: 4px; padding: 1px 5px; color: var(--color-text-tertiary);
}

/* Segmented control (density / toggles) */
.segmented { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.segmented button {
  height: 26px; min-width: 30px; padding: 0 8px; border: none; background: transparent;
  color: var(--color-text-secondary); border-radius: calc(var(--radius-sm) - 2px); cursor: pointer;
  font-size: var(--text-xs); font-family: var(--font-sans); display: inline-flex; align-items: center; justify-content: center;
}
.segmented button.active { background: var(--color-surface); color: var(--color-text-primary); box-shadow: var(--shadow-xs); }

/* ─── 25. AURORA DATA & CONTENT COMPONENTS ─────────── */
/* KPI / stat tiles */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap-grid); }
.kpi {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--pad-card); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
  transition: transform var(--dur-2) var(--ease-standard), box-shadow var(--dur-2) var(--ease-standard), border-color var(--dur-2) var(--ease-standard);
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: var(--text-sm); color: var(--color-text-secondary); font-weight: var(--fw-medium); }
.kpi-chip { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--color-accent-subtle); color: var(--color-accent-text); }
.kpi-chip.success { background: var(--color-success-subtle); color: var(--color-success-text); }
.kpi-chip.danger  { background: var(--color-danger-subtle);  color: var(--color-danger-text); }
.kpi-chip.warning { background: var(--color-warning-subtle); color: var(--color-warning-text); }
.kpi-chip svg, .kpi-chip i { display: block; width: 16px; height: 16px; }
.kpi-value-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kpi-value { font-size: var(--text-2xl); font-weight: var(--fw-semibold); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-delta { display: inline-flex; align-items: center; font-size: 12px; font-weight: var(--fw-semibold); font-family: var(--font-mono); }
.kpi-delta.up { color: var(--color-success-text); }
.kpi-delta.down { color: var(--color-danger-text); }
.kpi-spark { height: 34px; margin-top: 2px; }

/* Bento / chart grids */
.bento-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap-grid); }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap-grid); }
@media (max-width: 900px) { .bento-2 { grid-template-columns: 1fr; } }

/* Framed section (header / body / footer with dividers) */
.au-section { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
/* Lets an absolutely-positioned popover (e.g. date picker) escape the section clip */
.au-section--overflow { overflow: visible; }
.au-section-header { padding: 14px var(--pad-card); border-block-end: 1px solid var(--color-border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.au-section-header h2, .au-section-header h3 { margin: 0; font-size: var(--text-md); font-weight: var(--fw-semibold); }
.au-section-header .sub { font-size: 12px; color: var(--color-text-tertiary); }
.au-section-body { padding: var(--pad-card); display: flex; flex-direction: column; gap: 16px; }
.au-section-footer { padding: 12px var(--pad-card); border-block-start: 1px solid var(--color-border); background: var(--color-surface-2); display: flex; align-items: center; gap: 10px; }

/* Avatar */
.avatar {
  width: 32px; height: 32px; border-radius: var(--radius-full); color: #fff; font-size: 12px;
  font-weight: var(--fw-semibold); display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; }
.avatar.lg { width: 36px; height: 36px; }

/* Tag / chip / count-pill */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-sm); font-size: 12px; color: var(--color-text-primary); background: var(--color-surface-2); border: 1px solid var(--color-border); }
.tag .x { color: var(--color-text-tertiary); cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 6px 3px 9px; border-radius: 99px; font-size: 12px; font-weight: var(--fw-medium); background: var(--color-surface-2); border: 1px solid var(--color-border); }
.count-pill { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 99px; font-size: 11px; font-weight: var(--fw-semibold); color: #fff; background: var(--color-accent); font-family: var(--font-mono); }

/* Underline tabs */
.au-tabs { display: flex; gap: 4px; border-block-end: 1px solid var(--color-border); }
.au-tabs > a, .au-tabs > button, .au-tabs .au-tab {
  padding: 8px 14px; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--color-text-secondary);
  background: none; border: none; cursor: pointer; text-decoration: none; margin-bottom: -1px; border-block-end: 2px solid transparent;
}
.au-tabs > a:hover, .au-tabs .au-tab:hover { color: var(--color-text-primary); }
.au-tabs > .active, .au-tabs .au-tab.active { color: var(--color-accent-text); border-block-end: 2px solid var(--color-accent); }

/* Tooltip */
.tt { position: relative; display: inline-flex; align-items: center; }
.tt-bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  padding: 5px 9px; background: var(--color-text-primary); color: var(--color-bg); font-size: 11px;
  border-radius: var(--radius-sm); white-space: nowrap; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity var(--dur-1) var(--ease-standard); z-index: var(--z-sticky);
}
.tt:hover .tt-bubble { opacity: 1; }

/* Progress bar */
.progress { height: 8px; border-radius: 99px; background: var(--color-surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--color-accent); border-radius: 99px; }
.progress.thin { height: 5px; }

/* Dropzone */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; border: 1.5px dashed var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface-2); transition: border-color var(--dur-2) var(--ease-standard), background var(--dur-2) var(--ease-standard); }
.dropzone.drag { border-color: var(--color-accent); background: var(--color-accent-subtle); }

/* Skeleton shimmer */
.skel { background: linear-gradient(90deg, var(--color-surface-2) 25%, var(--color-surface-3) 50%, var(--color-surface-2) 75%); background-size: 480px 100%; animation: om-shimmer 1.3s linear infinite; border-radius: 6px; }
.skel.circle { border-radius: 99px; }
.skel.line { height: 11px; }

/* ─── 26. OVERLAY PRIMITIVES (drawer / toast / cmdk) ─ */
.drawer-overlay { position: fixed; inset: 0; z-index: var(--z-drawer); background: var(--color-overlay); display: none; justify-content: flex-end; animation: om-overlay-in 140ms var(--ease-standard); }
.drawer-overlay.show { display: flex; }
.drawer { width: min(380px, 92vw); height: 100%; background: var(--color-surface); border-inline-start: 1px solid var(--color-border); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: om-drawer-in 240ms var(--ease-out); }
.drawer-header { padding: 16px var(--space-6); border-block-end: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }
.drawer-header h3 { margin: 0; font-size: var(--text-lg); font-weight: var(--fw-semibold); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px; }

.toast-stack { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 11px; width: min(360px, 86vw); padding: 13px 15px; background: var(--color-surface); border: 1px solid var(--color-border); border-inline-start: 3px solid var(--color-accent); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); pointer-events: auto; animation: om-toast-in 240ms var(--ease-spring); }
.toast.success { border-inline-start-color: var(--color-success); }
.toast.danger  { border-inline-start-color: var(--color-danger); }
.toast.warning { border-inline-start-color: var(--color-warning); }
.toast.info    { border-inline-start-color: var(--color-info); }
.toast-title { font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.toast-body { font-size: 12px; color: var(--color-text-secondary); line-height: 1.4; }

.cmdk-overlay { position: fixed; inset: 0; z-index: var(--z-cmdk); background: var(--color-overlay); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; animation: om-overlay-in 140ms var(--ease-standard); }
.cmdk-overlay.show { display: flex; }
.cmdk { width: min(560px, 92vw); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: om-modal-in 180ms var(--ease-out); }
.cmdk-search { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-block-end: 1px solid var(--color-border); }
.cmdk-search input { flex: 1; border: none; background: transparent; color: var(--color-text-primary); font-size: var(--text-md); font-family: var(--font-sans); outline: none; }
.cmdk-list { max-height: 340px; overflow-y: auto; padding: 8px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: none; background: transparent; border-radius: var(--radius-sm); text-align: start; cursor: pointer; color: var(--color-text-primary); font-size: var(--text-sm); text-decoration: none; }
.cmdk-item:hover, .cmdk-item.active { background: var(--color-surface-2); }
.cmdk-item .dot { width: 8px; height: 8px; border-radius: 99px; background: var(--color-border-strong); flex-shrink: 0; }
.cmdk-item .hint { margin-inline-start: auto; font-size: 11px; color: var(--color-text-tertiary); font-family: var(--font-mono); }

/* Theme toggle as an icon button (Aurora): swap sun/moon by theme */
.theme-ico .ico-sun { display: none; }
[data-theme="light"] .theme-ico .ico-moon { display: none; }
[data-theme="light"] .theme-ico .ico-sun { display: block; }

/* Topbar notifications bell dot */
.topbar-bell { position: relative; }
.topbar-bell .bell-dot {
  position: absolute; top: 6px; inset-inline-end: 7px; width: 7px; height: 7px;
  border-radius: 99px; background: var(--color-danger); border: 2px solid var(--color-surface-2);
}

/* ─── 27. PAGE CONTENT HEADER (breadcrumb + title + actions) ─ */
.au-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.au-page-header .ph-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.au-page-header h1 { font-size: var(--text-xl); font-weight: var(--fw-semibold); letter-spacing: -0.02em; margin: 0; }
.au-page-header .ph-sub { color: var(--color-text-secondary); font-size: var(--text-sm); }
.au-page-header .ph-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.au-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--color-text-tertiary); flex-wrap: wrap; }
.au-breadcrumb a { color: var(--color-text-tertiary); text-decoration: none; }
.au-breadcrumb a:hover { color: var(--color-text-secondary); }
.au-breadcrumb .cur { color: var(--color-text-primary); font-weight: var(--fw-medium); }
.au-breadcrumb .sep { color: var(--color-border-strong); }

/* ─── 28. DATE RANGE FIELD (Aurora) ────────────────── */
.date-range {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 6px 4px 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.date-range:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-focus-ring); }
.date-range .rng-ico { display: inline-flex; width: 16px; height: 16px; color: var(--color-text-tertiary); flex-shrink: 0; }
.date-range .rng-label { font-size: var(--text-sm); color: var(--color-text-secondary); font-weight: var(--fw-medium); white-space: nowrap; }
.date-range .rng-sep { color: var(--color-text-tertiary); }
.date-range input[type="date"] {
  height: calc(var(--control-h) - 8px);
  border: 1px solid transparent;
  background: transparent;
  padding: 0 4px;
  min-width: 0; width: 132px;
  border-radius: var(--radius-xs);
  font-variant-numeric: tabular-nums;
}
.date-range input[type="date"]:hover:not(:focus) { border-color: transparent; background: var(--color-surface-3); }
.date-range input[type="date"]:focus { border-color: var(--color-accent); background: var(--color-surface); box-shadow: none; }

/* ─── 29. RANGE DATE PICKER (Aurora calendar) ──────── */
.rangepicker { position: relative; display: inline-block; min-width: 264px; }
.rp-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: var(--control-h); padding: 0 12px;
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--color-text-primary);
  font-family: var(--font-sans); font-size: var(--text-sm);
  transition: border-color var(--dur-1) var(--ease-standard);
}
.rp-trigger:hover { border-color: var(--color-border-strong); }
.rangepicker.open .rp-trigger { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-focus-ring); }
.rp-trigger .rp-ico { display: inline-flex; width: 16px; height: 16px; color: var(--color-text-tertiary); flex-shrink: 0; }
.rp-trigger .rp-label { flex: 1; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-trigger .rp-chev { display: inline-flex; width: 16px; height: 16px; color: var(--color-text-tertiary); flex-shrink: 0; transition: transform var(--dur-2) var(--ease-standard); }
.rangepicker.open .rp-trigger .rp-chev { transform: rotate(90deg); }

.rp-pop {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: var(--z-overlay);
  width: 320px; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 14px;
  animation: om-pop-in 160ms var(--ease-out);
}
.rp-pop[hidden] { display: none; }
/* Single-date mode detaches .rp-pop to <body> (see aurora-rangepicker.js
   Picker.open) so it can float above a scrollable/clipping ancestor like a
   .modal — needs a z-index above --z-modal (500) for the same reason, or it
   would render invisibly behind the modal's own backdrop. Matches
   .aui-select-pop's z-index, the existing "float above a modal" precedent. */
.rp-pop.rp-pop--fixed { position: fixed; z-index: 10001; }
.rp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rp-title { font-size: var(--text-md); font-weight: var(--fw-semibold); letter-spacing: -0.01em; }
.rp-nav {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: none; background: transparent; color: var(--color-text-secondary);
  border-radius: var(--radius-sm); cursor: pointer;
}
.rp-nav:hover { background: var(--color-surface-2); color: var(--color-text-primary); }
.rp-nav svg { width: 16px; height: 16px; }
.rp-weekdays, .rp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.rp-weekdays { margin-bottom: 4px; }
.rp-weekdays span { text-align: center; font-size: 11px; font-weight: var(--fw-semibold); color: var(--color-text-tertiary); padding: 6px 0; }
.rp-grid { row-gap: 2px; }
.rp-day {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--color-text-primary);
  font-family: var(--font-sans); font-size: var(--text-sm); font-variant-numeric: tabular-nums;
  cursor: pointer; padding: 0;
}
.rp-day:hover:not(.muted):not(.range-start):not(.range-end):not(.in-range) { background: var(--color-surface-2); border-radius: var(--radius-sm); }
.rp-day.muted { color: var(--color-text-tertiary); opacity: 0.45; cursor: default; }
.rp-day.today { font-weight: var(--fw-bold); }
.rp-day.in-range { background: var(--color-accent-subtle); color: var(--color-accent-text); }
.rp-day.week-start.in-range, .rp-day.week-start.range-end { border-start-start-radius: var(--radius-sm); border-end-start-radius: var(--radius-sm); }
.rp-day.week-end.in-range, .rp-day.week-end.range-start { border-start-end-radius: var(--radius-sm); border-end-end-radius: var(--radius-sm); }
.rp-day.range-start, .rp-day.range-end {
  background: var(--color-accent); color: var(--color-accent-fg);
  font-weight: var(--fw-semibold); border-radius: var(--radius-sm);
}
.rp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding-top: 12px; border-block-start: 1px solid var(--color-border);
}
.rp-foot .rp-reset { background: transparent; border-color: transparent; }
.rp-foot .rp-reset:hover { background: var(--color-surface-2); border-color: transparent; }
