/* ==========================================================================
   Strands — design system
   Identity: three strands that start straight (order, receipts, lists) and flow
   into waves (hair, beauty, spa water). Rendered in 3D as glossy lacquer.
   Palette (logo): Kohl #1F1531 · Berry #A03359 · Pearl #F2F2EF · Stone #E6E6E1
   Type: Alexandria (display) + IBM Plex Sans Arabic (UI)
   Depth: layered surfaces, inner highlights, soft diffused shadows, 3D icon tiles.
   ========================================================================== */

:root {
  /* brand — kohl */
  --kohl-950: #120B1E;
  --kohl-900: #1F1531;
  --kohl-800: #2B1F44;
  --kohl-700: #3D2E5C;
  --kohl-600: #5A4A7E;
  --kohl-300: #ADA3C4;

  /* brand — berry (token names kept as --rose-* for module compatibility) */
  --rose-800: #6E1F3D;
  --rose-700: #87284B;
  --rose-600: #A03359;
  --rose-500: #B9446E;
  --rose-400: #D46A93;
  --rose-200: #F2C6D6;
  --rose-100: #F9E3EB;
  --rose-50: #FDF2F6;

  /* neutrals — pearl & stone */
  --ink: #1F1531;
  --ink-2: #3D3352;
  --muted: #6B647A;
  --subtle: #9A94A6;
  --line: #E4E2DD;
  --line-2: #D6D3CC;
  --paper: #F2F2EF;
  --paper-2: #E8E7E2;
  --surface: #FFFFFF;
  --surface-2: #FAFAF8;

  /* supporting hues */
  --saffron-700: #8A560F;
  --saffron-600: #B5761B;
  --saffron-500: #D9982B;
  --saffron-300: #F3CD82;
  --saffron-100: #FBF0D8;
  --teal-700: #0E5B4D;
  --teal-600: #167A67;
  --teal-100: #DCF1EA;
  --violet-600: #6A4FC4;
  --violet-100: #ECE7FA;
  --blue-600: #2F5BB0;
  --blue-100: #E2EAFA;
  --red-700: #9C2A24;
  --red-600: #C2362F;
  --red-100: #FBE3E1;
  --amber-600: #B26A00;
  --amber-100: #FDF0D9;
  --wa: #1FAF5A;
  --wa-dark: #128C4B;

  --primary: var(--rose-600);
  --primary-hover: var(--rose-700);
  --primary-soft: var(--rose-100);
  --focus: 0 0 0 3px rgba(160, 51, 89, .22);

  --font-ui: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;

  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --r-pill: 999px;

  /* depth */
  --hl: inset 0 1px 0 rgba(255, 255, 255, .75);
  --hl-dark: inset 0 1px 0 rgba(255, 255, 255, .09);
  --sh-1: 0 1px 2px rgba(31, 21, 49, .05), 0 2px 6px -2px rgba(31, 21, 49, .05);
  --sh-2: 0 2px 4px rgba(31, 21, 49, .04), 0 14px 32px -14px rgba(31, 21, 49, .16);
  --sh-raise: var(--sh-2);
  --sh-pop: 0 28px 64px -22px rgba(31, 21, 49, .38), 0 6px 16px rgba(31, 21, 49, .08);
  --sh-berry: 0 10px 22px -10px rgba(160, 51, 89, .6);
  --sh-kohl: 0 10px 22px -10px rgba(31, 21, 49, .55);

  --sidebar-w: 276px;
  --topbar-h: 68px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);

  /* signature: the strand wave (logo tail) as a repeating line */
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='12' viewBox='0 0 48 12'%3E%3Cpath d='M0 6 C8 6 10 2 16 2 S24 10 32 10 S40 6 48 6' fill='none' stroke='%23A03359' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --wave-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='12' viewBox='0 0 48 12'%3E%3Cpath d='M0 6 C8 6 10 2 16 2 S24 10 32 10 S40 6 48 6' fill='none' stroke='%23F2F2EF' stroke-opacity='.35' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --kohl-gradient: radial-gradient(130% 90% at 100% 0%, #3A2652 0%, #1F1531 52%, #160E25 100%);
  --berry-gradient: linear-gradient(160deg, #C0507A 0%, #A03359 48%, #87284B 100%);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 92% -8%, rgba(160, 51, 89, .07), transparent 70%),
    radial-gradient(800px 380px at -5% 0%, rgba(106, 79, 196, .06), transparent 70%),
    var(--paper);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern";
}
img, svg { max-width: 100%; }
a { color: var(--rose-700); text-decoration: none; }
a:hover { color: var(--rose-800); }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; color: var(--ink); font-weight: 600; }
p { margin: 0 0 .75em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
button { font-family: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
::selection { background: var(--rose-200); }
[x-cloak] { display: none !important; }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; stroke-width: 1.5; }
.icon-fill { fill: currentColor; }

.num, .tabular { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: 13.5px; }
.xs { font-size: 12px; }
.strong { font-weight: 600; }
.bold { font-weight: 600; }
.display { font-family: var(--font-display); }
.text-center { text-align: center; }
.text-end { text-align: end; }
.text-start { text-align: start; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.text-rose { color: var(--rose-600); }
.text-teal { color: var(--teal-600); }
.text-red { color: var(--red-600); }
.text-saffron { color: var(--saffron-600); }

/* layout helpers */
.row { display: flex; align-items: center; gap: 12px; }
.row-top { display: flex; align-items: flex-start; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.ms-auto { margin-inline-start: auto; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; }
.grid-main-wide { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
@media (max-width: 1100px) {
  .grid-main, .grid-main-wide { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .hide-mobile { display: none !important; }
}
@media (min-width: 721px) { .show-mobile { display: none !important; } }

/* ------------------------------------------------------------------ signature wave */
.sadu { height: 12px; background: var(--wave) repeat-x center; background-size: 48px 12px; opacity: .9; }
.sadu-thin { height: 8px; background: var(--wave) repeat-x center; background-size: 32px 8px; opacity: .8; }
.wave-line { display: block; width: 64px; height: 12px; background: var(--wave) no-repeat center / 64px 16px; }

/* live 3D object: the static render cross-fades away once WebGL has drawn */
[data-strands3d] > img[data-fallback] { transition: opacity .3s var(--ease); }
.strands3d-ready > img[data-fallback] { opacity: 0; }

/* 3D icon tile: glossy rounded square with a lit top edge */
.tile3d {
  --tile-a: #C0507A; --tile-b: #87284B; --tile-glow: rgba(160, 51, 89, .55);
  width: 44px; height: 44px; flex: none; border-radius: 14px;
  display: inline-grid; place-items: center; color: #fff;
  background: linear-gradient(155deg, var(--tile-a) 0%, var(--tile-b) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 6px rgba(0, 0, 0, .18), 0 10px 18px -10px var(--tile-glow);
  position: relative; isolation: isolate;
}
.tile3d::before { content: ""; position: absolute; inset: 1px 1px 50% 1px; border-radius: 13px 13px 22px 22px / 13px 13px 10px 10px; background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0)); z-index: -1; }
.tile3d .icon { width: 22px; height: 22px; stroke-width: 1.9; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.tile3d.sm { width: 34px; height: 34px; border-radius: 11px; }
.tile3d.sm .icon { width: 18px; height: 18px; }
.tile3d.lg { width: 60px; height: 60px; border-radius: 19px; }
.tile3d.lg .icon { width: 28px; height: 28px; }
.tile3d.kohl { --tile-a: #4A3A6C; --tile-b: #1F1531; --tile-glow: rgba(31, 21, 49, .55); }
.tile3d.teal { --tile-a: #2BA387; --tile-b: #0E5B4D; --tile-glow: rgba(22, 122, 103, .5); }
.tile3d.saffron { --tile-a: #F0B54D; --tile-b: #B5761B; --tile-glow: rgba(181, 118, 27, .5); }
.tile3d.violet { --tile-a: #8F75E8; --tile-b: #5338AD; --tile-glow: rgba(106, 79, 196, .5); }
.tile3d.blue { --tile-a: #5B86DB; --tile-b: #24478E; --tile-glow: rgba(47, 91, 176, .5); }
.tile3d.pearl { --tile-a: #FFFFFF; --tile-b: #E6E6E1; --tile-glow: rgba(31, 21, 49, .25); color: var(--kohl-900); }

/* ------------------------------------------------------------------ app shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 12px; height: calc(100vh - 24px); margin: 12px; margin-inline-end: 0;
  overflow: hidden; border-radius: 26px;
  background: var(--grain), var(--kohl-gradient);
  color: #D9D2E6; display: flex; flex-direction: column;
  box-shadow: var(--hl-dark), 0 24px 48px -24px rgba(18, 11, 30, .55);
  isolation: isolate;
}
.sidebar::after {
  content: ""; position: absolute; z-index: -1; inset-inline: -30px -70px; bottom: -70px; height: 230px;
  background: url("/static/img/brand/strands-wave-dark.webp") no-repeat center / contain;
  opacity: .32; pointer-events: none; transform: rotate(-10deg);
  -webkit-mask-image: linear-gradient(to top, #000 45%, transparent 100%); mask-image: linear-gradient(to top, #000 45%, transparent 100%);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 14px; color: #fff; }
.sidebar-brand img, .brand-mark { width: 42px; height: 42px; border-radius: 13px; flex: none; object-fit: cover; background: var(--kohl-800); box-shadow: var(--hl-dark), 0 6px 14px -6px rgba(0, 0, 0, .5); }
.sidebar-brand .name { font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.3; color: #fff; }
.sidebar-brand .sub { font-size: 12px; color: var(--kohl-300); }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .12) transparent; }
.nav-label { font-size: 12px; color: #8F86A6; padding: 16px 12px 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 14px; color: #D3CBE1; font-size: 14.5px; font-weight: 500;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-item .icon { width: 34px; height: 34px; padding: 7px; border-radius: 11px; color: #B9AFCD; transition: background .15s var(--ease), color .15s var(--ease); }
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item:hover .icon { color: #fff; }
.nav-item.active { background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .06)); color: #fff; box-shadow: var(--hl-dark), 0 8px 18px -12px rgba(0, 0, 0, .6); }
.nav-item.active .icon { color: #fff; background: var(--berry-gradient); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 16px -8px rgba(192, 80, 122, .8); }
.nav-item .count { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rose-500); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; box-shadow: 0 4px 10px -4px rgba(192, 80, 122, .8); }
.nav-item .lock { margin-inline-start: auto; color: var(--saffron-300); }
.nav-item .lock .icon { width: 16px; height: 16px; padding: 0; background: none; color: var(--saffron-300); box-shadow: none; }
.sidebar-foot { padding: 12px 14px 16px; }
.plan-card { border-radius: 18px; padding: 14px; background: rgba(255, 255, 255, .07); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #E6E0EF; font-size: 13px; box-shadow: var(--hl-dark); border: 1px solid rgba(255, 255, 255, .06); }
.plan-card .plan-name { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.plan-card .bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); margin: 10px 0 8px; overflow: hidden; }
.plan-card .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--rose-400), var(--saffron-500)); border-radius: 3px; }
.plan-card a { color: #FFD4E3; font-weight: 600; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: rgba(242, 242, 239, .78);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.topbar .search { position: relative; flex: 0 1 440px; }
.topbar .search .icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--subtle); width: 18px; height: 18px; }
.topbar .search input { width: 100%; height: 44px; border-radius: var(--r-pill); border: 1px solid transparent; background: var(--surface); box-shadow: var(--sh-1); padding: 0 16px; padding-inline-start: 42px; font: inherit; font-size: 14px; color: var(--ink); transition: box-shadow .15s var(--ease), border-color .15s var(--ease); }
.topbar .search input:focus { outline: none; border-color: var(--rose-400); box-shadow: var(--focus), var(--sh-1); }
.topbar .search kbd { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); font-family: inherit; font-size: 12px; color: var(--subtle); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; background: var(--surface-2); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: var(--r-pill); border: 1px solid transparent; background: transparent; color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; transition: background .15s var(--ease), box-shadow .15s var(--ease); }
.icon-btn:hover { background: var(--surface); box-shadow: var(--sh-1); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 9px; inset-inline-end: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--rose-500); border: 2px solid var(--paper); }
.wa-status { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; white-space: nowrap; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; background: var(--surface); box-shadow: var(--sh-1); color: var(--muted); }
.wa-status .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); }
.wa-status.on { color: var(--wa-dark); }
.wa-status.on .pulse { background: var(--wa); box-shadow: 0 0 0 4px rgba(31, 175, 90, .16); }
.wa-status.off { color: var(--red-700); }
.wa-status.off .pulse { background: var(--red-600); box-shadow: 0 0 0 4px rgba(194, 54, 47, .14); }

.content { padding: 12px 28px 56px; width: 100%; max-width: 1480px; }
.content-narrow { max-width: 920px; }

.banner { display: flex; align-items: center; gap: 12px; margin: 12px 28px 0; padding: 11px 16px; font-size: 14px; border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.banner .icon { width: 18px; height: 18px; }
.banner-info { background: var(--blue-100); color: #1D3F80; }
.banner-warning { background: var(--saffron-100); color: var(--saffron-700); }
.banner-success { background: var(--teal-100); color: var(--teal-700); }
.banner-trial { background: var(--kohl-gradient); color: #E6E0EF; }
.banner-trial a { color: #FFD4E3; font-weight: 600; }
.banner-impersonate { background: linear-gradient(90deg, var(--saffron-300), var(--saffron-500)); color: var(--kohl-950); font-weight: 600; }
.banner-impersonate a, .banner-impersonate button { color: var(--kohl-950); }

/* mobile shell */
.mobile-nav { display: none; }
.sidebar-overlay { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 60; top: 8px; bottom: 8px; height: auto; margin: 0; inset-inline-start: 8px; width: min(86vw, 300px); transform: translateX(110%); transition: transform .3s var(--ease); }
  .sidebar.open { transform: none; box-shadow: var(--sh-pop); }
  .sidebar-overlay.open { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(18, 11, 30, .4); backdrop-filter: blur(3px); }
  .topbar { padding: 0 14px; }
  .topbar .search { display: none; }
  .content { padding: 10px 16px 104px; }
  .banner { margin: 10px 16px 0; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .86); backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
    border-radius: 24px; padding: 6px; box-shadow: var(--sh-pop), var(--hl); border: 1px solid rgba(255, 255, 255, .6);
  }
  .mobile-nav a, .mobile-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); padding: 4px 0; background: none; border: 0; font-family: inherit; cursor: pointer; }
  .mobile-nav .active { color: var(--rose-600); }
  .mobile-nav .fab { width: 50px; height: 50px; margin-top: -22px; border-radius: 17px; background: var(--berry-gradient); color: #fff; display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 14px 24px -10px rgba(160, 51, 89, .75); }
  .mobile-nav .fab .icon { width: 24px; height: 24px; }
}
@media (min-width: 961px) { .menu-toggle { display: none !important; } }

/* ------------------------------------------------------------------ page head & tabs */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 22px; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; color: var(--kohl-900); }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--rose-700); }
.breadcrumb .icon { width: 14px; height: 14px; }

.tabs { display: flex; gap: 4px; padding: 5px; margin-bottom: 20px; background: rgba(31, 21, 49, .05); border-radius: var(--r-pill); width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 1px 2px rgba(31, 21, 49, .06); }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; border: 0; background: none; cursor: pointer; font-family: inherit; transition: color .15s var(--ease), background .15s var(--ease); }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--kohl-900); font-weight: 600; background: var(--surface); box-shadow: var(--sh-1), var(--hl); }
.tab .count { font-size: 12px; font-weight: 600; color: var(--rose-700); background: var(--rose-100); border-radius: 10px; padding: 0 7px; }
.segmented { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: rgba(31, 21, 49, .05); gap: 2px; box-shadow: inset 0 1px 2px rgba(31, 21, 49, .06); }
.segmented a, .segmented button { padding: 6px 14px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 500; color: var(--muted); border: 0; background: none; cursor: pointer; font-family: inherit; }
.segmented .active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--sh-1), var(--hl); }

