/* ================================================================
   Uzair Khan Stream Panel — EXACT-MATCH THEME (owner's reference
   screenshot, 09 Nov 2026 03:21 AM — replaces the 2026-11-09
   "premium futuristic" rewrite the owner rejected): the design in
   his screenshot, applied as-is — near-black navy background with
   a PROMINENT bright blue → purple → cyan flowing wave, bright
   full-gradient stat cards with a wave pattern inside, white bold
   title + blue gradient role badge, gold Credits pill, blue →
   purple credits bar, blue → purple active bottom-nav tab.

   Every legacy class name, selector and responsive breakpoint is
   kept, so only functions.php changed (profile icon + stylesheet
   version). No external fonts or CDN assets — the panel stays
   self-contained and fast on shared hosting.
   ================================================================ */
:root {
    /* ---- design tokens ---- */
    --bg: #02040a;          /* near-black navy (screenshot) */
    --bg2: #010208;         /* almost pure black */
    --black: #000000;
    --surface: rgba(13, 22, 46, .55);   /* glass */
    --surface2: rgba(20, 32, 66, .55);
    --surface3: rgba(28, 44, 88, .55);
    --surface-solid: #0d162e;
    --surface2-solid: #142044;
    --border: rgba(0, 191, 255, .22);
    --border-soft: rgba(139, 92, 246, .22);
    --text: #f2f6ff;
    --muted: #8fa3c8;
    --accent: #00bfff;      /* neon blue */
    --accent2: #00e5ff;     /* cyan */
    --purple: #a55eea;      /* electric purple */
    --purple2: #8b5cf6;
    --gold: #ffb300;
    --gold-soft: #ffd97a;
    --green: #22c55e;
    --red: #ef4444;
    --amber: #f5a623;
    --orange: #ff7a18;
    --blue: #2f9df6;
    --neon: #a855f7;
    --radius: 18px;
    --radius-sm: 14px;
    --sidebar-w: 236px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    /* Screen-fit lock: no page may grow wider than the device screen,
       so mobile browsers never zoom out to fit stray wide content. */
    overflow-x: hidden;
    color: var(--text);
    overscroll-behavior: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    background:
        url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201440%20430%22%20preserveAspectRatio%3D%22none%22%3E%3Cg%3E%3Cellipse%20cx%3D%221080%22%20cy%3D%22170%22%20rx%3D%22540%22%20ry%3D%22120%22%20fill%3D%22%2300bfff%22%20opacity%3D%220.10%22%20transform%3D%22rotate%28-13%201080%20170%29%22%2F%3E%3Cellipse%20cx%3D%221150%22%20cy%3D%22140%22%20rx%3D%22420%22%20ry%3D%2280%22%20fill%3D%22%23a55eea%22%20opacity%3D%220.08%22%20transform%3D%22rotate%28-13%201150%20140%29%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1440%2C8%20C1240%2C70%201060%2C100%20880%2C160%20C720%2C210%20560%2C250%20400%2C290%20C320%2C308%20240%2C318%20180%2C322%22%20stroke%3D%22%2300e5ff%22%20stroke-width%3D%229.5%22%20opacity%3D%220.22%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M1440%2C48%20C1260%2C105%201080%2C135%20900%2C190%20C740%2C235%20580%2C272%20420%2C308%20C340%2C324%20260%2C332%20200%2C336%22%20stroke%3D%22%2300bfff%22%20stroke-width%3D%229%22%20opacity%3D%220.22%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M1440%2C92%20C1280%2C145%201100%2C172%20920%2C222%20C760%2C264%20600%2C296%20440%2C328%20C360%2C342%20280%2C350%20220%2C352%22%20stroke%3D%22%23a55eea%22%20stroke-width%3D%229%22%20opacity%3D%220.22%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M1440%2C140%20C1300%2C188%201120%2C212%20940%2C256%20C780%2C294%20620%2C320%20460%2C346%20C380%2C358%20300%2C364%20240%2C366%22%20stroke%3D%22%23c084fc%22%20stroke-width%3D%228.5%22%20opacity%3D%220.22%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M1440%2C8%20C1240%2C70%201060%2C100%20880%2C160%20C720%2C210%20560%2C250%20400%2C290%20C320%2C308%20240%2C318%20180%2C322%22%20stroke%3D%22%2300e5ff%22%20stroke-width%3D%223.5%22%20opacity%3D%221%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M1440%2C48%20C1260%2C105%201080%2C135%20900%2C190%20C740%2C235%20580%2C272%20420%2C308%20C340%2C324%20260%2C332%20200%2C336%22%20stroke%3D%22%2300bfff%22%20stroke-width%3D%223%22%20opacity%3D%220.95%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M1440%2C92%20C1280%2C145%201100%2C172%20920%2C222%20C760%2C264%20600%2C296%20440%2C328%20C360%2C342%20280%2C350%20220%2C352%22%20stroke%3D%22%23a55eea%22%20stroke-width%3D%223%22%20opacity%3D%220.9%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M1440%2C140%20C1300%2C188%201120%2C212%20940%2C256%20C780%2C294%20620%2C320%20460%2C346%20C380%2C358%20300%2C364%20240%2C366%22%20stroke%3D%22%23c084fc%22%20stroke-width%3D%222.5%22%20opacity%3D%220.75%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") right top / 1440px 430px no-repeat,
        url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201440%20300%22%20preserveAspectRatio%3D%22none%22%3E%3Cg%3E%3Cellipse%20cx%3D%22360%22%20cy%3D%22230%22%20rx%3D%22480%22%20ry%3D%2290%22%20fill%3D%22%233b82f6%22%20opacity%3D%220.10%22%20transform%3D%22rotate%288%20360%20230%29%22%2F%3E%3Cellipse%20cx%3D%22300%22%20cy%3D%22250%22%20rx%3D%22360%22%20ry%3D%2260%22%20fill%3D%22%2300bfff%22%20opacity%3D%220.08%22%20transform%3D%22rotate%288%20300%20250%29%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M0%2C288%20C180%2C250%20360%2C225%20560%2C190%20C760%2C155%20960%2C135%201160%2C95%20C1280%2C72%201370%2C62%201440%2C50%22%20stroke%3D%22%2300e5ff%22%20stroke-width%3D%229.5%22%20opacity%3D%220.22%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M0%2C298%20C200%2C268%20380%2C245%20580%2C212%20C780%2C180%20980%2C160%201180%2C124%20C1300%2C102%201390%2C92%201440%2C84%22%20stroke%3D%22%2300bfff%22%20stroke-width%3D%229%22%20opacity%3D%220.22%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M0%2C300%20C220%2C282%20400%2C262%20600%2C232%20C800%2C204%201000%2C186%201200%2C152%20C1320%2C132%201400%2C124%201440%2C118%22%20stroke%3D%22%23a55eea%22%20stroke-width%3D%229%22%20opacity%3D%220.22%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M0%2C300%20C240%2C292%20420%2C276%20620%2C250%20C820%2C226%201020%2C212%201220%2C182%20C1340%2C164%201410%2C156%201440%2C152%22%20stroke%3D%22%237c3aed%22%20stroke-width%3D%228.5%22%20opacity%3D%220.22%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M0%2C288%20C180%2C250%20360%2C225%20560%2C190%20C760%2C155%20960%2C135%201160%2C95%20C1280%2C72%201370%2C62%201440%2C50%22%20stroke%3D%22%2300e5ff%22%20stroke-width%3D%223.5%22%20opacity%3D%221%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M0%2C298%20C200%2C268%20380%2C245%20580%2C212%20C780%2C180%20980%2C160%201180%2C124%20C1300%2C102%201390%2C92%201440%2C84%22%20stroke%3D%22%2300bfff%22%20stroke-width%3D%223%22%20opacity%3D%220.95%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M0%2C300%20C220%2C282%20400%2C262%20600%2C232%20C800%2C204%201000%2C186%201200%2C152%20C1320%2C132%201400%2C124%201440%2C118%22%20stroke%3D%22%23a55eea%22%20stroke-width%3D%223%22%20opacity%3D%220.9%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M0%2C300%20C240%2C292%20420%2C276%20620%2C250%20C820%2C226%201020%2C212%201220%2C182%20C1340%2C164%201410%2C156%201440%2C152%22%20stroke%3D%22%237c3aed%22%20stroke-width%3D%222.5%22%20opacity%3D%220.75%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") left bottom / 1440px 300px no-repeat,
        radial-gradient(700px 260px at 88% -40px, rgba(0, 191, 255, .16), transparent 70%),
        linear-gradient(180deg, var(--bg) 0%, #010208 55%, var(--black) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}
/* ---- THIN-LINE flowing wave (screenshot) — painted in the BODY
   background as the topmost layers, NOT in fixed ::before/::after
   pseudo-elements: a fixed pseudo-element with z-index:-1 is
   unreliable on mobile Chrome and the wave never showed on the
   owner's phone. Body-background layers render on every browser.
   Top wave pinned right top, bottom wave pinned left bottom;
   background-attachment: fixed keeps both glued to the viewport.
   The waves are THIN stroked lines (2.5–3.5px, cyan/blue/purple)
   with only a faint glow wash — the owner rejected the earlier
   thick filled bands as too big/heavy. */
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
/* overflow: clip does the same job without creating a scroll
   container, so sticky sidebar/topbar keep working perfectly. */
@supports (overflow-x: clip) {
    body { overflow-x: clip; }
}
/* Grid children must be allowed to shrink below their content size,
   otherwise one long word/URL stretches the whole page sideways. */
.stat-grid > *, .dash-grid > *, .recent-grid > *, .qa-grid > *, .cards > * { min-width: 0; }
/* Long unbroken strings (playlist links, device keys) wrap inside
   table cells instead of pushing the page wider than the screen. */
.table-wrap td, .detail-table td, .card td { overflow-wrap: anywhere; }
h1 { font-size: 23px; margin: 6px 0 14px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 22px 0 10px; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 16px 0 8px; }
code { background: var(--surface2-solid); padding: 1px 6px; border-radius: 5px; font-size: 13px; color: #bfe9ff; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------------- Shell: sidebar + main ---------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, rgba(10, 18, 40, .82), rgba(3, 6, 15, .92));
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-right: 1px solid var(--border-soft);
    padding: 18px 12px 14px;
    overflow-y: auto;
}
.side-brand { text-align: center; padding: 4px 4px 16px; border-bottom: 1px solid var(--border-soft); }
.side-logo {
    width: 58px; height: 58px; margin: 0 auto 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; border-radius: 16px;
    background: linear-gradient(145deg, #00bfff, #8b5cf6);
    box-shadow: 0 0 22px rgba(0, 191, 255, .45);
}
.side-name { font-size: 19px; font-weight: 800; color: #fff; letter-spacing: .2px; }
.side-name::first-letter { color: var(--accent2); }
.side-sub { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 14px; flex: 1; }
.side-link {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: 10px;
    color: #c6d2ea; font-size: 14.5px; font-weight: 600;
}
.side-link:hover { background: rgba(0, 191, 255, .10); text-decoration: none; color: #fff; }
.side-link.active {
    background: linear-gradient(90deg, #00bfff, #8b5cf6);
    color: #fff; box-shadow: 0 0 18px rgba(0, 191, 255, .45);
}
.side-ico { width: 21px; text-align: center; font-size: 16px; }
.side-logout {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: 10px; margin-top: 10px;
    color: #ff8f86; font-weight: 700; border-top: 1px solid var(--border-soft);
}
.side-logout:hover { background: rgba(239, 68, 68, .12); text-decoration: none; }

/* Slide-in menu (drawer) controls — small screens only */
.tb-burger {
    display: none; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px;
    border: 1px solid rgba(0, 191, 255, .35); background: rgba(13, 22, 46, .85);
    color: #fff; font-size: 20px; cursor: pointer; padding: 0;
    box-shadow: 0 0 10px rgba(0, 191, 255, .12);
}
.side-close {
    display: none; position: absolute; top: 8px; right: 8px;
    width: 34px; height: 34px; align-items: center; justify-content: center;
    border-radius: 9px; border: 1px solid var(--border-soft);
    background: var(--surface2-solid); color: #fff; font-size: 15px; cursor: pointer;
}
.side-overlay { display: none; }
body.no-scroll { overflow: hidden; }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 18px 20px 8px; flex: 1; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 0 26px; }

/* ---------------- Top bar ---------------- */
.topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; flex-wrap: wrap; gap: 10px 10px; align-items: center;
    justify-content: space-between;
    background: rgba(2, 4, 10, .38); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 191, 255, .16);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
    padding: 11px 20px;
}
.tb-brand { display: flex; align-items: center; gap: 8px; }
.tb-crown { font-size: 24px; filter: drop-shadow(0 3px 6px rgba(0, 191, 255, .45)); }
.tb-title { font-size: 20px; font-weight: 800; color: #fff; line-height: 1.1; letter-spacing: .1px; }
/* Screenshot: the role subtitle is a BLUE gradient pill badge
   with a crown — not plain text. The crown is added with
   ::before so no PHP change is needed. */
.tb-sub {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 3px; padding: 2px 8px; border-radius: 999px;
    background: linear-gradient(90deg, #0b7fe0, #2f9df6 55%, #38bdf8);
    color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
    box-shadow: 0 0 12px rgba(47, 157, 246, .5);
}
.tb-sub::before { content: "\1F451"; font-size: 11px; }
.tb-right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 700;
    border: 1px solid rgba(0, 191, 255, .45); color: #c9f3ff;
    background: rgba(0, 191, 255, .08);
    box-shadow: 0 0 12px rgba(0, 191, 255, .12);
    white-space: nowrap;
}
.pill-credits {
    border: 1.5px solid rgba(255, 179, 0, .7); color: var(--gold);
    background: rgba(255, 179, 0, .10);
    box-shadow: 0 0 16px rgba(255, 179, 0, .25);
    font-size: 14px; font-weight: 800; padding: 7px 15px;
}
.user-chip { display: inline-flex; align-items: center; gap: 9px; }
.avatar {
    width: 37px; height: 37px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, #00bfff, #8b5cf6);
    color: #fff; font-weight: 800; font-size: 16px;
    box-shadow: 0 0 16px rgba(0, 191, 255, .45);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta strong { font-size: 14px; }
.user-meta small { color: var(--muted); font-size: 11.5px; }
/* legacy userbar no longer emitted; keep it harmless */
.userbar { display: none; }
.brand { font-size: 19px; font-weight: 700; color: var(--gold); }

/* ---------------- Bottom nav (phones) ---------------- */
.bottom-nav {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(4, 7, 16, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-soft);
    box-shadow: 0 -6px 24px rgba(0, 191, 255, .12);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--muted); font-size: 11px; font-weight: 600;
    padding: 7px 2px; border-radius: 10px;
}
.bn-item:hover { text-decoration: none; }
.bn-ico { font-size: 19px; }
.bn-item.active {
    color: #fff;
    background: linear-gradient(180deg, #38a1f8, #7c3aed);
    box-shadow: 0 0 16px rgba(59, 130, 246, .5);
}

/* ---------------- Alerts ---------------- */
.alert { padding: 12px 15px; border-radius: var(--radius-sm); margin: 10px 0; font-size: 14px; border: 1px solid transparent; }
.alert.success { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .55); color: #b9f4d4; box-shadow: 0 0 14px rgba(34, 197, 94, .12); }
.alert.error   { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .55); color: #ffc9c2; box-shadow: 0 0 14px rgba(239, 68, 68, .12); }
.alert.info    { background: rgba(0, 191, 255, .10); border-color: rgba(0, 191, 255, .45); color: #c9f3ff; box-shadow: 0 0 14px rgba(0, 191, 255, .10); }
/* Flash messages (renew / replace-key / transfer pages) */
.flash { padding: 12px 15px; border-radius: var(--radius-sm); margin: 10px 0; font-size: 14px; border: 1px solid rgba(0, 191, 255, .45); background: rgba(0, 191, 255, .10); color: #c9f3ff; }
.flash-error { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .55); color: #ffc9c2; box-shadow: 0 0 14px rgba(239, 68, 68, .12); }

/* ---------------- Buttons & forms ---------------- */
.btn {
    display: inline-block; background: var(--surface2-solid); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px;
    padding: 8px 15px; font-size: 14px; cursor: pointer; font-weight: 600;
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease, filter .18s ease;
}
.btn:hover { text-decoration: none; border-color: var(--accent); color: #fff; box-shadow: 0 0 14px rgba(0, 191, 255, .25); }
.btn-primary {
    background: linear-gradient(135deg, #00bfff, #8b5cf6);
    border-color: transparent; color: #fff; font-weight: 700;
    box-shadow: 0 0 16px rgba(0, 191, 255, .35);
}
.btn-primary:hover { filter: brightness(1.12); color: #fff; box-shadow: 0 0 22px rgba(139, 92, 246, .45); }
.btn-danger { border-color: rgba(239, 68, 68, .6); color: #ff9d94; }
.btn-danger:hover { border-color: var(--red); box-shadow: 0 0 14px rgba(239, 68, 68, .30); }
.btn-success { border-color: rgba(34, 197, 94, .6); color: #86efac; }
.btn-success:hover { border-color: var(--green); box-shadow: 0 0 14px rgba(34, 197, 94, .30); }
.btn-ghost { background: transparent; }
.btn-small { padding: 4px 11px; font-size: 13px; }
.btn-big { padding: 13px 20px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; text-align: center; }

label, .label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; font-weight: 600; letter-spacing: .02em; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
    width: 100%; margin-top: 4px; padding: 10px 12px;
    background: rgba(3, 6, 15, .75); color: var(--text);
    border: 1px solid var(--border-soft); border-radius: 10px; font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
input::placeholder, textarea::placeholder { color: #6f83ab; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 191, 255, .18), 0 0 14px rgba(0, 191, 255, .15); }
.input-small { width: 90px !important; display: inline-block; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.form-grid .form-actions { grid-column: 1 / -1; margin-top: 4px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.inline-form { display: inline-flex; gap: 5px; align-items: center; margin: 2px 2px 2px 0; }
.inline-form select { width: auto; }

/* ---------------- Boxes, cards, tables ---------------- */
.panel-box {
    background: linear-gradient(180deg, var(--surface2), var(--surface));
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 16px 18px; margin: 14px 0;
    box-shadow: 0 0 18px rgba(139, 92, 246, .10), 0 10px 30px rgba(0, 0, 0, .35);
}
.panel-box h2 { margin-top: 2px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 12px 0; }
.card {
    background: linear-gradient(180deg, var(--surface2), var(--surface));
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 14px; text-align: center;
    box-shadow: 0 0 14px rgba(139, 92, 246, .08);
}
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--accent); text-decoration: none; box-shadow: 0 0 18px rgba(0, 191, 255, .22); }
.card-num { font-size: 27px; font-weight: 800; color: #fff; }
.card-num.green { color: #4ade80; }
.card-num.amber { color: var(--amber); }
.card-num.red { color: #ff8f86; }
.card-label { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.table-wrap {
    overflow-x: auto; border: 1px solid var(--border-soft);
    border-radius: var(--radius); margin: 12px 0;
    background: linear-gradient(180deg, rgba(20, 32, 66, .55), rgba(13, 22, 46, .55));
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 0 16px rgba(139, 92, 246, .08);
    -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
th { background: rgba(3, 6, 15, .55); color: #bcd0f2; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(0, 191, 255, .06); }
.actions-cell { min-width: 210px; }

.detail-table { background: transparent; }
.detail-table th { background: transparent; text-transform: none; letter-spacing: 0; font-size: 14px; width: 130px; color: var(--muted); }

/* Badges */
.badge { padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; display: inline-block; }
.exp-days { font-weight: 700; white-space: nowrap; }
.exp-days.exp-red { color: #ff8f86; }
.exp-days.exp-amber { color: #ffd479; }
.badge-active   { background: rgba(34, 197, 94, .18); color: #4ade80; border: 1px solid rgba(34, 197, 94, .45); }
.badge-pending  { background: rgba(245, 166, 35, .18); color: #ffd479; border: 1px solid rgba(245, 166, 35, .45); }
.badge-expired  { background: rgba(168, 85, 247, .20); color: #d9a5f0; border: 1px solid rgba(168, 85, 247, .45); }
.badge-disabled { background: rgba(42, 50, 71, .7); color: #a9b6cf; border: 1px solid rgba(169, 182, 207, .3); }
.badge-blocked  { background: rgba(239, 68, 68, .20); color: #ff9d94; border: 1px solid rgba(239, 68, 68, .45); }

/* Search + misc */
.search-bar { display: flex; gap: 8px; margin: 10px 0 4px; }
.search-bar input { flex: 1; padding: 11px 13px; font-size: 15px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
img, video, iframe { max-width: 100%; }
.table-wrap table { min-width: 600px; }
.detail-table { min-width: 0; }

/* ---------------- Modals (generic, for future dialogs) ---------------- */
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 4, 10, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-box { width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; background: linear-gradient(180deg, #142044, #0d162e); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; box-shadow: 0 0 32px rgba(0, 191, 255, .22), 0 24px 60px rgba(0, 0, 0, .6); }
.modal-box h2, .modal-box h3 { margin-top: 0; }

/* ---------------- Pagination (generic) ---------------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px;
    border: 1px solid var(--border-soft); background: var(--surface2-solid);
    color: var(--text); font-size: 13.5px; font-weight: 700;
}
.pagination a:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 0 12px rgba(0, 191, 255, .25); }
.pagination .current, .pagination span.active {
    background: linear-gradient(135deg, #00bfff, #8b5cf6); border-color: transparent; color: #fff;
    box-shadow: 0 0 14px rgba(0, 191, 255, .4);
}

/* ---------------- Login (owner's 6-step design) ---------------- */
.login-wrap {
    min-height: 100vh; position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 14px 16px 20px;
    background:
        radial-gradient(700px 420px at 85% -60px, rgba(0, 191, 255, .16), transparent 65%),
        radial-gradient(900px 520px at 50% 115%, rgba(139, 92, 246, .30), transparent 62%),
        radial-gradient(560px 320px at 8% 8%, rgba(0, 229, 255, .12), transparent 60%),
        linear-gradient(180deg, #03060f 0%, var(--bg) 55%, #000000 100%);
}
/* Login page only (index.php): the whole screen is pinned to the
   visible viewport with fixed positioning — no vh units involved,
   so no mobile browser can scroll or shift it up/down at all.
   install.php keeps the normal flowing .login-wrap. */
.login-wrap.login-fixed {
    position: fixed; inset: 0; min-height: 0;
}
/* The login page's <body> itself is pinned too — nothing on this
   page can scroll, bounce or be zoomed, on any browser. */
body.login-body {
    position: fixed; inset: 0; width: 100%; overflow: hidden;
    touch-action: manipulation;
}
/* poster collage strips (cropped from the owner's login mockup) */
.login-bg {
    position: absolute; top: 0; bottom: 0; width: 15.5vw; min-width: 52px; max-width: 172px;
    background-size: cover; background-position: center; opacity: .55; z-index: 0;
    pointer-events: none;
}
.login-bg-left {
    left: 0; background-image: url('login-left.jpg');
    -webkit-mask-image: linear-gradient(90deg, #000 52%, transparent 98%);
    mask-image: linear-gradient(90deg, #000 52%, transparent 98%);
}
.login-bg-right {
    right: 0; background-image: url('login-right.jpg');
    -webkit-mask-image: linear-gradient(270deg, #000 52%, transparent 98%);
    mask-image: linear-gradient(270deg, #000 52%, transparent 98%);
}
/* cyan-purple wave glow along the bottom */
.login-wrap::after {
    content: ""; position: absolute; left: -10%; right: -10%; bottom: -120px; height: 240px;
    background: radial-gradient(60% 100% at 50% 100%, rgba(139, 92, 246, .45), rgba(0, 191, 255, .14) 55%, transparent 75%);
    filter: blur(6px); pointer-events: none;
}
.login-brand { position: relative; z-index: 1; text-align: center; margin-bottom: 8px; }
/* The brand artwork is cropped from the owner's own login mockup;
   screen blending melts its dark background into the page. */
.login-brand-img {
    width: min(440px, 94vw); height: auto; display: block; margin: 0 auto;
    mix-blend-mode: screen;
}
.login-waves {
    position: absolute; left: 0; right: 0; bottom: 0; height: 150px; z-index: 0;
    background: url('login-waves.jpg') center bottom / cover no-repeat;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 46%);
    mask-image: linear-gradient(180deg, transparent 0, #000 46%);
    pointer-events: none;
}
.login-title {
    margin: 6px 0 0; font-size: 42px; line-height: 1.05; font-weight: 800; font-style: italic;
    color: #fff; letter-spacing: .3px;
}
.login-title span {
    background: linear-gradient(92deg, #00e5ff, #00bfff 45%, #a55eea);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.title-swoosh { width: 250px; max-width: 72%; height: auto; display: block; margin: 1px auto 0; }
.login-panel-label {
    margin: 8px 0 0; display: flex; align-items: center; justify-content: center; gap: 14px;
    color: #fff; font-size: 27px; font-weight: 800; font-style: italic; letter-spacing: 1px;
}
.login-panel-label::before, .login-panel-label::after {
    content: ""; height: 2px; width: 56px; border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, .85));
}
.login-panel-label::after { background: linear-gradient(90deg, rgba(0, 229, 255, .85), transparent); }
.login-card {
    position: relative; z-index: 1; overflow: hidden;
    width: 100%; max-width: 400px;
    background: linear-gradient(180deg, rgba(20, 32, 66, .88), rgba(5, 9, 20, .94));
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1.5px solid rgba(0, 191, 255, .55); border-radius: 26px; padding: 28px 24px 26px;
    box-shadow:
        inset 0 1px 0 rgba(140, 200, 255, .45),
        inset 0 0 30px rgba(0, 191, 255, .10),
        0 0 55px rgba(139, 92, 246, .40),
        0 0 18px rgba(0, 191, 255, .35),
        0 26px 60px rgba(0, 0, 0, .55);
}
/* blue glow spot on the card's top edge, like the mockup */
.login-card::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 58%; height: 84px; pointer-events: none;
    background: radial-gradient(50% 100% at 50% 0, rgba(64, 170, 255, .5), transparent 72%);
}
.login-card .alert { margin-bottom: 14px; position: relative; }
.login-card form { position: relative; }
.login-card .field-icon { position: relative; margin-bottom: 14px; }
.login-card .field-icon .fi-ico {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    display: flex; color: #d7e3fb; pointer-events: none; z-index: 1;
}
.login-card .field-icon .fi-ico svg { width: 20px; height: 20px; display: block; }
.login-card .field-icon input {
    width: 100%; margin-top: 0; padding: 13px 48px 13px 46px; border-radius: 12px;
    background: rgba(3, 6, 15, .72); border: 1px solid rgba(0, 191, 255, .35);
    color: var(--text); font-size: 15.5px; outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.login-card .field-icon input::placeholder { color: #7d90b5; }
.login-card .field-icon input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, .25);
}
.login-card .eye-btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    padding: 7px 9px; border-radius: 9px; color: #d7e3fb; line-height: 1;
    display: flex; align-items: center;
}
.login-card .eye-btn svg { width: 21px; height: 21px; display: block; }
.login-card .eye-btn:hover { background: rgba(255, 255, 255, .08); }
.login-card .remember-row {
    display: flex; align-items: center; gap: 9px; cursor: pointer;
    color: var(--text); font-size: 14.5px; margin: 2px 0 18px; user-select: none;
}
.login-card .remember-row input[type="checkbox"] {
    width: 19px; height: 19px; margin: 0; padding: 0; cursor: pointer; accent-color: var(--accent);
}
.login-btn {
    width: 100%; padding: 14px; border: none; border-radius: 12px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(92deg, #00bfff, #8b5cf6 60%, #a55eea);
    color: #fff; font-size: 17px; font-weight: 700; letter-spacing: .3px;
    box-shadow: 0 0 22px rgba(0, 191, 255, .40);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.login-btn-ico { width: 21px; height: 21px; }
.login-btn:hover:not(:disabled) {
    transform: translateY(-1px); filter: brightness(1.1);
    box-shadow: 0 0 30px rgba(139, 92, 246, .55);
}
.login-btn:active:not(:disabled) { transform: translateY(0); }
.login-btn:disabled { opacity: .55; cursor: not-allowed; }
/* kept for install.php, which still uses these classes */
.login-logo { font-size: 25px; font-weight: 800; color: var(--gold); text-align: center; }
.login-sub { text-align: center; color: var(--muted); margin: 4px 0 18px; font-size: 14px; }
@media (max-width: 480px) {
    .login-title { font-size: 34px; }
    .login-logo-svg { width: 138px; }
    .login-panel-label { font-size: 23px; }
    .login-card { padding: 23px 17px 21px; border-radius: 22px; }
}
/* Short screens: shrink the brand art + tighten the card so the
   whole login still fits one fixed screen without scrolling. */
@media (max-height: 740px) {
    .login-brand-img { width: min(322px, 76vw); }
    .login-brand { margin-bottom: 2px; }
    .login-card { padding: 20px 20px 18px; }
    .login-card .field-icon { margin-bottom: 11px; }
    .login-card .field-icon input { padding-top: 11px; padding-bottom: 11px; }
    .login-card .remember-row { margin-bottom: 13px; }
    .login-btn { padding: 12px; }
    .login-waves { height: 104px; }
}
@media (max-height: 560px) {
    .login-brand-img { width: min(238px, 58vw); }
    .login-card { padding: 15px 16px 14px; }
}

/* ================================================================
   Dashboard: page head, glowing gradient stat cards,
   credits bar, chart + quick actions, recent tables.
   ================================================================ */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 2px 0 6px; }
.page-head h1 { margin: 0; font-size: 26px; display: flex; align-items: center; gap: 10px; color: #fff; letter-spacing: -.01em; }
.page-head .head-sub { color: #8fa3c8; font-size: 14px; width: 100%; margin-top: -2px; }
.date-chip {
    margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
    border: 1.5px solid rgba(0, 191, 255, .5); border-radius: 12px;
    padding: 9px 15px; font-size: 14px; font-weight: 700; color: #fff;
    background: rgba(3, 6, 15, .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 0 14px rgba(0, 191, 255, .15);
    white-space: nowrap;
}

.stat-grid { display: grid; gap: 13px; margin: 14px 0 4px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.stat-card {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 13px;
    border-radius: 20px; padding: 16px 16px; color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .22);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
/* soft inner light sweep on every card */
.stat-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(120% 90% at 8% 0%, rgba(255, 255, 255, .16), transparent 55%);
}
/* subtle wave pattern inside every card (screenshot) — thin
   lighter curved lines sweeping across the lower half. */
.stat-card::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20220%20130%27%20preserveAspectRatio%3D%27none%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%23ffffff%27%20stroke-linecap%3D%27round%27%3E%3Cpath%20d%3D%27M-10%2C98%20C40%2C72%2090%2C106%20140%2C80%20C180%2C60%20205%2C70%20230%2C54%27%20stroke-width%3D%272%27%20opacity%3D%27.17%27%2F%3E%3Cpath%20d%3D%27M-10%2C112%20C50%2C88%20100%2C120%20150%2C96%20C190%2C76%20210%2C86%20230%2C72%27%20stroke-width%3D%271.5%27%20opacity%3D%27.12%27%2F%3E%3Cpath%20d%3D%27M-10%2C84%20C45%2C60%2095%2C92%20145%2C66%20C185%2C46%20210%2C56%20230%2C42%27%20stroke-width%3D%271.5%27%20opacity%3D%27.10%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / 100% 100% no-repeat;
}
.stat-card:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-2px); }
.stat-card .stat-ico {
    position: relative; z-index: 1;
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
    background: rgba(255, 255, 255, .16); border: 1.5px solid rgba(255, 255, 255, .42);
    box-shadow: 0 0 16px rgba(255, 255, 255, .14), inset 0 0 10px rgba(255, 255, 255, .10);
}
.stat-card .stat-label { position: relative; z-index: 1; font-size: 14px; font-weight: 700; opacity: .97; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.stat-card .stat-num { position: relative; z-index: 1; font-size: 29px; font-weight: 800; line-height: 1.15; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.stat-card .stat-chev { position: relative; z-index: 1; margin-left: auto; font-size: 22px; opacity: .9; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
/* Per-card neon accent: tinted dark gradient + glowing border.
   Numbers/labels stay pure white with a dark shadow so the glow
   never washes the text out. */
/* BRIGHT full gradients (screenshot): vivid at the top, deep at
   the bottom, glowing border in the card's accent colour, and the
   icon chip tinted to match. Numbers/labels stay pure white with
   a dark shadow so the glow never washes the text out. */
.g-blue   { background: linear-gradient(160deg, #38a1f8 0%, #1976d2 52%, #0b3d91 100%); border-color: rgba(56, 189, 248, .85); box-shadow: 0 0 22px rgba(47, 157, 246, .45), 0 8px 22px rgba(0, 0, 0, .5); }
.g-blue:hover   { box-shadow: 0 0 32px rgba(47, 157, 246, .6), 0 10px 26px rgba(0, 0, 0, .5); }
.g-blue .stat-ico { border-color: rgba(186, 230, 253, .85); box-shadow: 0 0 18px rgba(56, 189, 248, .55), inset 0 0 10px rgba(255, 255, 255, .12); }
.g-purple { background: linear-gradient(160deg, #b45cf5 0%, #7e22ce 52%, #581c87 100%); border-color: rgba(192, 132, 252, .85); box-shadow: 0 0 22px rgba(168, 85, 247, .45), 0 8px 22px rgba(0, 0, 0, .5); }
.g-purple:hover { box-shadow: 0 0 32px rgba(168, 85, 247, .6), 0 10px 26px rgba(0, 0, 0, .5); }
.g-purple .stat-ico { border-color: rgba(221, 214, 254, .85); box-shadow: 0 0 18px rgba(168, 85, 247, .6), inset 0 0 10px rgba(255, 255, 255, .12); }
.g-orange { background: linear-gradient(160deg, #fdb022 0%, #f97316 52%, #9a3412 100%); border-color: rgba(251, 146, 60, .85); box-shadow: 0 0 22px rgba(249, 115, 22, .45), 0 8px 22px rgba(0, 0, 0, .5); }
.g-orange:hover { box-shadow: 0 0 32px rgba(249, 115, 22, .6), 0 10px 26px rgba(0, 0, 0, .5); }
.g-orange .stat-ico { border-color: rgba(254, 215, 170, .85); box-shadow: 0 0 18px rgba(249, 115, 22, .55), inset 0 0 10px rgba(255, 255, 255, .12); }
.g-green  { background: linear-gradient(160deg, #4ade80 0%, #16a34a 52%, #14532d 100%); border-color: rgba(74, 222, 128, .85); box-shadow: 0 0 22px rgba(34, 197, 94, .45), 0 8px 22px rgba(0, 0, 0, .5); }
.g-green:hover  { box-shadow: 0 0 32px rgba(34, 197, 94, .6), 0 10px 26px rgba(0, 0, 0, .5); }
.g-green .stat-ico { border-color: rgba(187, 247, 208, .85); box-shadow: 0 0 18px rgba(34, 197, 94, .55), inset 0 0 10px rgba(255, 255, 255, .12); }
.g-red    { background: linear-gradient(160deg, #fb4d6d 0%, #e11d48 52%, #9f1239 100%); border-color: rgba(251, 113, 133, .85); box-shadow: 0 0 22px rgba(244, 63, 94, .45), 0 8px 22px rgba(0, 0, 0, .5); }
.g-red:hover    { box-shadow: 0 0 32px rgba(244, 63, 94, .6), 0 10px 26px rgba(0, 0, 0, .5); }
.g-red .stat-ico { border-color: rgba(254, 205, 211, .85); box-shadow: 0 0 18px rgba(244, 63, 94, .55), inset 0 0 10px rgba(255, 255, 255, .12); }
.g-pink   { background: linear-gradient(160deg, #f472b6 0%, #db2777 52%, #831843 100%); border-color: rgba(244, 114, 182, .85); box-shadow: 0 0 22px rgba(236, 72, 153, .45), 0 8px 22px rgba(0, 0, 0, .5); }
.g-pink:hover   { box-shadow: 0 0 32px rgba(236, 72, 153, .6), 0 10px 26px rgba(0, 0, 0, .5); }
.g-pink .stat-ico { border-color: rgba(251, 207, 232, .85); box-shadow: 0 0 18px rgba(236, 72, 153, .55), inset 0 0 10px rgba(255, 255, 255, .12); }
.g-gold   { background: linear-gradient(160deg, #fcd34d 0%, #f59e0b 52%, #92400e 100%); border-color: rgba(252, 211, 77, .85); box-shadow: 0 0 22px rgba(245, 158, 11, .45), 0 8px 22px rgba(0, 0, 0, .5); }
.g-gold:hover   { box-shadow: 0 0 32px rgba(245, 158, 11, .6), 0 10px 26px rgba(0, 0, 0, .5); }
.g-gold .stat-ico { border-color: rgba(254, 243, 199, .85); box-shadow: 0 0 18px rgba(245, 158, 11, .55), inset 0 0 10px rgba(255, 255, 255, .12); }

.credits-bar {
    position: relative; overflow: hidden;
    display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px 0;
    background: linear-gradient(90deg, #1d7fe0 0%, #3b82f6 35%, #7c3aed 70%, #a855f7 100%);
    border: 1.5px solid rgba(0, 191, 255, .55); border-radius: 20px;
    padding: 13px 18px; margin: 14px 0 4px;
    box-shadow: 0 0 26px rgba(59, 130, 246, .4), 0 8px 22px rgba(0, 0, 0, .45);
    color: #fff;
}
.cb-seg { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; padding: 2px 20px; }
.cb-seg:first-child { padding-left: 2px; }
.cb-seg + .cb-seg { border-left: 1px solid rgba(255, 255, 255, .28); }
.cb-ico {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px;
    background: rgba(255, 255, 255, .14); border: 1.5px solid rgba(255, 255, 255, .45);
    box-shadow: 0 0 16px rgba(255, 255, 255, .18), inset 0 0 10px rgba(255, 255, 255, .12);
    text-shadow: 0 0 12px rgba(255, 255, 255, .35);
}
/* wave pattern inside the bar (screenshot) */
.credits-bar::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20220%20130%27%20preserveAspectRatio%3D%27none%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%23ffffff%27%20stroke-linecap%3D%27round%27%3E%3Cpath%20d%3D%27M-10%2C98%20C40%2C72%2090%2C106%20140%2C80%20C180%2C60%20205%2C70%20230%2C54%27%20stroke-width%3D%272%27%20opacity%3D%27.17%27%2F%3E%3Cpath%20d%3D%27M-10%2C112%20C50%2C88%20100%2C120%20150%2C96%20C190%2C76%20210%2C86%20230%2C72%27%20stroke-width%3D%271.5%27%20opacity%3D%27.12%27%2F%3E%3Cpath%20d%3D%27M-10%2C84%20C45%2C60%2095%2C92%20145%2C66%20C185%2C46%20210%2C56%20230%2C42%27%20stroke-width%3D%271.5%27%20opacity%3D%27.10%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / 100% 100% no-repeat;
    opacity: .8;
}
/* rising bar-chart icon at the right (screenshot) — mobile only,
   where the first segment spans the full width; hidden on desktop
   so it never overlaps the third segment. */
.credits-bar::after {
    content: ""; position: absolute; right: 18px; top: 16px; width: 64px; height: 48px; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2064%2048%27%3E%3Cdefs%3E%3ClinearGradient%20id%3D%27g%27%20x1%3D%270%27%20y1%3D%271%27%20x2%3D%270%27%20y2%3D%270%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%231d7fe0%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%235ee7ff%27%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20fill%3D%27url%28%23g%29%27%3E%3Crect%20x%3D%272%27%20y%3D%2732%27%20width%3D%2712%27%20height%3D%2716%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2718%27%20y%3D%2722%27%20width%3D%2712%27%20height%3D%2726%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2734%27%20y%3D%2712%27%20width%3D%2712%27%20height%3D%2736%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2750%27%20y%3D%272%27%20width%3D%2712%27%20height%3D%2746%27%20rx%3D%272%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, .6));
}
@media (min-width: 701px) { .credits-bar::after { display: none; } }
.cb-title { font-size: 16.5px; font-weight: 800; line-height: 1.2; color: #fff; }
.cb-label { color: rgba(255, 255, 255, .82); font-size: 12.5px; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.cb-value { font-size: 19px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .45); }

.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 13px; margin-top: 13px; }
.dash-box {
    background: linear-gradient(180deg, var(--surface2), var(--surface));
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    padding: 15px 17px; min-width: 0;
    box-shadow: 0 0 16px rgba(139, 92, 246, .10), 0 10px 26px rgba(0, 0, 0, .35);
}
.box-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.box-head h2, .box-head h3 { margin: 0; font-size: 16px; }
.box-head .view-all { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent2); }
.chart-legend { margin-left: auto; display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.dot.green { background: var(--green); } .dot.red { background: var(--red); }
.chart-svg { width: 100%; height: auto; display: block; }

.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qa-tile {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 15px 6px 12px; border-radius: 12px; text-align: center;
    font-size: 13px; font-weight: 700; color: #eaf1ff;
    border: 1.5px solid; background: rgba(255, 255, 255, .03);
    transition: box-shadow .18s ease, filter .18s ease, transform .18s ease;
}
.qa-tile:hover { text-decoration: none; filter: brightness(1.25); transform: translateY(-1px); }
.qa-tile .qa-ico { font-size: 23px; }
.qa-blue   { border-color: rgba(0, 191, 255, .7); background: rgba(0, 191, 255, .10); box-shadow: 0 0 12px rgba(0, 191, 255, .14); }
.qa-purple { border-color: rgba(165, 94, 234, .7); background: rgba(165, 94, 234, .10); box-shadow: 0 0 12px rgba(165, 94, 234, .14); }
.qa-orange { border-color: rgba(245, 158, 11, .7); background: rgba(245, 158, 11, .10); box-shadow: 0 0 12px rgba(245, 158, 11, .14); }
.qa-green  { border-color: rgba(34, 197, 94, .7); background: rgba(34, 197, 94, .10); box-shadow: 0 0 12px rgba(34, 197, 94, .14); }
.qa-pink   { border-color: rgba(236, 64, 122, .7); background: rgba(236, 64, 122, .10); box-shadow: 0 0 12px rgba(236, 64, 122, .14); }
.qa-gold   { border-color: rgba(255, 179, 0, .7); background: rgba(255, 179, 0, .10); box-shadow: 0 0 12px rgba(255, 179, 0, .14); }

.recent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 13px; }
.recent-grid .table-wrap { margin: 0; }
.recent-grid table { min-width: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
    .dash-grid { grid-template-columns: 1fr; }
    .recent-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
    /* Owner's slide-in menu (2026-11-04): on phones/tablets the
       sidebar becomes a drawer opened by the topbar hamburger,
       exactly like his design mockups. */
    .sidebar {
        display: flex; position: fixed; top: 0; left: 0; bottom: 0;
        height: 100dvh; width: min(300px, 85vw); flex: 0 0 auto;
        z-index: 1200; transform: translateX(-106%);
        transition: transform .28s ease;
        box-shadow: 24px 0 60px rgba(0, 0, 0, .55);
    }
    .sidebar.open { transform: translateX(0); }
    .side-brand { position: relative; }
    .side-close { display: inline-flex; }
    .side-overlay {
        display: block; position: fixed; inset: 0; z-index: 1100;
        background: rgba(2, 4, 12, .62); opacity: 0; pointer-events: none;
        transition: opacity .28s ease;
    }
    .side-overlay.show { opacity: 1; pointer-events: auto; }
    .tb-burger { display: inline-flex; }
    .bottom-nav { display: flex; }
    body { padding-bottom: 74px; }
    .container { padding: 14px 13px 6px; }
    .footer { padding-bottom: 8px; }
}
@media (max-width: 700px) {
    body { font-size: 14px; }
    h1 { font-size: 20px; }
    .page-head h1 { font-size: 24px; }
    .date-chip { margin-left: 0; }
    .topbar { padding: 10px 12px; }
    .tb-title { font-size: 19px; }
    .tb-logo { width: 36px; height: 36px; }
    .pill { padding: 5px 10px; font-size: 12px; }
    .pill-credits { padding: 7px 14px; font-size: 13.5px; }
    /* Screenshot header, mobile: hamburger + logo + title on row 1
       with bell + profile at the right; the gold Credits pill wraps
       to its own row, left-aligned. display:contents makes the
       .tb-right children direct flex items of the topbar so the
       pill can wrap on its own line. */
    .tb-right { display: contents; }
    .tb-brand { flex: 1 1 auto; min-width: 0; }
    .pill-credits { order: 4; }
    .pill-notif { padding: 0; font-size: 19px; }
    .pill-notif, .tb-profile { width: 38px; height: 38px; }
    .user-meta { display: none; }
    .stat-grid.cols-3, .stat-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
    .stat-card { padding: 14px 13px; gap: 11px; }
    .stat-card .stat-ico { width: 42px; height: 42px; flex-basis: 42px; font-size: 20px; }
    .stat-card .stat-num { font-size: 27px; }
    .stat-card .stat-label { font-size: 13.5px; }
    .qa-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .qa-tile { font-size: 11.5px; padding: 12px 3px 10px; min-height: 88px; justify-content: center; }
    /* Mobile fit: tables turn into stacked labelled cards
       (labels stamped by the layout script) — zero horizontal
       scrolling, zero cut text, every value on its own row. */
    .table-wrap { overflow-x: visible; }
    .table-wrap table { min-width: 0; width: 100%; font-size: 14px; }
    .table-wrap thead { display: none; }
    .table-wrap tbody tr {
        display: block; border: 1px solid var(--border-soft);
        border-radius: 12px; margin-bottom: 10px; padding: 5px 11px;
        background: rgba(255, 255, 255, .02);
    }
    .table-wrap tbody td {
        display: flex; justify-content: space-between; align-items: baseline;
        gap: 16px; padding: 7px 1px; border-bottom: 1px dashed var(--border-soft);
        text-align: right; overflow-wrap: anywhere;
    }
    .table-wrap tbody td:last-child { border-bottom: none; }
    .table-wrap tbody td::before {
        content: attr(data-label); flex: 0 0 auto; text-align: left;
        font-weight: 700; color: var(--muted); font-size: 11px;
        text-transform: uppercase; letter-spacing: .4px; padding-top: 2px;
    }
    .table-wrap tbody td:empty { display: none; }
    .table-wrap td.actions-cell {
        min-width: 0; justify-content: flex-start; flex-wrap: wrap; gap: 7px;
    }
    .credits-bar { padding: 11px 12px; }
    .cb-seg { padding: 2px 12px; }
    .cb-seg:first-child { width: 100%; border-left: none; padding-bottom: 8px; }
    .cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .card { padding: 10px 8px; }
    .card-num { font-size: 22px; }
    .panel-box { padding: 13px; }
    input[type="text"], input[type="password"], input[type="number"], select, textarea {
        font-size: 16px; padding: 10px 11px;
    }
    /* 16px on the login fields too, so phones do not auto-zoom on tap */
    .login-card .field-icon input { font-size: 16px; }
    .btn { padding: 9px 13px; }
    .btn-small { padding: 6px 10px; }
    .search-bar { flex-direction: column; }
    .search-bar .btn { width: 100%; text-align: center; }
    .inline-form { display: flex; flex-wrap: wrap; }
    .detail-table tr { display: block; padding: 5px 0; border-bottom: 1px solid var(--border-soft); }
    .detail-table th, .detail-table td { display: block; width: 100%; padding: 2px 0; border-bottom: none; }
    .actions-cell { min-width: 170px; }
    .login-card { padding: 22px 17px; }
}
@media (min-width: 1500px) {
    .container { max-width: 1320px; }
}

/* Smooth page-in transition (transform/opacity only). */
@keyframes msPageIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
main.container { animation: msPageIn .28s ease-out; }

/* ---- Option rows (More / Reports / Notifications pages) ---- */
.opt-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.opt-row {
    display: flex; align-items: center; gap: 13px;
    padding: 13px 15px; border-radius: 13px; color: var(--text);
    background: linear-gradient(180deg, var(--surface2), var(--surface));
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 1px solid var(--border-soft);
    box-shadow: 0 0 12px rgba(139, 92, 246, .10);
    min-width: 0;
}
a.opt-row:hover { text-decoration: none; filter: brightness(1.18); }
.opt-ico {
    font-size: 21px; flex: 0 0 42px; width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 11px; background: rgba(0, 191, 255, .12);
    border: 1px solid rgba(0, 191, 255, .35);
    box-shadow: 0 0 10px rgba(0, 191, 255, .15);
}
.opt-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.opt-label { font-weight: 700; font-size: 15.5px; }
.opt-sub { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.opt-chev { margin-left: auto; color: var(--accent2); font-size: 21px; font-weight: 700; }

/* ---- Device status filter tabs ---- */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.ftab {
    padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
    color: var(--text); background: rgba(0, 191, 255, .08);
    border: 1px solid rgba(0, 191, 255, .35);
}
.ftab:hover { text-decoration: none; filter: brightness(1.3); }
.ftab.active {
    background: linear-gradient(135deg, #00bfff, #8b5cf6); color: #fff;
    border-color: transparent; box-shadow: 0 0 14px rgba(0, 191, 255, .45);
}
.filter-form { margin: 10px 0; }

/* ---- Notifications ---- */
.notif-row.unread { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 179, 0, .25); }
.pill-notif {
    text-decoration: none; position: relative; flex: 0 0 auto;
    width: 42px; height: 42px; padding: 0; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
    background: rgba(13, 22, 46, .85); border: 1px solid rgba(0, 191, 255, .35);
    box-shadow: 0 0 10px rgba(0, 191, 255, .12);
}
/* Screenshot: the bell carries a red DOT (not a count) at its
   top-right corner. The count text is hidden visually. */
.notif-badge {
    position: absolute; top: -4px; right: -4px;
    width: 13px; height: 13px; min-width: 0; padding: 0;
    background: var(--red); color: transparent; border-radius: 50%;
    font-size: 0; line-height: 0;
    border: 2px solid #02040a;
    box-shadow: 0 0 8px rgba(239, 68, 68, .8);
}
/* Profile circle (screenshot): blue outline, dark fill, grey
   person silhouette — added to the header by functions.php. */
.tb-profile {
    width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(13, 22, 46, .85);
    border: 2px solid rgba(0, 191, 255, .65);
    box-shadow: 0 0 12px rgba(0, 191, 255, .25);
    text-decoration: none;
}
.tb-profile:hover { text-decoration: none; border-color: var(--accent2); box-shadow: 0 0 16px rgba(0, 229, 255, .45); }
.tb-profile svg { display: block; }

/* The app icon replaces the crown/emoji marks in the header. */
.tb-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 12px rgba(0, 191, 255, .35); }
.side-logo-img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 14px rgba(0, 191, 255, .30); }

/* My Account hero card. */
.account-hero { display: flex; align-items: center; gap: 14px; }
.account-avatar { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; box-shadow: 0 0 14px rgba(0, 191, 255, .30); }
.account-hero-meta { flex: 1; min-width: 0; }
.account-name { font-size: 20px; font-weight: 800; color: #fff; }
.account-sub { color: #b9a8d9; font-size: 13px; margin-top: 2px; }
.account-credits { text-align: center; background: linear-gradient(135deg, #f7b733, #f83600); border-radius: 12px; padding: 8px 14px; color: #1a1033; box-shadow: 0 0 16px rgba(255, 179, 0, .35); }
.account-credits-num { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; }
.account-credits-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* Compact device card (owner's order, 2026-11-04) */
.device-card{padding:14px 16px}
.dc-head{margin-bottom:6px}
.dc-name{font-size:20px;font-weight:700;color:#fff}
.dc-table th,.dc-table td{padding:5px 8px;font-size:13px}
.dc-actions{margin:12px 0 4px;flex-wrap:wrap}
.dc-more{margin:2px 0 14px;align-items:center}

/* ---- Reduced motion: page-in animations off ---- */
@media (prefers-reduced-motion: reduce) {
    main.container { animation: none; }
    .stat-card, .btn, .qa-tile { transition: none; }
}
