/* ───────────────────────────────────────────────────────────────
   Zeltuv Industries — Zelunit store theme
   Dark, Manrope, pink glow. Mirrors zeltuv.com tokens.
   ─────────────────────────────────────────────────────────────── */

@font-face {
    font-family: "MC Five";
    src: url("/assets/fonts/mc-five.ttf") format("truetype");
    font-display: swap;
}
@font-face {
    font-family: "MC Ten Lowercase";
    src: url("/assets/fonts/mc-ten-lowercase.ttf") format("truetype");
    font-display: swap;
}
@font-face {
    font-family: "MC Ten Lowercase Alt";
    src: url("/assets/fonts/mc-ten-lowercase-alt.ttf") format("truetype");
    font-display: swap;
}
@font-face {
    font-family: "Inter Display";
    src: url("/assets/fonts/InterVariable.ttf") format("truetype");
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("/assets/fonts/InterVariable.ttf") format("truetype");
    font-display: swap;
}

:root {
    --bg: #000000;
    --bg-deep: #000000;
    --panel: #161616;
    --panel-2: #161616;
    --panel-3: #1e1e1e;
    --input-bg: #0c0c0c;
    --border: transparent; /* no borders */
    --border-strong: transparent;
    --hairline: rgba(
        255,
        255,
        255,
        0.06
    ); /* functional table/divider lines only */

    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.56);
    --muted-2: rgba(255, 255, 255, 0.38);

    --zelintelligence-pink: #ff8be2;
    --white: #ffffff;
    --pink: #ff8be2;
    --magenta: #f261b8;
    --cream: rgb(255, 233, 199);
    --green: #37f561;
    --blue: #0099ff;
    --gold: #f5cb37;
    --red: #ff5a6a;

    --grad-accent: linear-gradient(90deg, #ff8be2 0%, #f261b8 100%);
    --grad-glow: linear-gradient(
        180deg,
        rgba(255, 139, 226, 0.15) 0%,
        rgba(0, 0, 0, 0.72) 47%,
        var(--bg) 85%
    );

    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 26px;
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
    --shadow-pink: 0 18px 50px -18px rgba(255, 139, 226, 0.5);

    --font:
        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
        sans-serif;
    --font-display: "Inter Display", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Headings — Inter Display, tight tracking. */
h1,
h2,
h3,
.brand,
.section-head h2,
.hero h1 {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    letter-spacing: -0.015em;
}

a {
    color: inherit;
    text-decoration: none;
}
img {
    max-width: 100%;
    display: block;
}
button {
    font-family: inherit;
    cursor: pointer;
}

.wrap {
    width: min(1180px, 92vw);
    margin: 0 auto;
}
/* Navbar & footer span the full viewport with a small edge gap. */
.nav .wrap,
.footer .wrap {
    width: 100%;
    margin: 0;
    padding: 0 15px;
}
.nav .wrap {
    padding: 0 24px;
}
.footer .wrap {
    padding: 0 40px;
}

.muted {
    color: var(--muted);
}
.gradient-text {
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.01em;
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
    white-space: nowrap;
}
.btn:active {
    transform: translateY(1px);
}
.btn-primary {
    background: var(--grad-accent);
    color: #15010f;
    box-shadow: var(--shadow-pink);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 55px -16px rgba(255, 139, 226, 0.65);
}
.btn-light {
    background: #fff;
    color: #0a0a0a;
}
.btn-light:hover {
    transform: translateY(-2px);
}
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: var(--border);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-strong);
}
.btn-block {
    width: 100%;
    justify-content: center;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 13.5px;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Pills / badges ───────────────────────────────────────── */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
}
.pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}
.badge {
    position: absolute;
    top: -12px;
    right: 18px;
    padding: 2px 8px;
    font-size: 11px;
    font-family: "MC Five";
    background: var(--white);
    color: #15010f;
}

.badge-section {
    padding: 4px 12px;
    text-align: center;
    text-transform: uppercase;
    font-size: 16px;
    font-family: "MC Five";
    background: var(--panel-2);
    color: var(--white);
}

