@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Caveat:wght@500;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg: #11162a;
  --shell: #151b33;
  --panel: #1b213b;
  --panel-2: #222a49;
  --panel-3: #2a3357;
  --line: #2f3862;
  --line-soft: #262e52;
  --text: #f4f1ec;
  --muted: #9aa1bd;
  --dim: #6f7799;
  --lilac: #e6a4ff;
  --lilac-ink: #2a1838;
  --orange: #ea5f39;
  --orange-2: #f2784f;
  --sky: #a2d6ed;
  --blue: #1a5fc4;
  --green: #7fd8a8;
  --green-ink: #0f3b2a;
  --yellow: #ffd27a;
  --red: #ff8a7a;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --ease: cubic-bezier(.2, .9, .3, 1);
  --spring: cubic-bezier(.2, 1.5, .4, 1);
  --mono: 'DM Mono', ui-monospace, monospace;
  --hand: 'Caveat', cursive;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.5 Poppins, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--lilac); color: var(--lilac-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 10px; border: 2px solid var(--shell); }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-weight: 500; transition: transform .15s var(--ease), background .15s, border-color .15s, box-shadow .2s; white-space: nowrap; }
.btn:hover { background: var(--panel-3); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--text); color: var(--panel); border-color: var(--text); font-weight: 600; }
.btn-primary:hover { background: #fffaf3; box-shadow: 0 6px 20px rgba(244, 241, 236, .15); }
.btn-orange { background: var(--orange); border-color: var(--orange); color: #fff7f2; font-weight: 600; }
.btn-orange:hover { background: var(--orange-2); box-shadow: 0 8px 24px rgba(234, 95, 57, .35); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn-danger { color: var(--red); border-color: rgba(255, 138, 122, .4); background: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; cursor: pointer; transition: background .15s, transform .15s; }
.icon-btn:hover { background: var(--panel-2); transform: rotate(-6deg); }
.icon-btn svg { width: 18px; height: 18px; }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; background: var(--shell); border: 1px solid var(--line); border-radius: var(--r-sm); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--lilac); box-shadow: 0 0 0 3px rgba(230, 164, 255, .18); }
.code { font-family: var(--mono); font-size: 13px; line-height: 1.6; tab-size: 2; }
label.lbl { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; font-weight: 500; }
.field { margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--dim); margin-top: 6px; }
.hand { font-family: var(--hand); font-size: 22px; color: var(--lilac); line-height: 1.1; }

