/* Appreciate B2C Operations Portal: dark glass theme (same design language as the B2B partner terminal) */
:root {
  --bg: #04070E;
  --bg-2: #070B16;
  --navy: #0B1325;
  --ink: #E8EEF8;
  --ink-2: #B8C4D6;
  --muted: #8392AB;
  --faint: #5B6A84;
  --line: rgba(148, 163, 184, 0.13);
  --line-2: rgba(148, 163, 184, 0.22);
  --glass: rgba(14, 21, 40, 0.62);
  --glass-hi: rgba(20, 29, 54, 0.78);
  --cyan: #00D8F6;
  --neon: #00E599;
  --sky: #38EDFF;
  --violet: #818CF8;
  --ok: #00E599;
  --warn: #FBBF24;
  --bad: #FB7185;
  --none: #64748B;
  --accent: #00D8F6;
  --accent-2: #7DE9F7;
  --accent-rgb: 0, 216, 246;
  --radius: 24px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
body[data-ws="onboarding"] { --accent: #FF4FA3; --accent-2: #FF9BCD; --accent-rgb: 255, 79, 163; }
body[data-ws="upi"]        { --accent: #A974FF; --accent-2: #CDB0FF; --accent-rgb: 169, 116, 255; }
body[data-ws="lrs"]        { --accent: #4D8BFF; --accent-2: #9CC0FF; --accent-rgb: 77, 139, 255; }
body[data-ws="mf"]         { --accent: #22D3EE; --accent-2: #8DEBFA; --accent-rgb: 34, 211, 238; }
body[data-ws="trade"]      { --accent: #2EE89A; --accent-2: #9AF6CE; --accent-rgb: 46, 232, 154; }

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh; overflow-x: hidden; color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45;
  background-color: var(--bg);
  background-image:
    radial-gradient(at 12% 8%, rgba(0, 216, 246, 0.10) 0px, transparent 50%),
    radial-gradient(at 88% 6%, rgba(0, 229, 153, 0.08) 0px, transparent 46%),
    radial-gradient(at 50% 100%, rgba(var(--accent-rgb), 0.07) 0px, transparent 60%);
  background-attachment: fixed;
  transition: background-image 0.6s ease;
}
::selection { background: rgba(0, 216, 246, 0.3); color: #fff; }
button, input, select { font-family: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
img { display: block; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ink2 { color: var(--ink-2); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; }
.ml-auto { margin-left: auto; }
.icon { width: 14px; height: 14px; flex-shrink: 0; }
.icon-sm { width: 12px; height: 12px; flex-shrink: 0; }
.icon-md { width: 16px; height: 16px; flex-shrink: 0; }
.icon-lg { width: 20px; height: 20px; flex-shrink: 0; }

/* One label style everywhere: small, spaced capitals */
.t-label { font-size: 10.5px; line-height: 1.3; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #8A9AB5; }
.t-label.dark { color: #A9B8CF; font-size: 11px; }
h1, h2, h3, h4 { margin: 0; }
.h-title { font-size: 20px; font-weight: 900; letter-spacing: -0.02em; color: #F3F7FD; }
.h-card { font-size: 15px; font-weight: 900; color: #F1F5FB; letter-spacing: -0.01em; }
.sub { font-size: 12px; color: var(--muted); }

/* ---------- Background: fluid colour field + aurora orbs ---------- */
#fluidBg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1s ease; }
#fluidBg.ready { opacity: 1; }
.orb { position: absolute; border-radius: 50%; filter: blur(85px); will-change: transform; }
.orb-cyan-1 { width: 780px; height: 780px; top: -120px; left: -80px; background: radial-gradient(circle, rgba(0, 216, 246, 0.50) 0%, rgba(0, 163, 196, 0.22) 50%, transparent 100%); animation: float-orb-1 5s ease-in-out infinite alternate; }
.orb-neon-1 { width: 820px; height: 820px; top: -60px; right: -100px; background: radial-gradient(circle, rgba(0, 229, 153, 0.45) 0%, rgba(16, 220, 120, 0.20) 50%, transparent 100%); animation: float-orb-2 6s ease-in-out infinite alternate; }
.orb-center-active { width: 800px; height: 800px; top: 30%; left: 25%; background: radial-gradient(circle, rgba(0, 216, 246, 0.35) 0%, rgba(0, 229, 153, 0.20) 45%, transparent 70%); animation: float-orb-center 5.5s ease-in-out infinite alternate; }
.orb-sky-1 { width: 750px; height: 750px; bottom: -120px; left: 15%; background: radial-gradient(circle, rgba(56, 237, 255, 0.40) 0%, rgba(0, 229, 153, 0.20) 50%, transparent 100%); animation: float-orb-3 6.5s ease-in-out infinite alternate; }
@keyframes float-orb-1 { 0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); } 100% { transform: translate3d(220px, 160px, 0) scale(1.25) rotate(45deg); } }
@keyframes float-orb-2 { 0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); } 100% { transform: translate3d(-210px, 180px, 0) scale(1.22) rotate(-40deg); } }
@keyframes float-orb-center { 0% { transform: translate3d(0, 0, 0) scale(0.9); } 100% { transform: translate3d(180px, -150px, 0) scale(1.3); } }
@keyframes float-orb-3 { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(180px, -170px, 0) scale(1.28); } }

/* Top progress bar */
#progressBar { position: fixed; top: 0; left: 0; height: 3.5px; width: 0%; z-index: 99999; opacity: 0;
  background: linear-gradient(90deg, var(--cyan), var(--neon), var(--sky));
  box-shadow: 0 0 16px rgba(0, 216, 246, 0.9), 0 0 28px rgba(0, 229, 153, 0.7);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease; }

/* ---------- Login ---------- */
#loginModal { position: fixed; inset: 0; z-index: 60; display: flex; padding: 16px; overflow-y: auto; background: rgba(2, 5, 12, 0.55); backdrop-filter: blur(2px) saturate(160%); transition: opacity 0.5s ease; }
#loginModal.fade { opacity: 0; pointer-events: none; }
.login-mesh { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0, 216, 246, 0.32) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 229, 153, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(56, 237, 255, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 60%, rgba(129, 140, 248, 0.18) 0%, transparent 50%);
  background-size: 250% 250%; animation: meshGlow 3s ease-in-out infinite alternate, meshDrift 5s ease-in-out infinite; opacity: 0.85; }
@keyframes meshGlow { 0% { opacity: 0.45; filter: brightness(0.85); } 50% { opacity: 1; filter: brightness(1.25); } 100% { opacity: 0.5; filter: brightness(0.9); } }
@keyframes meshDrift { 0% { background-position: 0% 0%; } 25% { background-position: 100% 50%; } 50% { background-position: 50% 100%; } 75% { background-position: 0% 50%; } 100% { background-position: 0% 0%; } }
.login-orbs { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.glass-login-card {
  position: relative; z-index: 1; margin: auto; width: 100%; max-width: 480px; padding: 40px;
  background: rgba(10, 16, 32, 0.78); backdrop-filter: blur(50px) saturate(200%); -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid rgba(0, 216, 246, 0.28); border-radius: 32px;
  box-shadow: 0 35px 80px -15px rgba(0, 216, 246, 0.30), 0 20px 40px -15px rgba(0, 229, 153, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.10);
}
.brand-tile { position: relative; width: 96px; height: 96px; margin: 0 auto; }
.brand-tile .glow { position: absolute; inset: -10px; border-radius: 30px; background: linear-gradient(45deg, var(--cyan), var(--neon), var(--sky)); filter: blur(22px); opacity: 0.6; animation: pulse 2.4s ease-in-out infinite; }
.brand-tile .tile { position: relative; width: 100%; height: 100%; border-radius: 24px; background: #fff; padding: 14px; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5); }
.brand-tile img { width: 100%; height: 100%; object-fit: contain; }
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.85; } }
.pill-brand { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #070B16; color: var(--cyan); border: 1px solid rgba(0, 216, 246, 0.32); font-size: 10px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.radar { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--neon); }
.radar::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: var(--neon); opacity: 0.65; animation: radar-ring 2.2s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes radar-ring { 0% { transform: scale(0.9); opacity: 0.8; } 100% { transform: scale(2.4); opacity: 0; } }
.field { position: relative; display: flex; align-items: center; }
.field > .lead { position: absolute; left: 16px; color: var(--faint); pointer-events: none; }
.input {
  width: 100%; background: rgba(4, 8, 18, 0.72); border: 1px solid var(--line-2); border-radius: 18px; padding: 13px 16px 13px 44px;
  font-size: 13px; font-weight: 700; color: var(--ink); transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.input.plain { padding-left: 14px; border-radius: 14px; padding-top: 10px; padding-bottom: 10px; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--cyan); background: rgba(4, 8, 18, 0.9); box-shadow: 0 0 0 4px rgba(0, 216, 246, 0.16), 0 6px 16px -4px rgba(0, 216, 246, 0.18); }
select.input { padding-left: 14px; cursor: pointer; }
select.input option { background: #0B1325; color: var(--ink); }
.btn-primary {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #0A1022 0%, #0E1830 50%, #12203E 100%); color: #fff; border: 1px solid rgba(0, 216, 246, 0.45);
  box-shadow: 0 10px 25px -6px rgba(0, 216, 246, 0.30), inset 0 1px 1px rgba(255, 255, 255, 0.14);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); font-weight: 900; font-size: 12px; border-radius: 16px; padding: 12px 18px;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(0, 229, 153, 0.6); box-shadow: 0 16px 36px -8px rgba(0, 216, 246, 0.42), 0 0 0 1px rgba(0, 229, 153, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.2); }
.btn-primary::after { content: ''; position: absolute; top: -50%; left: -70%; width: 50%; height: 200%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent); transform: rotate(25deg); transition: all 0.75s ease; }
.btn-primary:hover::after { left: 130%; }
.btn-primary.block { width: 100%; padding: 14px 24px; text-transform: uppercase; letter-spacing: 0.08em; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 12px; font-size: 12px; font-weight: 800;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); color: var(--ink-2); transition: all 0.2s ease; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(0, 216, 246, 0.35); }
.btn.sm { height: 28px; padding: 0 10px; border-radius: 10px; font-size: 11px; }
.btn.icon-only { width: 34px; justify-content: center; padding: 0; }
.btn-close { width: 32px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.06); color: var(--muted); transition: all 0.2s; flex-shrink: 0; }
.btn-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.gradient-text { background: linear-gradient(135deg, var(--cyan) 0%, var(--neon) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.alert { padding: 12px; border-radius: 16px; background: rgba(251, 113, 133, 0.10); border: 1px solid rgba(251, 113, 133, 0.35); color: #FDA4AF; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; }

/* ---------- App shell ---------- */
#app { position: relative; z-index: 10; min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 64px; opacity: 0; transition: opacity 0.5s ease; }
#app.ready { opacity: 1; }
.shell { width: 100%; max-width: 1680px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.glass-nav {
  position: sticky; top: 0; z-index: 40; background: rgba(6, 10, 20, 0.62); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line); box-shadow: 0 4px 20px -6px rgba(0, 0, 0, 0.4), inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.glass-nav.scrolled { background: rgba(6, 10, 20, 0.80); box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.6); }
.nav-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-top: 12px; padding-bottom: 12px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand .logo { width: 44px; height: 44px; border-radius: 16px; background: #fff; padding: 6px; box-shadow: 0 6px 16px -4px rgba(0, 216, 246, 0.4); flex-shrink: 0; }
.brand .logo img { width: 100%; height: 100%; object-fit: contain; }
.brand .word { font-weight: 900; font-size: 23px; letter-spacing: -0.05em; color: #fff; }
.brand .tag { font-size: 11px; color: var(--muted); font-weight: 600; }

/* Workspace tabs */
.ws-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 18px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tab { --c: 0, 216, 246; position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 14px; font-size: 12.5px; font-weight: 800; color: var(--muted); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap; }
.ws-tab .dot { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--c)); opacity: 0.55; transition: all 0.3s; }
.ws-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.ws-tab:hover .dot { opacity: 1; }
.ws-tab.active { color: #fff; background: linear-gradient(135deg, rgba(var(--c), 0.24), rgba(var(--c), 0.08)); box-shadow: inset 0 0 0 1px rgba(var(--c), 0.5), 0 8px 22px -8px rgba(var(--c), 0.55); }
.ws-tab.active .dot { opacity: 1; box-shadow: 0 0 0 3px rgba(var(--c), 0.25), 0 0 12px rgba(var(--c), 0.9); }
.ws-tab[data-ws="onboarding"] { --c: 255, 79, 163; }
.ws-tab[data-ws="upi"] { --c: 169, 116, 255; }
.ws-tab[data-ws="lrs"] { --c: 77, 139, 255; }
.ws-tab[data-ws="mf"] { --c: 34, 211, 238; }
.ws-tab[data-ws="trade"] { --c: 46, 232, 154; }

.nav-right { display: flex; align-items: center; gap: 10px; }
.pipeline { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); }
.pipeline .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--none); transition: background 0.3s, box-shadow 0.3s; }
.pipeline .dot.live { background: var(--neon); box-shadow: 0 0 0 3px rgba(0, 229, 153, 0.18), 0 0 10px rgba(0, 229, 153, 0.8); }
.pipeline .dot.err { background: var(--bad); box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18); }
.avatar { width: 40px; height: 40px; border-radius: 16px; background: #070B16; color: var(--cyan); border: 1px solid rgba(0, 216, 246, 0.4); font-family: var(--mono); font-weight: 900; font-size: 12px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.avatar:hover { box-shadow: 0 0 0 3px rgba(0, 216, 246, 0.2); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 288px; max-width: calc(100vw - 2rem); padding: 12px; border-radius: 18px; background: rgba(11, 17, 33, 0.97); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7); }
.menu-item { width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; font-size: 12px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.menu-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

/* Slicer ribbon */
.ribbon { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding-top: 10px; padding-bottom: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.ribbon .grp { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; max-width: 100%; }
.ribbon .grp.who { margin-left: auto; }
.ribbon .ws-row { flex: 1 0 100%; align-items: center; padding-top: 10px; border-top: 1px dashed var(--line); }
.ribbon .ws-row:empty { display: none; }
#uidBox .ms-btn { border-color: rgba(var(--accent-rgb), 0.35); background: rgba(var(--accent-rgb), 0.06); }
.seg { display: inline-flex; align-items: center; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); gap: 2px; }
.seg button { padding: 5px 10px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--muted); transition: all 0.2s ease; white-space: nowrap; }
.seg button:hover:not(.on) { color: #fff; background: rgba(255, 255, 255, 0.05); }
.seg button.on { color: #fff; font-weight: 900; background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.30), rgba(var(--accent-rgb), 0.12)); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.55); }
.seg.brand button.on { background: #070B16; color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(0, 216, 246, 0.5); }
.chipbox { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); }
.date-field { background: transparent; border: 0; color: var(--ink); font-weight: 800; font-size: 12px; color-scheme: dark; min-width: 0; }
.date-field:focus { outline: none; }
.date-field::-webkit-calendar-picker-indicator { display: none; }

/* Multi-select dropdown */
.ms { position: relative; min-width: 0; }
.ms-btn { display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); font-size: 12px; max-width: 280px; transition: border-color 0.2s; }
.ms-btn:hover { border-color: rgba(var(--accent-rgb), 0.45); }
.ms-btn .ms-label { font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ms-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px; max-width: 340px; max-height: 360px; overflow-y: auto; padding: 6px; border-radius: 16px; background: rgba(11, 17, 33, 0.98); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.75); }
.ms-pop.right { left: auto; right: 0; }
.ms-opt { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: left; }
.ms-opt:hover { background: rgba(255, 255, 255, 0.06); }
.ms-opt .ms-check { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--faint); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 11px; color: transparent; }
.ms-opt.on { color: #fff; }
.ms-opt.on .ms-check { background: rgba(var(--accent-rgb), 0.25); border-color: var(--accent); color: var(--accent); }
.ms-hint { padding: 8px 10px 4px; font-size: 10.5px; font-weight: 600; color: var(--faint); }

/* ---------- Main ---------- */
main { width: 100%; max-width: 1680px; margin: 0 auto; padding: 28px 32px; display: flex; flex-direction: column; gap: 24px; flex: 1; }
.context { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.context .ttl { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.ws-badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 12px; color: var(--accent); background: rgba(var(--accent-rgb), 0.12); border: 1px solid rgba(var(--accent-rgb), 0.35); box-shadow: 0 0 22px -6px rgba(var(--accent-rgb), 0.7); align-self: center; }
.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 18px; background: rgba(251, 113, 133, 0.08); border: 1px solid rgba(251, 113, 133, 0.3); color: #FDA4AF; font-weight: 700; font-size: 12px; }

/* Glass cards */
.card {
  position: relative; min-width: 0; padding: 26px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}
.card.hover:hover, .kpi:hover { transform: translateY(-3px); background: var(--glass-hi); border-color: rgba(var(--accent-rgb), 0.32);
  box-shadow: 0 26px 50px -18px rgba(var(--accent-rgb), 0.28), 0 0 0 1px rgba(var(--accent-rgb), 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head .sub { margin-top: 2px; }

/* KPI row */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.kpi { position: relative; min-width: 0; padding: 22px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.045); display: flex; flex-direction: column; justify-content: space-between; gap: 12px; overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s, background-color 0.35s; }
.kpi.click { cursor: pointer; }
.kpi .kicon { width: 32px; height: 32px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #070B16; border: 1px solid rgba(var(--accent-rgb), 0.38); color: var(--accent); flex-shrink: 0; }
.kpi .val { font-family: var(--mono); font-weight: 900; font-size: 27px; letter-spacing: -0.02em; color: #fff; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .foot { font-size: 11px; color: var(--muted); }
.kpi .foot strong { color: var(--ink); font-family: var(--mono); }
.kpi .accent-sub { font-size: 12px; font-weight: 800; color: var(--accent-2); margin-top: 2px; }
.hero {
  grid-column: span 2; position: relative; overflow: hidden; padding: 28px; border-radius: 28px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-width: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(var(--accent-rgb), 0.30) 0%, transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(0, 229, 153, 0.16) 0%, transparent 50%),
    linear-gradient(145deg, #060A15 0%, #0A1224 50%, #0E1832 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  box-shadow: 0 20px 40px -12px rgba(var(--accent-rgb), 0.28), 0 10px 25px -8px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.16);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.hero:hover { transform: translateY(-3px) scale(1.006); box-shadow: 0 30px 65px -12px rgba(var(--accent-rgb), 0.40), 0 14px 30px -8px rgba(0, 229, 153, 0.22), 0 0 0 1px rgba(var(--accent-rgb), 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.26); }
.hero .hicon { width: 40px; height: 40px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: rgba(2, 6, 14, 0.85); border: 1px solid rgba(var(--accent-rgb), 0.45); color: var(--accent); }
.hero .big { font-family: var(--mono); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; font-size: clamp(1.9rem, 4.2vw, 3rem); word-break: break-all;
  background: linear-gradient(135deg, var(--accent) 0%, var(--neon) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .chip { font-family: var(--mono); font-weight: 900; color: #6EE7B7; background: rgba(2, 6, 14, 0.85); padding: 2px 10px; border-radius: 9px; border: 1px solid rgba(52, 211, 153, 0.4); font-size: 12px; }
.badge-delta { font-size: 11.5px; font-weight: 800; padding: 4px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid; white-space: nowrap; }
.badge-delta.up { background: rgba(6, 78, 59, 0.55); color: #6EE7B7; border-color: rgba(52, 211, 153, 0.4); }
.badge-delta.down { background: rgba(76, 5, 25, 0.55); color: #FDA4AF; border-color: rgba(251, 113, 133, 0.4); }
.badge-delta.flat { background: rgba(30, 41, 59, 0.6); color: var(--ink-2); border-color: var(--line-2); }
.hbar { width: 100%; height: 10px; border-radius: 999px; overflow: hidden; display: flex; padding: 2px; gap: 3px; background: #02050C; border: 1px solid rgba(148, 163, 184, 0.14); }
.hbar > span { height: 100%; border-radius: 999px; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); min-width: 0; }
.delta { font-size: 11px; font-weight: 700; margin-top: 2px; min-height: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.delta .up { color: #34D399; } .delta .down { color: #FB7185; }

/* Section tabs */
.sections { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 4px; border-radius: 18px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); scrollbar-width: none; }
.sections::-webkit-scrollbar { display: none; }
.sec-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 13px; font-size: 12.5px; font-weight: 800; color: var(--muted); white-space: nowrap; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.sec-btn:hover:not(.on) { color: #fff; background: rgba(255, 255, 255, 0.05); }
.sec-btn.on { color: #fff; background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.26), rgba(var(--accent-rgb), 0.08)); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.5), 0 8px 20px -10px rgba(var(--accent-rgb), 0.7); }
.sec-btn .count { font-family: var(--mono); font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--ink-2); }
.sec-btn.on .count { background: rgba(var(--accent-rgb), 0.28); color: #fff; }
#sectionBody { display: flex; flex-direction: column; gap: 22px; min-height: 300px; }
.anim-in { animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
.anim-in:nth-child(2) { animation-delay: 0.05s; } .anim-in:nth-child(3) { animation-delay: 0.1s; } .anim-in:nth-child(4) { animation-delay: 0.15s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* Layout grids */
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.g75 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 22px; }
.g84 { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 22px; }

/* Loading sheen */
.skel { position: relative; }
.is-loading .skel > * { opacity: 0; transition: none; }
.skel > * { transition: opacity 0.5s ease; }
.is-loading .skel::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.05) 40%, rgba(var(--accent-rgb), 0.12) 50%, rgba(255, 255, 255, 0.05) 60%, transparent 80%);
  background-size: 250% 100%; animation: glassSweep 1.6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes glassSweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* Bar lists (funnel, status, banks) */
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar-row { width: 100%; display: grid; grid-template-columns: 200px minmax(0, 1fr) 104px; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 12px; text-align: left; transition: background 0.2s; }
.bar-row.click { cursor: pointer; }
.bar-row.click:hover { background: rgba(var(--accent-rgb), 0.07); }
.bar-row .lbl { font-size: 12px; font-weight: 800; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .lbl .tag { display: inline-block; margin-left: 6px; font-size: 9.5px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; vertical-align: 1px; }
.bar-track { position: relative; height: 28px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); overflow: hidden; }
.bar-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 9px; width: 0; transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.bar-fill.main { background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 18px -4px rgba(var(--accent-rgb), 0.8); }
.bar-fill.ghost { background: repeating-linear-gradient(135deg, rgba(var(--accent-rgb), 0.24) 0 6px, rgba(var(--accent-rgb), 0.12) 6px 12px); border: 1px solid rgba(var(--accent-rgb), 0.35); }
.bar-num { position: absolute; top: 0; bottom: 0; left: 10px; display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); white-space: nowrap; }
.bar-num .att { color: var(--ink-2); font-weight: 700; }
.bar-row .pct { text-align: right; }
.bar-row .pct b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 900; color: #fff; }
.bar-row .pct span { display: block; font-size: 10px; font-weight: 700; color: var(--faint); }
.bar-row .pct span.drop { color: var(--bad); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 11px; font-weight: 700; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.note { font-size: 11px; font-weight: 800; padding: 6px 12px; border-radius: 12px; }
.note.bad { color: #FDA4AF; background: rgba(251, 113, 133, 0.10); border: 1px solid rgba(251, 113, 133, 0.25); }
.note.info { color: var(--accent-2); background: rgba(var(--accent-rgb), 0.08); border: 1px solid rgba(var(--accent-rgb), 0.25); }

/* Tables */
.tbl-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: rgba(2, 6, 14, 0.35); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { position: sticky; top: 0; z-index: 1; background: rgba(9, 14, 28, 0.96); text-align: left; padding: 11px 14px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #8A9AB5; border-bottom: 1px solid var(--line-2); white-space: nowrap; cursor: pointer; user-select: none; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl th .sort { color: var(--accent); margin-left: 4px; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid rgba(148, 163, 184, 0.07); color: var(--ink); font-weight: 600; vertical-align: top; }
.tbl td.num { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.tbl td.wrapcell { min-width: 220px; max-width: 520px; white-space: normal; word-break: break-word; }
.tbl tbody tr { transition: background 0.15s; }
.tbl tbody tr:hover { background: rgba(var(--accent-rgb), 0.05); }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.drill { cursor: pointer; color: var(--accent-2); text-decoration: underline dotted rgba(var(--accent-rgb), 0.5); text-underline-offset: 3px; }
.tbl td.drill:hover { color: #fff; background: rgba(var(--accent-rgb), 0.10); }
.tbl td.zero { color: var(--faint); }
.tbl tfoot td { font-weight: 900; border-top: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.025); }
.tbl .uid { font-family: var(--mono); font-size: 11.5px; color: var(--accent-2); white-space: nowrap; }
.tbl .uid { display: block; }
.uref { display: block; margin-top: 2px; font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .02em; white-space: nowrap; cursor: copy; opacity: .85; }
.uid-opt { display: flex; flex-direction: column; min-width: 0; }
.uid-opt .uref { margin-top: 1px; font-size: 9.5px; cursor: inherit; }
.uid-chip-txt small { display: block; font-size: 9px; color: var(--muted); opacity: .9; }
.uid-chip { display: inline-flex; align-items: center; gap: 6px; text-align: left; }
.tbl-scroll { max-height: 560px; overflow-y: auto; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; white-space: nowrap; border: 1px solid transparent; }
.pill.ok { color: #6EE7B7; background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.3); }
.pill.warn { color: #FCD34D; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.3); }
.pill.bad { color: #FDA4AF; background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.3); }
.pill.none { color: var(--ink-2); background: rgba(100, 116, 139, 0.16); border-color: rgba(100, 116, 139, 0.3); }
.pill.acc { color: var(--accent-2); background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.3); }
.search { position: relative; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { width: 100%; height: 34px; padding: 0 12px 0 32px; border-radius: 12px; background: rgba(2, 6, 14, 0.55); border: 1px solid var(--line-2); color: var(--ink); font-size: 12px; font-weight: 700; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15); }

/* Charts */
.chart { position: relative; width: 100%; }
.chart.h220 { height: 220px; } .chart.h260 { height: 260px; } .chart.h300 { height: 300px; } .chart.h340 { height: 340px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center b { font-family: var(--mono); font-size: 24px; font-weight: 900; color: #fff; }
.chip-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.chip-btn { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); font-size: 11.5px; text-align: left; transition: all 0.2s; min-width: 0; }
.chip-btn:hover { background: rgba(var(--accent-rgb), 0.08); border-color: rgba(var(--accent-rgb), 0.35); }
.chip-btn .sw { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.chip-btn b { color: #fff; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip-btn span.n { margin-left: auto; color: var(--muted); font-family: var(--mono); font-weight: 700; }

/* Stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); min-width: 0; }
.tile b { display: block; margin-top: 4px; font-family: var(--mono); font-size: 18px; font-weight: 900; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile span.s { display: block; font-size: 10.5px; color: var(--faint); font-weight: 600; margin-top: 2px; }
.tile.click { cursor: pointer; transition: all 0.2s; }
.tile.click:hover { border-color: rgba(var(--accent-rgb), 0.4); background: rgba(var(--accent-rgb), 0.07); }

/* Heatmap */
.heat { display: grid; grid-template-columns: 36px repeat(24, minmax(0, 1fr)); gap: 3px; font-size: 9.5px; color: var(--faint); font-weight: 700; }
.heat .c { aspect-ratio: 1 / 1; border-radius: 4px; background: rgba(255, 255, 255, 0.03); transition: transform 0.15s; min-height: 12px; }
.heat .c.click { cursor: pointer; }
.heat .c.click:hover { transform: scale(1.25); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6); }
.heat .lab { display: flex; align-items: center; }
.heat .hl { text-align: center; }

/* Drill drawer */
#drill { position: fixed; inset: 0; z-index: 55; }
#drill .backdrop { position: absolute; inset: 0; background: rgba(1, 3, 8, 0.6); opacity: 0; transition: opacity 0.3s ease; backdrop-filter: blur(3px); }
#drill .panel { position: absolute; right: 0; top: 0; height: 100%; width: min(880px, 100%); transform: translateX(100%); transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(8, 13, 26, 0.96); border-left: 1px solid rgba(var(--accent-rgb), 0.35); box-shadow: -30px 0 80px -20px rgba(0, 0, 0, 0.8), -1px 0 30px -10px rgba(var(--accent-rgb), 0.35);
  display: flex; flex-direction: column; border-radius: 28px 0 0 28px; }
#drill.open .backdrop { opacity: 1; }
#drill.open .panel { transform: translateX(0); }
.drill-head { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.drill-body { flex: 1; overflow: auto; padding: 16px 24px 24px; }
.drill-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.drill-stats .tile { padding: 8px 14px; }
.drill-stats .tile b { font-size: 16px; }
.copy-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 99; padding: 8px 16px; border-radius: 999px; background: #070B16; border: 1px solid rgba(0, 229, 153, 0.5); color: var(--neon); font-size: 12px; font-weight: 800; transition: all 0.3s ease; pointer-events: none; }
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 58; display: flex; padding: 24px; background: rgba(1, 3, 8, 0.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); opacity: 0; transition: opacity 0.3s ease; overflow-y: auto; }
.modal.show { opacity: 1; }
.modal .sheet { margin: auto; width: 100%; padding: 32px; border-radius: 30px; background: rgba(9, 14, 28, 0.96); border: 1px solid rgba(0, 216, 246, 0.24); box-shadow: 0 35px 80px -15px rgba(0, 0, 0, 0.8), 0 20px 40px -20px rgba(0, 216, 246, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.06); animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.modal .sheet.w-md { max-width: 460px; } .modal .sheet.w-xl { max-width: 1040px; }
.mhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.mhead .mi { width: 40px; height: 40px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: #070B16; border: 1px solid rgba(0, 229, 153, 0.4); color: var(--neon); flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.req { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--bad); }
.creds { padding: 18px; border-radius: 18px; background: #04070F; border: 1px solid rgba(0, 229, 153, 0.35); }

/* Scrollbars, focus, motion */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), 0.35); border-radius: 999px; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1500px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hero { grid-row: span 2; } }
@media (max-width: 1200px) { .g75, .g84 { grid-template-columns: minmax(0, 1fr); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hide-lg { display: none !important; } }
@media (max-width: 1024px) { .g2 { grid-template-columns: minmax(0, 1fr); } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero { grid-row: auto; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .shell { padding-left: 16px; padding-right: 16px; } main { padding: 18px 16px; }
  .g3 { grid-template-columns: minmax(0, 1fr); } .kpis { grid-template-columns: minmax(0, 1fr); } .hero { grid-column: span 1; }
  .card { padding: 18px; } .bar-row { grid-template-columns: 110px minmax(0, 1fr) 76px; gap: 8px; } .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none !important; } .glass-login-card { padding: 26px; } #drill .panel { border-radius: 0; }
  .glass-nav { position: relative; }
}

/* Exact value on hover for shortened figures (L, Cr, K, M, rounded) */
.xv { cursor: help; text-decoration: underline dotted rgba(148, 163, 184, 0.45); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.hero .big .xv, .kpi .val .xv { text-decoration: none; }
.xv-tip { position: fixed; z-index: 120; pointer-events: none; display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 12px;
  background: #04070E; color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 900; white-space: nowrap;
  border: 1px solid rgba(var(--accent-rgb), 0.6); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.8), 0 0 18px -6px rgba(var(--accent-rgb), 0.7);
  opacity: 0; transform: translateY(4px); transition: opacity 0.15s ease, transform 0.15s ease; }
.xv-tip.show { opacity: 1; transform: translateY(0); }
.xv-tip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--neon); }
.ms-pop .search input { height: 30px; font-size: 11.5px; }
.ms-opt .truncate { min-width: 0; }
.ms-list { max-height: 300px; overflow-y: auto; }
.ms-pop { max-height: none; overflow: visible; }

/* Funnel card flips over to the daily funnel table */
.flip-card { perspective: 1800px; min-width: 0; }
.flip-card .flip-inner { display: grid; transform-style: preserve-3d; transition: transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1); }
.flip-card .flip-face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; min-width: 0; }
.flip-card .flip-face > .card { height: 100%; }
.flip-card .flip-face.back { transform: rotateY(180deg); }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-card:not(.flipped) .flip-face.back, .flip-card.flipped .flip-face:not(.back) { pointer-events: none; }
.daily-funnel { max-height: none; }
.daily-funnel table { width: max-content; min-width: 100%; }
.daily-funnel th.dday { border-left: 1px solid var(--line-2); color: #fff; }
.daily-funnel .stage { position: sticky; left: 0; z-index: 2; background: rgba(9, 14, 28, 0.98); min-width: 230px; font-weight: 800; color: var(--ink); border-right: 1px solid var(--line-2); }
.daily-funnel thead .stage { z-index: 3; }
.daily-funnel td.conv { color: #fff; font-weight: 800; border-right: 1px solid var(--line); }
.daily-funnel td.drill { color: var(--ink); text-decoration: none; }
.daily-funnel td.drill:hover { color: #fff; }
.cal-btn { display: inline-flex; align-items: center; padding: 2px; border-radius: 6px; }
.cal-btn:hover { background: rgba(var(--accent-rgb), 0.15); }
.date-field { cursor: pointer; }
.uid-pop { min-width: 380px; max-width: min(460px, calc(100vw - 24px)); }
@media (max-width: 520px) { .uid-pop { min-width: calc(100vw - 40px); max-width: calc(100vw - 40px); } }
.uid-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 4px 8px; }
.uid-chip { cursor: pointer; font-family: var(--mono); font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ms-btn.active-uid { border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15); }
.bar-row.funnel-row { grid-template-columns: 200px minmax(0, 1fr) 120px; }
@media (max-width: 760px) {
  .bar-row.funnel-row { grid-template-columns: 96px minmax(0, 1fr) 86px; }
  .bar-num .att { display: none; }
  .bar-row .lbl .tag { display: none; }
}

/* Trend: previous-period comparison hint under the chart */
.cmp-note{margin-top:8px;font-size:11px;font-weight:600;color:var(--muted);display:flex;align-items:center;gap:8px;justify-content:center;text-align:center}
.cmp-note i{display:none;width:22px;height:0;border-top:2px dashed currentColor;opacity:.8}
.cmp-note.on{color:#B8C4D6}
.cmp-note.on i{display:inline-block}