/* ------------------------------------------------------------------ panels */
.panel { background: var(--surface); border: 1px solid rgba(31, 21, 49, .06); border-radius: var(--r-xl); box-shadow: var(--sh-1), var(--hl); }
.panel + .panel { margin-top: 16px; }
:is(.stack, .stack-sm, .stack-lg, .grid, .grid-2, .grid-3, .grid-4, .grid-main, .grid-main-wide) > .panel + .panel { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head.plain { border-bottom: 0; padding-bottom: 4px; }
.panel-title { font-size: 15.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.panel-title .icon { width: 30px; height: 30px; padding: 6px; border-radius: 10px; color: var(--rose-600); background: var(--rose-50); box-shadow: inset 0 0 0 1px rgba(160, 51, 89, .1); }
.panel-sub { font-size: 13px; color: var(--muted); }
.panel-body { padding: 20px; }
.panel-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.panel.flush .panel-body { padding: 0; }
.panel.tint { background: var(--surface-2); }
.panel.kohl { background: var(--grain), var(--kohl-gradient); border-color: transparent; color: #E6E0EF; box-shadow: var(--hl-dark), 0 22px 44px -24px rgba(18, 11, 30, .6); }
.panel.kohl .panel-title { color: #fff; }
.panel.kohl .panel-title .icon { color: #fff; background: rgba(255, 255, 255, .1); box-shadow: none; }
.section-title { font-size: 15px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }

/* metrics: bento of raised cards, each with a 3D icon tile */
.metrics { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 14px; }
.metric {
  padding: 18px 18px 16px; position: relative; min-width: 0; overflow: hidden;
  background: var(--surface); border: 1px solid rgba(31, 21, 49, .06); border-radius: var(--r-xl);
  box-shadow: var(--sh-1), var(--hl);
}
.metric-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; font-weight: 500; }
.metric-label .icon {
  width: 36px; height: 36px; padding: 8px; border-radius: 12px; color: #fff; stroke-width: 1.9;
  background: linear-gradient(155deg, #C0507A, #87284B);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 16px -8px rgba(160, 51, 89, .6);
}
.metric:nth-child(4n+2) .metric-label .icon { background: linear-gradient(155deg, #4A3A6C, #1F1531); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 16px -8px rgba(31, 21, 49, .55); }
.metric:nth-child(4n+3) .metric-label .icon { background: linear-gradient(155deg, #2BA387, #0E5B4D); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 16px -8px rgba(22, 122, 103, .55); }
.metric:nth-child(4n+4) .metric-label .icon { background: linear-gradient(155deg, #F0B54D, #B5761B); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 16px -8px rgba(181, 118, 27, .55); }
.metric-value { font-family: var(--font-display); font-size: 27px; font-weight: 600; color: var(--kohl-900); line-height: 1.2; margin-top: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.metric-value small { font-size: 14px; font-weight: 500; color: var(--muted); font-family: var(--font-ui); }
.metric-meta { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 12px; padding: 1px 7px; border-radius: var(--r-pill); }
.delta.up { color: var(--teal-700); background: var(--teal-100); }
.delta.down { color: var(--red-700); background: var(--red-100); }
.delta .icon { width: 13px; height: 13px; padding: 0; background: none; box-shadow: none; color: currentColor; }
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
/* metrics nested inside a panel: flat inner tiles instead of floating cards */
.panel .metrics { padding: 14px; gap: 10px; }
.panel .metric { background: var(--surface-2); box-shadow: none; border-color: rgba(31, 21, 49, .05); border-radius: var(--r-lg); padding: 14px 16px; }
.panel .metric-value { margin-top: 6px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: var(--r-pill);
  border: 1px solid rgba(31, 21, 49, .1); background: var(--surface); color: var(--ink);
  font: 500 14.5px/1 var(--font-ui); cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: var(--sh-1), var(--hl);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--surface-2); color: var(--ink); border-color: rgba(31, 21, 49, .16); box-shadow: var(--sh-2), var(--hl); }
.btn:active { transform: translateY(1px); box-shadow: var(--sh-1); }
.btn .icon { width: 18px; height: 18px; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--berry-gradient); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .12), var(--sh-berry); }
.btn-primary:hover { background: linear-gradient(160deg, #CA5C85 0%, #A9375F 48%, #8D2A4F 100%); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 14px 26px -12px rgba(160, 51, 89, .75); }
.btn-dark { background: linear-gradient(160deg, #3D2E5C 0%, #1F1531 100%); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), var(--sh-kohl); }
.btn-dark:hover { background: linear-gradient(160deg, #4A3A6C 0%, #2B1F44 100%); color: #fff; border-color: transparent; }
.btn-glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #fff; box-shadow: var(--hl-dark); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .24); box-shadow: var(--hl-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none; }
.btn-ghost:hover { background: rgba(31, 21, 49, .05); border-color: transparent; box-shadow: none; }
.btn-soft { background: var(--rose-50); border-color: rgba(160, 51, 89, .12); color: var(--rose-700); box-shadow: none; }
.btn-soft:hover { background: var(--rose-100); color: var(--rose-800); border-color: rgba(160, 51, 89, .2); box-shadow: none; }
.btn-danger { background: linear-gradient(160deg, #D24A42, #A92C26); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 20px -10px rgba(194, 54, 47, .6); }
.btn-danger:hover { background: linear-gradient(160deg, #C2362F, #8E241F); color: #fff; border-color: transparent; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--red-600); box-shadow: none; }
.btn-danger-ghost:hover { background: var(--red-100); color: var(--red-700); box-shadow: none; }
.btn-success { background: linear-gradient(160deg, #23977E, #0E5B4D); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 20px -10px rgba(22, 122, 103, .6); }
.btn-success:hover { color: #fff; filter: brightness(1.05); }
.btn-wa { background: linear-gradient(160deg, #2BC46B, #128C4B); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 20px -10px rgba(31, 175, 90, .6); }
.btn-wa:hover { color: #fff; filter: brightness(1.05); }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-xs { --h: 30px; padding: 0 11px; font-size: 12.5px; gap: 5px; }
.btn-xs .icon { width: 15px; height: 15px; }
.btn-lg { --h: 50px; padding: 0 24px; font-size: 15.5px; }
.btn-xl { --h: 58px; padding: 0 30px; font-size: 16.5px; }
.btn-icon { width: var(--h); padding: 0; }
.btn-block { width: 100%; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255, 255, 255, .9) rgba(255, 255, 255, .9) transparent transparent; animation: spin .7s linear infinite; }
.btn:not(.btn-primary):not(.btn-dark):not(.btn-danger):not(.btn-success):not(.btn-wa).is-loading::after { border-color: var(--rose-600) var(--rose-600) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; box-shadow: var(--sh-1); border-radius: var(--r-pill); }
.btn-group .btn { border-radius: 0; box-shadow: none; }
.btn-group .btn:first-child { border-start-start-radius: var(--r-pill); border-end-start-radius: var(--r-pill); }
.btn-group .btn:last-child { border-start-end-radius: var(--r-pill); border-end-end-radius: var(--r-pill); }
.btn-group .btn + .btn { margin-inline-start: -1px; }
/* keyboard focus must stay visible over the depth shadows */
.btn:focus-visible, .chip:has(input:focus-visible), .icon-btn:focus-visible, .tab:focus-visible, .nav-item:focus-visible, .quick-action:focus-visible { outline: none; box-shadow: var(--focus), var(--sh-1); }
.link-btn { background: none; border: 0; padding: 0; color: var(--rose-700); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { color: var(--rose-800); text-decoration: underline; }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field + .field { margin-top: 16px; }
.form-grid > .field + .field { margin-top: 0; }
.label { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.label .req { color: var(--rose-600); }
.label .opt { font-weight: 400; color: var(--subtle); font-size: 12.5px; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.error-text { font-size: 12.5px; color: var(--red-600); }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 400 14.5px/1.4 var(--font-ui);
  box-shadow: inset 0 1px 2px rgba(31, 21, 49, .05);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.textarea { height: auto; min-height: 100px; padding: 11px 14px; line-height: 1.7; resize: vertical; }
.select { appearance: none; padding-inline-end: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B647A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 13px center; }
.select[multiple] { height: auto; min-height: 110px; padding: 6px; background-image: none; }
.input::placeholder, .textarea::placeholder { color: #A9A3B4; }
.input:hover, .select:hover, .textarea:hover { border-color: #C7C2CF; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--rose-400); box-shadow: var(--focus), inset 0 1px 2px rgba(31, 21, 49, .04); }
.input[readonly] { background: var(--surface-2); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--paper); color: var(--muted); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--red-600); }
.input-sm { height: 36px; font-size: 13.5px; }
.input-lg { height: 52px; font-size: 16px; border-radius: 14px; }
input[type="date"].input, input[type="time"].input, input[type="datetime-local"].input { direction: rtl; }
input[type="color"].input { padding: 4px; width: 56px; cursor: pointer; }
.input-group { display: flex; align-items: stretch; border-radius: var(--r-md); box-shadow: inset 0 1px 2px rgba(31, 21, 49, .05); }
.input-group .input { border-radius: 0; flex: 1; min-width: 0; box-shadow: none; }
.input-group .input:first-child { border-start-start-radius: var(--r-md); border-end-start-radius: var(--r-md); }
.input-group .input:last-child { border-start-end-radius: var(--r-md); border-end-end-radius: var(--r-md); }
.input-group .addon { display: flex; align-items: center; padding: 0 13px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.input-group .addon:first-child { border-start-start-radius: var(--r-md); border-end-start-radius: var(--r-md); border-inline-end: 0; }
.input-group .addon:last-child { border-start-end-radius: var(--r-md); border-end-end-radius: var(--r-md); border-inline-start: 0; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--subtle); width: 18px; height: 18px; pointer-events: none; }
.input-icon .input { padding-inline-start: 40px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); } }
.form-section { padding: 22px; }
.form-section + .form-section { border-top: 1px solid var(--line); }
.form-section-title { font-size: 15.5px; font-weight: 600; margin-bottom: 4px; }
.form-section-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.form-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-end-start-radius: var(--r-xl); border-end-end-radius: var(--r-xl); }
@media (max-width: 720px) {
  .form-actions.sticky { position: sticky; bottom: 84px; z-index: 5; box-shadow: 0 -10px 24px -16px rgba(31, 21, 49, .3); border-radius: 18px; }
  .form-actions .btn { flex: 1; }
}

.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; line-height: 1.5; }
.check input { appearance: none; width: 21px; height: 21px; margin: 1px 0 0; flex: none; border: 1.5px solid #C5BFCF; border-radius: 7px; background: var(--surface); cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s; box-shadow: inset 0 1px 2px rgba(31, 21, 49, .06); }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--berry-gradient); border-color: var(--rose-600); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 10px -4px rgba(160, 51, 89, .6); }
.check input[type="checkbox"]:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); } /* physical sides: a tick is not mirrored in RTL */
.check input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.check input:focus-visible { box-shadow: var(--focus); }
.check .check-sub { display: block; font-size: 12.5px; color: var(--muted); }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14.5px; }
.switch input { appearance: none; position: relative; width: 46px; height: 27px; flex: none; border-radius: 14px; background: #D9D5DF; cursor: pointer; transition: background .2s var(--ease); margin: 0; box-shadow: inset 0 1px 3px rgba(31, 21, 49, .15); }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 21px; height: 21px; border-radius: 50%; background: linear-gradient(180deg, #fff, #F2F2EF); box-shadow: 0 2px 5px rgba(31, 21, 49, .25), inset 0 -1px 0 rgba(31, 21, 49, .06); transition: inset-inline-start .2s var(--ease); }
.switch input:checked { background: linear-gradient(160deg, #23977E, #167A67); }
.switch input:checked::after { inset-inline-start: 22px; }
.switch input:focus-visible { box-shadow: var(--focus); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.setting-row + .setting-row { border-top: 1px solid var(--line); }
.setting-row .title { font-weight: 600; font-size: 14.5px; }
.setting-row .desc { font-size: 13px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 15px; border-radius: var(--r-pill); border: 1px solid rgba(31, 21, 49, .1); background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; user-select: none; box-shadow: var(--sh-1); transition: all .15s var(--ease); }
.chip:hover { border-color: rgba(31, 21, 49, .2); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip.active, .chip:has(input:checked) { background: linear-gradient(160deg, #3D2E5C, #1F1531); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), var(--sh-kohl); }
.chip .icon { width: 16px; height: 16px; }

.color-dots { display: flex; gap: 10px; flex-wrap: wrap; }
.color-dot { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2), inset 0 2px 4px rgba(255, 255, 255, .35); }
.color-dot { position: relative; }
.color-dot input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.color-dot:has(input:focus-visible) { box-shadow: var(--focus); }
.color-dot:has(input:checked) { box-shadow: 0 0 0 2px var(--kohl-900); }

.dropzone { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface-2); }
.dropzone img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--paper-2); }

/* ------------------------------------------------------------------ tables */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 12px 16px; background: transparent; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid #EFEDE9; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #FBFAF8; }
.table tr.clickable { cursor: pointer; }
.table .actions { text-align: end; white-space: nowrap; }
.table .num, .table td.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line); }
.table-compact td { padding: 10px 14px; }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 12.5px; color: var(--muted); }
a.cell-title:hover { color: var(--rose-700); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid #EFEDE9; }
.list-item:last-child { border-bottom: 0; }
a.list-item { color: inherit; transition: background .12s; }
a.list-item:hover { background: #FBFAF8; }
.list-item .meta { margin-inline-start: auto; text-align: end; }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }

/* ------------------------------------------------------------------ badges / status */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--paper-2); color: var(--ink-2); }
.badge .icon { width: 13px; height: 13px; }
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.b-rose { background: var(--rose-100); color: var(--rose-800); }
.b-violet { background: var(--violet-100); color: #4B2FA0; }
.b-teal { background: var(--teal-100); color: var(--teal-700); }
.b-saffron { background: var(--saffron-100); color: var(--saffron-700); }
.b-blue { background: var(--blue-100); color: #1D3F80; }
.b-red { background: var(--red-100); color: var(--red-700); }
.b-gray { background: var(--paper-2); color: var(--muted); }
.b-kohl { background: linear-gradient(160deg, #3D2E5C, #1F1531); color: #fff; }
.b-outline { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }

.st-pending { background: var(--saffron-100); color: var(--saffron-700); }
.st-confirmed { background: var(--blue-100); color: #1D3F80; }
.st-arrived { background: var(--violet-100); color: #4B2FA0; }
.st-in_progress { background: var(--rose-100); color: var(--rose-800); }
.st-completed { background: var(--teal-100); color: var(--teal-700); }
.st-cancelled { background: var(--paper-2); color: var(--muted); text-decoration: line-through; }
.st-no_show { background: var(--red-100); color: var(--red-700); }
.st-paid { background: var(--teal-100); color: var(--teal-700); }
.st-partial { background: var(--saffron-100); color: var(--saffron-700); }
.st-unpaid { background: var(--red-100); color: var(--red-700); }
.st-refunded, .st-partially_refunded, .st-void { background: var(--paper-2); color: var(--muted); }

.stars { display: inline-flex; gap: 1px; color: var(--saffron-500); }
.stars .icon { width: 16px; height: 16px; fill: currentColor; stroke-width: 1.5; }
.stars .icon.off { fill: none; color: #D9D4DF; }

/* ------------------------------------------------------------------ avatars */
.avatar { --size: 38px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-weight: 600; font-size: max(12px, calc(var(--size) * .38)); color: #fff; background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--c, #3D2E5C) 70%, #fff) 0%, var(--c, #3D2E5C) 55%); overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 10px -4px rgba(31, 21, 49, .4); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { --size: 24px; }
.avatar-sm { --size: 32px; }
.avatar-lg { --size: 58px; }
.avatar-xl { --size: 88px; }
.avatar.soft { background: var(--rose-100); color: var(--rose-800); box-shadow: none; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid var(--surface); }
.avatar-stack .avatar + .avatar { margin-inline-start: -10px; }
.person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person .name { font-weight: 600; color: var(--ink); line-height: 1.35; }
.person .sub { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------ empty & callouts */
.empty { text-align: center; padding: 52px 24px; }
.empty-art {
  width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 24px; display: grid; place-items: center; position: relative; color: #fff;
  background: linear-gradient(155deg, #C0507A, #87284B);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -3px 8px rgba(0, 0, 0, .18), 0 18px 30px -14px rgba(160, 51, 89, .65);
  transform: rotate(-6deg);
}
.empty-art::before { content: ""; position: absolute; inset: 2px 2px 52% 2px; border-radius: 22px 22px 30px 30px / 22px 22px 14px 14px; background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0)); }
.empty-art::after { content: ""; position: absolute; inset-inline: 6px; bottom: -20px; height: 12px; background: var(--wave) repeat-x center / 32px 8px; opacity: .45; transform: rotate(6deg); }
.empty-art .icon { width: 32px; height: 32px; stroke-width: 1.8; transform: rotate(6deg); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.empty-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); }
.empty-text { color: var(--muted); max-width: 440px; margin: 8px auto 20px; font-size: 14px; }
.empty-sm { padding: 30px 16px; }
.empty-sm .empty-art { width: 56px; height: 56px; border-radius: 18px; margin-bottom: 16px; }
.empty-sm .empty-art .icon { width: 24px; height: 24px; }

.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); font-size: 14px; background: var(--blue-100); color: #1D3F80; box-shadow: inset 0 0 0 1px rgba(47, 91, 176, .1); }
.callout .icon { margin-top: 2px; }
.callout-title { font-weight: 600; }
.callout-warning { background: var(--saffron-100); color: var(--saffron-700); box-shadow: inset 0 0 0 1px rgba(181, 118, 27, .12); }
.callout-danger { background: var(--red-100); color: var(--red-700); box-shadow: inset 0 0 0 1px rgba(194, 54, 47, .12); }
.callout-success { background: var(--teal-100); color: var(--teal-700); box-shadow: inset 0 0 0 1px rgba(22, 122, 103, .12); }
.callout-rose { background: var(--rose-50); color: var(--rose-800); box-shadow: inset 0 0 0 1px rgba(160, 51, 89, .1); }
.callout-neutral { background: var(--paper-2); color: var(--ink-2); box-shadow: none; }

/* ------------------------------------------------------------------ overlays */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(18, 11, 30, .42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 26px; box-shadow: var(--sh-pop), var(--hl); overflow: hidden; }
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 980px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.modal-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 24px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.drawer-overlay { justify-content: flex-end; padding: 10px; }
.drawer { width: min(480px, 100vw); height: 100%; background: var(--surface); box-shadow: var(--sh-pop); display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; }
.drawer-wide { width: min(640px, 100vw); }
.drawer .modal-body { flex: 1; }
@media (max-width: 720px) {
  .overlay:not(.drawer-overlay) { align-items: flex-end; padding: 0; }
  .overlay:not(.drawer-overlay) .modal { max-width: none; border-end-start-radius: 0; border-end-end-radius: 0; max-height: 92vh; }
  .drawer-overlay { padding: 0; }
  .drawer { border-radius: 0; }
}
.fade-enter { transition: opacity .2s var(--ease); }
.pop-enter { transition: opacity .2s var(--ease), transform .2s var(--ease); }
.pop-from { opacity: 0; transform: translateY(8px) scale(.98); }
.slide-from { opacity: 0; transform: translateX(-24px); }

.dropdown { position: relative; display: inline-block; }
.menu { position: absolute; z-index: 50; top: calc(100% + 8px); inset-inline-end: 0; min-width: 220px; padding: 6px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(31, 21, 49, .08); border-radius: 18px; box-shadow: var(--sh-pop); }
.menu.start { inset-inline-end: auto; inset-inline-start: 0; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; font-size: 14px; color: var(--ink); background: none; border: 0; cursor: pointer; text-align: start; font-family: inherit; }
.menu-item:hover { background: var(--paper); color: var(--ink); }
.menu-item .icon { width: 18px; height: 18px; color: var(--muted); }
.menu-item.danger { color: var(--red-600); }
.menu-item.danger .icon { color: var(--red-600); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-head { padding: 8px 10px 6px; font-size: 12.5px; color: var(--muted); }

.toasts { position: fixed; z-index: 100; top: 80px; inset-inline-end: 24px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 270px; max-width: 420px; padding: 12px 14px; border-radius: 18px; background: rgba(31, 21, 49, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; font-size: 14px; box-shadow: var(--sh-pop), var(--hl-dark); animation: toast-in .2s var(--ease); }
.toast .icon { width: 20px; height: 20px; flex: none; }
.toast-success .icon { color: #6FE0BE; }
.toast-error { background: rgba(156, 42, 36, .95); }
.toast-warning .icon { color: var(--saffron-300); }
.toast-info .icon { color: #A9C4F5; }
.toast button { margin-inline-start: auto; background: none; border: 0; color: rgba(255, 255, 255, .7); cursor: pointer; padding: 0; display: grid; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 720px) { .toasts { top: 74px; bottom: auto; inset-inline: 16px; align-items: stretch; } .toast { max-width: none; } } /* top on phones: never cover bottom action bars */

/* ------------------------------------------------------------------ misc components */
.progress { height: 8px; border-radius: 4px; background: rgba(31, 21, 49, .07); overflow: hidden; box-shadow: inset 0 1px 2px rgba(31, 21, 49, .08); }
.progress > span { display: block; height: 100%; border-radius: 4px; background: var(--berry-gradient); transition: width .3s var(--ease); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.progress.teal > span { background: linear-gradient(90deg, #23977E, #167A67); }
.progress.saffron > span { background: linear-gradient(90deg, #F0B54D, #D9982B); }

.steps { display: flex; gap: 8px; }
.steps .step { flex: 1; height: 6px; border-radius: 3px; background: rgba(31, 21, 49, .08); }
.steps .step.done { background: var(--berry-gradient); }
.steps .step.current { background: var(--rose-400); }

.checklist { display: flex; flex-direction: column; }
.checklist-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-2); color: var(--ink); }
.checklist-item:last-child { border-bottom: 0; }
.checklist-item .tick { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; border: 1.5px solid var(--line-2); color: transparent; flex: none; background: var(--surface); }
.checklist-item.done .tick { background: linear-gradient(160deg, #23977E, #0E5B4D); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 12px -6px rgba(22, 122, 103, .6); }
.checklist-item.done .title { color: var(--muted); text-decoration: line-through; }
.checklist-item .tick .icon { width: 15px; height: 15px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.pagination .pages { display: flex; gap: 4px; }
.pagination a, .pagination span.cur { min-width: 36px; height: 36px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 12px; color: var(--ink-2); border: 1px solid transparent; }
.pagination a:hover { background: var(--paper); }
.pagination span.cur { background: linear-gradient(160deg, #3D2E5C, #1F1531); color: #fff; font-weight: 600; box-shadow: var(--sh-kohl); }

.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filters .input, .filters .select { height: 40px; font-size: 14px; }
.filters .input-icon { flex: 1 1 260px; max-width: 380px; }

.kbd { font-family: inherit; font-size: 12px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); box-shadow: 0 1px 0 var(--line-2); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--c, var(--rose-600)); flex: none; }
.swatch { width: 14px; height: 14px; border-radius: 5px; display: inline-block; background: var(--c, var(--rose-600)); flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.copy-field { display: flex; align-items: center; gap: 8px; padding: 6px; padding-inline-start: 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface-2); box-shadow: inset 0 1px 2px rgba(31, 21, 49, .05); }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: left; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--ink-2); }
.qr-box { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.qr-box svg { display: block; width: 100%; height: auto; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 16px; padding-inline-start: 22px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 1px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; inset-inline-start: -21px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--c, var(--rose-600)); box-shadow: 0 0 0 3px var(--surface); }

.lock-card { text-align: center; padding: 56px 24px; }
.lock-card .crown { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: linear-gradient(155deg, #F0B54D, #B5761B); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 18px 30px -14px rgba(181, 118, 27, .6); transform: rotate(-6deg); }
.lock-card .crown .icon { transform: rotate(6deg); }

.upgrade-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--saffron-700); background: var(--saffron-100); border-radius: var(--r-pill); padding: 1px 9px; }
.upgrade-pill .icon { width: 13px; height: 13px; }

.skeleton { background: linear-gradient(90deg, var(--paper-2) 0%, #F7F6F3 50%, var(--paper-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ hero card (3D art) */
.hero-card { position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; padding: 28px 30px; color: #EDE7F5; background: var(--grain), var(--kohl-gradient); box-shadow: var(--hl-dark), 0 30px 60px -32px rgba(18, 11, 30, .7); }
.hero-card .hero-art { position: absolute; z-index: -1; inset-block: -40px; inset-inline-end: -60px; width: min(58%, 560px); background: url("/static/img/brand/strands-dark.webp") no-repeat center / contain; pointer-events: none; }
.hero-card h1, .hero-card .hero-title { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: #fff; line-height: 1.25; letter-spacing: -.01em; }
.hero-card .hero-sub { color: #C9C0D8; font-size: 14.5px; margin-top: 6px; }
.hero-card .hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #CFC6DE; padding: 5px 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .08); box-shadow: var(--hl-dark); margin-bottom: 12px; }
.hero-card .hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 132px)); gap: 10px; margin-top: 20px; }
.hero-card .hero-stat { padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: var(--hl-dark); border: 1px solid rgba(255, 255, 255, .06); min-width: 0; }
.hero-card .hero-stat .v { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.hero-card .hero-stat .l { font-size: 12px; color: #B8AECB; }
@media (max-width: 720px) {
  .hero-card { padding: 22px 18px; border-radius: 24px; }
  .hero-card .hero-art { inset-block: auto -40px; height: 170px; width: 58%; inset-inline-end: -96px; opacity: .38; }
  .hero-card h1, .hero-card .hero-title { font-size: 24px; }
  .hero-card .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hero-card .hero-stat { padding: 9px 10px; }
  .hero-card .hero-stat .v { font-size: 18px; }
  .hero-card .page-actions { width: 100%; }
  .hero-card .page-actions .btn { flex: 1; }
}

/* ------------------------------------------------------------------ auth screens */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--paper); }
.auth-side { position: relative; margin: 12px; border-radius: 30px; overflow: hidden; isolation: isolate; background: var(--grain), var(--kohl-gradient); color: #E6E0EF; padding: 44px; display: flex; flex-direction: column; box-shadow: var(--hl-dark), 0 30px 60px -30px rgba(18, 11, 30, .6); }
/* The 3D mark takes only the space left between the brand and the copy, so it never runs into the text. */
.auth-side .auth-3d { position: relative; flex: 1 1 0; min-height: 150px; margin: 8px -44px 12px; }
.auth-side .auth-3d img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.auth-side .sadu { position: absolute; inset-inline: 44px; bottom: 26px; opacity: .55; background-image: var(--wave-light); }
.auth-side h2 { font-family: var(--font-display); color: #fff; font-size: 34px; line-height: 1.3; font-weight: 600; margin-top: auto; max-width: 460px; letter-spacing: -.01em; }
.auth-side p { color: #C3B9D3; max-width: 460px; margin-top: 12px; }
.auth-side .brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; }
.auth-side .brand img { width: 44px; height: 44px; border-radius: 14px; }
.auth-points { margin: 24px 0 52px; display: flex; flex-direction: column; gap: 12px; }
.auth-points div { display: flex; gap: 12px; align-items: center; color: #DCD4E7; font-size: 14.5px; }
.auth-points .icon { width: 30px; height: 30px; padding: 6px; border-radius: 10px; color: #fff; background: rgba(255, 255, 255, .1); box-shadow: var(--hl-dark); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 430px; }
.auth-card h1 { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--kohl-900); letter-spacing: -.01em; }
.auth-card .lead { color: var(--muted); margin: 8px 0 26px; }
.auth-foot { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .auth-main { align-items: flex-start; padding-top: 48px; }
}

/* ------------------------------------------------------------------ dashboard bits */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hello h1 { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--kohl-900); }
.hello .dates { color: var(--muted); font-size: 14px; }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-action { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid rgba(31, 21, 49, .06); color: var(--ink); font-weight: 600; font-size: 14.5px; box-shadow: var(--sh-1), var(--hl); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.quick-action:hover { transform: translateY(-2px); box-shadow: var(--sh-2), var(--hl); color: var(--ink); }
.quick-action .qa-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(155deg, var(--qa-a, #C0507A), var(--qa-b, #87284B)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 18px -10px var(--qa-glow, rgba(160, 51, 89, .6)); flex: none; }
@media (max-width: 900px) { .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.appt-row { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid #EFEDE9; }
.appt-row:last-child { border-bottom: 0; }
.appt-time { width: 64px; flex: none; text-align: center; padding: 6px 0; border-radius: 14px; background: var(--paper); }
.appt-time .t { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--kohl-900); font-variant-numeric: tabular-nums; }
.appt-time .p { font-size: 12px; color: var(--muted); }
.appt-bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c, var(--rose-600)); flex: none; }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 180px; }

/* ------------------------------------------------------------------ print */
@media print {
  .sidebar, .topbar, .mobile-nav, .no-print, .toasts, .banner { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .panel { border: 0; box-shadow: none; }
}

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