/* ---------- Login ---------- */
.login { display: grid; grid-template-columns: minmax(380px, 38%) 1fr; min-height: 100vh; }
.login-left { background: var(--shell); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 40px; position: relative; }
.login-card { width: 100%; max-width: 340px; animation: rise .7s var(--ease) both; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 36px; }
.wordmark { font-weight: 800; font-size: 40px; letter-spacing: -1.5px; display: flex; align-items: center; gap: 2px; }
.wordmark .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--orange); display: inline-block; margin-left: 2px; align-self: flex-end; margin-bottom: 12px; animation: bob 2.4s ease-in-out infinite; }
.byline { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.byline img { height: 11px; }
.google-btn { width: 100%; height: 48px; justify-content: center; font-size: 15px; background: var(--text); color: var(--panel); border: 0; border-radius: var(--r); font-weight: 600; }
.google-btn:hover { background: #fffaf3; }
.login-note { font-size: 12px; color: var(--dim); text-align: center; margin-top: 18px; }
.login-err { background: rgba(255, 138, 122, .1); border: 1px solid rgba(255, 138, 122, .35); color: var(--red); padding: 10px 12px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; margin: 18px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-right { background: #c9b3f2; background: linear-gradient(160deg, #cfe9f5 0%, #e6c9ff 55%, #f6c9b8 100%); position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 56px 40px 0; color: #1b213b; }
.login-right h1 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.02; font-weight: 800; letter-spacing: -2px; text-align: center; margin: 14px 0 0; max-width: 680px; }
.login-right .eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .3px; opacity: .8; }
.login-right .scribble { font-family: var(--hand); font-size: 30px; color: var(--orange); transform: rotate(-4deg); margin-top: 6px; }
.hero-stage { position: relative; width: min(560px, 100%); flex: 1; min-height: 420px; margin-top: 18px; }
.hero-photo { position: absolute; left: 50%; bottom: -30px; width: 380px; height: 380px; transform: translateX(-50%); border-radius: 46% 54% 48% 52% / 55% 48% 52% 45%; overflow: hidden; box-shadow: 0 30px 60px rgba(27, 33, 59, .25); animation: morph 12s ease-in-out infinite, rise .9s .1s var(--ease) both; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.float-card { position: absolute; background: #fbf8f3; border-radius: 14px; padding: 10px 14px; box-shadow: 0 16px 40px rgba(27, 33, 59, .18); font-size: 12px; color: #1b213b; animation: floaty 6s ease-in-out infinite, pop .6s var(--spring) both; }
.float-card b { font-size: 26px; display: block; letter-spacing: -1px; }
.float-card .bars { display: flex; align-items: flex-end; gap: 4px; height: 34px; margin-top: 6px; }
.float-card .bars i { width: 10px; border-radius: 3px 3px 0 0; background: #a2d6ed; animation: grow 1.2s var(--spring) both; }
.float-card .bars i:last-child { background: #ea5f39; }
.fc1 { left: -10px; top: 40px; animation-delay: 0s, .4s; }
.fc2 { right: -6px; top: 110px; animation-delay: -2s, .6s; background: #1b213b; color: #f4f1ec; }
.fc3 { left: 20px; bottom: 120px; animation-delay: -4s, .8s; }
.hero-fox { position: absolute; right: 30px; bottom: 6px; width: 150px; z-index: 3; animation: peek 1.2s 1s var(--spring) both; }
.hero-arrow { position: absolute; width: 60px; left: 120px; top: 6px; transform: rotate(150deg); opacity: .9; }
.deco-blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; animation: drift 14s ease-in-out infinite; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 244px 1fr; height: 100vh; transition: grid-template-columns .35s var(--ease); }
.app.collapsed { grid-template-columns: 72px 1fr; }
.side { background: var(--bg); display: flex; flex-direction: column; padding: 14px 12px; overflow: hidden; }
.side-brand { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px; margin-bottom: 14px; }
.side-brand .fox { width: 38px; flex: none; }
.side-brand .wordmark { font-size: 24px; letter-spacing: -.8px; }
.side-brand .wordmark .dot { width: 7px; height: 7px; margin-bottom: 7px; }
.side-brand .byline { font-size: 9px; margin-top: -4px; }
.side-brand .byline img { height: 8px; }
.collapsed .side-brand .txt, .collapsed .nav-item span, .collapsed .nav-group-h span, .collapsed .nav-group-h .chev, .collapsed .nav-sub, .collapsed .side-foot .txt { display: none; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; }
.nav-sep { height: 1px; background: var(--line-soft); margin: 10px 6px; }
.nav-item, .nav-group-h { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: var(--r-sm); color: #d8dbe8; cursor: pointer; font-size: 14px; position: relative; transition: background .15s, color .15s; user-select: none; }
.nav-item svg, .nav-group-h svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover, .nav-group-h:hover { background: var(--panel); }
.nav-group-h .chev { margin-left: auto; width: 14px; height: 14px; transition: transform .25s var(--ease); color: var(--dim); }
.nav-group.open .chev { transform: rotate(180deg); }
.nav-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); margin-left: 19px; border-left: 1px solid var(--line-soft); }
.nav-group.open .nav-sub { grid-template-rows: 1fr; }
.nav-sub > div { overflow: hidden; padding-left: 8px; }
.nav-sub .nav-item { height: 34px; font-size: 13.5px; margin: 2px 0; }
.nav-item.active { background: var(--lilac); color: var(--lilac-ink); font-weight: 600; }
.nav-item.active::after { content: ''; position: absolute; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); animation: pulse 2s infinite; }
.side-foot { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; font-size: 11px; font-weight: 600; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.topbar { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 6px; flex: none; }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; min-width: 0; }
.crumb .sl { color: var(--dim); }
.crumb b { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idtag { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; background: var(--panel); cursor: pointer; }
.idtag:hover { color: var(--text); }
.client-switch { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: var(--r-sm); cursor: pointer; transition: background .15s; position: relative; }
.client-switch:hover { background: var(--panel); }
.cdot { width: 10px; height: 10px; border-radius: 3px; flex: none; transform: rotate(45deg); }
.topbar .grow { flex: 1; }
.content { flex: 1; background: var(--shell); border-top-left-radius: 22px; border: 1px solid var(--line-soft); border-right: 0; border-bottom: 0; overflow: auto; position: relative; }
.page { padding: 28px 36px 60px; max-width: 1280px; animation: pageIn .45s var(--ease) both; }
.page-h { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-h h1 { font-size: 26px; font-weight: 700; letter-spacing: -.6px; margin: 0; }
.page-h h1 .dotp { color: var(--orange); }
.page-h p { margin: 4px 0 0; color: var(--muted); }
.page-h .actions { margin-left: auto; display: flex; gap: 10px; }

/* ---------- Cards / tables ---------- */
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 22px; }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.card .sub { color: var(--muted); font-size: 13px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kpi { position: relative; overflow: hidden; animation: rise .5s var(--ease) both; }
.kpi .v { font-size: 34px; font-weight: 700; letter-spacing: -1.2px; margin-top: 6px; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi .ic { position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; transition: transform .4s var(--spring); }
.kpi:hover .ic { transform: rotate(-12deg) scale(1.1); }
.kpi .ic svg { width: 18px; height: 18px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { position: relative; width: 300px; }
.search svg { position: absolute; left: 11px; top: 11px; width: 17px; height: 17px; color: var(--dim); }
.search .input { padding-left: 36px; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; position: relative; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 13px; position: relative; z-index: 1; transition: color .2s; }
.seg button.on { color: var(--text); background: var(--panel-3); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 12px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; cursor: pointer; animation: rowIn .4s var(--ease) both; }
.table tbody tr:hover { background: var(--panel-2); }
.table tbody tr:hover .row-arrow { opacity: 1; transform: translateX(0); }
.row-arrow { opacity: 0; transform: translateX(-6px); transition: .2s var(--ease); color: var(--muted); }
.tname { font-weight: 500; }
.turl { font-size: 12px; color: var(--dim); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.typeic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-3); flex: none; }
.typeic svg { width: 16px; height: 16px; }
.mono { font-family: var(--mono); }

/* Status: dot + text (geen pill-chips) */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-running { color: var(--green); }
.st-running::before { box-shadow: 0 0 0 0 rgba(127, 216, 168, .6); animation: ping 1.8s infinite; }
.st-paused { color: var(--yellow); }
.st-draft { color: var(--muted); }
.st-completed { color: var(--sky); }
.vkey { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 5px; border-radius: 5px; font-family: var(--mono); font-size: 11px; font-weight: 500; border: 1px solid currentColor; }
.empty { text-align: center; padding: 50px 20px; }
.empty .fox { width: 130px; margin-bottom: 6px; }
.empty h3 { margin: 6px 0 4px; font-size: 18px; }
.empty p { color: var(--muted); margin: 0 auto 18px; max-width: 420px; }

/* Skeleton */
.skel { background: linear-gradient(90deg, var(--panel-2) 0%, var(--panel-3) 50%, var(--panel-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r-sm); }

/* ---------- Wizard ---------- */
.wiz { display: grid; grid-template-columns: 240px 1fr; min-height: 100%; }
.wiz-nav { border-right: 1px solid var(--line-soft); padding: 22px 14px; position: sticky; top: 0; align-self: start; height: 100%; }
.wiz-h { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .6px; margin: 4px 6px 10px; text-transform: uppercase; }
.wiz-h i { width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: var(--text); display: grid; place-items: center; font-style: normal; font-size: 11px; }
.wiz-step { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 10px; border-radius: var(--r-sm); color: #d8dbe8; cursor: pointer; transition: background .15s; }
.wiz-step:hover { background: var(--panel); }
.wiz-step.on { background: var(--panel-2); color: var(--text); font-weight: 500; box-shadow: inset 3px 0 0 var(--lilac); }
.wiz-step .ok { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--green); color: var(--green); display: grid; place-items: center; }
.wiz-step .ok svg { width: 11px; height: 11px; }
.wiz-body { padding: 26px 36px 120px; max-width: 980px; animation: pageIn .4s var(--ease) both; }
.wiz-body h2 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.4px; }
.wiz-body > p { color: var(--muted); margin: 0 0 22px; }
.wiz-foot { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 14px 36px; background: rgba(21, 27, 51, .92); backdrop-filter: blur(8px); border-top: 1px solid var(--line-soft); z-index: 5; }
.wiz-foot .grow { flex: 1; }
.banner { display: flex; gap: 10px; align-items: flex-start; background: rgba(26, 95, 196, .18); border: 1px solid rgba(26, 95, 196, .45); border-radius: var(--r); padding: 12px 14px; margin-bottom: 20px; font-size: 13px; }
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--sky); }
.rule { display: grid; grid-template-columns: 190px 1fr 36px; gap: 8px; margin-bottom: 8px; animation: rise .3s var(--ease) both; }
.vrow { display: grid; grid-template-columns: 54px 1fr 150px auto; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.vrow:last-child { border-bottom: 0; }
.vpanel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; }
.vedit { padding: 0 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; animation: rise .3s var(--ease) both; }
.split-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin: 16px 0 6px; background: var(--panel-3); }
.split-bar i { display: block; height: 100%; transition: width .4s var(--spring); }
.range { width: 100%; accent-color: var(--orange); }
.metric-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); margin-bottom: 8px; cursor: pointer; transition: border-color .15s, transform .15s; }
.metric-card:hover { border-color: var(--panel-3); transform: translateX(2px); }
.metric-card.sel { border-color: var(--lilac); background: rgba(230, 164, 255, .07); }
.metric-card .mk { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; transition: .2s var(--spring); }
.sel .check { background: var(--lilac); border-color: var(--lilac); color: var(--lilac-ink); transform: scale(1.08); }
.check svg { width: 12px; height: 12px; }
.star { color: var(--yellow); }

/* ---------- Report ---------- */
.rep { display: grid; grid-template-columns: 250px 1fr; min-height: 100%; }
.rep-side { border-right: 1px solid var(--line-soft); padding: 20px 14px; }
.rep-side .lbl2 { font-size: 12px; color: var(--muted); margin: 8px 6px; }
.mbtn { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; transition: background .15s; font-size: 14px; }
.mbtn:hover { background: var(--panel); }
.mbtn.on { background: var(--panel-2); font-weight: 500; }
.mtag { font-family: var(--mono); font-size: 11px; border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; }
.rep-main { padding: 24px 32px 80px; animation: pageIn .4s var(--ease) both; min-width: 0; }
.filters { display: grid; grid-template-columns: 56px 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 16px 0; background: var(--panel); }
.filters > * { border-right: 1px solid var(--line); padding: 10px 14px; }
.filters > *:last-child { border-right: 0; }
.filters select { background: transparent; border: 0; width: 100%; outline: none; font-weight: 500; cursor: pointer; }
.filters select option { background: var(--panel); }
.filters small { display: block; color: var(--muted); font-size: 11px; }
.concl { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 16px; background: var(--shell); }
.concl .pbar { flex: 1; height: 8px; background: var(--panel-3); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.concl .pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--lilac)); border-radius: 6px; transition: width 1s var(--ease); }
.concl.win { border-color: rgba(127, 216, 168, .5); background: rgba(127, 216, 168, .07); }
.rt td, .rt th { text-align: right; }
.rt td:first-child, .rt th:first-child { text-align: left; }
.big { font-family: var(--mono); font-size: 15px; }
.rng { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.up { color: var(--green); }
.down { color: var(--red); }
.prob { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.prob .pb { width: 70px; height: 6px; background: var(--panel-3); border-radius: 4px; overflow: hidden; }
.prob .pb i { display: block; height: 100%; border-radius: 4px; animation: grow-x 1s var(--ease) both; transform-origin: left; }
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s var(--ease) forwards; }
.chart-band { opacity: .14; }
.grid-line { stroke: var(--line-soft); }
.axis { fill: var(--dim); font-size: 11px; font-family: var(--mono); }
.tip { position: absolute; pointer-events: none; background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; font-size: 12px; transform: translate(-50%, -110%); opacity: 0; transition: opacity .15s; white-space: nowrap; z-index: 2; }
.legend { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }

/* ---------- Clients ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ccard { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 20px; cursor: pointer; position: relative; overflow: hidden; transition: transform .25s var(--spring), border-color .2s; animation: rise .45s var(--ease) both; }
.ccard:hover { transform: translateY(-4px) rotate(-.4deg); border-color: var(--panel-3); }
.ccard .mono-av { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 18px; color: var(--panel); transition: transform .4s var(--spring); }
.ccard:hover .mono-av { transform: rotate(-8deg) scale(1.06); }
.ccard h3 { margin: 14px 0 0; font-size: 17px; }
.ccard .dom { color: var(--muted); font-size: 13px; }
.ccard .stats { display: flex; gap: 18px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.ccard .stats b { color: var(--text); font-weight: 600; }
.ccard .corner { position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; opacity: .14; transition: transform .5s var(--spring); }
.ccard:hover .corner { transform: scale(1.5); }
.ccard.add { display: grid; place-items: center; text-align: center; border-style: dashed; color: var(--muted); min-height: 186px; }
.ccard.add:hover { color: var(--text); }
.plus { width: 46px; height: 46px; border-radius: 50%; border: 1.5px dashed currentColor; display: grid; place-items: center; margin: 0 auto 8px; transition: transform .4s var(--spring); }
.ccard.add:hover .plus { transform: rotate(90deg); }

/* Smartcode */
.codebox { position: relative; background: #0e1324; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: #cfd5ea; white-space: pre-wrap; word-break: break-all; }
.codebox .copy { position: absolute; right: 10px; top: 10px; }
.codebox:has(.copy) { padding-top: 52px; }
.tk { color: var(--lilac); } .ts { color: var(--sky); } .tc { color: var(--dim); }
.install { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); margin-top: 16px; }
.install .pulse { width: 12px; height: 12px; border-radius: 50%; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 38px; min-height: 26px; margin-bottom: 14px; color: #d8dbe8; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; font-size: 12px; font-weight: 600; }

/* Modal / menus / toasts */
.overlay { position: fixed; inset: 0; background: rgba(9, 12, 26, .62); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; animation: fade .2s both; }
.modal { width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: visible; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); animation: modalIn .45s var(--spring) both; position: relative; }
.modal h2 { margin: 0 0 4px; font-size: 20px; }
.modal .sub { color: var(--muted); margin-bottom: 20px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-fox { position: absolute; width: 74px; right: 22px; top: -52px; animation: peek .8s .15s var(--spring) both; }
.typepick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.typepick div { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; cursor: pointer; transition: .2s var(--ease); }
.typepick div:hover { border-color: var(--panel-3); transform: translateY(-2px); }
.typepick div.on { border-color: var(--lilac); background: rgba(230, 164, 255, .08); }
.typepick b { display: block; font-size: 14px; margin-top: 8px; }
.typepick small { color: var(--muted); font-size: 12px; line-height: 1.35; display: block; }
.swatches { display: flex; gap: 8px; }
.swatches i { width: 28px; height: 28px; border-radius: 8px; cursor: pointer; transition: transform .2s var(--spring); border: 2px solid transparent; }
.swatches i.on { border-color: var(--text); transform: scale(1.12) rotate(-6deg); }
.menu { position: absolute; z-index: 40; min-width: 240px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 6px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); animation: menuIn .22s var(--spring) both; transform-origin: top left; }
.menu .mi { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 14px; }
.menu .mi:hover { background: var(--panel-3); }
.menu .mi small { color: var(--dim); margin-left: auto; font-family: var(--mono); font-size: 11px; }
.menu .msep { height: 1px; background: var(--line); margin: 6px 4px; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; }
.toast { background: var(--text); color: var(--panel); padding: 10px 16px; border-radius: 12px; font-weight: 500; font-size: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); animation: toastIn .45s var(--spring) both; display: flex; align-items: center; gap: 10px; }
.toast.err { background: var(--red); }
.toast .mini-fox { width: 26px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
.loader { display: grid; place-items: center; height: 60vh; text-align: center; color: var(--muted); }
.loader .fox { width: 110px; animation: hop .7s ease-in-out infinite; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; }
.tabs a { padding: 10px 0; color: var(--muted); position: relative; cursor: pointer; font-weight: 500; }
.tabs a.on { color: var(--text); }
.tabs a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--lilac); border-radius: 2px; animation: grow-x .35s var(--ease) both; transform-origin: left; }
.camp-top { display: flex; align-items: center; gap: 14px; }
.camp-top .tabs2 { display: flex; gap: 6px; margin-left: 18px; }
.camp-top .tabs2 a { padding: 6px 12px; border-radius: var(--r-sm); color: var(--muted); font-weight: 500; position: relative; }
.camp-top .tabs2 a.on { color: var(--text); }
.camp-top .tabs2 a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -2px; height: 2px; background: var(--lilac); border-radius: 2px; }
.act-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); animation: rowIn .4s var(--ease) both; }
.act-row:last-child { border-bottom: 0; }
.spark { width: 100%; height: 110px; }
.greet { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.greet .fox { width: 84px; flex: none; }
.greet h1 { font-size: 28px; margin: 0; letter-spacing: -.8px; }
.greet p { margin: 2px 0 0; color: var(--muted); }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--muted); }

