/* Runpip Admin: black frame, soft canvas, pastel cards (after the "Dei" reference) */
:root {
  color-scheme: light;
  --frame: #0e0e10;
  --canvas: #f7f7f4;
  --panel: #efefeb;
  --card: #ffffff;
  --line: #ebebe6;
  --ink: #121214;
  --text-2: #55555d;
  --muted: #94949b;
  --sky: #d8f1fb;   --sky-d: #2a8fc0;
  --mint: #d3f5dd;  --mint-d: #23a25a;
  --lav: #f0d8fb;   --lav-d: #a44bd0;
  --lilac: #e4defe; --lilac-d: #6a56e6;
  --butter: #fdefb8; --butter-d: #b07b00;
  --pink: #ffd8e6;  --pink-d: #d43d76;
  --peach: #ffe3cf; --peach-d: #d2691e;
  --bar: #7d6bf2;
  --line-c: #23a25a;
  --good: #23a25a; --bad: #e0445c; --warn: #c78800;
  --r-xl: 34px; --r-lg: 26px; --r: 20px; --r-sm: 14px;
  --display: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --spring: cubic-bezier(.2, 1.3, .35, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --soft: 0 1px 1px rgba(18, 18, 20, .03), 0 10px 30px -12px rgba(18, 18, 20, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--frame); color: var(--ink); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3 { margin: 0; font-family: var(--display); letter-spacing: -.02em; font-weight: 600; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
[hidden] { display: none !important; }

/* ---------- buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; background: var(--card); border: 1px solid var(--line); transition: transform .25s var(--spring), background .2s, box-shadow .2s; white-space: nowrap; text-decoration: none; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--soft); }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.round { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; background: #eeeeea; transition: transform .25s var(--spring), background .2s; flex: none; }
.round svg { width: 16px; height: 16px; }
.round:hover { transform: scale(1.1); }
.round.ink { background: var(--ink); color: #fff; }
.round.ok:hover { background: var(--mint); color: var(--mint-d); }
.field { width: 100%; height: 48px; border-radius: 16px; border: 1.5px solid transparent; background: #efefeb; color: var(--ink); padding: 0 16px; font: inherit; font-size: 15px; transition: border-color .2s, background .2s, box-shadow .2s; }
textarea.field { height: auto; min-height: 90px; padding: 13px 16px; resize: vertical; }
.field:focus { outline: none; background: #fff; border-color: var(--ink); box-shadow: 0 0 0 5px rgba(18, 18, 20, .06); }
.stack { display: grid; gap: 10px; }
.err { color: var(--bad); font-weight: 600; min-height: 18px; margin: 10px 0 0; font-size: 13px; }

/* ---------- boot & login ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: #a9a9b0; font-weight: 600; }
.boot img { width: 64px; height: 64px; border-radius: 18px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .7; } }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(800px 500px at 20% 0%, #2b2442 0, transparent 60%), radial-gradient(700px 500px at 100% 100%, #1d3324 0, transparent 60%), var(--frame); }
.login-card { width: min(100%, 400px); background: var(--canvas); border-radius: var(--r-xl); padding: 34px 28px 26px; text-align: center; box-shadow: 0 40px 100px rgba(0, 0, 0, .5); animation: rise .7s var(--spring) both; }
.login-art { position: relative; width: 96px; height: 96px; margin: 0 auto; }
.login-art img { position: relative; z-index: 1; width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 16px 40px rgba(125, 107, 242, .4); animation: float 4s ease-in-out infinite; }
.login-art i { position: absolute; border-radius: 50%; }
.login-art .b1 { width: 26px; height: 26px; background: var(--mint); left: -22px; top: 10px; animation: float 3s ease-in-out infinite .3s; }
.login-art .b2 { width: 18px; height: 18px; background: var(--butter); right: -18px; top: -4px; animation: float 3.4s ease-in-out infinite .8s; }
.login-art .b3 { width: 14px; height: 14px; background: var(--pink); right: -10px; bottom: 4px; animation: float 2.8s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.login-card h1 { margin: 20px 0 4px; font-size: 30px; }
.login-card .muted { margin: 0 0 22px; }
.login-card .btn { width: 100%; height: 52px; }
.or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: 12px; }
.or i { flex: 1; height: 1px; background: var(--line); }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; padding: 0 12px 12px; }
.bar { height: 84px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 22px; color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; border-radius: 11px; }
.brand b { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.nav { position: relative; display: flex; gap: 6px; }
.nav button { position: relative; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 13px; border-radius: 999px; color: #b6b6bd; font-weight: 600; transition: color .25s, background .25s; }
.nav button svg { width: 20px; height: 20px; flex: none; transition: transform .35s var(--spring); }
.nav button span { display: none; }
.nav button.on { color: #fff; padding: 0 16px; }
.nav button.on span { display: inline; animation: fadeIn .35s var(--ease); }
.nav button:hover { color: #fff; }
.nav button:hover svg { transform: scale(1.12) rotate(-4deg); }
.nav .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #ff5b7a; box-shadow: 0 0 0 3px var(--frame); animation: ping 1.8s infinite; }
@keyframes ping { 0%, 100% { box-shadow: 0 0 0 3px var(--frame), 0 0 0 3px rgba(255, 91, 122, .6); } 60% { box-shadow: 0 0 0 3px var(--frame), 0 0 0 9px rgba(255, 91, 122, 0); } }
.me-wrap { justify-self: end; position: relative; }
.me { display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 6px; border-radius: 999px; color: #fff; text-align: left; transition: background .2s; }
.me:hover { background: rgba(255, 255, 255, .08); }
.me .av { width: 42px; height: 42px; font-size: 15px; }
.me-t b { display: block; font-size: 14px; font-weight: 700; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-t small { display: block; font-size: 12px; color: #a3a3ab; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .chev { width: 18px; height: 18px; color: #a3a3ab; transition: transform .3s var(--spring); }
.me[aria-expanded="true"] .chev { transform: rotate(180deg); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 180px; padding: 6px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); animation: popMenu .3s var(--spring); transform-origin: top right; }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 600; }
.menu button:hover { background: #f2f2ee; }
.menu svg { width: 18px; height: 18px; }
@keyframes popMenu { from { opacity: 0; transform: translateY(-6px) scale(.95); } }

.canvas { position: relative; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; background: var(--canvas); border-radius: var(--r-xl); min-height: 0; }
/* the bump under the active nav item */
.notch { position: absolute; top: -1px; left: 0; width: 120px; height: 18px; background: var(--frame); border-radius: 0 0 22px 22px; transform: translateX(var(--nx, 0)); transition: transform .55s var(--spring), width .45s var(--spring); z-index: 2; pointer-events: none; }
.notch::before, .notch::after { content: ""; position: absolute; top: 0; width: 18px; height: 18px; }
.notch::before { left: -18px; background: radial-gradient(circle at 0 100%, transparent 17.5px, var(--frame) 18px); }
.notch::after { right: -18px; background: radial-gradient(circle at 100% 100%, transparent 17.5px, var(--frame) 18px); }
.main { min-width: 0; padding: 34px 34px 120px; }
.feed { background: var(--panel); border-radius: 0 var(--r-xl) var(--r-xl) 0; padding: 34px 22px 120px; min-width: 0; }
.feed-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.feed-h h2 { font-size: 28px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--mint-d); background: var(--mint); padding: 5px 11px; border-radius: 99px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-d); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.emo { display: inline-block; animation: wiggle 3s ease-in-out infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-6deg); } }

