/* CMT Admin — 2026 dark glass design system. Served at /admin-panel/ and admin.cmtstudios.dk. */

:root {
    --bg: #070a13;
    --sidebar: rgb(13 17 30 / .72);
    --card: rgb(255 255 255 / .035);
    --card-strong: rgb(255 255 255 / .06);
    --line: rgb(255 255 255 / .075);
    --line-soft: rgb(255 255 255 / .045);
    --text: #e8ecf6;
    --muted: #8b93ad;
    --faint: #5b6379;
    --accent: #818cf8;
    --accent2: #22d3ee;
    --pink: #f472b6;
    --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #22d3ee 100%);
    --grad-green: linear-gradient(135deg, #10b981, #34d399);
    --grad-red: linear-gradient(135deg, #ef4444, #f87171);
    --grad-amber: linear-gradient(135deg, #f59e0b, #fbbf24);
    --ok: #34d399;
    --warn: #fbbf24;
    --bad: #f87171;
    --radius: 16px;
    --shadow: 0 8px 30px rgb(0 0 0 / .35);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
    margin: 0; color: var(--text);
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent2); }

/* Ambient background glows */
body::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(900px 500px at 85% -10%, rgb(99 102 241 / .16), transparent 60%),
        radial-gradient(700px 420px at -10% 30%, rgb(34 211 238 / .09), transparent 60%),
        radial-gradient(800px 500px at 50% 115%, rgb(139 92 246 / .10), transparent 60%),
        var(--bg);
}

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 248px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
    background: var(--sidebar); backdrop-filter: blur(18px);
    border-right: 1px solid var(--line-soft);
    display: flex; flex-direction: column; padding: 1.4rem 0;
}
.brand { display: flex; align-items: center; gap: .75rem; padding: 0 1.4rem 1.4rem; border-bottom: 1px solid var(--line-soft); }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px; background: var(--grad);
    display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff;
    box-shadow: 0 6px 18px rgb(99 102 241 / .45), inset 0 1px 0 rgb(255 255 255 / .25);
}
.brand-name { font-weight: 700; color: #fff; line-height: 1.15; display: flex; flex-direction: column; letter-spacing: -.01em; }
.brand-name small { font-weight: 600; font-size: .64rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }

.side-nav { padding: 1.1rem .8rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.side-nav a {
    display: flex; align-items: center; gap: .75rem; padding: .65rem .85rem;
    border-radius: 11px; color: #99a2bf; text-decoration: none; font-size: .88rem; font-weight: 550;
    transition: background .18s, color .18s, transform .12s; position: relative;
}
.side-nav a .ico {
    width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
    background: rgb(255 255 255 / .05); font-size: .95rem; transition: all .18s;
}
.side-nav a:hover { background: rgb(255 255 255 / .05); color: #fff; }
.side-nav a:active { transform: scale(.98); }
.side-nav a.active {
    background: linear-gradient(135deg, rgb(99 102 241 / .22), rgb(34 211 238 / .14));
    color: #fff; box-shadow: inset 0 0 0 1px rgb(129 140 248 / .35);
}
.side-nav a.active .ico { background: var(--grad); box-shadow: 0 3px 10px rgb(99 102 241 / .5); }

.side-foot { padding: 1rem 1.4rem .2rem; border-top: 1px solid var(--line-soft); font-size: .8rem; }
.side-user { color: var(--muted); margin-bottom: .35rem; overflow: hidden; text-overflow: ellipsis; }
.side-logout { color: var(--warn); text-decoration: none; font-size: .8rem; font-weight: 600; }
.side-logout:hover { color: #fcd34d; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 1rem;
    background: rgb(7 10 19 / .7); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft); padding: .85rem 1.7rem;
}
.topbar h1 { font-size: 1.15rem; margin: 0; flex: 1; font-weight: 700; letter-spacing: -.01em; }
.top-right { display: flex; align-items: center; gap: 1rem; }
.nav-toggle { display: none; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--text); }

.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 0 0 rgb(52 211 153 / .6); animation: pulse 2s infinite; }
.live-dot.off { background: var(--faint); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(52 211 153 / .5); } 70% { box-shadow: 0 0 0 9px rgb(52 211 153 / 0); } 100% { box-shadow: 0 0 0 0 rgb(52 211 153 / 0); } }