/* ── Nav ──────────────────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    background: rgba(10, 10, 10, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.nav-inner {
    display: flex;
    align-items: center;
    height: 51px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
}
.brand .logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.nav .brand .logo {
    width: 16px;
    height: 18px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
}
.nav-links a {
    color: #fff;
    font-weight: 400;
    font-size: 14px;
    transition: color 0.15s;
}
.nav-links a:hover {
    color: var(--muted);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 28px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 51px);
    min-height: calc(100svh - 51px);
    padding: 60px 0;
    text-align: center;
    overflow: hidden;
}
.hero .hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}
/* Light overlay: video is already dark, so only a slight top darken for the
   nav and a fade into the page background at the bottom — no heavy dimming. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        transparent 28%,
        transparent 62%,
        var(--bg) 100%
    );
    pointer-events: none;
    z-index: 1;
}
.hero > * {
    position: relative;
    z-index: 2;
}
.hero-logo {
    width: min(420px, 78%);
    height: auto;
    margin: 0 auto 22px;
}
.hero h1 {
    font-size: 56px;
    line-height: 1.5em;
    letter-spacing: -0.015em;
    font-weight: 800;
    margin: 18px auto 18px;
    max-width: 18ch;
}
.hero p.sub {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--muted);
    max-width: 56ch;
    margin: 0 auto 32px;
}
.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.stats {
    display: flex;
    gap: 38px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 56px;
}
.stat {
    text-align: center;
}
.stat .n {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.stat .l {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

/* ── Section headers ──────────────────────────────────────── */
.section {
    padding: 70px 0;
    position: relative;
}
.section-head {
    text-align: center;
    margin: 0 auto 44px;
}
.section-head .eyebrow {
    color: var(--pink);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.section-head h2 {
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.015em;
    margin: 12px 0 12px;
    font-weight: 700;
}
.section-head p {
    color: var(--muted);
    font-size: 16px;
    letter-spacing: 0.015em;
}

/* ── Pricing grid ─────────────────────────────────────────── */
.pricing {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.price-card {
    /* Per-package accent — override per plan, e.g.
       .price-card[data-plan="pro"] { --card-accent: #37f561; } */
    --card-accent: var(--white);
    position: relative;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}
.price-card:hover {
    transform: translateY(-6px);
}
/* Two stacked black-box containers */
.price-card .card-head,
.price-card .card-body {
    background: var(--panel-2);
    border: 0px solid rgba(255, 255, 255, 0.14);
    transition: border-color 0.2s ease;
}
.price-card:hover .card-head,
.price-card:hover .card-body {
    border-color: rgba(255, 255, 255, 0.24);
}
.price-card .card-head {
    padding: 22px 26px;
}

.card-head {
    background: var(--head-bg, #000) !important;
    /* When --head-bg is an image, cover the header instead of tiling at
       natural size (gradients/solid colors are unaffected). */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.price-card .card-body {
    background: var(--body-bg, var(--panel-2));
    flex: 1;
    padding: 26px 28px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
}
/* Divider bar across the head/body seam. Uses background (not box-shadow) so it
   accepts a solid color OR a CSS gradient via --divider-color. */
.price-card .card-body::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -4px;
    height: 4px;
    background: var(--divider-color, #474747);
}
.price-card.featured {
    --card-accent: var(--pink);
}
/*.price-card.featured .card-body {
    border-color: color-mix(in srgb, var(--card-accent) 40%, transparent);
    box-shadow: 0 24px 70px -30px
        color-mix(in srgb, var(--card-accent) 45%, transparent);
}*/
.price-card .name {
    font-family: "MC Ten Lowercase Alt", "MC Five", var(--font-display);
    font-size: clamp(22px, 2vw, 28px);
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: var(--head-color, #fff);
}
.price-card .tagline {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    margin-top: 12px;
}
.price-card .price {
    font-family: "MC Ten Lowercase Alt", "MC Five", var(--font-display);
    font-size: clamp(28px, 3vw, 40px);
    color: var(--body-color, #fff);
    margin: 2px 0 24px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}
.price-card .price small {
    font-family: var(--font);
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0;
    white-space: nowrap;
}
.price-card .feat {
    list-style: none;
    margin: 4px 0 22px;
    display: grid;
    gap: 14px;
}
.price-card .feat li {
    font-size: 14px;
    color: var(--body-color, var(--text));
    display: flex;
    gap: 11px;
    align-items: flex-start;
}
.price-card .feat li .ico {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}
.price-card .feat li.off {
    color: var(--muted-2);
}
.price-card .feat li sup {
    color: var(--muted-2);
    font-size: 0.7em;
}
.price-card .btn {
    margin-top: auto;
}
.price-card .terms {
    margin-top: 18px;
    text-align: center;
    color: var(--muted-2);
    font-size: 11.5px;
    line-height: 1.5;
}

/* ── Balance lookup ───────────────────────────────────────── */
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.balance-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.input {
    flex: 1;
    min-width: 200px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-deep);
    border: 1px solid var(--border);
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.input:focus {
    border-color: var(--white);
}
.input::placeholder {
    color: var(--muted-2);
}
.balance-result {
    margin-top: 18px;
    font-size: 15px;
}
.balance-result b {
    font-size: 28px;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq {
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
}
.faq details {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 20px;
    transition: border-color 0.15s;
}
.faq details.is-open {
    border-color: var(--border-strong);
}
.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 0;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.faq summary::-webkit-details-marker {
    display: none;
}
.faq summary::after {
    content: "+";
    color: var(--pink);
    font-size: 22px;
    font-weight: 400;
    transition: transform 0.2s;
}
.faq details.is-open summary::after {
    transform: rotate(45deg);
}
/* Collapsible answer: animate the grid track from 0fr to 1fr. This is
   GPU-friendly and reverses smoothly mid-animation without any JS. */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq details.is-open .faq-answer {
    grid-template-rows: 1fr;
}
/* Padding-free clip: collapses fully to 0 (the padded <p> is clipped inside). */
.faq-answer > div {
    overflow: hidden;
    min-height: 0;
}
.faq p {
    color: var(--muted);
    padding: 0 0 18px;
    font-size: 14.5px;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 40px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.footer .muted {
    font-size: 13.5px;
    max-width: 42ch;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    /* Hug content height so link hit-areas match the text, not the tall
       logo/blurb column this sits beside. */
    align-self: flex-start;
}
.footer-links a {
    color: var(--white);
    font-size: 16px;
    transition: color 0.15s;
}
.footer-links a:hover {
    color: var(--muted);
}
.disclaimer {
    color: var(--muted-2);
    font-size: 12px;
    margin-top: 26px;
}

/* ── Modal / checkout ─────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-backdrop.open {
    display: flex;
}
.modal {
    width: min(460px, 100%);
    background: var(--panel);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-height: 92vh;
    overflow-y: auto;
}
.modal-head {
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.modal-head h3 {
    font-size: 19px;
    letter-spacing: -0.02em;
}
.modal-head .x {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
}
.modal-head .x:hover {
    color: #fff;
}
.modal-body {
    padding: 22px 24px 26px;
}
.order-summary {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.order-summary .u {
    font-size: 20px;
    font-weight: 800;
}
.order-summary .p {
    font-size: 20px;
    font-weight: 800;
}
.field-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin: 0 0 7px;
    display: block;
}
.checkout-msg {
    font-size: 13.5px;
    margin-top: 12px;
    min-height: 18px;
}
.checkout-msg.error {
    color: var(--red);
}
.checkout-msg.ok {
    color: var(--green);
}

.success-state {
    text-align: center;
    padding: 16px 4px;
}
.success-state .check {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 18px;
    background: rgba(55, 245, 97, 0.12);
    color: var(--green);
    display: grid;
    place-items: center;
    font-size: 32px;
    border: 1px solid rgba(55, 245, 97, 0.3);
}
.success-state h3 {
    font-size: 22px;
    margin-bottom: 8px;
}
.success-state p {
    color: var(--muted);
    margin-bottom: 6px;
}
.success-state .big {
    font-size: 30px;
    font-weight: 800;
}

/* ── License key + usage ──────────────────────────────────── */
.license-box {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    background: var(--bg-deep);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin: 14px 0 4px;
}
.license-box code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--pink);
    user-select: all;
    white-space: nowrap;
    overflow-x: auto;
}
.usage-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--bg-deep);
    overflow: hidden;
    margin: 10px 0 6px;
}
.usage-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--grad-accent);
    transition: width 0.4s ease;
}
.usage-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}
.license-card {
    background: var(--bg-deep);
    border-radius: var(--radius);
    padding: 20px;
}
.license-card .lk {
    font-family: ui-monospace, Menlo, monospace;
    font-weight: 700;
    color: var(--pink);
    letter-spacing: 0.04em;
}
.license-card .row {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 14px;
}
.license-card .row .muted {
    color: var(--muted);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 980px) {
    .pricing {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 720px) {
    .nav-links {
        display: none;
    }
    .nav-actions {
        margin-left: auto;
    }
    .pricing {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        flex-direction: column;
    }
    .hero h1 {
        font-size: 38px;
        line-height: 1.25em;
    }
}

/* utility */
.hidden {
    display: none !important;
}
.spin {
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════ */
.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}
.login-card {
    width: min(400px, 100%);
}
.login-card .brand {
    justify-content: center;
    margin-bottom: 24px;
    font-size: 22px;
}
.login-card h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.login-card .sub {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.admin-shell {
    display: grid;
    grid-template-columns: 248px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: var(--bg-deep);
    border-right: 1px solid var(--border);
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}
.sidebar .brand {
    padding: 0 8px 22px;
}
.side-nav {
    display: grid;
    gap: 4px;
}
.side-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: 11px;
    color: var(--muted);
    font-weight: 600;
    font-size: 14.5px;
    transition: all 0.15s;
    cursor: pointer;
}
.side-link svg,
.side-link i {
    width: 18px;
    height: 18px;
    font-size: 15px;
    text-align: center;
    opacity: 0.8;
}
.side-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}
.side-link.active {
    background: rgba(255, 139, 226, 0.1);
    color: #fff;
}
.side-link.active svg,
.side-link.active i {
    color: var(--pink);
    opacity: 1;
}
.sidebar .foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.admin-main {
    padding: 28px 34px 60px;
    max-width: 1240px;
}
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
}
.admin-topbar h1 {
    font-size: 26px;
    letter-spacing: -0.03em;
}
.admin-topbar .who {
    color: var(--muted);
    font-size: 13.5px;
}

