:root {
  --canvas: #d9d9d9;
  --shell: #f3f3f2;
  --card: #ffffff;
  --ink: #111111;
  --ink-2: #3a3a3a;
  --muted: #8b8b8b;
  --muted-2: #b5b5b5;
  --line: #ececec;
  --line-2: #e2e2e2;
  --blue: #2152ee;
  --blue-2: #5b82f6;
  --blue-soft: #e8eeff;
  --green: #1aa34a;
  --green-soft: #b9e6c6;
  --pink: #e8338a;
  --pink-soft: #f8c6dd;
  --orange: #f2994a;
  --amber: #b45309;
  --amber-soft: #fff1dc;
  --danger: #d92d20;
  --wa: #128c4a;
  --r-shell: 30px;
  --r-card: 22px;
  --r-md: 14px;
  --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --surface-2: #fafafa;
  --fill: #f4f4f4;
  --fill-2: #ececec;
  --btn: #1b1b1b;
  --btn-ink: #ffffff;
  --blue-line: #dfe6fb;
  --ask-bg: linear-gradient(180deg, rgba(232, 238, 255, 0.92), rgba(240, 244, 255, 0.98));
  --glass: rgba(255, 255, 255, 0.92);
  --glass-shell: rgba(243, 243, 242, 0.88);
  --green-soft-2: #e5f6eb;
  /* pull-cord lamp */
  --lamp-shade: #1b1b1b;
  --lamp-cap: #8b8b8b;
  --lamp-cord: #a3a3a3;
  --lamp-bulb-off: #dcdcdc;
  --lamp-bulb-on: #ffc94a;
  --lamp-bead: linear-gradient(160deg, #f7b733, #f08a24);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --canvas: #050505;
  --shell: #111111;
  --card: #1a1a1a;
  --ink: #f2f2f2;
  --ink-2: #c8c8c8;
  --muted: #8a8a8a;
  --muted-2: #5c5c5c;
  --line: #242424;
  --line-2: #2c2c2c;
  --blue: #4a74ff;
  --blue-soft: #16203d;
  --green: #34c46a;
  --amber: #f5a524;
  --amber-soft: #2c1f0b;
  --surface-2: #202020;
  --fill: #242424;
  --fill-2: #2c2c2c;
  --btn: #f2f2f2;
  --btn-ink: #111111;
  --blue-line: #263156;
  --ask-bg: linear-gradient(180deg, rgba(22, 32, 61, 0.92), rgba(20, 26, 44, 0.98));
  --glass: rgba(30, 30, 30, 0.92);
  --glass-shell: rgba(17, 17, 17, 0.88);
  --green-soft-2: #0f2a1a;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.02), 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
  --lamp-shade: #2e2e2e;
  --lamp-cap: #5c5c5c;
  --lamp-cord: #6b6b6b;
  --lamp-bulb-off: #3a3a3a;
  color-scheme: dark;
}
:root[data-theme="dark"] .shell { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 20px 60px rgba(0, 0, 0, 0.6); }
:root[data-theme="dark"] .card { border-color: rgba(255, 255, 255, 0.04); }
:root[data-theme="dark"] .f-bar::before { background: #3a4f8f; }
:root[data-theme="dark"] .chip.complete { color: #4ade80; }

/* theme flip: light floods out of the bulb */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root[data-vt="close"]::view-transition-old(root) { z-index: 2; }

/* ================= PULL CORD LAMP ================= */
.lamp-slot { position: relative; width: 110px; align-self: stretch; flex-shrink: 0; order: 3; user-select: none; -webkit-user-select: none; }
.lamp-stage {
  position: absolute; left: 0; top: -22px; width: 200px; height: 290px; transform: scale(0.55); transform-origin: 0 0;
  pointer-events: none; z-index: 6;
}
.lamp-stage .lamp { position: absolute; left: 50%; top: 0; width: 0; height: 0; transform-origin: 0 0; will-change: transform; }
.lamp-stage .head { position: absolute; left: 0; top: 0; will-change: transform; }
.lamp-stage .cap { position: absolute; left: -9px; top: -10px; width: 18px; height: 14px; border-radius: 5px 5px 0 0; background: var(--lamp-cap); }
.lamp-stage .shade { position: absolute; left: -62px; top: 0; width: 124px; height: 66px; border-radius: 62px 62px 12px 12px / 58px 58px 12px 12px; background: var(--lamp-shade); }
.lamp-stage .bulb { position: absolute; left: -19px; top: 44px; width: 38px; height: 38px; border-radius: 50%; background: var(--lamp-bulb-off); will-change: transform; transition: background-color 0.15s; }
.lamp-stage.is-on .bulb { background: var(--lamp-bulb-on); }
.lamp-stage .rope { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lamp-stage .rope path { fill: none; stroke: var(--lamp-cord); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lamp-stage .bead { position: absolute; left: -8px; top: -3px; width: 16px; height: 30px; border-radius: 999px; background: var(--lamp-bead); transform-origin: 8px 3px; will-change: transform; box-shadow: 0 2px 6px rgba(240, 138, 36, 0.35); }
.lamp-stage .grab {
  position: absolute; left: -40px; top: -26px; width: 80px; height: 96px; border: 0; border-radius: 22px; background: transparent;
  cursor: grab; touch-action: none; will-change: transform; pointer-events: auto; -webkit-tap-highlight-color: transparent;
}
.lamp-stage .grab.is-held { cursor: grabbing; }
.lamp-stage .grab:focus-visible { outline: 3px solid var(--blue); outline-offset: 0; }
.lamp-hint {
  position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-size: 11px; color: var(--muted); transition: opacity 0.3s;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.45 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }

/* ================= SHELL ================= */
.shell {
  max-width: none; margin: 16px; background: var(--shell);
  border-radius: var(--r-shell); padding: 18px 20px 24px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7) inset, 0 20px 60px rgba(0, 0, 0, 0.08);
}
@media (max-width: 760px) {
  body { background: var(--shell); }
  .shell { margin: 0; border-radius: 0; padding: 12px 16px 110px; box-shadow: none; }
}

/* ================= TOP NAV ================= */
.nav { display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 600; letter-spacing: -0.4px; white-space: nowrap; }
.logo .mk { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(145deg, #f7b733, #f08a24); display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.12); }
.pills { flex: 1; display: flex; justify-content: center; gap: 4px; }
.pill { padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.pill:hover { background: rgba(0, 0, 0, 0.04); }
.pill.on { background: var(--btn); color: var(--btn-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.18); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.circle {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line-2); color: var(--ink);
}
.circle:hover { background: var(--surface-2); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(145deg, #f2994a, #c2410c); box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line-2); }

@media (max-width: 760px) {
  .nav { flex-wrap: wrap; gap: 10px; }
  .pills { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .pills::-webkit-scrollbar { display: none; }
  .logo { flex: 1; }
}

/* ================= TITLE ROW ================= */
.title-row { display: flex; align-items: flex-end; gap: 16px; margin: 22px 2px 18px; min-height: 140px; }
.title-row h1 { margin: 0; font-size: 40px; font-weight: 500; letter-spacing: -1.4px; display: flex; align-items: center; gap: 12px; line-height: 1; }
.title-row h1 .circle { width: 30px; height: 30px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; order: 2; }
.seg { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 4px; gap: 2px; }
.seg span, .seg button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.seg .sep { color: var(--muted); padding: 0 6px; font-size: 11.5px; }
.seg .box { background: var(--fill); border: 1px solid var(--line); }
.btn-soft {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; height: 42px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line-2); font-weight: 500; font-size: 13px; color: var(--ink-2);
}
.btn-dark { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; height: 42px; border-radius: 12px; background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 13.5px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.18); }
@media (max-width: 760px) { .title-row h1 { font-size: 32px; } .actions { display: none; } }

/* ================= GRID ================= */
.grid {
  display: grid; gap: 12px;
  grid-template-columns: 0.92fr 1.32fr 1.06fr;
  grid-template-areas:
    "funnel funnel volume"
    "intake week insight"
    "intake done insight";
}
@media (max-width: 1060px) {
  .grid { grid-template-columns: 1fr 1fr; grid-template-areas: "funnel funnel" "volume insight" "week done" "intake intake"; }
}
@media (max-width: 680px) {
  .grid { grid-template-columns: 1fr; grid-template-areas: "volume" "insight" "funnel" "week" "done" "intake"; }
}

.card {
  background: var(--card); border-radius: var(--r-card); padding: 18px 16px 16px;
  box-shadow: var(--shadow-card); border: 1px solid rgba(0, 0, 0, 0.035); position: relative; min-width: 0;
}
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-h h3 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -0.3px; }
.dots-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); background: var(--card); }

/* Funnel */
.funnel { grid-area: funnel; padding-bottom: 14px; overflow: hidden; }
.f-cols { display: grid; grid-template-columns: repeat(5, 1fr); height: 214px; margin-top: 6px; position: relative; }
.f-col { position: relative; border-left: 1px solid var(--line); padding: 2px 10px 0; display: flex; flex-direction: column; min-width: 0; }
.f-col:first-child { border-left: 0; }
.f-col small { display: block; font-size: 11.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-col b { display: block; font-size: 22px; font-weight: 400; letter-spacing: -0.6px; color: var(--muted-2); line-height: 1.3; }
.f-col.hl { background: linear-gradient(180deg, transparent, var(--blue-soft)); }
.f-col.hl small { color: var(--ink-2); }
.f-col.hl b { color: var(--ink); }
.f-bar {
  position: absolute; left: 0; right: 0; bottom: 0; border-radius: 3px 3px 0 0;
  background: repeating-linear-gradient(-45deg, var(--blue) 0 2px, #7d9cf7 2px 5.5px);
  transition: height 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.f-bar::before { content: ""; position: absolute; top: -9px; left: 50%; width: 28px; height: 5px; border-radius: 99px; transform: translateX(-50%); background: #b9c8fb; box-shadow: 0 1px 2px rgba(33, 82, 238, 0.25); }
.f-col.hl .f-bar { background: linear-gradient(180deg, #3a63f1, #1f45d6); }
.f-col.hl .f-bar::before { display: none; }
.f-tip {
  position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--glass); backdrop-filter: blur(8px); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 6px 10px; font-size: 11.5px; color: var(--ink-2); box-shadow: var(--shadow-pop);
}
.f-tip b { display: inline; font-size: 11.5px; color: var(--ink); font-weight: 600; letter-spacing: 0; }
.ask {
  margin-top: -2px; position: relative; z-index: 3; border-radius: 16px; padding: 10px;
  background: var(--ask-bg); border: 1px solid var(--blue-line);
  backdrop-filter: blur(10px);
}
.ask-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); padding: 0 4px 8px; }
.ask-h svg { color: var(--blue); }
.ask label { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 10px; border: 1px solid var(--blue-line); padding: 0 12px; }
.ask input { flex: 1; min-width: 0; border: 0; outline: none; padding: 11px 0; background: none; font-size: 13.5px; }
.ask .hint-tag { font-size: 12px; color: #c2410c; background: #ffedd5; border: 1px solid #fed7aa; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
@media (max-width: 560px) {
  .f-col { padding: 2px 5px 0; }
  .f-col b { font-size: 17px; }
  .f-col small { font-size: 10px; white-space: normal; line-height: 1.2; min-height: 24px; }
  .ask .hint-tag { display: none; }
}

/* Volume */
.volume { grid-area: volume; }
.big { display: flex; align-items: center; gap: 12px; margin: 10px 0 22px; }
.big b { font-size: 50px; font-weight: 400; letter-spacing: -2.2px; line-height: 1; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 4px 8px; border-radius: 99px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow-card); }
.delta i { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid var(--green); }
.delta.down i { border-bottom: 0; border-top: 6px solid var(--muted); }
.meter { margin-bottom: 16px; }
.meter:last-child { margin-bottom: 0; }
.meter-h { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; }
.meter-h b { font-weight: 600; color: var(--ink); }
.meter-t { height: 9px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.meter-t i { display: block; height: 100%; border-radius: 99px; transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); min-width: 6px; }
.m-green i { background: repeating-linear-gradient(-45deg, var(--green) 0 2px, #5fcf86 2px 5px); }
.m-blue i { background: repeating-linear-gradient(-45deg, var(--blue) 0 2px, #7d9cf7 2px 5px); }
.m-pink i { background: repeating-linear-gradient(-45deg, var(--pink) 0 2px, #f493c0 2px 5px); }

/* Intake (stepped) */
.intake { grid-area: intake; display: flex; flex-direction: column; }
.intake .chart { flex: 1; min-height: 210px; position: relative; }
.intake svg { width: 100%; height: 100%; display: block; }
.x-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 6px 2px 0; }
.peak-tip { position: absolute; transform: translate(-50%, -100%); background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px 8px; font-size: 11px; font-weight: 600; box-shadow: var(--shadow-pop); white-space: nowrap; }

/* Dot matrix cards */
.week { grid-area: week; }
.done { grid-area: done; }
.dm { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 14px; }
.dm .num { font-size: 40px; font-weight: 400; letter-spacing: -1.6px; line-height: 1; }
.dm .num small { display: block; font-size: 12px; letter-spacing: 0; color: var(--muted); margin-top: 6px; }
.dm .cmp { text-align: right; font-size: 12px; color: var(--muted); }
.dm .cmp b { display: block; font-size: 18px; font-weight: 500; color: var(--ink); letter-spacing: -0.3px; margin-top: 3px; }
.matrix { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 70px; padding-top: 26px; }
.mcol { display: flex; flex-direction: column-reverse; gap: 4px; align-items: center; }
.mcol i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.mtip { position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-size: 11px; background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 2px 8px; color: var(--muted); white-space: nowrap; box-shadow: var(--shadow-pop); }
.mtip b { color: var(--ink); font-weight: 600; }
.green-dots i { background: #c4ead0; }
.green-dots .peak i { background: var(--green); }
.blue-dots i { background: #c7d5fc; }
.blue-dots .peak i { background: var(--blue); }
.mcol.zero i { background: var(--fill-2) !important; }
@media (max-width: 420px) {
  .dm { grid-template-columns: 1fr auto; }
  .dm .matrix { grid-column: 1 / -1; grid-row: 1; justify-content: flex-start; }
  .dm .num { font-size: 34px; }
}

/* Insight */
.insight {
  grid-area: insight; color: #fff; overflow: hidden; padding: 16px 16px 14px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: space-between; border: 0;
  background:
    radial-gradient(90% 70% at 105% -5%, #ff7a2f 0%, rgba(255, 122, 47, 0) 60%),
    radial-gradient(70% 60% at 80% 35%, rgba(255, 186, 120, 0.85) 0%, rgba(255, 186, 120, 0) 70%),
    radial-gradient(90% 80% at 0% 100%, #0b2fb0 0%, rgba(11, 47, 176, 0) 65%),
    radial-gradient(80% 70% at 20% 55%, #2f6bff 0%, rgba(47, 107, 255, 0) 70%),
    linear-gradient(160deg, #6aa2ff 0%, #2a57e6 55%, #0f2a9e 100%);
}
.insight::before {
  content: ""; position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.insight::after {
  content: ""; position: absolute; right: -40px; top: -30px; width: 230px; height: 230px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 30px; transform: rotate(20deg); opacity: 0.55;
}
.insight > * { position: relative; z-index: 1; }
.chip-glass { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; font-size: 11.5px; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); backdrop-filter: blur(6px); }
.insight .pct { font-size: 64px; font-weight: 300; letter-spacing: -2.5px; line-height: 1; margin: 18px 0 14px; }
.insight h4 { margin: 0 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.3; max-width: 290px; }
.insight p { margin: 0; font-size: 12.5px; opacity: 0.85; max-width: 300px; }
.prog { display: flex; gap: 6px; margin-top: 18px; }
.prog i { flex: 1; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.3); }
.prog i.on { background: var(--card); }

/* ================= CLIENT LIST ================= */
.clients { margin-top: 12px; padding-bottom: 6px; }
.clients .card-h { flex-wrap: wrap; gap: 10px; }
.tabs { display: flex; background: var(--fill); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.tab { padding: 7px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tab em { font-style: normal; color: var(--muted); margin-left: 4px; font-variant-numeric: tabular-nums; }
.tab.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.tab.on em { color: var(--ink-2); }

.list-head, .row { display: grid; grid-template-columns: 130px minmax(0, 1.4fr) minmax(0, 1fr) 120px 110px 24px; gap: 14px; align-items: center; }
.list-head { font-size: 11.5px; color: var(--muted); padding: 4px 10px 8px; border-bottom: 1px solid var(--line); }
.list { display: grid; }
.row { width: 100%; text-align: left; padding: 10px; border-bottom: 1px solid var(--line); border-radius: 12px; transition: background 0.15s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.pair { display: flex; gap: 3px; border-radius: 10px; overflow: hidden; width: max-content; }
.pair .pic { width: 52px; height: 52px; background: var(--fill); position: relative; }
.pair .pic img { width: 100%; height: 100%; object-fit: cover; }
.pair .pic.none { display: grid; place-items: center; color: var(--muted-2); }
.pair .pic small { position: absolute; left: 3px; bottom: 3px; font-size: 8.5px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, 0.55); padding: 0 4px; border-radius: 4px; }
.row .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.1px; }
.row .sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .work { color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .age { font-size: 12.5px; color: var(--muted); }
.row .chev { color: var(--muted-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 8px; white-space: nowrap; width: max-content; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.pending { background: var(--amber-soft); color: var(--amber); }
.chip.complete { background: var(--green-soft-2); color: var(--green); }
@media (max-width: 760px) {
  .list-head { display: none; }
  .row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "pic name chev" "pic meta chev"; row-gap: 4px; padding: 10px 4px; border-radius: 0; }
  .row .pair { grid-area: pic; }
  .row .who { grid-area: name; }
  .row .work { display: none; }
  .row .stat { grid-area: meta; display: flex; gap: 8px; align-items: center; }
  .row .age { display: none; }
  .row .stat .age-m { display: inline; }
  .row .chev { grid-area: chev; }
}
.row .age-m { display: none; font-size: 12px; color: var(--muted); white-space: nowrap; }

.empty { text-align: center; padding: 40px 16px 30px; color: var(--muted); }
.empty .art { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; background: var(--fill); color: var(--ink-2); }
.empty h3 { margin: 0 0 4px; color: var(--ink); font-size: 17px; font-weight: 600; }
.empty p { margin: 0; font-size: 13px; }
.skeleton { height: 72px; margin: 6px 0; border-radius: 12px; background: linear-gradient(90deg, var(--fill) 0%, var(--fill-2) 50%, var(--fill) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Mobile FAB */
.fab {
  display: none; position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20;
  align-items: center; gap: 8px; background: var(--btn); color: var(--btn-ink); border-radius: 99px; padding: 14px 22px;
  font-weight: 600; font-size: 14.5px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}
@media (max-width: 760px) { .fab { display: inline-flex; } }

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; border-radius: 14px; font-weight: 600; font-size: 14.5px;
  background: var(--card); border: 1px solid var(--line-2); color: var(--ink);
}
.btn.block { width: 100%; }
.btn.gold, .btn.dark { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ghost { background: var(--card); }
.btn:disabled { opacity: 0.55; cursor: default; }

/* ================= SHEETS ================= */
.overlay { position: fixed; inset: 0; z-index: 30; background: rgba(20, 20, 20, 0.35); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.sheet { width: 100%; max-width: 480px; background: var(--shell); border-radius: 26px 26px 0 0; padding: 10px 18px 22px; animation: up 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); max-height: 92vh; overflow-y: auto; }
.sheet .grab { width: 40px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 0 auto 14px; }
.sheet h2 { margin: 0 0 4px; font-size: 26px; font-weight: 500; letter-spacing: -0.8px; }
.sheet .lead { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
@media (min-width: 720px) { .overlay { align-items: center; } .sheet { border-radius: 24px; padding: 22px 24px 24px; } .sheet .grab { display: none; } }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); outline: none; font-size: 15px; transition: border-color 0.15s, box-shadow 0.15s; }
.field input:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(33, 82, 238, 0.12); }
.field textarea { resize: vertical; }
.opt { font-style: normal; color: var(--muted); }

/* ================= DETAIL PAGE ================= */
.page { position: fixed; inset: 0; z-index: 25; background: var(--shell); overflow-y: auto; animation: slide 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes slide { from { transform: translateX(20px); opacity: 0; } }
.page-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--glass-shell); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); }
.page-bar .title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.page-bar .title b { font-size: 18px; font-weight: 600; letter-spacing: -0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line-2); color: var(--ink); }
.page-body { max-width: 820px; margin: 0 auto; padding: 16px 16px 120px; }

.compare { position: relative; border-radius: var(--r-card); overflow: hidden; background: #111; aspect-ratio: 4 / 3.3; user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .after-layer { clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: var(--card); transform: translateX(-1px); box-shadow: 0 0 12px rgba(0, 0, 0, 0.4); pointer-events: none; }
.compare .knob { position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; border-radius: 50%; transform: translate(-50%, -50%); background: #fff; color: #111; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.tag { position: absolute; top: 12px; z-index: 2; font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; backdrop-filter: blur(8px); pointer-events: none; }
.tag.l { left: 12px; }
.tag.r { right: 12px; }
.single { position: relative; border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 3.3; background: var(--fill); }
.single img { width: 100%; height: 100%; object-fit: cover; }
.hint { text-align: center; color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.start { background: var(--card); border: 1.5px dashed var(--line-2); border-radius: var(--r-card); padding: 30px 18px; text-align: center; }
.start .art { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.start h3 { margin: 0 0 4px; font-size: 19px; font-weight: 600; letter-spacing: -0.3px; }
.start p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }

.galleries { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.gallery { background: var(--card); border-radius: var(--r-card); padding: 14px; box-shadow: var(--shadow-card); }
.gallery h4 { margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 500; letter-spacing: -0.2px; }
.gallery h4 em { font-style: normal; font-size: 12px; color: var(--muted); background: var(--fill); border-radius: 99px; padding: 1px 8px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (max-width: 420px) { .thumbs { grid-template-columns: repeat(2, 1fr); } }
.th { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--fill); }
.th img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.th.sel { outline: 2.5px solid var(--blue); outline-offset: -2.5px; }
.th .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; display: grid; place-items: center; }
.add { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--blue-line); background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; align-content: center; gap: 2px; font-size: 11.5px; font-weight: 600; cursor: pointer; text-align: center; }
.add input { display: none; }
.add.busy { opacity: 0.6; pointer-events: none; }

.info { background: var(--card); border-radius: var(--r-card); padding: 16px; margin-top: 12px; box-shadow: var(--shadow-card); }
.info-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.info-h h4 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -0.2px; }
.link { color: var(--blue); font-weight: 600; font-size: 13px; }
.kv { display: grid; gap: 12px; }
.kv small { display: block; color: var(--muted); font-size: 12px; }
.kv p { margin: 1px 0 0; font-weight: 500; white-space: pre-wrap; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.contact a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: 12px; font-weight: 600; font-size: 13.5px; border: 1px solid var(--line-2); background: var(--surface-2); }
.contact a.wa { color: var(--wa); }
.timeline { display: flex; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.timeline b { color: var(--ink); font-weight: 600; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--shell) 35%); }
.dock .inner { max-width: 820px; margin: 0 auto; display: flex; gap: 10px; }
.dock .btn { flex: 1; padding: 15px; font-size: 15px; box-shadow: var(--shadow-pop); }

.menu { position: absolute; right: 16px; top: 60px; z-index: 5; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 6px; min-width: 200px; animation: fade 0.15s; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 10px; font-weight: 500; font-size: 14px; text-align: left; }
.menu button:hover { background: var(--fill); }
.menu .danger { color: var(--danger); }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.94); display: grid; place-items: center; padding: 16px; animation: fade 0.15s; }
.lightbox img { max-height: 92vh; max-width: 100%; object-fit: contain; border-radius: 10px; }

.toast { position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60; background: var(--btn); color: var(--btn-ink); padding: 11px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-pop); animation: up 0.2s; max-width: calc(100% - 32px); }

/* ================= LOGIN ================= */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--canvas); }
.login-card { width: 100%; max-width: 400px; background: var(--shell); border-radius: var(--r-shell); padding: 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08); }
.login-card .logo { margin-bottom: 26px; }
.login-card h1 { margin: 0; font-size: 34px; font-weight: 500; letter-spacing: -1.2px; }
.login-card .sub { margin: 4px 0 22px; color: var(--muted); }
.login-card form { background: var(--card); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow-card); }
.login-card .btn { width: 100%; margin-top: 4px; }
.login-card .err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 10px 0 0; text-align: center; }

/* ================= VIEWS: overview vs client list ================= */
.shell[data-view="overview"] .clients { display: none; }
.shell[data-view="list"] .grid { display: none; }
.shell[data-view="list"] .clients { margin-top: 0; }

/* ================= FIT TO SCREEN (laptop / desktop) ================= */
@media (min-width: 1060px) and (min-height: 640px) {
  body { overflow: hidden; }
  .shell {
    height: calc(100vh - 32px); height: calc(100dvh - 32px);
    display: flex; flex-direction: column; padding: 14px 18px 16px; overflow: hidden;
  }
  .title-row { margin: 10px 2px 12px; min-height: 92px; }
  .title-row h1 { font-size: clamp(30px, 4.2vh, 40px); }
  .lamp-stage { transform: scale(0.5); top: -14px; }

  .grid {
    flex: 1; min-height: 0;
    grid-template-rows: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .grid > .card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: clamp(12px, 1.8vh, 18px) 16px clamp(10px, 1.6vh, 16px); }
  .card-h { margin-bottom: clamp(4px, 1vh, 12px); flex-shrink: 0; }

  /* pipeline: columns take whatever height is left */
  .funnel .f-cols { flex: 1; min-height: 0; height: auto; }
  .funnel .ask { flex-shrink: 0; padding: 8px; }
  .funnel .ask-h { padding-bottom: 6px; }
  .funnel .ask input { padding: 8px 0; }

  /* totals: spread the meters over the card */
  .volume { justify-content: flex-start; }
  .volume .big { margin: clamp(2px, 1vh, 10px) 0 clamp(8px, 2vh, 22px); }
  .volume .big b { font-size: clamp(36px, 5.6vh, 50px); }
  .volume .meter { margin-bottom: clamp(8px, 1.6vh, 16px); }

  .intake .chart { min-height: 0; }

  .week, .done { justify-content: space-between; }
  .dm .num { font-size: clamp(30px, 4.4vh, 40px); }

  .insight { min-height: 0; }
  .insight .pct { font-size: clamp(44px, 7.4vh, 64px); margin: clamp(6px, 1.6vh, 18px) 0 clamp(6px, 1.2vh, 14px); }

  /* client list view fills the screen and scrolls inside */
  .shell[data-view="list"] .clients { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .shell[data-view="list"] .clients .list { flex: 1; min-height: 0; overflow-y: auto; }
}
.list-search { flex: 1; min-width: 160px; max-width: 360px; margin-left: auto; display: flex; align-items: center; background: var(--fill); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.list-search input { width: 100%; border: 0; outline: none; background: none; padding: 9px 0; font-size: 13.5px; }
.list-search:focus-within { border-color: var(--blue); background: var(--card); }
@media (max-width: 760px) { .list-search { order: 3; max-width: none; flex-basis: 100%; } }
/* shorter laptop screens: tighten the top row so nothing is cut */
@media (min-width: 1060px) and (min-height: 640px) and (max-height: 860px) {
  .title-row { margin: 6px 2px 10px; min-height: 84px; }
  .title-row h1 { font-size: 32px; }
  .funnel .ask-h { display: none; }
  .funnel .f-col > b { font-size: 19px; }
  .volume .big { margin: 0 0 8px; gap: 10px; }
  .volume .big b { font-size: 36px; }
  .volume .meter { margin-bottom: 6px; }
  .volume .meter-h { margin-bottom: 4px; font-size: 12.5px; }
  .volume .meter-t { height: 7px; }
  .card-h h3 { font-size: 15.5px; }
  .dots-btn { width: 30px; height: 30px; }
  .dm .matrix { height: 58px; padding-top: 22px; }
}

/* ================= COMMAND BUTTON (top nav search) ================= */
.cb {
  --cb-bg: var(--card); --cb-bg-hover: var(--surface-2); --cb-text: var(--ink-2); --cb-strong: var(--ink);
  --cb-placeholder: var(--muted-2); --cb-muted: var(--muted); --cb-key: var(--fill); --cb-key-on: var(--btn); --cb-key-on-ink: var(--btn-ink);
  position: relative; height: 40px; border-radius: 20px; overflow: hidden; display: flex; align-items: center;
  background: var(--cb-bg); color: var(--cb-text); font-size: 13.5px; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line-2); transform-origin: center; transition: background-color 0.15s;
}
.cb:not(.is-open):hover { background: var(--cb-bg-hover); }
.cb-btn { height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 8px 0 13px; white-space: nowrap; cursor: pointer; user-select: none; outline: none; color: inherit; }
.cb-btn:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); border-radius: 20px; }
.cb-ic { display: grid; place-items: center; color: var(--cb-muted); }
.cb-ic svg { width: 16px; height: 16px; }
.cb-keys { display: flex; gap: 4px; }
.cb kbd {
  display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 20px; padding: 0 6px;
  border-radius: 6px; background: var(--cb-key); color: var(--cb-muted); font: 500 11px/1 var(--font);
  transition: background-color 0.15s, color 0.15s;
}
.cb kbd[data-on] { background: var(--cb-key-on); color: var(--cb-key-on-ink); transition-duration: 0.075s; }
.cb-field { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; }
.cb-field[hidden] { display: none !important; }
.cb-field input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--cb-strong); font-size: 14px; }
.cb-field input::placeholder { color: var(--cb-placeholder); }
.cb-field input::-webkit-search-cancel-button { display: none; }
.cb.is-open { box-shadow: inset 0 0 0 1.5px var(--blue); }
/* the swap: blur + fade, 180ms, ease [0.23, 1, 0.32, 1], incoming delayed 60ms */
.cb-in { animation: cb-in 0.18s cubic-bezier(0.23, 1, 0.32, 1) 0.06s both; }
.cb-out { animation: cb-out 0.18s cubic-bezier(0.23, 1, 0.32, 1) both; position: absolute; left: 0; top: 0; }
@keyframes cb-in { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: blur(0); } }
@keyframes cb-out { from { opacity: 1; filter: blur(0); } to { opacity: 0; filter: blur(4px); } }
@media (prefers-reduced-motion: reduce) { .cb-in, .cb-out { animation: none; } }
.cb.is-touch .cb-keys, .cb.is-touch .cb-esc { display: none; }
@media (max-width: 760px) { .cb-label { display: none; } .cb-btn { padding: 0 12px; } .cb-keys { display: none; } }

/* ================= BRAND LOGO ================= */
.logo { display: inline-flex; align-items: center; }
.brand-logo { height: 30px; width: auto; display: block; }
.login-card .brand-logo { height: 44px; }
@media (max-width: 760px) { .nav .brand-logo { height: 24px; } }

/* ================= MORPH ISLAND (status + notifications) ================= */
.island {
  --island-bg: #e4e4e2; --island-ink: var(--ink); --island-muted: var(--muted);
  position: fixed; left: 50%; top: 110px; z-index: 40; width: 126px; height: 36px; border-radius: 18px;
  background: var(--island-bg); color: var(--island-ink); overflow: hidden; cursor: pointer;
  transform: translate(-50%, -50%); will-change: width, height, transform; font-size: 13px;
  transition: opacity 0.25s ease, filter 0.25s ease;
}
:root[data-theme="dark"] .island { --island-bg: #2c2c2c; }
.island.is-hidden { opacity: 0; filter: blur(6px); pointer-events: none; }
.island .ic {
  position: absolute; left: 50%; top: 50%; display: flex; align-items: center;
  opacity: 0; filter: blur(6px); transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.14s ease, filter 0.14s ease, transform 0.2s ease;
  pointer-events: none; white-space: nowrap;
}
.island .ic.on {
  opacity: 1; filter: none; transform: translate(-50%, -50%) scale(1); pointer-events: auto;
  transition: opacity 0.35s ease 0.09s, filter 0.35s ease 0.09s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.09s;
}
.island .ic svg { display: block; flex: none; }
.island .num { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.01em; }
.island .lead { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.island .lead svg { width: 16px; height: 16px; }

.ic-idle .ic-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--island-muted); opacity: 0.5; }

.ic-overdue { width: 206px; justify-content: space-between; }
.ic-overdue .lead { color: var(--amber); }
.ic-link { font: 600 12px/1 var(--font); color: var(--island-ink); background: rgba(0, 0, 0, 0.07); border-radius: 99px; padding: 6px 10px; }
:root[data-theme="dark"] .ic-link { background: rgba(255, 255, 255, 0.1); }

.ic-progress { width: 246px; gap: 9px; }
.ic-progress .lead b { font-weight: 700; font-variant-numeric: tabular-nums; }
.ic-muted { margin-left: auto; color: var(--island-muted); font-size: 12px; }
.ic-week { width: 210px; justify-content: center; }
.ic-week .lead svg { color: var(--green); }

.island .ring { width: 32px; height: 32px; transform: rotate(-90deg); }
.island .ring.sm { width: 22px; height: 22px; }
.island .ring circle { fill: none; stroke-width: 3.5; }
.island .ring .bg { stroke: rgba(0, 0, 0, 0.1); }
:root[data-theme="dark"] .island .ring .bg { stroke: rgba(255, 255, 255, 0.14); }
.island .ring .fg { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 81.7; stroke-dashoffset: 81.7; }

.ic-upload { width: 272px; gap: 12px; }
.ic-note { width: 272px; gap: 12px; }
.island .tx { flex: 1; min-width: 0; }
.island .tx b { display: block; font-size: 13.5px; font-weight: 600; color: var(--island-ink); overflow: hidden; text-overflow: ellipsis; }
.island .tx span { display: block; font-size: 12px; color: var(--island-muted); overflow: hidden; text-overflow: ellipsis; }
.ic-upload .num { font-size: 15px; color: var(--green); }
.badge-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: var(--green); }
.badge-ic svg { width: 17px; height: 17px; }
.badge-ic.info { background: var(--blue); }
.badge-ic.error { background: var(--danger); }

/* ================= TAB PILL (sliding nav highlight) ================= */
.pills.has-ind { position: relative; }
.pill-ind {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 10px; pointer-events: none;
  background: var(--btn); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.18);
  will-change: transform, width;
}
.pills.has-ind .pill { position: relative; z-index: 1; background: none; box-shadow: none; transition: color 0.25s; }
.pills.has-ind .pill:hover { background: none; color: var(--ink); }
.pills.has-ind .pill.on { color: var(--btn-ink); }

/* ================= COMMAND PALETTE (top nav search + actions) ================= */
.pal-slot { position: relative; width: 196px; height: 40px; flex-shrink: 0; }
.pal {
  position: absolute; right: 0; top: 0; z-index: 45; height: 40px; border-radius: 20px; overflow: hidden;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); font-family: var(--font);
}
.pal.is-open { box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-pop); }
.pal svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; width: 17px; height: 17px; flex: none; }
.pal-trig {
  position: absolute; right: 0; top: 0; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 13px;
  color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer; will-change: opacity;
}
.pal-trig:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); border-radius: 20px; }
.pal-ph { color: var(--ink-2); }
.pal kbd { font: 500 11px/1 var(--font); color: var(--muted); background: var(--fill); border-radius: 6px; padding: 4px 6px; white-space: nowrap; }
.pal-box { position: absolute; right: 0; top: 0; opacity: 0; pointer-events: none; }
.pal-box.on { pointer-events: auto; }
.pal-q { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px 0 16px; color: var(--muted); border-bottom: 1px solid var(--line); }
.pal-q input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 400 15px var(--font); }
.pal-q input::placeholder { color: var(--muted-2); }
.pal-res { position: relative; list-style: none; margin: 0; padding: 6px 6px 0; }
.pal-res li {
  position: absolute; left: 6px; right: 6px; top: 6px; height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 12px; border-radius: 12px; font-size: 13.5px; color: var(--ink-2); will-change: transform, opacity; cursor: pointer; z-index: 1;
}
.pal-res li.cur { color: var(--ink); }
.pal-res li .chip { padding: 2px 8px; font-size: 11px; }
.pal-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.pal-name small { color: var(--muted); font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.pal-hl { position: absolute; left: 6px; right: 6px; top: 6px; height: 38px; border-radius: 12px; background: var(--fill); will-change: transform, opacity; }
@media (max-width: 760px) {
  .pal-slot { width: 40px; }
  .pal-ph, .pal-trig kbd { display: none; }
  .pal-trig { padding: 0 11px; }
}

/* ================= STAT CARD (Revamps received) ================= */
.statc { display: flex; flex-direction: column; }
.sc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sc-lab { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -0.2px; color: var(--ink); }
.sc-big { margin: 6px 0 0; font-size: clamp(34px, 5vh, 44px); line-height: 1; font-weight: 400; letter-spacing: -1.6px; font-variant-numeric: tabular-nums; color: var(--ink); }
.sc-sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.sc-delta { padding: 4px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--green-soft-2); color: var(--green); white-space: nowrap; }
.sc-delta.down { background: #fde8e8; color: var(--danger); }
:root[data-theme="dark"] .sc-delta.down { background: #3a1414; color: #f87171; }
.sc-delta.new { background: var(--blue-soft); color: var(--blue); }
.sc-cw { position: relative; flex: 1; min-height: 96px; margin: 12px 0 6px; }
.sc-chart { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sc-dot { position: absolute; left: 0; top: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 3px var(--card); will-change: transform; }
.sc-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.sc-seg { position: relative; display: flex; padding: 3px; border-radius: 99px; background: var(--fill); flex-shrink: 0; }
.sc-seg button { position: relative; z-index: 1; flex: 1; padding: 7px 0; font-size: 12.5px; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.sc-seg button.on { color: var(--ink); }
.sc-pill { position: absolute; left: 0; top: 3px; bottom: 3px; border-radius: 99px; background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); will-change: transform, width; }

/* ================= PHOTO BOOK (page flip) ================= */
.bk-overlay {
  --paper: #fbfaf7; --paper-back: #f1efe9; --paper-ink: #1a1a1a; --paper-muted: #8a857c; --cover: #1f1a1b; --brand-pink: #da8395;
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 56px 16px 24px;
  background: rgba(14, 12, 12, 0.72); backdrop-filter: blur(8px); animation: fade 0.2s ease;
}
:root[data-theme="dark"] .bk-overlay { --paper: #1c1c1c; --paper-back: #262626; --paper-ink: #f2f2f2; --paper-muted: #9a9a9a; --cover: #120f10; }
.bk-overlay.closing { opacity: 0; transition: opacity 0.18s ease; }
.bk-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.12); }
.bk-close:hover { background: rgba(255, 255, 255, 0.2); }
.bk-close svg, .bk-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bk-frame { width: min(920px, 100%, (100vh - 150px) * 1.5); display: flex; flex-direction: column; align-items: center; overflow-x: clip; }
.bk-slide { width: 100%; flex-shrink: 0; transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1); }
.bk-slide.single { width: 200%; align-self: flex-start; transition: none; }
@media (prefers-reduced-motion: reduce) { .bk-slide { transition: none; } }
.bk-book { position: relative; width: 100%; aspect-ratio: 3 / 2; touch-action: none; user-select: none; -webkit-user-select: none; }
.bk-shadow { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.bk-paper {
  position: absolute; top: 0; height: 100%; width: 50%; transform-origin: 0 0; overflow: hidden;
  background: var(--paper); color: var(--paper-ink); container-type: inline-size;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.bk-paper.left { left: 0; border-radius: 4px 0 0 4px; box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05); }
.bk-paper.right { left: 50%; border-radius: 0 4px 4px 0; box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05); }
.bk-paper.back { background: var(--paper-back); }
.bk-inner { width: 100%; height: 100%; }
.bk-paper.back .bk-inner { transform: scaleX(-1); }   /* the back of a page reads the right way once folded over */
.bk-content { width: 100%; height: 100%; }
.bk-gutter { position: absolute; top: 0; bottom: 0; width: 8%; pointer-events: none; }
.bk-paper.left .bk-gutter { right: 0; background: linear-gradient(to left, rgba(0, 0, 0, 0.07), transparent); }
.bk-paper.right .bk-gutter { left: 0; background: linear-gradient(to right, rgba(0, 0, 0, 0.07), transparent); }

/* cover */
.bk-cover { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 10cqw; background: var(--cover); color: #f6eef0; }
.bk-logo { width: 62cqw; height: auto; }
.bk-logo.sm { width: 40cqw; margin-top: 8cqw; }
.bk-kicker { margin: 9cqw 0 0; font-size: 3.2cqw; letter-spacing: 0.32em; text-transform: uppercase; opacity: 0.7; }
.bk-title { margin: 3cqw 0 0; font-size: 8cqw; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; color: var(--brand-pink); }
.bk-title.sm { font-size: 7cqw; }
.bk-notes { margin: 3cqw 0 0; font-size: 3.6cqw; line-height: 1.5; opacity: 0.75; }
.bk-foot { position: absolute; bottom: 8cqw; margin: 0; font-size: 3cqw; opacity: 0.55; }

/* photo pages */
.bk-photo { height: 100%; display: flex; flex-direction: column; padding: 8cqw 8cqw 6cqw; }
.bk-ph-top { display: flex; justify-content: space-between; align-items: center; font-size: 3.2cqw; color: var(--paper-muted); }
.bk-tag { font-size: 3.2cqw; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; padding: 1.2cqw 2.6cqw; border-radius: 99px; }
.bk-tag.before { background: rgba(0, 0, 0, 0.06); color: var(--paper-ink); }
.bk-tag.after { background: rgba(218, 131, 149, 0.18); color: #b4536a; }
:root[data-theme="dark"] .bk-tag.before { background: rgba(255, 255, 255, 0.1); }
:root[data-theme="dark"] .bk-tag.after { color: var(--brand-pink); }
.bk-img { flex: 1; min-height: 0; margin-top: 4cqw; border-radius: 1.6cqw; overflow: hidden; background: rgba(0, 0, 0, 0.05); box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, 0.12); }
.bk-img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.bk-cap { margin: 3.4cqw 0 0; font-size: 3.4cqw; color: var(--paper-muted); }
.bk-num { margin-top: auto; padding-top: 2cqw; align-self: center; font-size: 3cqw; color: var(--paper-muted); font-variant-numeric: tabular-nums; }

/* controls */
.bk-nav { margin-top: 18px; display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, 0.75); font-size: 12.5px; }
.bk-count { min-width: 96px; text-align: center; font-variant-numeric: tabular-nums; }
.bk-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); transition: background 0.15s; }
.bk-btn:hover { background: rgba(255, 255, 255, 0.12); }
.bk-btn[aria-disabled="true"] { opacity: 0.3; cursor: default; background: none; }
.bk-hint { margin: 10px 0 0; font-size: 12px; color: rgba(255, 255, 255, 0.5); }
.hint .link { font-size: 12.5px; }
/* photo book: phone performance */
.bk-paper { contain: paint; }
.bk-shadow .bk-paper { will-change: clip-path, transform; }
.bk-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, var(--shade, 0)), transparent 60%); }
.bk-overlay.bk-touch { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(14, 12, 12, 0.88); }
.bk-overlay.bk-touch .bk-shadow { filter: none !important; }
.bk-overlay.bk-touch .bk-hint { display: none; }
@media (max-width: 760px) { .bk-overlay { padding: 56px 12px 20px; } }