.sound-toggle { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; cursor: pointer; user-select: none; }
.sound-toggle input { accent-color: var(--accent); }

.content { padding: 1.7rem; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ---------- Hero ---------- */
.hero { margin-bottom: 1.3rem; }
.hero h2 { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em;
    background: linear-gradient(90deg, #fff 30%, #a5b4fc 70%, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; }

/* ---------- Stats strip ---------- */
.stats-strip {
    display: flex; flex-wrap: wrap; gap: 0;
    background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
    box-shadow: var(--shadow); backdrop-filter: blur(8px);
    margin-bottom: 1.6rem; overflow: hidden;
    animation: rise .4s cubic-bezier(.2,.8,.3,1) both;
}
.ss-item {
    flex: 1 1 130px; padding: .9rem 1.15rem;
    border-right: 1px solid var(--line-soft);
    display: flex; flex-direction: column; gap: .15rem;
}
.ss-item:last-child { border-right: 0; }
.ss-label { font-size: .64rem; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 700; }
.ss-val { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: #fff; }
.ss-val.ok { color: var(--ok); }
.ss-val.amber { color: var(--warn); }
.ss-val.red { color: var(--bad); }
.ss-sub { font-size: .7rem; color: var(--muted); }

/* ---------- Overview grid: big log + side chart ---------- */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.log-card { max-height: calc(100vh - 210px); display: flex; flex-direction: column; }
.log-card .feed { overflow-y: auto; flex: 1; }
.chart-card { position: sticky; top: 84px; }
@media (max-width: 1100px) {
    .ov-grid { grid-template-columns: 1fr; }
    .chart-card { position: static; }
    .log-card { max-height: 70vh; }
}

/* ---------- KPI cards ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.kpi {
    background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
    padding: 1.15rem 1.3rem; box-shadow: var(--shadow); position: relative; overflow: hidden;
    backdrop-filter: blur(8px); transition: transform .18s ease, border-color .18s;
    animation: rise .45s cubic-bezier(.2,.8,.3,1) both;
}
.kpi:hover { transform: translateY(-2px); border-color: rgb(129 140 248 / .35); }
.kpi::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 3px;
    background: var(--grad); opacity: .9;
}
.kpi.good::before { background: var(--grad-green); }
.kpi.bad::before { background: var(--grad-red); }
.kpi.amber::before { background: var(--grad-amber); }
.kpi .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: .45rem; font-weight: 700; }
.kpi .value { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: #fff; }
.kpi .sub { font-size: .75rem; color: var(--muted); margin-top: .35rem; }
.kpi .trend { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; margin-top: .45rem; }
.kpi .trend.up { background: rgb(52 211 153 / .14); color: var(--ok); }
.kpi .trend.down { background: rgb(248 113 113 / .14); color: var(--bad); }
.kpi .trend.flat { background: rgb(255 255 255 / .07); color: var(--muted); }

/* ---------- Cards & tables ---------- */
.card {
    background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 1.6rem; overflow: hidden; backdrop-filter: blur(8px);
    animation: rise .45s cubic-bezier(.2,.8,.3,1) both;
}
.card h2 {
    font-size: .92rem; margin: 0; padding: 1rem 1.35rem; font-weight: 700; letter-spacing: -.01em;
    border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.card h2 .sub { font-size: .73rem; color: var(--muted); font-weight: 500; }
.card h2 .sub a { color: var(--accent2); text-decoration: none; }
.card .pad { padding: 1.25rem 1.35rem; }

table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { text-align: left; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: .7rem 1.35rem; border-bottom: 1px solid var(--line-soft); background: rgb(255 255 255 / .02); font-weight: 700; }
td { padding: .62rem 1.35rem; border-bottom: 1px solid var(--line-soft); color: #cbd2e6; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgb(129 140 248 / .06); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .78rem; }
td a { color: var(--accent2); text-decoration: none; }
td a:hover { text-decoration: underline; }

/* ---------- Method icons ---------- */
.mico {
    display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
    margin-right: .35rem; border-radius: 3px;
    background: var(--muted);
    -webkit-mask-size: contain; mask-size: contain;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
}
/* card */
.mico.card {
    background: #a5b4fc;
    -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><rect x="2" y="5" width="20" height="14" rx="2"/><path d="M2 10h20"/></svg>');
    mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><rect x="2" y="5" width="20" height="14" rx="2"/><path d="M2 10h20"/></svg>');
}
/* phone — MobilePay */
.mico.mp {
    background: #67e8f9;
    -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><rect x="7" y="2" width="10" height="20" rx="2"/><path d="M11 18h2"/></svg>');
    mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><rect x="7" y="2" width="10" height="20" rx="2"/><path d="M11 18h2"/></svg>');
}
/* bank */
.mico.bank {
    background: #fcd34d;
    -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M3 21h18M4 18h16M6 18v-8m4 8v-8m4 8v-8m4 8v-8M12 3l9 6H3z"/></svg>');
    mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M3 21h18M4 18h16M6 18v-8m4 8v-8m4 8v-8m4 8v-8M12 3l9 6H3z"/></svg>');
}
/* wallet (Apple Pay / Google Pay / Vipps) */
.mico.wallet {
    background: #d8b4fe;
    -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M20 7H5a2 2 0 01-2-2 2 2 0 012-2h13v4"/><path d="M3 5v13a2 2 0 002 2h15a1 1 0 001-1v-8a1 1 0 00-1-1H5"/><circle cx="16.5" cy="14.5" r="1.5"/></svg>');
    mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M20 7H5a2 2 0 01-2-2 2 2 0 012-2h13v4"/><path d="M3 5v13a2 2 0 002 2h15a1 1 0 001-1v-8a1 1 0 00-1-1H5"/><circle cx="16.5" cy="14.5" r="1.5"/></svg>');
}
.mico.paypal { background: #93c5fd; -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><circle cx="12" cy="12" r="9"/><text x="12" y="16" font-size="11" font-weight="bold" text-anchor="middle" fill="white" stroke="none">P</text></svg>'); mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><circle cx="12" cy="12" r="9"/><text x="12" y="16" font-size="11" font-weight="bold" text-anchor="middle" fill="white" stroke="none">P</text></svg>'); }
.mico.test { background: #d8b4fe; }
.mico.qp { background: #67e8f9; border-radius: 50%; }

/* ---------- Pills ---------- */
.st { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .65rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; }
.st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.ok { background: rgb(52 211 153 / .13); color: var(--ok); box-shadow: inset 0 0 0 1px rgb(52 211 153 / .25); }
.st.warn { background: rgb(251 191 36 / .13); color: var(--warn); box-shadow: inset 0 0 0 1px rgb(251 191 36 / .25); }
.st.bad { background: rgb(248 113 113 / .13); color: var(--bad); box-shadow: inset 0 0 0 1px rgb(248 113 113 / .3); }
.st.muted { background: rgb(255 255 255 / .07); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.st.info { background: rgb(129 140 248 / .15); color: #a5b4fc; box-shadow: inset 0 0 0 1px rgb(129 140 248 / .3); }
.badge-test { background: rgb(192 132 252 / .15); color: #d8b4fe; box-shadow: inset 0 0 0 1px rgb(192 132 252 / .35); }

/* ---------- Filters / buttons ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .55rem; padding: 1rem 1.35rem; border-bottom: 1px solid var(--line-soft); background: rgb(255 255 255 / .015); }
.filters input, .filters select {
    padding: .52rem .72rem; border: 1px solid var(--line); border-radius: 9px;
    font: inherit; font-size: .83rem; background: rgb(13 17 30 / .6); color: var(--text); min-width: 0;
}
.filters input::placeholder { color: var(--faint); }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(129 140 248 / .2); }
.filters input[type="date"] { color-scheme: dark; }
.filters select option { background: #111827; color: var(--text); }

.btn {
    display: inline-flex; align-items: center; gap: .4rem; padding: .52rem 1rem;
    border: 0; border-radius: 9px; background: var(--grad); color: #fff;
    font: inherit; font-size: .83rem; font-weight: 700; cursor: pointer; text-decoration: none;
    transition: filter .15s, transform .12s, box-shadow .15s;
    box-shadow: 0 4px 14px rgb(99 102 241 / .3), inset 0 1px 0 rgb(255 255 255 / .2);
}
.btn:hover { filter: brightness(1.12); box-shadow: 0 6px 20px rgb(99 102 241 / .45); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: rgb(255 255 255 / .05); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent2); filter: none; }

.pager { display: flex; gap: .6rem; align-items: center; padding: .9rem 1.35rem; font-size: .8rem; color: var(--muted); }

/* ---------- Chart ---------- */
.chart-wrap { padding: 1.25rem 1.35rem .6rem; }
.chart-wrap canvas { width: 100%; height: 230px; display: block; }
.chart-legend { display: flex; gap: 1.1rem; font-size: .75rem; color: var(--muted); padding: 0 1.35rem 1.05rem; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; }

/* ---------- Feed ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: .9rem; padding: .7rem 1.35rem; border-bottom: 1px solid var(--line-soft); transition: background .15s; }
.feed li:hover { background: rgb(255 255 255 / .025); }
.feed li:last-child { border-bottom: 0; }
.feed .f-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: .8rem; font-weight: 800; flex-shrink: 0; }
.feed .f-ico.ok { background: rgb(52 211 153 / .14); color: var(--ok); box-shadow: inset 0 0 0 1px rgb(52 211 153 / .3); }
.feed .f-ico.warn { background: rgb(251 191 36 / .14); color: var(--warn); box-shadow: inset 0 0 0 1px rgb(251 191 36 / .3); }
.feed .f-ico.bad { background: rgb(248 113 113 / .14); color: var(--bad); box-shadow: inset 0 0 0 1px rgb(248 113 113 / .3); }
.feed .f-main { flex: 1; min-width: 0; }
.feed .f-title { font-size: .85rem; font-weight: 600; color: #eef1fb; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.feed .f-amt-inline { font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.feed .f-site { color: var(--accent2); font-weight: 700; font-size: .8rem; }
.feed .f-user { color: var(--muted); font-weight: 500; font-size: .78rem; }
.feed .f-sub { font-size: .73rem; color: var(--muted); }
.feed .f-amt { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .9rem; color: #fff; }
.feed .st { flex-shrink: 0; }
.feed li.new { animation: flash 1.8s ease; }
tbody tr.new td { animation: flash 1.8s ease; }
@keyframes flash { 0% { background: rgb(129 140 248 / .25); } 100% { background: transparent; } }

/* ---------- Skeleton / notice ---------- */
.skeleton { padding: 1.35rem; }
.sk { height: 14px; border-radius: 6px; margin: .7rem 0; background: linear-gradient(90deg, rgb(255 255 255 / .04) 25%, rgb(255 255 255 / .09) 50%, rgb(255 255 255 / .04) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.sk.w40 { width: 40%; } .sk.w70 { width: 70%; } .sk.w90 { width: 90%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.notice { margin: 0 0 1.2rem; padding: .75rem 1.1rem; border-radius: 11px; font-size: .83rem; border: 1px solid; backdrop-filter: blur(6px); }
.notice.warn { background: rgb(251 191 36 / .1); color: var(--warn); border-color: rgb(251 191 36 / .25); }
.notice.info { background: rgb(129 140 248 / .1); color: #a5b4fc; border-color: rgb(129 140 248 / .28); }

/* ---------- Toasts ---------- */
.toast-wrap { position: fixed; right: 1.2rem; bottom: 1.2rem; display: flex; flex-direction: column; gap: .6rem; z-index: 200; }
.toast {
    background: rgb(17 24 39 / .92); backdrop-filter: blur(12px); color: #fff;
    padding: .85rem 1.15rem; border-radius: 13px; font-size: .85rem;
    border: 1px solid var(--line); box-shadow: 0 12px 34px rgb(0 0 0 / .5);
    display: flex; align-items: center; gap: .6rem;
    animation: toast-in .35s cubic-bezier(.2,.9,.3,1.2) both;
}
.toast.ok { border-left: 3px solid var(--ok); box-shadow: 0 12px 34px rgb(0 0 0 / .5), 0 0 24px rgb(52 211 153 / .18); }
.toast .t-amt { font-weight: 800; color: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateX(34px) scale(.95); } to { opacity: 1; transform: none; } }
.toast.out { animation: toast-out .3s ease both; }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px); } }

/* ---------- Confetti canvas ---------- */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

/* ---------- Login ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; }
.login-card {
    width: min(400px, 92vw);
    background: rgb(255 255 255 / .045); border: 1px solid var(--line);
    backdrop-filter: blur(20px); border-radius: 20px;
    box-shadow: 0 30px 80px rgb(0 0 0 / .55); padding: 2.4rem;
    animation: rise .5s cubic-bezier(.2,.8,.3,1) both;
}
.login-card .brand { justify-content: center; border: 0; padding: 0 0 .5rem; }
.login-card h1 { font-size: 1.15rem; margin: .5rem 0 1.5rem; text-align: center; color: #fff; font-weight: 700; }
.login-card label { display: block; font-size: .76rem; font-weight: 700; color: var(--muted); margin: .95rem 0 .32rem; letter-spacing: .04em; text-transform: uppercase; }
.login-card input {
    width: 100%; padding: .72rem .9rem; border: 1px solid var(--line);
    border-radius: 10px; font: inherit; color: var(--text); background: rgb(7 10 19 / .55);
    transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(129 140 248 / .22); }
.login-card button {
    width: 100%; margin-top: 1.5rem; padding: .82rem; border: 0; border-radius: 10px;
    background: var(--grad); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
    box-shadow: 0 6px 20px rgb(99 102 241 / .4), inset 0 1px 0 rgb(255 255 255 / .25);
    transition: filter .15s, transform .12s;
}
.login-card button:hover { filter: brightness(1.12); }
.login-card button:active { transform: scale(.98); }
.login-card .err { background: rgb(248 113 113 / .12); color: var(--bad); border: 1px solid rgb(248 113 113 / .3); padding: .65rem .9rem; border-radius: 9px; font-size: .85rem; margin-top: 1rem; animation: shake .3s ease; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- Entrance ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.content > * { animation: rise .4s cubic-bezier(.2,.8,.3,1) both; }
.content > *:nth-child(2) { animation-delay: .05s; }
.content > *:nth-child(3) { animation-delay: .1s; }
.content > *:nth-child(4) { animation-delay: .15s; }
.kpis .kpi:nth-child(2) { animation-delay: .05s; }
.kpis .kpi:nth-child(3) { animation-delay: .1s; }
.kpis .kpi:nth-child(4) { animation-delay: .15s; }
.kpis .kpi:nth-child(5) { animation-delay: .2s; }
.kpis .kpi:nth-child(6) { animation-delay: .25s; }
.kpis .kpi:nth-child(7) { animation-delay: .3s; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgb(255 255 255 / .12); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgb(255 255 255 / .2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .sidebar { position: fixed; z-index: 100; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 60px rgb(0 0 0 / .6); }
    body.nav-open .sidebar { transform: none; }
    .nav-toggle { display: block; }
    .content { padding: 1rem; }
    .kpis { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
    table { font-size: .78rem; }
    th, td { padding: .55rem .8rem; }
}

/* ---------- Transaction detail ---------- */
.txd-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.4rem; }
.txd-title h2 { margin: 0; font-size: 1.5rem; display: flex; align-items: center; gap: .8rem; }
.txd-amount { font-size: 1.2rem; font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; }
.txd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.6rem; margin-bottom: 1.6rem; align-items: start; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.2rem; padding: 1.1rem; margin: 0; font-size: .85rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 550; word-break: break-word; }
.dl dd.small, .mono.small { font-size: .72rem; }
.tx-link { color: #a5b4fc; text-decoration: none; font-weight: 600; }
.tx-link:hover { color: #c7d2fe; text-decoration: underline; }
.op-type { font-weight: 600; text-transform: capitalize; }
.card > table tr:hover td { background: rgb(255 255 255 / .03); }
.plog { max-height: 420px; overflow-y: auto; padding: .6rem 1.1rem; }
.plog-row { display: flex; gap: .7rem; align-items: baseline; padding: .35rem 0; border-bottom: 1px solid rgb(255 255 255 / .05); font-size: .8rem; }
.plog-row:last-child { border-bottom: 0; }
.plog-time { color: var(--muted); white-space: nowrap; }
.plog-level { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 6px; white-space: nowrap; }
.plog-level.info { color: #a5b4fc; background: rgb(129 140 248 / .14); }
.plog-level.debug { color: var(--muted); background: rgb(148 163 184 / .12); }
.plog-level.warning { color: var(--warn); background: rgb(251 191 36 / .12); }
.plog-level.error { color: var(--bad); background: rgb(248 113 113 / .12); }
.plog-msg { color: #cbd5e1; }
.plog-msg details { margin-top: .3rem; }
.plog-msg summary { color: var(--muted); cursor: pointer; font-size: .72rem; }
.plog-msg pre { background: rgb(0 0 0 / .3); border: 1px solid rgb(255 255 255 / .08); border-radius: 8px; padding: .6rem .8rem; font-size: .72rem; overflow-x: auto; margin: .35rem 0 0; }

/* ---------- Funnel ---------- */
.ov-side { display: flex; flex-direction: column; gap: 1.6rem; min-width: 0; }
.funnel-total { display: flex; align-items: baseline; gap: .8rem; padding: .9rem 1.1rem .5rem; }
.funnel-rate { font-size: 1.9rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.funnel-row { display: grid; grid-template-columns: minmax(90px, 130px) 1fr auto; gap: .7rem; align-items: center; padding: .42rem 1.1rem; font-size: .8rem; }
.funnel-row:last-child { padding-bottom: .9rem; }
.funnel-site { color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funnel-bar { height: 7px; background: rgb(255 255 255 / .07); border-radius: 4px; overflow: hidden; }
.funnel-fill { height: 100%; background: var(--grad); border-radius: 4px; transition: width .6s cubic-bezier(.2,.8,.3,1); }
.funnel-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Fee / net ---------- */
.fee-grid { display: flex; flex-direction: column; gap: 1rem; }
.fee-item { border: 1px solid rgb(255 255 255 / .09); border-radius: 12px; padding: .9rem 1.1rem; background: rgb(255 255 255 / .02); }
.fee-cur { font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); margin-bottom: .5rem; }
.fee-row { display: flex; justify-content: space-between; font-size: .84rem; padding: .18rem 0; font-variant-numeric: tabular-nums; }
.fee-row span { color: var(--muted); }
.fee-row.net { border-top: 1px solid rgb(255 255 255 / .09); margin-top: .35rem; padding-top: .5rem; }
.fee-row.net strong { color: var(--ok); }

/* ---------- Settings form ---------- */
.fld { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; color: var(--muted); margin-bottom: .9rem; }
.fld input { background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .12); border-radius: 10px; padding: .6rem .85rem; color: var(--text); font-size: .88rem; }
.fld input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(129 140 248 / .18); }
.notice.ok { background: rgb(52 211 153 / .1); color: var(--ok); border-color: rgb(52 211 153 / .28); }

/* ---------- Feed row links ---------- */
.feed li.f-link { cursor: pointer; }
.feed li.f-link:hover { background: rgb(255 255 255 / .045); }

/* ---------- Clean-view note + audit log ---------- */
.clean-note { font-size: .78rem; color: var(--muted); padding: 0 1.1rem .6rem; margin: -.4rem 0 0; }
.clean-note a { color: #a5b4fc; text-decoration: none; }
.clean-note a:hover { text-decoration: underline; }
.plog-prov { color: #a5b4fc; font-size: .7rem; white-space: nowrap; min-width: 62px; }

/* ---------- Today-by-site ---------- */
.tsb-list { padding-bottom: .5rem; }
.tsb-row { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; align-items: baseline; padding: .42rem 1.1rem; font-size: .83rem; }
.tsb-row:nth-child(odd) { background: rgb(255 255 255 / .02); }
.tsb-site { color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsb-amt { font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; }
.tsb-n { color: var(--muted); font-size: .72rem; min-width: 44px; text-align: right; }

/* ---------- Payout provider cards ---------- */
.payout-card { padding-bottom: 1rem; }
.pc-head { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem .3rem; }
.pc-head h3 { margin: 0; font-size: .95rem; flex: 1; }
.pc-amt { font-size: 1.6rem; font-weight: 800; padding: .2rem 1.1rem; font-variant-numeric: tabular-nums;
          background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pc-note { padding: .2rem 1.1rem 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
