/* Web24 Reseller - "command center" theme */
:root {
    --bg: #07070d; --bg-2: #0d0d18;
    --glass: rgba(255, 255, 255, .045); --glass-2: rgba(255, 255, 255, .075); --glass-line: rgba(255, 255, 255, .09);
    --text: #eef0ff; --muted: #8b8fa8; --dim: #5d6078;
    --red: #ff2d55; --violet: #a855f7; --cyan: #22d3ee; --ok: #34d399; --warn: #fbbf24; --bad: #fb7185; --blue: #60a5fa;
    --grad: linear-gradient(135deg, #ff2d55 0%, #c026d3 50%, #7c3aed 100%);
    --grad-cool: linear-gradient(135deg, #22d3ee, #7c3aed);
    --radius: 18px;
    --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
.login-alt { text-align: center; margin: 14px 0 0; font-size: 13px; color: var(--muted); } .login-alt a { color: var(--cyan); font-weight: 600; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cyan); text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); } .small { font-size: 13px; } .error { color: var(--bad); min-height: 1.2em; font-size: 14px; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }
::selection { background: rgba(168, 85, 247, .4); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 10px; }

/* ---------- living background */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); opacity: .32; animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: #ff2d55; top: -25vmax; left: -15vmax; }
.aurora i:nth-child(2) { background: #7c3aed; bottom: -30vmax; right: -20vmax; animation-duration: 32s; }
.aurora i:nth-child(3) { background: #0891b2; top: 30%; left: 40%; width: 40vmax; height: 40vmax; opacity: .18; animation-duration: 38s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vmax, 4vmax) scale(1.1); } 100% { transform: translate(-4vmax, 6vmax) scale(.95); } }
.grid-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%); }
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.glass { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }

/* ---------- brand */
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: #fff; color: #0b0b12; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand-mark span { background: var(--red); color: #fff; margin-left: 2px; padding: 0 4px; border-radius: 4px; }
.brand-mark.sm { width: auto; padding: 0 7px; height: 34px; border-radius: 10px; font-size: 13px; box-shadow: 0 0 24px rgba(255,45,85,.35); }
.brand-orb { align-self: center; padding: 6px; border-radius: 22px; background: var(--grad); box-shadow: 0 0 60px rgba(192, 38, 211, .45); animation: pulse-orb 4s ease-in-out infinite; }
@keyframes pulse-orb { 50% { box-shadow: 0 0 90px rgba(255, 45, 85, .55); } }