.view {
    display: none;
}
.view.active {
    display: block;
    animation: fade 0.25s ease;
}
@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}
.card h3 {
    font-size: 15px;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}
.card .sub-label {
    color: var(--muted);
    font-size: 13px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.kpi {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.kpi .l {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
.kpi .v {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-top: 8px;
}
.kpi .d {
    font-size: 12.5px;
    color: var(--green);
    margin-top: 4px;
}

.chart-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    margin-bottom: 22px;
}
.chart-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 22px;
}
.chart-box {
    position: relative;
    height: 260px;
}
.chart-box-sm {
    position: relative;
    height: 230px;
}

.table-wrap {
    overflow-x: auto;
}
table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
table.table th {
    text-align: left;
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 11px 14px;
    border-bottom: 1px solid var(--hairline);
    white-space: nowrap;
}
table.table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--hairline);
}
table.table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}
table.table tr:last-child td {
    border-bottom: none;
}
.mono {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 12.5px;
}

.tag {
    padding: 2px 8px;
    text-align: center;
    text-transform: uppercase;
    font-size: 12px;
    font-family: "MC Five";
    color: var(--white);
}
.tag.paid {
    background: rgba(55, 245, 62);
    color: var(--panel-3);
}
.tag.pending {
    background: rgba(245, 203, 55, 0.14);
    color: var(--gold);
}
.tag.failed,
.tag.refunded {
    background: rgba(255, 90, 106, 0.14);
    color: var(--red);
}
.tag.stripe {
    background: rgba(0, 153, 255, 0.14);
    color: var(--blue);
}
.tag.paypal {
    background: rgba(255, 203, 119, 0.14);
    color: #ffcb77;
}
.tag.manual {
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.toolbar .input {
    max-width: 280px;
}
.select {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-deep);
    border: 1px solid var(--border);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-grid.full {
    grid-template-columns: 1fr;
}
.form-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}
/* Inside a form grid the column, not the input's intrinsic 200px min-width,
   governs sizing — otherwise two-column grids overflow narrow drawers. */