/* ---------- Fox animation ---------- */
.fox { overflow: visible; }
.fox-shadow { fill: rgba(9, 12, 26, .25); }
.fox-eye { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.fox-eye:nth-child(2) { animation-delay: .04s; }
.fox-tail { transform-box: fill-box; transform-origin: 0% 90%; animation: wag 1.8s ease-in-out infinite; }
.fox-ear-l { transform-box: fill-box; transform-origin: 70% 100%; animation: twitchL 5.5s infinite; }
.fox-ear-r { transform-box: fill-box; transform-origin: 30% 100%; animation: twitchR 7s 1s infinite; }
.fox-head { transform-box: fill-box; transform-origin: 50% 90%; animation: tilt 7s ease-in-out infinite; }
.fox-glass { transform-box: fill-box; transform-origin: 90% 90%; animation: sweep 3.6s ease-in-out infinite; }
.fox-glint { animation: glint 3.6s ease-in-out infinite; }
.fox-pupil { transition: transform .12s linear; }
.fox-happy .fox-mouth { d: path('M60 77 Q66 85 72 77'); }
.fox-happy { animation: jump .6s var(--spring) 3; }

@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes wag { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
@keyframes twitchL { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-12deg); } 96% { transform: rotate(4deg); } }
@keyframes twitchR { 0%, 88%, 100% { transform: rotate(0); } 92% { transform: rotate(12deg); } }
@keyframes tilt { 0%, 40%, 100% { transform: rotate(0); } 50%, 70% { transform: rotate(-7deg); } }
@keyframes sweep { 0%, 100% { transform: rotate(0) translate(0, 0); } 50% { transform: rotate(-10deg) translate(-3px, -3px); } }
@keyframes glint { 0%, 60%, 100% { opacity: .9; } 70% { opacity: 0; } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px) rotate(-3deg); } }
@keyframes jump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-18px) rotate(-6deg); } }
@keyframes peek { from { transform: translateY(70%) rotate(8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes menuIn { from { opacity: 0; transform: scale(.94) translateY(-6px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes grow { from { transform: scaleY(0); transform-origin: bottom; } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes morph { 0%, 100% { border-radius: 46% 54% 48% 52% / 55% 48% 52% 45%; } 50% { border-radius: 54% 46% 56% 44% / 46% 56% 44% 54%; } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -20px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(127, 216, 168, .55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(127, 216, 168, 0); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 1100px) { .grid4 { grid-template-columns: 1fr 1fr; } .rep, .wiz { grid-template-columns: 1fr; } .rep-side, .wiz-nav { border-right: 0; border-bottom: 1px solid var(--line-soft); height: auto; position: static; } }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; } .login-right { display: none; }
  .app { grid-template-columns: 1fr; } .side { display: none; }
  .page, .wiz-body, .rep-main { padding: 20px 16px 60px; } .grid2 { grid-template-columns: 1fr; } .search { width: 100%; }
  .table { display: block; overflow-x: auto; } .vedit { grid-template-columns: 1fr; } .vrow { grid-template-columns: 44px 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

@media (max-height: 720px) { .modal { overflow: auto; } .modal-fox { display: none; } }