/* ---------- sign in */
#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; text-align: center; padding: 30px 26px; border-radius: 26px; animation: rise .5s ease both; }
.login-box h1 { margin: 6px 0 0; font-size: 24px; letter-spacing: -.02em; }
.login-box label { text-align: left; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

input, select, textarea { background: rgba(0,0,0,.35); border: 1px solid var(--glass-line); border-radius: 12px; padding: 11px 13px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(168,85,247,.7); box-shadow: 0 0 0 4px rgba(168,85,247,.15); }
select option { background: #15151f; }

.btn { border: 1px solid var(--glass-line); background: var(--glass-2); border-radius: 12px; padding: 11px 18px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s, background .15s, box-shadow .2s; color: var(--text); }
.btn:hover { background: rgba(255,255,255,.11); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; }
.btn.primary:hover { box-shadow: 0 8px 30px rgba(192, 38, 211, .45); }
.btn.glow { box-shadow: 0 8px 30px rgba(255, 45, 85, .35); }
.btn.cool { background: var(--grad-cool); border-color: transparent; color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn.danger, .danger { color: var(--bad) !important; border-color: rgba(251,113,133,.35) !important; }
.icon-btn { border: 0; background: transparent; width: 40px; height: 40px; border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text); position: relative; }
.icon-btn:hover { background: var(--glass-2); }

/* ---------- shell */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-top)) 16px 10px; background: rgba(7,7,13,.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--glass-line); }
.top-title { font-weight: 700; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.search-btn { flex: 1; max-width: 460px; margin-left: auto; display: none; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--glass-line); background: rgba(0,0,0,.3); color: var(--muted); cursor: pointer; text-align: left; }
.search-btn span { flex: 1; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--glass-line); border-radius: 6px; padding: 2px 6px; color: var(--muted); background: rgba(255,255,255,.04); }
.bell { margin-left: auto; }
.bell b { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; padding: 0 5px; box-shadow: 0 0 12px rgba(255,45,85,.8); }
.credits-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 14px 6px 8px; font-weight: 700; font-size: 14px; white-space: nowrap; background: rgba(0,0,0,.35); border: 1px solid rgba(251,191,36,.3); font-family: var(--mono); cursor: pointer; }
.coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b 60%, #b45309); box-shadow: 0 0 10px rgba(251,191,36,.6); }
.sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: 262px; padding: calc(74px + var(--safe-top)) 12px 16px; display: flex; flex-direction: column; gap: 3px; transform: translateX(-105%); transition: transform .25s ease; background: rgba(10,10,18,.92); border-right: 1px solid var(--glass-line); backdrop-filter: blur(18px); }
.sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); }
.sidebar a { color: var(--muted); padding: 10px 12px; border-radius: 12px; display: flex; align-items: center; gap: 12px; font-weight: 500; transition: background .15s, color .15s; position: relative; }
.sidebar a:hover { color: var(--text); background: var(--glass); }
.sidebar a.on { color: var(--text); background: linear-gradient(90deg, rgba(255,45,85,.18), rgba(124,58,237,.08)); }
.sidebar a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px rgba(255,45,85,.8); }
.sidebar a.accent { color: #fff; background: var(--grad); margin: 8px 0; justify-content: center; font-weight: 700; box-shadow: 0 8px 26px rgba(192,38,211,.35); }
.side-foot { margin-top: auto; padding: 10px 12px; font-size: 12px; color: var(--dim); border-top: 1px solid var(--glass-line); }
.nav-badge { background: var(--red); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 800; margin-left: auto; }
.content { padding: 18px 16px calc(100px + var(--safe-bottom)); max-width: 1240px; margin: 0 auto; animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tabbar { position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); display: flex; align-items: center; justify-content: space-around; padding: 8px 6px; border-radius: 22px; background: rgba(14,14,24,.85); border: 1px solid var(--glass-line); backdrop-filter: blur(18px); box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.tabbar a { color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 12px; }
.tabbar a.on { color: var(--text); }
.tabbar a.on svg { color: var(--red); filter: drop-shadow(0 0 6px rgba(255,45,85,.7)); }
.tabbar .fab { width: 54px; height: 54px; border-radius: 18px; background: var(--grad); color: #fff; justify-content: center; margin-top: -26px; box-shadow: 0 10px 30px rgba(192,38,211,.55); }
.tabbar .fab svg { width: 26px; height: 26px; }
@media (min-width: 960px) {
    .menu-btn, .tabbar { display: none; }
    .search-btn { display: flex; }
    .bell { margin-left: 0; }
    .sidebar { transform: none; top: 61px; padding-top: 16px; }
    .sidebar.open { box-shadow: none; }
    .content { margin-left: 262px; padding: 26px 32px 40px; }
}

/* ---------- cards & stats */
h2 { font-size: 16px; margin: 0 0 14px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card { background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); padding: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: relative; animation: rise .45s ease both; }
.card + .card { margin-top: 14px; }
.grid > .card + .card, .cols > .card + .card { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { overflow: hidden; }
.stat .n { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-family: var(--mono); }
.stat .l { color: var(--muted); font-size: 13px; }
.stat .ico { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.05); }
.stat .ico svg { width: 18px; height: 18px; }
.stat.click { cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .2s; }
.stat.click:hover { transform: translateY(-3px); border-color: rgba(168,85,247,.45); box-shadow: 0 14px 40px rgba(124,58,237,.18); }
.c-ok .n { color: var(--ok); } .c-cyan .n { color: var(--cyan); } .c-warn .n { color: var(--warn); } .c-bad .n { color: var(--bad); } .c-violet .n { color: #c084fc; }
.c-ok .ico { color: var(--ok); } .c-cyan .ico { color: var(--cyan); } .c-warn .ico { color: var(--warn); } .c-bad .ico { color: var(--bad); } .c-violet .ico { color: #c084fc; }
.cols { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 14px; }
@media (min-width: 1100px) { .cols { grid-template-columns: 1.35fr 1fr; } .cols.three { grid-template-columns: 1fr 1fr 1fr; } }
.cols .card + .card { margin-top: 0; }

/* hero */
.hero { display: grid; gap: 18px; grid-template-columns: auto 1fr; align-items: center; padding: 22px; background: linear-gradient(135deg, rgba(255,45,85,.12), rgba(124,58,237,.1) 55%, rgba(34,211,238,.06)); border-color: rgba(255,255,255,.12); margin-bottom: 14px; }
.hero h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.hero .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.gauge { width: 132px; height: 132px; position: relative; }
.gauge svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.gauge .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge .val b { font-size: 26px; font-family: var(--mono); }
.gauge .val span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 560px) { .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; } .hero-actions { justify-content: center; } }

/* live */
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.bars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 14px; }
.hbar .track { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 6px; background: var(--grad); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .v { font-family: var(--mono); color: var(--muted); font-size: 13px; }
.flags { display: flex; flex-wrap: wrap; gap: 8px; }
.flag { background: rgba(255,255,255,.05); border: 1px solid var(--glass-line); border-radius: 999px; padding: 4px 11px; font-size: 13px; }
.flag { display: inline-flex; align-items: center; gap: 7px; } .flag img { width: 20px; height: 14px; border-radius: 3px; object-fit: cover; } .flag b { font-family: var(--mono); }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; } .mini div { background: rgba(0,0,0,.25); border: 1px solid var(--glass-line); border-radius: 12px; padding: 10px 12px; } .mini b { display: block; font-family: var(--mono); font-size: 20px; } .mini span { color: var(--muted); font-size: 12px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,.06); font-size: 14px; cursor: pointer; }
.feed li:last-child { border-bottom: 0; }
.feed .who { font-weight: 600; font-family: var(--mono); font-size: 13px; } .feed .what { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* insights */
.insight { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--glass-line); }
.insight + .insight { margin-top: 10px; }
.insight .ic { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.insight .tx { flex: 1; font-size: 14px; color: var(--muted); } .insight .tx b { color: var(--text); } .insight .tx b.t { display: block; font-size: 15px; margin-bottom: 2px; }
.ic.warn { background: rgba(251,191,36,.12); color: var(--warn); } .ic.cyan { background: rgba(34,211,238,.12); color: var(--cyan); }
.ic.violet { background: rgba(168,85,247,.14); color: #c084fc; } .ic.ok { background: rgba(52,211,153,.12); color: var(--ok); } .ic.bad { background: rgba(251,113,133,.12); color: var(--bad); }
.spark { width: 100%; height: 72px; display: block; }

/* announcement / warnings */
.announce { display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(90deg, rgba(34,211,238,.12), rgba(124,58,237,.08)); border: 1px solid rgba(34,211,238,.25); border-radius: 14px; padding: 13px 15px; margin-bottom: 14px; white-space: pre-wrap; }
.warn-box { background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.3); border-radius: 14px; padding: 13px 15px; margin-bottom: 14px; }

/* lists & lines */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid rgba(255,255,255,.06); padding: 11px 2px; }
.list li:last-child { border-bottom: 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input { flex: 1; min-width: 180px; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; scrollbar-width: none; }
.chip { border: 1px solid var(--glass-line); background: var(--glass); border-radius: 999px; padding: 7px 14px; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .15s; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 20px rgba(192,38,211,.35); }
.hero-actions select.btn { appearance: auto; -webkit-appearance: auto; padding-right: 28px; }
.form textarea { width: 100%; box-sizing: border-box; }
#sheet-body h3 { margin: 16px 0 8px; font-size: 15px; }
.table tr.click:hover td { background: rgba(255,255,255,.04); }
.line-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.05); cursor: pointer; transition: background .12s; }
.line-row:hover { background: rgba(255,255,255,.035); }
.line-row:last-child { border-bottom: 0; }
.line-row .avatar { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; background: rgba(255,255,255,.06); position: relative; text-transform: uppercase; }
.line-row .avatar.on::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid #0d0d18; box-shadow: 0 0 8px var(--ok); }
.line-row .main { flex: 1; min-width: 0; }
.line-row .u { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 14px; }
.line-row .sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.life { height: 4px; border-radius: 4px; background: rgba(255,255,255,.07); margin-top: 6px; overflow: hidden; max-width: 260px; }
.life i { display: block; height: 100%; border-radius: 4px; }
.line-row .pick { width: 18px; height: 18px; flex: none; accent-color: #c026d3; }
.badge { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; border-radius: 7px; padding: 4px 8px; text-transform: uppercase; white-space: nowrap; }
.badge.active { background: rgba(52,211,153,.12); color: var(--ok); }
.badge.trial { background: rgba(96,165,250,.14); color: var(--blue); }
.badge.expired, .badge.banned { background: rgba(251,113,133,.12); color: var(--bad); }
.badge.disabled { background: rgba(139,143,168,.15); color: var(--muted); }
.more { text-align: center; padding: 14px; }
.bulkbar { position: sticky; bottom: 0; background: rgba(14,14,24,.92); backdrop-filter: blur(14px); border-top: 1px solid var(--glass-line); padding: 12px 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; z-index: 5; border-radius: 0 0 var(--radius) var(--radius); }
.bulkbar select { flex: 1; min-width: 180px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 600px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { flex-direction: row !important; align-items: center; gap: 10px !important; color: var(--text) !important; font-size: 15px !important; }
.check input { width: auto; accent-color: #c026d3; }
.summary { background: rgba(0,0,0,.3); border: 1px solid var(--glass-line); border-radius: 14px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 14px; }
.summary b { text-align: right; font-family: var(--mono); }
.pkg { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.price { font-weight: 800; white-space: nowrap; font-family: var(--mono); }
.pkg-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pkg-card { padding: 18px; border-radius: 16px; background: rgba(0,0,0,.25); border: 1px solid var(--glass-line); display: flex; flex-direction: column; gap: 6px; transition: transform .15s, border-color .15s; }
.pkg-card:hover { transform: translateY(-3px); border-color: rgba(168,85,247,.45); }
.pkg-card .p { font-size: 26px; font-weight: 800; font-family: var(--mono); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* sheet */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(3,3,8,.65); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fadein .2s ease both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.sheet { background: rgba(16,16,28,.92); width: 100%; max-width: 660px; max-height: 92vh; border-radius: 24px 24px 0 0; display: flex; flex-direction: column; animation: up .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 720px) { .sheet-back { align-items: center; } .sheet { border-radius: 24px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.sheet-head h2 { margin: 0; font-family: var(--mono); }
.sheet-body { overflow-y: auto; padding: 6px 18px calc(20px + var(--safe-bottom)); }
.kv { display: grid; grid-template-columns: auto 1fr auto; gap: 9px 12px; align-items: center; margin: 8px 0 14px; }
.kv dt { color: var(--muted); font-size: 13px; } .kv dd { margin: 0; font-weight: 600; word-break: break-all; font-family: var(--mono); font-size: 13.5px; }
.copy { border: 1px solid var(--glass-line); background: var(--glass-2); border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 12px; color: var(--text); }
.copy:hover { border-color: rgba(168,85,247,.6); }
.sec { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 18px 0 9px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* palette */
.palette-back { position: fixed; inset: 0; z-index: 60; background: rgba(3,3,8,.6); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 14px 0; animation: fadein .15s ease both; }
.palette { width: 100%; max-width: 620px; border-radius: 20px; background: rgba(16,16,28,.92); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(168,85,247,.25); overflow: hidden; animation: up .2s ease both; }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--glass-line); color: var(--muted); }
.palette-in input { border: 0; background: transparent; padding: 4px 0; font-size: 17px; box-shadow: none !important; }
.palette-list { max-height: 55vh; overflow-y: auto; padding: 6px; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.pal-item.sel, .pal-item:hover { background: linear-gradient(90deg, rgba(255,45,85,.16), rgba(124,58,237,.1)); }
.pal-item .t { flex: 1; min-width: 0; } .pal-item .t small { display: block; color: var(--muted); font-size: 12px; }
.pal-group { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; padding: 10px 12px 4px; }

/* notifications */
.notif { position: fixed; z-index: 55; top: calc(64px + var(--safe-top)); right: 12px; width: min(380px, calc(100vw - 24px)); border-radius: 18px; background: rgba(16,16,28,.94); box-shadow: 0 30px 80px rgba(0,0,0,.6); padding: 8px; animation: up .2s ease both; }
.notif .it { display: flex; gap: 10px; padding: 11px 12px; border-radius: 12px; cursor: pointer; font-size: 14px; align-items: flex-start; }
.notif .it:hover { background: var(--glass-2); }
.notif .empty { padding: 18px; text-align: center; color: var(--muted); }

/* tables, misc */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: top; }
.table th { color: var(--dim); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 6px; }
.chart .bar { border-radius: 4px 4px 0 0; min-height: 2px; background: var(--grad); }
.chart .bar.renew { background: var(--grad-cool); }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.msg { border-radius: 16px; padding: 11px 14px; margin: 8px 0; white-space: pre-wrap; max-width: 88%; font-size: 14px; }
.msg.you { background: linear-gradient(135deg, rgba(255,45,85,.22), rgba(124,58,237,.2)); margin-left: auto; border-bottom-right-radius: 4px; }
.msg.admin { background: var(--glass-2); border-bottom-left-radius: 4px; }
.msg .meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.qr { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; }
.status-pill { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-radius: 7px; padding: 4px 8px; }
.status-pill.pending { background: rgba(251,191,36,.12); color: var(--warn); }
.status-pill.approved { background: rgba(52,211,153,.12); color: var(--ok); }
.status-pill.rejected, .status-pill.cancelled { background: rgba(139,143,168,.15); color: var(--muted); }

/* skeleton + toast + loader */
.skel { border-radius: 16px; height: 96px; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.09) 37%, rgba(255,255,255,.04) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.skel.tall { height: 220px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.loading-inline { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px 4px; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-bottom)); transform: translateX(-50%); z-index: 70; background: rgba(20,20,34,.95); color: var(--text); border: 1px solid rgba(168,85,247,.4); border-radius: 14px; padding: 12px 18px; font-weight: 600; max-width: 90vw; box-shadow: 0 16px 50px rgba(0,0,0,.5), 0 0 30px rgba(124,58,237,.25); }
@media (min-width: 960px) { .toast { bottom: 28px; } }
.loader { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; background: rgba(3,3,8,.45); backdrop-filter: blur(3px); }
.loader .ring { width: 54px; height: 54px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--red); border-right-color: var(--violet); animation: spin .8s linear infinite; box-shadow: 0 0 40px rgba(192,38,211,.4); }

/* AI assistant + Channel Doctor */
.sidebar a.ai-link { color: var(--text); background: linear-gradient(90deg, rgba(34,211,238,.14), rgba(124,58,237,.12)); border: 1px solid rgba(34,211,238,.25); }
.ai-orb { width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--grad-cool); box-shadow: 0 0 40px rgba(34,211,238,.4); animation: pulse-ai 3.5s ease-in-out infinite; }
.ai-orb svg { width: 30px; height: 30px; }
.ai-orb.sm { width: 40px; height: 40px; border-radius: 13px; } .ai-orb.sm svg { width: 20px; height: 20px; }
@keyframes pulse-ai { 50% { box-shadow: 0 0 70px rgba(124,58,237,.55); } }
.ai-wrap { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 460px; padding: 0; overflow: hidden; }
@media (max-width: 959px) { .ai-wrap { height: calc(100vh - 190px); } }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--glass-line); }
.ai-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ai-hello { margin: auto; text-align: center; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ai-hello h1 { margin: 6px 0 0; font-size: 24px; }
.ai-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 86%; animation: rise .3s ease both; }
.ai-msg.you { margin-left: auto; flex-direction: row-reverse; }
.ai-av { width: 30px; height: 30px; border-radius: 10px; background: var(--grad-cool); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.ai-av svg { width: 16px; height: 16px; }
.ai-b { padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; background: var(--glass-2); border: 1px solid var(--glass-line); border-bottom-left-radius: 5px; word-break: break-word; }
.ai-msg.you .ai-b { background: linear-gradient(135deg, rgba(255,45,85,.28), rgba(124,58,237,.26)); border-color: rgba(255,45,85,.3); border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
.ai-meta { font-size: 11px; color: var(--muted); margin-top: 5px; }
.ai-typing { padding: 0 18px 8px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); animation: blink 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: .2s; } .ai-typing span:nth-child(3) { animation-delay: .4s; }
.ai-caret { display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--cyan); animation: blink 1s infinite; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-in { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--glass-line); align-items: flex-end; }
.ai-in textarea { resize: none; min-height: 46px; max-height: 140px; }
.ai-in .btn { height: 46px; width: 52px; padding: 0; }
.ai-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 14px 12px; }
.doc-row { display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px; border-bottom: 1px solid rgba(255,255,255,.05); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .main { flex: 1; min-width: 0; } .doc-row .u { font-weight: 700; } .doc-row .sub { color: var(--muted); font-size: 13px; }
.doc-out { margin-top: 10px; }

/* ---------- staff view ("Login as reseller" in the admin console): the bar under the top bar, and the end screen.
 * app.js sets the bar's top to the real height of the top bar. */
.staffbar { position: sticky; top: 61px; z-index: 19; display: flex; align-items: center; gap: 12px; padding: 8px 16px; font-size: 13px; line-height: 1.35; color: #fde68a; background: rgba(54, 38, 6, .94); border-bottom: 1px solid rgba(251, 191, 36, .45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.staffbar span { flex: 1; min-width: 0; } .staffbar b { color: #fff; }
.staffbar .btn { flex: none; color: #fde68a; background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .5); }
@media (min-width: 960px) { .staffbar { margin-left: 262px; padding: 8px 32px; } }
#staff-end { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