.form-field .input {
    min-width: 0;
}
.form-field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}
.form-field .hint {
    font-size: 12px;
    color: var(--muted-2);
}
.color-row {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
}
.color-row .color-pick {
    flex: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}
.color-row .color-prev {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.switch input {
    display: none;
}
.switch .track {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--panel-3);
    border: 1px solid var(--border);
    position: relative;
    transition: background 0.15s;
}
.switch .track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s;
}
.switch input:checked + .track {
    background: var(--magenta);
}
.switch input:checked + .track::after {
    transform: translateX(18px);
}
.switch .lbl {
    font-weight: 700;
    font-size: 14px;
}

.settings-block {
    margin-bottom: 20px;
}
.settings-block .head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.settings-block .head h3 {
    margin: 0;
}
.divider {
    height: 1px;
    background: var(--border);
    margin: 22px 0;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    background: var(--panel);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.25s;
    pointer-events: none;
}
.toast.show {
    transform: none;
    opacity: 1;
}
.toast.ok {
    border-color: rgba(55, 245, 97, 0.4);
}
.toast.err {
    border-color: rgba(255, 90, 106, 0.4);
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 40px;
    font-size: 14px;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
}
.drawer-backdrop.open {
    display: block;
}
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(440px, 100%);
    z-index: 121;
    background: var(--panel);
    border-left: 1px solid var(--border-strong);
    padding: 26px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
}
.drawer.open {
    transform: none;
}
.drawer h2 {
    font-size: 20px;
    letter-spacing: -0.02em;
}

@media (max-width: 900px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }
    .admin-shell > * {
        min-width: 0;
    }
    .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        padding: 12px 14px;
        gap: 10px;
    }
    .sidebar .brand {
        padding: 0;
        flex: 0 0 auto;
    }
    .side-nav {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        gap: 6px;
    }
    .side-link {
        white-space: nowrap;
        padding: 9px 12px;
    }
    .sidebar .foot {
        margin: 0;
        padding: 0;
        border: none;
        display: flex;
        gap: 6px;
        flex: 0 0 auto;
    }
    .admin-main {
        padding: 20px 16px 48px;
        max-width: 100%;
    }
    .kpi-grid,
    .chart-grid,
    .chart-grid-2,
    .form-grid {
        grid-template-columns: 1fr;
    }
}