/* detail page: view buttons */
.view-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.view-bar .btn { font-size: 14px; padding: 12px; }
.view-bar .btn svg { color: var(--muted); }
.view-bar .btn small { color: var(--muted); font-weight: 500; font-size: 12px; }
@media (max-width: 420px) { .view-bar .btn small { display: none; } }

/* book view: solid background so nothing behind shows through */
.bk-overlay, .bk-overlay.bk-touch { background: #0f0d0d; backdrop-filter: none; -webkit-backdrop-filter: none; }
:root:not([data-theme="dark"]) .bk-overlay { background: #2a2526; }

/* ================= TWO-VIEW GALLERY ================= */
html.gv-lock, html.gv-lock body { overflow: hidden; }
.gv-overlay {
  position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: auto 1fr 1fr; gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  background: #0f0f0f; color: #f2f2f2; animation: fade 0.18s ease;
}
.gv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px; }
.gv-title { min-width: 0; }
.gv-title b { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gv-title small { display: block; font-size: 12px; color: #9a9a9a; }
.gv-close { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.12); flex: none; }
.gv-overlay svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gv-pane { min-height: 0; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #1a1a1a; }
.gv-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; }
.gv-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); }
.gv-tag.after { background: rgba(218, 131, 149, 0.22); color: #f0a9b8; }
.gv-meta { flex: 1; min-width: 0; font-size: 12px; color: #9a9a9a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gv-tools { display: flex; gap: 4px; }
.gv-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #e6e6e6; background: rgba(255, 255, 255, 0.08); }
.gv-icon:active { transform: scale(0.94); }
.gv-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: zoom-in; outline: none; background: #111; }
.gv-stage.zoomed { cursor: grab; }
.gv-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); }
.gv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 50%; will-change: transform; pointer-events: none; }
.gv-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #777; font-size: 14px; }
.gv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.45); z-index: 2; }
.gv-nav.prev { left: 8px; }
.gv-nav.next { right: 8px; }
.gv-stage.zoomed .gv-nav { opacity: 0; pointer-events: none; }
.gv-zoom { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, 0.6); color: #fff; pointer-events: none; }
@media (min-width: 900px) { .gv-overlay { padding: 16px 20% 16px; } }