/* ---------- page header ---------- */
.ph { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.ph h1 { font-size: 40px; line-height: 1.05; }
.ph p { margin: 6px 0 0; color: var(--muted); }
.search { position: relative; width: min(100%, 280px); }
.search svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
.search .field { padding-left: 44px; border-radius: 999px; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 16px; }
.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; background: var(--card); border-radius: var(--r-lg); padding: 22px; min-width: 0; box-shadow: var(--soft); transition: transform .4s var(--spring), box-shadow .3s; }
.card.lift:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 24px 50px -20px rgba(18, 18, 20, .25); }
.card h2 { font-size: 21px; line-height: 1.2; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-h .muted { font-size: 12.5px; }
.sec { margin-top: 30px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 4px 14px; flex-wrap: wrap; }
.sec-h h2 { font-size: 24px; }
.p-sky { background: var(--sky); } .p-mint { background: var(--mint); } .p-lav { background: var(--lav); } .p-lilac { background: var(--lilac); } .p-butter { background: var(--butter); } .p-pink { background: var(--pink); } .p-peach { background: var(--peach); }
.p-dash { background: transparent; box-shadow: none; border: 2px dashed #d9d9d3; }

/* stat tiles (the big number row) */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { position: relative; border-radius: var(--r); padding: 20px 14px 16px; text-align: center; box-shadow: none; transition: transform .4s var(--spring); }
.stat:hover { transform: translateY(-3px) scale(1.02); }
.stat b { display: block; font-family: var(--display); font-size: 46px; font-weight: 600; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 8px; color: var(--text-2); font-weight: 500; }
.stat small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.stat .confetti { position: absolute; top: -14px; right: -6px; font-size: 26px; animation: wiggle 2.6s ease-in-out infinite; }

/* mini tiles */
.tile { display: flex; flex-direction: column; gap: 4px; }
.tile .ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .7); margin-bottom: 8px; }
.tile .ico svg { width: 20px; height: 20px; }
.tile b { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile span { color: var(--text-2); font-weight: 600; }
.tile small { color: var(--muted); font-size: 12px; }
.tile.alert b { color: var(--bad); }

/* ---------- charts ---------- */
.chart { position: relative; height: 210px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .gridline { stroke: #efefeb; stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; stroke: none; font-family: var(--body); }
.chart .bar { fill: var(--bar); transform-box: fill-box; transform-origin: bottom; animation: grow .8s var(--spring) both; transition: opacity .2s; }
.chart .bar.dim { opacity: .3; }
.chart .line { stroke: var(--line-c); stroke-width: 2.5; fill: none; stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 1.4s var(--ease) .1s forwards; }
.chart .area { stroke: none; opacity: 0; animation: fadeIn .8s .5s forwards; }
.chart .hit { fill: transparent; stroke: none; cursor: crosshair; }
.chart .cross { stroke: #c8c8c2; stroke-width: 1; stroke-dasharray: 3 4; }
.chart .pt { fill: var(--line-c); stroke: #fff; stroke-width: 3; }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.tip { position: fixed; z-index: 80; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }

/* breakdown bars */
.blist { display: grid; gap: 12px; }
.brow { display: grid; grid-template-columns: 96px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; }
.brow .n { color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .track { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .65); overflow: hidden; }
.brow .fill { height: 100%; border-radius: 99px; background: var(--ink); min-width: 6px; transform-origin: left; animation: growX .9s var(--spring) both; }
.brow .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes growX { from { transform: scaleX(0); } }
.empty { color: var(--muted); padding: 20px 4px; text-align: center; font-size: 13px; }

/* ---------- live feed ---------- */
.feed-list { display: grid; gap: 14px; align-content: start; }
.fcard { border-radius: 24px; padding: 16px; animation: slideIn .6s var(--spring) both; transition: transform .4s var(--spring); }
.fcard:hover { transform: translateY(-3px) rotate(.6deg); }
.fcard:nth-child(even):hover { transform: translateY(-3px) rotate(-.6deg); }
.fhead { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13.5px; }
.fhead .av { width: 30px; height: 30px; font-size: 11px; background: rgba(255, 255, 255, .8); }
.fhead svg { width: 18px; height: 18px; }
.fhead time { margin-left: auto; font-weight: 600; color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.fbody { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .6); font-size: 13.5px; line-height: 1.45; color: #2b2b30; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.fcta { margin-top: 8px; width: 100%; height: 38px; border-radius: 14px; background: #fff; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: transform .25s var(--spring); }
.fcta:hover { transform: scale(1.02); }
.fcta svg { width: 15px; height: 15px; }
.fempty { border: 2px dashed #d9d9d3; border-radius: 24px; padding: 26px 16px; text-align: center; color: var(--muted); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px) rotate(2deg); } }

/* ---------- users ---------- */
.ulist { display: grid; gap: 10px; }
.urow, .uhead { display: grid; grid-template-columns: minmax(220px, 2fr) 1fr 1fr 70px 70px 90px 28px; align-items: center; gap: 12px; }
.urow { padding: 12px 16px 12px 12px; border-radius: 22px; background: var(--card); box-shadow: var(--soft); cursor: pointer; transition: transform .35s var(--spring), box-shadow .3s; animation: rise .5s var(--spring) both; }
.urow:hover { transform: translateX(4px); box-shadow: 0 18px 40px -22px rgba(18, 18, 20, .3); }
.uhead { padding: 0 16px 0 12px; color: var(--muted); font-size: 12px; font-weight: 600; }
.urow .num, .uhead .num { text-align: right; font-variant-numeric: tabular-nums; }
.urow .num { font-family: var(--display); font-size: 18px; font-weight: 600; }
.urow .go { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #f1f1ed; transition: transform .3s var(--spring), background .2s, color .2s; }
.urow:hover .go { background: var(--ink); color: #fff; transform: rotate(-45deg); }
.urow .go svg { width: 14px; height: 14px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who > div { min-width: 0; }
.who b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; flex: none; color: var(--ink); background: var(--sky); }
.av.c0 { background: var(--sky); } .av.c1 { background: var(--mint); } .av.c2 { background: var(--lav); } .av.c3 { background: var(--butter); } .av.c4 { background: var(--pink); } .av.c5 { background: var(--peach); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: #f0f0ec; color: var(--text-2); white-space: nowrap; }
.pill.mint { background: var(--mint); color: #17703f; } .pill.pink { background: var(--pink); color: #a52858; } .pill.lav { background: var(--lav); color: #7d2fa6; } .pill.butter { background: var(--butter); color: #845b00; } .pill.sky { background: var(--sky); color: #1d6b91; } .pill.ink { background: var(--ink); color: #fff; } .pill.white { background: rgba(255, 255, 255, .75); color: var(--ink); }
.pill.sm { height: 24px; padding: 0 10px; font-size: 11.5px; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(14, 14, 16, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: flex-end; padding: 12px; animation: fadeIn .25s; }
.drawer-in { width: min(100%, 460px); height: 100%; overflow-y: auto; background: var(--canvas); border-radius: var(--r-xl); padding: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); animation: drawerIn .55s var(--spring); }
@keyframes drawerIn { from { transform: translateX(60px) scale(.97); opacity: 0; } }
.dr-h { display: flex; align-items: center; gap: 14px; }
.dr-h .av { width: 62px; height: 62px; font-size: 22px; }
.dr-h .grow { flex: 1; min-width: 0; }
.dr-h h2 { font-size: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl { display: grid; grid-template-columns: 112px 1fr; gap: 11px 12px; font-size: 13.5px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.sub-h { font-family: var(--display); font-size: 17px; font-weight: 600; margin: 22px 0 10px; }

/* ---------- troubleshooting ---------- */
.health { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hcard { border-radius: 22px; padding: 16px; display: flex; gap: 12px; align-items: flex-start; animation: rise .5s var(--spring) both; transition: transform .35s var(--spring); }
.hcard:hover { transform: translateY(-3px); }
.hcard .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .75); font-weight: 800; }
.hcard b { display: block; font-size: 14px; }
.hcard small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.hcard.ok { background: var(--mint); } .hcard.ok .ic { color: var(--mint-d); }
.hcard.warn { background: var(--butter); } .hcard.warn .ic { color: var(--warn); }
.hcard.bad { background: var(--pink); } .hcard.bad .ic { color: var(--bad); }
.list { display: grid; gap: 12px; }
.item { background: var(--card); border-radius: 24px; padding: 18px; box-shadow: var(--soft); animation: rise .5s var(--spring) both; transition: transform .35s var(--spring), opacity .3s; }
.item:hover { transform: translateY(-2px); }
.item-top { display: flex; align-items: flex-start; gap: 14px; }
.item-top .grow { flex: 1; min-width: 0; }
.count { min-width: 48px; height: 48px; border-radius: 16px; background: var(--pink); color: var(--bad); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 20px; flex: none; }
.err-msg { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; font-weight: 600; word-break: break-word; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.item.fixed { opacity: .55; }
.item.fixed .count { background: var(--mint); color: var(--mint-d); }
.pillbox { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(255, 255, 255, .7); flex: none; }
.item .pillbox { background: #f1f1ed; }
pre.stack { margin: 12px 0 0; padding: 14px; background: #f3f3ef; border-radius: 14px; font-size: 11.5px; overflow-x: auto; max-height: 240px; white-space: pre-wrap; word-break: break-word; }
details summary { list-style: none; cursor: pointer; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
details summary::-webkit-details-marker { display: none; }
.fb-card { border-radius: 24px; padding: 18px; animation: rise .5s var(--spring) both; transition: transform .35s var(--spring), opacity .3s; }
.fb-card:hover { transform: translateY(-3px) rotate(-.3deg); }
.fb-card .fbody { -webkit-line-clamp: unset; display: block; white-space: pre-wrap; }
.fb-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.fb-foot .grow { flex: 1; }
.seg { position: relative; display: inline-flex; background: #ebebe6; border-radius: 99px; padding: 4px; gap: 2px; }
.seg button { position: relative; z-index: 1; height: 34px; padding: 0 14px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: color .25s; }
.seg button.on { color: #fff; }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 99px; background: var(--ink); transition: transform .45s var(--spring), width .45s var(--spring); }

/* ---------- settings ---------- */
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.icon-opt { display: grid; justify-items: center; gap: 7px; padding: 12px 6px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--text-2); transition: background .2s, transform .3s var(--spring); }
.icon-opt:hover { background: #f2f2ee; transform: translateY(-2px); }
.icon-opt img, .icon-opt .auto { width: 58px; height: 58px; border-radius: 16px; object-fit: cover; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .3); transition: transform .4s var(--spring); }
.icon-opt.on { background: var(--lilac); color: var(--ink); }
.icon-opt.on img, .icon-opt.on .auto { transform: scale(1.08) rotate(-4deg); }
.icon-opt.pop img, .icon-opt.pop .auto { animation: bounce .5s var(--spring); }
@keyframes bounce { 40% { transform: scale(1.22) rotate(6deg); } }
.icon-opt .auto { display: grid; place-items: center; background: conic-gradient(from 210deg, #c6b5ff, #f7b8da, #3a3d47, #d8f43a, #c6b5ff); color: #fff; font-family: var(--display); font-weight: 700; font-size: 12px; }
.mini-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; }
.form-row { display: grid; gap: 7px; margin-top: 14px; }
.form-row label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.sw-row { display: flex; align-items: center; gap: 14px; padding: 6px 0; }
.sw-row .grow { flex: 1; }
.sw-row b { display: block; }
.sw-row small { color: var(--muted); }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #dcdcd6; transition: background .3s; }
.switch i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .45s var(--spring), width .2s; }
.switch input:active + i::after { width: 30px; }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(20px); background: #d8f43a; }
.switch input:checked:active + i::after { transform: translateX(14px); }
.save-bar { position: fixed; left: 50%; bottom: 104px; z-index: 40; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 20px; border-radius: 99px; background: var(--ink); color: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); animation: popBar .45s var(--spring); white-space: nowrap; }
.save-bar span { font-weight: 600; margin-right: 6px; }
.save-bar .btn { height: 38px; }
.save-bar .btn.go { background: #d8f43a; color: var(--ink); border: 0; }
.save-bar .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .2); }
@keyframes popBar { from { opacity: 0; transform: translateX(-50%) translateY(16px) scale(.9); } }

.phone { width: 270px; margin: 0 auto; border-radius: 42px; padding: 11px; background: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); }
.phone-in { position: relative; border-radius: 32px; overflow: hidden; background: #f4f3ef; min-height: 470px; padding: 44px 14px 14px; color: var(--ink); }
.phone-in::before { content: ""; position: absolute; top: 10px; left: 50%; width: 80px; height: 22px; border-radius: 99px; background: var(--ink); transform: translateX(-50%); }
.pv-brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 17px; margin-bottom: 14px; }
.pv-logo { width: 32px; height: 32px; border-radius: 10px; background: #d8f43a; display: grid; place-items: center; overflow: hidden; }
.pv-logo.pop { animation: bounce .5s var(--spring); }
.pv-logo img { width: 100%; height: 100%; object-fit: cover; }
.pv-ann { display: flex; gap: 10px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .07); font-size: 12.5px; }
.pv-ann .ic { width: 30px; height: 30px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--lilac); font-weight: 800; }
.pv-ann.warn .ic { background: #ffe3b8; } .pv-ann.love .ic { background: #ffd3e6; }
.pv-ann b { display: block; font-size: 13px; }
.pv-ann p { margin: 2px 0 0; color: #6b6a72; word-break: break-word; }
.pv-home { margin-top: 12px; height: 160px; border-radius: 22px; background: linear-gradient(160deg, #c6b5ff, #f7d6e8); }
.pv-row { margin-top: 10px; height: 54px; border-radius: 18px; background: #fff; }
.pv-gate { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(20, 18, 28, .5); backdrop-filter: blur(6px); animation: fadeIn .3s; }
.pv-gate div { background: #fff; border-radius: 22px; padding: 18px; text-align: center; font-size: 12.5px; }

/* ---------- dock ---------- */
.dock { position: fixed; left: 50%; bottom: 22px; z-index: 50; transform: translateX(-50%); display: flex; gap: 10px; padding: 10px 12px; border-radius: 99px; background: var(--ink); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); animation: dockIn .8s var(--spring) .2s both; }
@keyframes dockIn { from { transform: translateX(-50%) translateY(140%); } }
.dock button { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--ink); transition: transform .35s var(--spring); }
.dock button.dark { background: #3a3a3f; color: #fff; }
.dock button svg { width: 20px; height: 20px; }
.dock button:hover { transform: translateY(-8px) scale(1.12); }
.dock button:active { transform: translateY(-4px) scale(.95); }
.dock button::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(6px); padding: 6px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--spring); }
.dock button:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.dock button.spin svg { animation: spin .8s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- admins ---------- */
.adm { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.adm-card { border-radius: 26px; padding: 20px; display: grid; gap: 14px; animation: rise .5s var(--spring) both; transition: transform .4s var(--spring); }
.adm-card:hover { transform: translateY(-4px) rotate(-.5deg); }
.adm-card .av { width: 56px; height: 56px; font-size: 20px; background: rgba(255, 255, 255, .75); }
.adm-card b { display: block; font-family: var(--display); font-size: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-card small { display: block; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- toast & motion ---------- */
.toast { position: fixed; left: 50%; top: 22px; transform: translate(-50%, -30px) scale(.9); opacity: 0; pointer-events: none; background: #fff; color: var(--ink); padding: 12px 18px 12px 14px; border-radius: 99px; font-weight: 600; transition: .45s var(--spring); z-index: 90; box-shadow: 0 16px 40px rgba(0, 0, 0, .2); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); }
.toast::before { content: "✓"; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--mint-d); font-size: 13px; font-weight: 800; flex: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.skel { background: linear-gradient(90deg, #ececE7, #f6f6f2, #ececE7); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 20px; }
@keyframes sk { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.stagger > * { animation: rise .6s var(--spring) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; } .stagger > *:nth-child(2) { animation-delay: .07s; } .stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .17s; } .stagger > *:nth-child(5) { animation-delay: .22s; } .stagger > *:nth-child(6) { animation-delay: .27s; }
.stagger > *:nth-child(7) { animation-delay: .32s; } .stagger > *:nth-child(8) { animation-delay: .37s; } .stagger > *:nth-child(n+9) { animation-delay: .42s; }
.page.enter { animation: pageIn .5s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- responsive ---------- */
@media (max-width: 1280px) { .canvas { grid-template-columns: minmax(0, 1fr) 300px; } .c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .canvas { grid-template-columns: 1fr; }
  .feed { border-radius: 0 0 var(--r-xl) var(--r-xl); padding-top: 26px; }
  .feed-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .main { padding-bottom: 40px; }
  .set-grid { grid-template-columns: 1fr; }
  .urow, .uhead { grid-template-columns: minmax(180px, 2fr) 1fr 70px 70px 28px; }
  .hide-md { display: none !important; }
}
@media (max-width: 820px) {
  .shell { padding: 0 6px 6px; }
  .bar { grid-template-columns: auto 1fr auto; height: 70px; padding: 0 10px; gap: 8px; }
  .brand b, .me-t, .me .chev { display: none; }
  .nav { justify-self: center; gap: 0; }
  .nav button { padding: 0 10px; }
  .nav button.on { padding: 0 12px; }
  .nav button.on span { display: none; }
  .notch { width: 56px; }
  .main { padding: 24px 16px 40px; }
  .feed { padding: 24px 16px 120px; }
  .ph h1 { font-size: 30px; }
  .c2, .c3 { grid-template-columns: 1fr; }
  .stat b { font-size: 36px; }
  .urow, .uhead { grid-template-columns: minmax(0, 1fr) 60px 28px; }
  .hide-sm { display: none !important; }
  .dock { gap: 6px; padding: 8px; bottom: 14px; }
  .dock button { width: 40px; height: 40px; }
  .save-bar { bottom: 86px; }
  .save-bar span { display: none; }
}
@media (max-width: 420px) { .dock button:nth-child(5), .dock button:nth-child(6) { display: none; } .c4 { grid-template-columns: 1fr 1fr; } .tile b { font-size: 26px; } .stats { gap: 8px; } .stat b { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; } .chart .line { stroke-dashoffset: 0; } }

/* ===== v3 polish: hero, KPI sparklines, chart switcher, funnel, hours, leaderboard ===== */
.canvas { background: radial-gradient(circle at 1px 1px, rgba(18, 18, 20, .045) 1px, transparent 0) 0 0 / 22px 22px, var(--canvas); }
.feed { background: linear-gradient(180deg, #ecece7, #efefeb 140px); }
.card { border: 1px solid rgba(18, 18, 20, .04); }
.ov-top { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 16px; align-items: stretch; }
.hero-card { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 30px 32px; min-height: 250px; background: linear-gradient(125deg, #e8e2ff 0%, #f6dcf7 45%, #d9f1fb 100%); display: flex; align-items: flex-end; animation: rise .7s var(--spring) both; }
.hero-txt { position: relative; z-index: 2; max-width: 62%; }
.hero-date { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--text-2); background: rgba(255, 255, 255, .7); padding: 5px 12px; border-radius: 99px; margin-bottom: 14px; }
.hero-card h1 { font-size: 44px; line-height: 1.02; letter-spacing: -.035em; }
.hero-card p { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: #3d3d46; }
.hero-btns { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.hero-pip { position: absolute; z-index: 1; right: 2%; bottom: -14%; height: 128%; pointer-events: none; filter: drop-shadow(0 20px 30px rgba(90, 60, 160, .25)); animation: heroPip 5s ease-in-out infinite; transform-origin: bottom center; }
@keyframes heroPip { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-2deg); } }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.hero-blob.b1 { width: 220px; height: 220px; right: 18%; top: -90px; background: rgba(255, 255, 255, .45); }
.hero-blob.b2 { width: 90px; height: 90px; right: 4%; top: 18px; background: rgba(216, 244, 58, .55); animation: float 4s ease-in-out infinite; }
.stats-col { grid-template-columns: 1fr; }
.stats-col .stat { padding: 14px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; align-items: center; }
.stats-col .stat b { grid-row: span 2; font-size: 40px; min-width: 56px; text-align: center; }
.stats-col .stat span { margin: 0; align-self: end; font-weight: 600; }
.stats-col .stat small { margin: 0; align-self: start; }
.kpi2 { display: flex; flex-direction: column; gap: 2px; padding: 18px 18px 0; overflow: hidden; }
.kpi2-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.kpi2 .ico { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: #f2f1ec; }
.kpi2 .ico svg { width: 19px; height: 19px; }
.kpi2 > b { font-family: var(--display); font-size: 36px; font-weight: 600; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi2 .lbl { color: var(--text-2); font-weight: 600; font-size: 13px; }
.spark { display: block; width: calc(100% + 36px); height: 46px; margin: 10px -18px 0; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.trend svg { width: 12px; height: 12px; stroke-width: 2.6; }
.trend.up { background: var(--mint); color: #17703f; }
.trend.down { background: var(--pink); color: #a52858; }
.trend.flat { background: #f2f1ec; color: var(--text-2); }
.ov-mid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: stretch; }
.chart-card .card-h { align-items: flex-start; flex-wrap: wrap; }
.ch-ctrls { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-ctrls .seg button { height: 30px; padding: 0 12px; font-size: 12.5px; }
.chart.big { height: 250px; }
.funnel { display: grid; gap: 14px; }
.fn-row { animation: rise .55s var(--spring) both; }
.fn-top { display: flex; justify-content: space-between; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.fn-top b { font-family: var(--display); font-size: 18px; }
.fn-track { height: 14px; border-radius: 99px; background: #f1f0eb; overflow: hidden; }
.fn-track i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: growX 1s var(--spring) both; }
.fn-row small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.hours { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding-top: 6px; }
.hours i { flex: 1; border-radius: 6px 6px 3px 3px; background: var(--bar); transform-origin: bottom; animation: grow .8s var(--spring) both; transition: transform .2s; }
.hours i:hover { transform: scaleY(1.06); filter: brightness(1.1); }
.hours-x { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin: 6px 2px 0; }
.wdays { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.wdays span { display: grid; justify-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.wdays i { width: 26px; height: 26px; border-radius: 50%; background: var(--line-c); transition: transform .5s var(--spring); }
.lb { display: grid; gap: 4px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 16px; animation: rise .5s var(--spring) both; transition: background .2s; }
.lb-row:hover { background: #f5f4ef; }
.lb-row .av { width: 36px; height: 36px; font-size: 13px; }
.lb-row .grow { flex: 1; min-width: 0; }
.lb-row .grow b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row small { color: var(--muted); font-size: 11.5px; }
.lb-n { width: 26px; text-align: center; font-size: 18px; font-weight: 700; color: var(--muted); }
.lb-km { font-family: var(--display); font-size: 20px; font-weight: 600; white-space: nowrap; }
.lb-km small { font-size: 12px; color: var(--muted); }
.sbar { display: flex; gap: 3px; height: 16px; border-radius: 99px; overflow: hidden; margin: 6px 0 14px; }
.sbar i { border-radius: 4px; transform-origin: left; animation: growX .9s var(--spring) both; min-width: 6px; }
.sbar i:first-child { border-radius: 99px 4px 4px 99px; } .sbar i:last-child { border-radius: 4px 99px 99px 4px; } .sbar i:only-child { border-radius: 99px; }
.legend { display: grid; gap: 8px; }
.legend span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.legend span i { width: 10px; height: 10px; border-radius: 4px; flex: none; }
.legend span b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.blist .brow .fill { background: linear-gradient(90deg, var(--bar), #a89cf7); }
@media (max-width: 1280px) { .ov-mid { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .ov-top { grid-template-columns: 1fr; } .stats-col { grid-template-columns: repeat(3, 1fr); } .stats-col .stat { display: block; text-align: center; } .stats-col .stat b { font-size: 34px; } .hero-txt { max-width: 70%; } }
@media (max-width: 640px) { .hero-card { padding: 22px; min-height: 0; } .hero-card h1 { font-size: 30px; } .hero-txt { max-width: 100%; } .hero-pip { opacity: .25; height: 90%; bottom: -6%; right: -10%; } .c4 { grid-template-columns: 1fr 1fr; } }
.hero-pip { height: 112%; bottom: -8%; right: 1%; }
@media (max-width: 1180px) { .hero-txt { max-width: 64%; } .hero-pip { height: 92%; bottom: -4%; right: -2%; } }
@media (max-width: 760px) { .hero-txt { max-width: 100%; } .hero-pip { height: 70%; right: -6%; bottom: -6%; opacity: .3; } }
.notch { display: none !important; }
.av { display: inline-flex !important; align-items: center; justify-content: center; text-align: center; line-height: 1; letter-spacing: 0; padding: 0; overflow: hidden; white-space: nowrap; }
.hero-pip { height: 108%; bottom: -6%; right: 2%; filter: drop-shadow(0 18px 26px rgba(60, 40, 140, .22)); animation: heroBoss 6s ease-in-out infinite; }
@keyframes heroBoss { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-1.5deg) translateY(-4px); } }
@media (max-width: 1180px) { .hero-pip { height: 90%; bottom: -3%; right: -1%; } }
@media (max-width: 760px) { .hero-pip { height: 68%; right: -8%; opacity: .3; } }