/* book view: rotatable layer (landscape on phones) */
.bk-overlay { padding: 0; }
.bk-rot { --bk-h: 100vh; position: absolute; inset: 0; display: grid; place-items: center; padding: 56px 16px 24px; }
.bk-frame { width: min(920px, 100%, (var(--bk-h) - 150px) * 1.5); }
.bk-overlay:fullscreen { background: #0f0d0d; }
@media (orientation: portrait) {
  /* phone held upright and the screen did not rotate: turn the book itself 90° */
  .bk-overlay.bk-landscape .bk-rot {
    --bk-h: 100vw;
    inset: auto; top: 0; left: 100vw; width: 100vh; height: 100vw;
    width: 100dvh; left: 100dvw; height: 100dvw;
    transform-origin: 0 0; transform: rotate(90deg);
    padding: 12px 56px 12px 16px;
  }
  .bk-overlay.bk-landscape .bk-frame { width: min(920px, 100%, (var(--bk-h) - 90px) * 1.5); }
  .bk-overlay.bk-landscape .bk-nav { margin-top: 10px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  /* phone in landscape: use the height well */
  .bk-overlay.bk-landscape .bk-rot { padding: 10px 56px 10px 16px; }
  .bk-overlay.bk-landscape .bk-frame { width: min(920px, 100%, (var(--bk-h) - 80px) * 1.5); }
  .bk-overlay.bk-landscape .bk-nav { margin-top: 8px; }
}

/* book view on phones: the book fills the whole landscape screen */
.bk-overlay.bk-landscape .bk-rot { padding: 8px 54px; }
.bk-overlay.bk-landscape .bk-frame { position: relative; width: 100%; height: 100%; justify-content: center; }
.bk-overlay.bk-landscape .bk-slide { width: 100%; }
.bk-overlay.bk-landscape .bk-book { aspect-ratio: auto; height: calc(var(--bk-h) - 16px); }
.bk-overlay.bk-landscape .bk-hint, .bk-overlay.bk-landscape .bk-count { display: none; }
.bk-overlay.bk-landscape .bk-nav { position: absolute; inset: 0; margin: 0; pointer-events: none; }
.bk-overlay.bk-landscape .bk-btn { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: auto; width: 40px; height: 40px; background: rgba(255, 255, 255, 0.1); }
.bk-overlay.bk-landscape .bk-btn[data-go="-1"] { left: -48px; }
.bk-overlay.bk-landscape .bk-btn[data-go="1"] { right: -48px; }
.bk-overlay.bk-landscape .bk-close { top: 8px; right: 7px; }
.bk-overlay.bk-landscape .bk-cover .bk-logo { width: min(62cqw, 260px); }
.bk-overlay.bk-landscape .bk-photo { padding: 4cqw 5cqw 3cqw; }
.bk-overlay.bk-landscape .bk-img { margin-top: 2.5cqw; }
.bk-overlay.bk-landscape .bk-cap { margin-top: 2cqw; }
.bk-overlay.bk-landscape .bk-num { display: none; }
@media (orientation: portrait) {
  .bk-overlay.bk-landscape .bk-rot { padding: 8px 54px; --bk-h: 100vw; }
  .bk-overlay.bk-landscape .bk-frame { width: 100%; }
}
@media (orientation: landscape) {
  .bk-overlay.bk-landscape .bk-rot { --bk-h: 100vh; --bk-h: 100dvh; }
}
.bk-overlay.bk-landscape .bk-frame { overflow: visible; }

/* ================= CLIENTS SECTION (admin-dashboard style) ================= */
.clients { margin-top: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.cl-sub { margin: -6px 2px 12px; color: var(--muted); font-size: 13.5px; }
.cl-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.cl-toolbar .tabs { background: var(--card); border: 1px solid var(--line-2); border-radius: 99px; padding: 3px; }
.cl-toolbar .tab { border-radius: 99px; padding: 7px 14px; }
.cl-toolbar .tab.on { background: var(--fill); box-shadow: none; }
.cl-toolbar .list-search { flex: 0 1 300px; margin: 0; gap: 8px; border-radius: 99px; background: var(--card); border: 1px solid var(--line-2); color: var(--muted); }
.cl-toolbar .list-search svg { width: 15px; height: 15px; }
.cl-new { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 99px; background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 13.5px; }

.cl-over-h, .cl-list-h { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 10px; }
.cl-over-h b, .cl-list-h b { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.cl-over-h span, .cl-list-h > span { font-size: 12.5px; color: var(--muted); }

.cl-metrics { display: grid; grid-template-columns: 1.55fr 1fr 0.9fr; gap: 10px; height: 190px; margin-bottom: 18px; }
.clm { position: relative; border-radius: 18px; padding: 14px 16px; overflow: hidden; min-height: 0; background: var(--card); border: 1px solid var(--line); }
.clm-lab { font-size: 12.5px; color: var(--muted); }
.clm-hero { background: #c5d4ee; border: 0; color: #121212; display: flex; flex-direction: column; }
.clm-hero .clm-lab { color: #3e4a5c; }
.clm-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.clm-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #fff; background: #151515; padding: 4px 10px; border-radius: 99px; }
.clm-live i { width: 6px; height: 6px; border-radius: 50%; background: #9be38f; }
.clm-big { margin: auto 0 0; font-size: clamp(40px, 6vh, 58px); line-height: 1; font-weight: 400; letter-spacing: -2px; position: relative; z-index: 2; }
.clm-foot { margin: 6px 0 0; font-size: 12px; color: #3e4a5c; position: relative; z-index: 2; }
.clm-foot.dim { color: var(--muted); position: absolute; left: 16px; bottom: 12px; margin: 0; font-size: 11.5px; }
.clm-cluster { position: absolute; right: 8px; top: 30px; bottom: 8px; width: 46%; }
.cb-av { position: absolute; width: var(--d); height: var(--d); transform: translate(-50%, -50%); }
.cb-av .av { width: 100%; height: 100%; box-shadow: 0 0 0 2px #c5d4ee; }
.cb-av.more { display: grid; place-items: center; border-radius: 50%; background: #151515; color: #fff; font-size: 12px; font-weight: 600; }

.clm-bub { position: absolute; inset: 30px 10px 28px; }
.bub { position: absolute; width: var(--d); height: var(--d); transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-content: center; text-align: center; color: #151515; }
.bub b { font-size: calc(var(--d) * 0.22); font-weight: 500; line-height: 1.1; letter-spacing: -0.5px; }
.bub small { font-size: 10.5px; opacity: 0.7; }
.bub.pending { background: #dccbc4; }
.bub.complete { background: #c5d4ee; }
.bub.over { background: #f1c6db; }

.clm-stack { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; min-height: 0; }
.clm-stack .clm { display: flex; flex-direction: column; justify-content: space-between; padding: 12px 14px; }
.clm-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.clm-num { margin: 0; font-size: 30px; line-height: 1; letter-spacing: -1px; font-weight: 400; }
.clm-num small { font-size: 13px; color: var(--muted); letter-spacing: 0; }
.clm-avs { display: flex; }
.clm-avs .av { margin-left: -8px; box-shadow: 0 0 0 2px var(--card); }
.clm-pill { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: #f6dbe8; color: #9c2f5f; white-space: nowrap; }
:root[data-theme="dark"] .clm-pill { background: #3a1f2c; color: #f1a9c8; }

/* avatars */
.av { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; background: var(--fill); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 26px; height: 26px; font-size: 10px; }
.av.lg { width: 42px; height: 42px; }
.av.ini { background: #e3dcf3; color: #4b3d73; }
:root[data-theme="dark"] .av.ini { background: #2e2840; color: #cfc3f2; }

/* list header + view switch */
.cl-list-h { align-items: center; margin-bottom: 10px; }
.cl-view { margin-left: auto; display: flex; background: var(--card); border: 1px solid var(--line-2); border-radius: 99px; padding: 3px; }
.cl-view button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.cl-view button.on { background: var(--fill); color: var(--ink); }

/* table */
.clients .list-head {
  display: grid; grid-template-columns: minmax(0, 1.6fr) 120px minmax(0, 1fr) 110px minmax(0, 1fr) 110px; gap: 14px;
  padding: 12px 16px; font-size: 12px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0;
}
.clients .list { background: var(--card); border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; }
.clients .list-head[hidden] + .list { border-radius: 18px; }
.clients .row {
  display: grid; grid-template-columns: minmax(0, 1.6fr) 120px minmax(0, 1fr) 110px minmax(0, 1fr) 110px; gap: 14px; align-items: center;
  grid-template-areas: none; padding: 12px 16px; border-radius: 0; border-bottom: 1px solid var(--line); text-align: left; width: 100%;
}
.clients .row:last-child { border-bottom: 0; }
.clients .row:hover { background: var(--surface-2); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-t { display: flex; flex-direction: column; min-width: 0; }
.who-t .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-t .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clients .row .work { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clients .row .age { font-size: 12.5px; color: var(--muted); display: block; }
.spill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; background: var(--fill); color: var(--ink-2); }
.spill.complete { background: #c5d4ee; color: #1d2a44; }
.spill.over { background: #f1c6db; color: #6e1f45; }
.sdot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.sdot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.sdot.open::before { background: #8fb0ea; }
.sdot.late::before { background: #e48ab3; }
.sdot.done::before { background: #7fcf98; }
.ph { display: flex; align-items: center; gap: 8px; }
.thumbs2 { display: flex; }
.thumbs2 img, .thumbs2 i { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; display: block; background: var(--fill); box-shadow: 0 0 0 2px var(--card); }
.thumbs2 > :nth-child(2) { margin-left: -8px; }
.pcount { font-size: 12px; color: var(--muted); }
.tbar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar { flex: 1; height: 4px; border-radius: 99px; background: var(--fill); overflow: hidden; min-width: 40px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--ink); }
.bar.late i { background: #e48ab3; }
.bar.done i { background: #7fcf98; }
.tt { font-size: 12px; color: var(--ink-2); white-space: nowrap; }

/* cards */
.clients .list.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; background: none; border: 0; border-radius: 0; }
.ccard { display: flex; flex-direction: column; gap: 12px; text-align: left; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: border-color 0.15s, transform 0.12s; }
.ccard:hover { border-color: var(--line-2); }
.ccard:active { transform: scale(0.99); }
.cc-top { display: flex; align-items: center; gap: 12px; }
.cc-top .who-t { flex: 1; }
.cc-more { color: var(--muted); }
.cc-tags { display: flex; align-items: center; gap: 10px; }
.cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.cc-grid small, .cc-bar small { display: block; font-size: 11.5px; color: var(--muted); }
.cc-grid b { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-bar { display: flex; flex-direction: column; gap: 7px; }
.cc-bar-h { display: flex; justify-content: space-between; align-items: baseline; }
.cc-bar-h b { font-size: 12.5px; font-weight: 500; }

/* fit-to-screen list view: metrics stay, the list scrolls inside */
@media (min-width: 1060px) and (min-height: 640px) {
  .shell[data-view="list"] .clients { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .shell[data-view="list"] .clients .list { flex: 1; min-height: 0; overflow-y: auto; }
  .shell[data-view="list"] .clients .list.cards { align-content: start; }
}
@media (min-width: 1060px) and (max-height: 860px) {
  .cl-metrics { height: 150px; margin-bottom: 12px; }
  .cl-toolbar { margin-bottom: 12px; }
}

/* tablet / phone */
@media (max-width: 1060px) {
  .clients .list-head, .clients .row { grid-template-columns: minmax(0, 1.6fr) 110px minmax(0, 1fr) minmax(0, 1fr); }
  .clients .list-head span:nth-child(4), .clients .list-head span:nth-child(6), .clients .row .ph, .clients .row .age { display: none; }
}
@media (max-width: 760px) {
  .cl-toolbar .list-search { flex: 1 1 100%; order: 3; }
  .cl-new { display: none; }
  .cl-metrics { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 170px; height: auto; }
  .clm-hero { grid-column: 1 / -1; }
  .clm-stack { grid-template-rows: 1fr 1fr; }
  .clients .list-head { display: none; }
  .clients .list { border-radius: 18px; }
  .clients .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who stat" "bar bar"; row-gap: 10px; padding: 12px 14px; }
  .clients .row .who { grid-area: who; }
  .clients .row .stat { grid-area: stat; display: block; }
  .clients .row .tbar { grid-area: bar; }
  .clients .row .work { display: none; }
  .clients .list.cards { grid-template-columns: 1fr; }
}
.cl-new { display: none !important; }
.cc-bar .bar { flex: none; width: 100%; height: 4px; }
@media (max-width: 760px) {
  .cl-metrics { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 150px auto; }
  .clm-hero, .clm-bubbles { grid-column: 1 / -1; }
  .clm-stack { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .clm-stack .clm { min-height: 96px; }
  .clm-row { flex-wrap: wrap; row-gap: 6px; }
  .clm-cluster { width: 52%; }
  .cl-list-h > span { display: none; }
}
.clients .list { align-content: start; grid-auto-rows: max-content; }
.island { transform-origin: right center; }

/* ================= CLIENT PAGE MOTION WIDGETS ================= */
/* step progress */
.stp-host { margin: 2px 0 16px; padding: 14px 16px 12px; background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.stp-track { position: relative; height: 30px; margin: 0 22px; }
.stp-track::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 4px; border-radius: 2px; background: var(--fill); }
.stp-bar { position: absolute; left: 0; top: 13px; height: 4px; border-radius: 2px; background: var(--green); will-change: width; }
.stp-dots { position: absolute; inset: 0; }
.stp-dot { position: absolute; top: 0; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 700; will-change: transform; }
.stp-dot b { position: absolute; font-weight: inherit; }
.stp-dot svg { position: absolute; width: 15px; height: 15px; stroke: #fff; }
.stp-names { position: relative; height: 18px; margin: 8px 22px 0; }
.stp-names span { position: absolute; top: 0; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; transition: color 0.3s; }
.stp-names span:first-child { transform: translateX(-22%); }
.stp-names span:last-child { transform: translateX(-78%); }
.stp-names span.on { color: var(--ink); font-weight: 500; }
@media (max-width: 420px) { .stp-names span { font-size: 10px; } .stp-track, .stp-names { margin: 0 14px; } }

/* file drop */
.dz { position: relative; height: 216px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-card); cursor: pointer; overflow: hidden; will-change: transform; -webkit-tap-highlight-color: transparent; outline: none; }
.dz::after { content: ""; position: absolute; inset: 0; background: var(--blue-soft); opacity: var(--h, 0); pointer-events: none; }
.dz:focus-visible { box-shadow: 0 0 0 2px var(--blue); }
.dz-core { position: absolute; left: 50%; top: 38px; width: 72px; height: 72px; margin-left: -36px; border-radius: 50%; background: var(--fill); z-index: 1; will-change: transform; }
.dz-g { position: absolute; inset: 0; border-radius: 50%; background: var(--green); transform: scale(0); will-change: transform; }
.dz-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); opacity: 0; }
.dz-trk { stroke: var(--line-2); }
.dz-arc { stroke: var(--ink); }
.dz-ic { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); will-change: transform, opacity; }
.dz-ic svg { width: 26px; height: 26px; display: block; }
.dz-pct { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; opacity: 0; }
.dz-ok { color: #fff; opacity: 0; }
.dz-ok svg { width: 30px; height: 30px; }
.dz-line { position: absolute; left: 16px; right: 16px; z-index: 1; overflow: hidden; text-align: center; pointer-events: none; }
.dz-line span { position: absolute; left: 0; right: 0; top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; will-change: transform, opacity; }
.dz-t { top: 130px; height: 24px; }
.dz-t span { line-height: 24px; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.dz-s { top: 157px; height: 20px; }
.dz-s span { line-height: 20px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gallery.drag { box-shadow: 0 0 0 2px var(--blue); background: var(--blue-soft); }

/* view bar with ticket */
.view-bar { grid-template-columns: 1fr 1fr 1fr; }
.view-bar.one { grid-template-columns: 1fr; }
@media (max-width: 420px) { .view-bar .btn { padding: 11px 6px; font-size: 13px; } }

/* promised delivery row */
.due-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); text-align: left; }
.due-row > span:first-child { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.due-row small { display: block; font-size: 11.5px; color: var(--muted); }
.due-row b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.due-row.late { border-color: #f1c6db; background: #fdf0f6; }
.due-row.late b { color: #9c2f5f; }
:root[data-theme="dark"] .due-row.late { background: #2a1620; border-color: #4a2236; }
:root[data-theme="dark"] .due-row.late b { color: #f1a9c8; }
.date-field { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 13px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--muted); font-size: 15px; text-align: left; }
.date-field b { font-weight: 400; }
.date-field.set { color: var(--ink); }

/* hold to delete */
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; padding: 14px 16px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-card); }
.danger-zone b { display: block; font-size: 14px; font-weight: 600; }
.danger-zone small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.hb-host { width: 190px; flex-shrink: 0; display: flex; justify-content: flex-end; }
.hb { position: relative; width: 190px; height: 48px; border-radius: 24px; padding: 0; overflow: hidden; background: #fde8e8; color: var(--danger); font-size: 14px; font-weight: 600; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; will-change: width, transform; }
:root[data-theme="dark"] .hb { background: #3a1414; color: #f87171; }
.hb:focus-visible { box-shadow: 0 0 0 2px var(--danger); }
.hb-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--danger); border-radius: inherit; }
.hb-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: opacity 0.2s, filter 0.2s; }
.hb-label svg { width: 16px; height: 16px; }
.hb-top { color: #fff; }
.hb.done { background: var(--danger); }
.hb.done .hb-label { opacity: 0; filter: blur(4px); }
.hb.done .hb-fill { opacity: 0; }
.hb-check { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; color: #fff; opacity: 0; }
.hb-check svg { width: 100%; height: 100%; }
.hb-check path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.hb.done .hb-check { opacity: 1; transition: opacity 0.1s 0.12s; }
.hb.done .hb-check path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.45s cubic-bezier(0.65, 0, 0.35, 1) 0.16s; }
@media (max-width: 520px) { .danger-zone { flex-direction: column; align-items: stretch; } .hb-host { width: 100%; } .hb { width: 100%; } }

/* slide to confirm */
.stc-host { flex: 1; }
.stc { position: relative; height: 56px; border-radius: 99px; background: var(--card); border: 1px solid var(--line-2); overflow: hidden; user-select: none; -webkit-user-select: none; box-shadow: var(--shadow-pop); }
.stc-label, .stc-ink-label, .stc-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-left: 24px; white-space: nowrap; font-size: 14.5px; font-weight: 600; pointer-events: none; }
.stc-label { color: var(--muted); }
.stc-ink { position: absolute; inset: 0; background: var(--green); border-radius: 99px; opacity: 0; pointer-events: none; }
.stc-ink-label { color: #fff; }
.stc-state { color: #fff; opacity: 0; padding-left: 0; }
.stc[data-phase="confirming"] .stc-ink-label, .stc[data-phase="done"] .stc-ink-label { opacity: 0; }
.stc[data-phase="confirming"] .stc-state, .stc[data-phase="done"] .stc-state { opacity: 1; transition: opacity 0.2s; }
.stc-thumb { position: absolute; left: 4px; top: 4px; width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; cursor: grab; touch-action: none; will-change: transform; z-index: 2; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.stc-thumb:active { cursor: grabbing; }
.stc-thumb:focus-visible { box-shadow: 0 0 0 3px var(--blue); }
.stc-arrow { width: 20px; height: 20px; transition: opacity 0.15s, transform 0.2s; }
.stc.armed .stc-arrow { transform: translateX(2px); }
.stc-spin { position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.4px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; opacity: 0; animation: stc-spin 0.7s linear infinite; }
@keyframes stc-spin { to { transform: rotate(360deg); } }
.stc-ok { position: absolute; width: 22px; height: 22px; opacity: 0; }
.stc-ok svg { width: 100%; height: 100%; }
.stc[data-phase="confirming"] .stc-thumb, .stc[data-phase="done"] .stc-thumb { background: #fff; color: var(--green); }
.stc[data-phase="confirming"] .stc-arrow, .stc[data-phase="done"] .stc-arrow { opacity: 0; }
.stc[data-phase="confirming"] .stc-spin { opacity: 1; border-color: rgba(26, 163, 74, 0.25); border-top-color: var(--green); }
.stc[data-phase="done"] .stc-ok { opacity: 1; transition: opacity 0.15s; }

/* loading > success */
.ls { position: relative; overflow: hidden; }
.ls-txt, .ls-done { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; will-change: transform, opacity; }
.ls-done { position: absolute; inset: 0; color: #fff; opacity: 0; }
.ls-done svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ls-done b { font-weight: 600; }
.ls-spin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 10%, var(--btn-ink) 85%, transparent 85%);
  -webkit-mask: radial-gradient(circle closest-side, transparent 68%, #000 72%); mask: radial-gradient(circle closest-side, transparent 68%, #000 72%); opacity: 0; will-change: transform, opacity; }
.btn.ls.busy { margin-left: auto; margin-right: auto; }
.btn.block.ls.busy { display: flex; }

/* undo pill */
.ub-wrap { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 80; transform: translate(-50%, 16px); opacity: 0; transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.22s; pointer-events: none; }
.ub-wrap.in { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.ub-wrap.out { transform: translate(-50%, 10px); opacity: 0; }
.ub { position: relative; display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 99px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap; box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line-2); }
.ub-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ub-ring path { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; }
.ub-in { display: inline-flex; align-items: center; gap: 8px; }
.ub-done { color: var(--muted); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.ub-sep { width: 1px; height: 16px; background: var(--line-2); }
.ub-ic { width: 16px; height: 16px; }
.ub-n { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 8px; }
.ub kbd { font: 500 11px/1 var(--font); color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 5px; }
@media (pointer: coarse) { .ub kbd { display: none; } }
@media (max-width: 760px) { .ub-wrap { bottom: 96px; } }

/* wheel picker */
.wp-sheet { max-width: 420px; }
.wp-lead { min-height: 20px; }
.wp { position: relative; display: flex; justify-content: center; gap: 4px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-2); padding: 0 10px; user-select: none; -webkit-user-select: none; overflow: hidden; }
.wp-band { position: absolute; left: 8px; right: 8px; top: 50%; height: 36px; transform: translateY(-50%); border-radius: 10px; background: var(--fill); pointer-events: none; }
.wp-tick { position: absolute; top: 50%; width: 4px; height: 1px; background: var(--muted-2); pointer-events: none; }
.wp-tick.l { left: 2px; } .wp-tick.r { right: 2px; }
.wp-col { position: relative; height: 100%; perspective: 1000px; touch-action: none; cursor: grab; outline: none; }
.wp-col:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); border-radius: 10px; }
.wp-drum { position: absolute; left: 0; right: 0; top: 50%; height: 36px; margin-top: -18px; transform-style: preserve-3d; will-change: transform; }
.wp-row { position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; font-variant-numeric: tabular-nums; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.wp-muted .wp-row { color: var(--muted-2); }
.wp-band-clip { position: absolute; left: 0; right: 0; top: 50%; height: 36px; margin-top: -18px; overflow: hidden; pointer-events: none; }
.wp-band-clip .wp-drum { top: 0; margin-top: 0; }
.wp-strong .wp-row { color: var(--ink); font-weight: 600; }
.wp-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; }
.wp-chip { padding: 7px 12px; border-radius: 99px; background: var(--fill); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.wp-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 14px; }

/* parallax ticket */
.tk-overlay { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; align-content: center; gap: 14px; background: rgba(12, 10, 10, 0.78); animation: fade 0.2s ease; }
.tk-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.12); }
.tk-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tk-hint { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }
.t-stage { width: 280px; height: 380px; perspective: 900px; }
.ticket { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; cursor: pointer; outline: none; will-change: transform; }
.ticket .side { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #1f1a1b; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.7); }
.ticket .back { transform: rotateY(180deg); background: #fbfaf7; color: #1a1a1a; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 22px 18px; }
.ticket .layer { position: absolute; inset: 0; will-change: transform; pointer-events: none; }
.ticket .l-bg { inset: -20px; background: #2a2224 center/cover no-repeat; }
.ticket .shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 30%, transparent 45%, rgba(0, 0, 0, 0.78)); }
.ticket .l-brand { padding: 20px 22px; }
.ticket .l-brand img { width: 140px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); }
.ticket .title { position: absolute; left: 22px; right: 22px; bottom: 62px; font-size: 38px; line-height: 0.98; font-weight: 600; letter-spacing: -0.035em; color: #fff; overflow-wrap: anywhere; }
.ticket .meta { position: absolute; left: 22px; right: 22px; bottom: 26px; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: rgba(255, 255, 255, 0.78); }
.ticket .meta b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.ticket .glare { position: absolute; inset: 0; pointer-events: none; opacity: var(--g, 0); background: radial-gradient(240px circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, 0.22), transparent 60%); mix-blend-mode: screen; }
.tk-logo { width: 150px; }
.tk-rows { width: 100%; display: grid; gap: 10px; padding: 14px 0; border-top: 1px dashed #d8d2c8; border-bottom: 1px dashed #d8d2c8; }
.tk-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.tk-rows small { color: #8a857c; font-size: 12.5px; }
.tk-rows b { font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-share { margin-top: auto; width: 100%; padding: 12px; border-radius: 14px; background: #128c4a; color: #fff; font-weight: 600; font-size: 14px; text-align: center; }
.ticket .flip-hint { font-size: 11.5px; color: #a9a39a; }
.wp-band-clip { perspective: 1000px; }
body:has(#root-layer .page) .pal { visibility: hidden; }

/* ================= LOGIN: moving clouds behind the card ================= */
.login-body { background: #68b8d7; }
:root[data-theme="dark"] .login-body { background: #1b2a44; }
.login-sky { position: fixed; inset: 0; z-index: 0; background: linear-gradient(180deg, #68b8d7 0%, #adc1de 70%, #f3d9c4 100%); }
:root[data-theme="dark"] .login-sky { background: linear-gradient(180deg, #1b2a44 0%, #2c3a58 75%, #4a2f3a 100%); }
.login-body .login-page { position: relative; z-index: 1; background: transparent; }
.login-body .login-card { background: rgba(243, 243, 242, 0.82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: 0 30px 80px rgba(16, 40, 64, 0.25); }
:root[data-theme="dark"] .login-body .login-card { background: rgba(17, 17, 17, 0.78); border-color: rgba(255, 255, 255, 0.08); }
/* phones: the undo pill and the status island share the bottom of the screen, so the island steps aside */
@media (max-width: 760px) { body.undo-open .island { opacity: 0; pointer-events: none; } }
.tk-share { border: 0; cursor: pointer; }
.tk-share:disabled { opacity: 0.6; cursor: default; }
.tk-dl { width: 100%; padding: 9px; border-radius: 12px; background: transparent; color: #6f6a62; font-size: 13px; font-weight: 600; border: 1px solid #e3ddd3; }
.tk-dl:disabled { opacity: 0.5; }
.ticket .back { gap: 10px; }
