:root {
    --bg: #0f1419;
    --surface: #1a2332;
    --surface2: #243044;
    --border: #2d3a4f;
    --text: #e8edf5;
    --muted: #8b9cb3;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --blue: #3b82f6;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #1e293b 0%, var(--bg) 55%);
    color: var(--text);
}

body.public {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 24px;
    background: rgba(26, 35, 50, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-logo {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 6px;
}

.topbar nav {
    display: flex;
    gap: 8px;
    flex: 1;
}

.topbar nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
}

.topbar nav a:hover {
    color: var(--text);
    background: var(--surface2);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.container {
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card + .card { margin-top: 20px; }

.card h1, .card h2, .card h3 {
    margin: 0 0 16px;
    font-weight: 600;
}

.card h1 { font-size: 1.5rem; }
.card h2 { font-size: 1.15rem; color: var(--muted); font-weight: 500; }

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.kpi {
    background: var(--surface2);
    border-radius: var(--radius);
    padding: 18px;
    border: 1px solid var(--border);
}

.kpi .label {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.kpi .value {
    font-size: 1.6rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

input, select, textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(99, 102, 241, 0.45);
    border-color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: white;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.btn-lg { padding: 14px 22px; font-size: 1rem; border-radius: 10px; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface2); }
.btn-danger { background: var(--red); }
.btn-success { background: var(--green); color: #052e16; }

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

th { color: var(--muted); font-weight: 500; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-green { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.badge-yellow { background: rgba(234, 179, 8, 0.15); color: #fde047; }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.badge-red { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.badge-gray { background: rgba(139, 156, 179, 0.15); color: var(--muted); }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.35); color: #bbf7d0; }
.alert-error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); color: #fecaca; }
.alert-info { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.35); color: #bfdbfe; }

.login-box {
    width: min(420px, 100%);
}

.login-box .card { padding: 32px; }

.muted { color: var(--muted); font-size: 0.9rem; }

.link-url {
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    word-break: break-all;
    background: var(--bg);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.footer {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 0.85rem;
}

.public-card {
    width: min(480px, 100%);
}

.public-card .logo {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.4rem;
    font-weight: 700;
}

.public-card .subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 24px;
}

.success-icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .topbar { flex-wrap: wrap; }
    .topbar nav { order: 3; width: 100%; overflow-x: auto; }
}

/* ——— Branding (login + checkout) ——— */

.brand-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

.brand-mark__logo {
    width: auto;
    height: 72px;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.brand-mark__icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.45);
}

.brand-mark__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-mark__name {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.brand-mark__tagline {
    color: var(--muted);
    font-size: 0.95rem;
}

.brand-mark--hero {
    margin-bottom: 28px;
}

.brand-mark--checkout {
    margin-bottom: 0;
}

.brand-mark--checkout .brand-mark__logo {
    height: 56px;
}

.brand-mark--checkout .brand-mark__icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    border-radius: 16px;
}

.brand-mark--checkout .brand-mark__name {
    font-size: 1.35rem;
}

/* ——— Auth (login) ——— */

body.auth-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #0a0e14;
    position: relative;
    overflow: hidden;
}

.auth-page__glow {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(99, 102, 241, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 80% 90%, rgba(168, 85, 247, 0.18) 0%, transparent 40%),
        radial-gradient(ellipse at top, #1e293b 0%, #0a0e14 60%);
    pointer-events: none;
}

.auth-page__wrap {
    position: relative;
    width: min(420px, 100%);
    z-index: 1;
}

.auth-card {
    padding: 28px 28px 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(26, 35, 50, 0.88);
    backdrop-filter: blur(16px);
}

.auth-card__title {
    margin: 0 0 20px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
}

.auth-form__submit {
    width: 100%;
    margin-top: 8px;
}

.auth-page__footer {
    text-align: center;
    margin-top: 20px;
    color: var(--muted);
    font-size: 0.82rem;
}

/* ——— Checkout PRO (ativar / resgatar) ——— */

body.checkout-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: #080b12;
    position: relative;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.checkout-page__glow {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.35) 0%, transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
        #080b12;
    pointer-events: none;
}

.checkout-page__wrap {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    margin: 0 auto;
    padding:
        max(28px, env(safe-area-inset-top, 0px))
        max(16px, env(safe-area-inset-right, 0px))
        max(36px, env(safe-area-inset-bottom, 0px))
        max(16px, env(safe-area-inset-left, 0px));
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-pro {
    width: 100%;
    padding: 22px 22px 18px;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: linear-gradient(165deg, rgba(22, 18, 38, 0.97) 0%, rgba(12, 14, 24, 0.98) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 80px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(124, 58, 237, 0.12);
}

.checkout-pro__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.45);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.25);
    margin-bottom: 16px;
}

.checkout-pro__badge--success {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.checkout-pro__badge--error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

.checkout-pro__badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 8px #a78bfa;
}

.checkout-pro__badge--success .checkout-pro__badge-dot { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.checkout-pro__badge--error .checkout-pro__badge-dot { background: #f87171; box-shadow: 0 0 8px #f87171; }

.checkout-pro__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.checkout-pro__brand-logo {
    height: 36px;
    max-width: 120px;
    object-fit: contain;
}

.checkout-pro__brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}

.checkout-pro__title {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.4;
}

.checkout-pro__hero {
    text-align: center;
    padding: 20px 16px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: rgba(15, 12, 28, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.checkout-pro__hero-qty {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #c084fc 0%, #818cf8 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 24px rgba(167, 139, 250, 0.45));
    margin-bottom: 6px;
}

.checkout-pro__hero-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #cbd5e1;
}

.checkout-pro__info {
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(124, 58, 237, 0.06);
}

.checkout-pro__info-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #c4b5fd;
    margin-bottom: 8px;
}

.checkout-pro__info p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #94a3b8;
}

.checkout-pro__info strong {
    color: #e2e8f0;
    font-weight: 600;
}

.checkout-pro__tips {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-pro__tips li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #64748b;
}

.checkout-pro__tips li span {
    flex-shrink: 0;
    font-size: 0.9rem;
}

.checkout-pro__tips strong {
    color: #cbd5e1;
}

.checkout-pro__alert {
    padding: 10px 14px;
    margin-bottom: 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.checkout-pro__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkout-pro__field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
}

.checkout-pro__input-wrap {
    display: flex;
    align-items: center;
    border-radius: 12px;
    background: rgba(8, 10, 18, 0.9);
    border: 1px solid rgba(100, 116, 139, 0.25);
    overflow: hidden;
}

.checkout-pro__input-wrap--glow {
    border-color: rgba(167, 139, 250, 0.55);
    box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.15), 0 0 28px rgba(124, 58, 237, 0.2);
}

.checkout-pro__at {
    padding: 0 0 0 14px;
    color: #64748b;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.checkout-pro__sep {
    padding: 0 10px 0 6px;
    color: #475569;
    font-weight: 400;
    font-size: 0.95rem;
    flex-shrink: 0;
    user-select: none;
}

.checkout-pro__input {
    width: 100%;
    min-width: 0;
    padding: 14px 14px 14px 0;
    border: none;
    background: transparent;
    color: #f1f5f9;
    font-size: 1rem;
    outline: none;
}

.checkout-pro__input--order {
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(8, 10, 18, 0.9);
    border: 1px solid rgba(100, 116, 139, 0.25);
    color: #f1f5f9;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.checkout-pro__input--order:focus {
    border-color: rgba(167, 139, 250, 0.45);
    outline: none;
}

.checkout-pro__input::placeholder {
    color: #475569;
}

.checkout-pro__submit {
    width: 100%;
    margin-top: 4px;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    background: linear-gradient(90deg, #7c3aed 0%, #6366f1 45%, #3b82f6 100%);
    box-shadow:
        0 8px 32px rgba(124, 58, 237, 0.45),
        0 0 40px rgba(99, 102, 241, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.checkout-pro__submit:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 40px rgba(124, 58, 237, 0.55),
        0 0 50px rgba(99, 102, 241, 0.3);
}

.checkout-pro__submit:active {
    transform: translateY(0);
}

.checkout-pro__secure {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(100, 116, 139, 0.15);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #475569;
    font-family: ui-monospace, monospace;
}

.checkout-state {
    text-align: center;
    padding: 16px 0 8px;
}

.checkout-state h2 {
    margin: 0 0 10px;
    font-size: 1.4rem;
    color: #f1f5f9;
}

.checkout-state__text {
    margin: 0;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
}

.checkout-state__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 2px solid rgba(99, 102, 241, 0.35);
}

.checkout-state--success .checkout-state__icon {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.4);
}

.checkout-state--error .checkout-state__icon {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}

.checkout-ref {
    margin-top: 12px;
    font-size: 0.82rem;
    color: #64748b;
    font-family: ui-monospace, monospace;
}

@media (max-width: 480px) {
    .checkout-page__wrap {
        width: 100%;
        max-width: 100%;
        padding:
            max(14px, env(safe-area-inset-top, 0px))
            max(12px, env(safe-area-inset-right, 0px))
            max(18px, env(safe-area-inset-bottom, 0px))
            max(12px, env(safe-area-inset-left, 0px));
        align-items: center;
        justify-content: center;
    }

    .checkout-pro {
        width: 100%;
        max-width: 100%;
        padding: 20px 18px 16px;
        border-radius: 18px;
        border-width: 1px;
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.04) inset,
            0 16px 48px rgba(0, 0, 0, 0.5),
            0 0 48px rgba(124, 58, 237, 0.14);
    }

    .checkout-pro__badge {
        margin-bottom: 14px;
        font-size: 0.65rem;
        padding: 5px 12px;
    }

    .checkout-pro__brand {
        margin-bottom: 12px;
    }

    .checkout-pro__brand-name {
        font-size: 0.92rem;
    }

    .checkout-pro__title {
        font-size: 1rem;
        margin-bottom: 14px;
    }

    .checkout-pro__hero {
        padding: 18px 14px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .checkout-pro__hero-qty {
        font-size: 2.35rem;
    }

    .checkout-pro__hero-name {
        font-size: 0.9rem;
    }

    .checkout-pro__info {
        padding: 12px 14px;
        margin-bottom: 12px;
    }

    .checkout-pro__info p {
        font-size: 0.8rem;
    }

    .checkout-pro__tips {
        margin-bottom: 16px;
        gap: 10px;
    }

    .checkout-pro__tips li {
        font-size: 0.78rem;
        line-height: 1.5;
    }

    .checkout-pro__field label {
        font-size: 0.8rem;
    }

    .checkout-pro__input-wrap,
    .checkout-pro__input,
    .checkout-pro__input--order {
        font-size: 16px;
    }

    .checkout-pro__input-wrap {
        min-height: 50px;
    }

    .checkout-pro__submit {
        padding: 15px 18px;
        font-size: 0.92rem;
        border-radius: 12px;
        min-height: 52px;
        -webkit-tap-highlight-color: transparent;
    }

    .checkout-pro__secure {
        margin-top: 14px;
        padding-top: 12px;
        font-size: 0.68rem;
        word-break: break-all;
    }

    .checkout-state h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 360px) {
    .checkout-pro {
        padding: 18px 14px 14px;
    }

    .checkout-pro__hero-qty {
        font-size: 2.1rem;
    }

    .checkout-pro__at {
        padding-left: 12px;
    }

    .checkout-pro__sep {
        padding: 0 8px 0 4px;
    }
}

.brand-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.brand-preview img {
    height: 48px;
    max-width: 160px;
    object-fit: contain;
}

body.admin {
    margin: 0;
    min-height: 100vh;
    background: #050a12;
    color: var(--text);
}

/* ——— Admin shell (estilo GameMarket) ——— */

.admin-shell {
    display: flex;
    min-height: 100vh;
    background: #050a12;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #0a1018;
    border-right: 1px solid rgba(59, 130, 246, 0.12);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar__logo {
    height: 32px;
    max-width: 36px;
    object-fit: contain;
    border-radius: 8px;
}

.sidebar__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: white;
    font-size: 1rem;
}

.sidebar__name {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.sidebar__nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #64748b;
    padding: 0 10px 10px;
    text-transform: uppercase;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    margin-bottom: 4px;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.92rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar__link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #e2e8f0;
}

.sidebar__link.is-active {
    background: rgba(37, 99, 235, 0.22);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.sidebar__link-icon {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar__footer {
    padding: 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar__user {
    font-size: 0.88rem;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.sidebar__logout {
    color: #64748b;
    font-size: 0.82rem;
    text-decoration: none;
}

.sidebar__logout:hover {
    color: #f87171;
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 16, 24, 0.85);
}

.admin-topbar__greeting h1 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 500;
}

.admin-topbar__greeting p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.admin-topbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-topbar__gear {
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 1.1rem;
}

.admin-content {
    flex: 1;
    padding: 24px 28px 40px;
    width: 100%;
    max-width: 1200px;
}

.admin-footer {
    padding: 16px 28px 24px;
    color: #475569;
    font-size: 0.82rem;
}

/* Dashboard GameMarket */

.gm-section {
    margin-bottom: 22px;
}

.gm-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.gm-section__title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.gm-fee-badge {
    font-size: 0.75rem;
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    padding: 4px 10px;
    border-radius: 999px;
}

.gm-balances {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.gm-balance-card {
    background: #0d1520;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 18px 20px;
}

.gm-balance-card__label {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.gm-balance-card__value {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gm-balance-card--blocked .gm-balance-card__value { color: #fbbf24; }
.gm-balance-card--pending .gm-balance-card__value { color: #f8fafc; }
.gm-balance-card--available .gm-balance-card__value { color: #38bdf8; }

.gm-panel {
    background: #0b121c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.gm-panel--compact {
    margin-bottom: 0;
}

.gm-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.gm-panel__title {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 600;
}

.gm-panel__subtitle {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
}

.gm-period-tabs {
    display: flex;
    gap: 6px;
    background: #060b12;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.gm-period-tab {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
}

.gm-period-tab:hover {
    color: #e2e8f0;
}

.gm-period-tab.is-active {
    background: #1d4ed8;
    color: white;
}

.gm-sales-summary {
    margin-bottom: 20px;
}

.gm-sales-summary__total {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

.gm-sales-summary__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 6px;
    font-size: 0.88rem;
    color: #64748b;
}

.gm-sales-summary__fee { color: #fbbf24; }
.gm-sales-summary__net { color: #4ade80; }

.gm-chart {
    min-height: 200px;
    padding-top: 8px;
}

.gm-chart__empty {
    text-align: center;
    padding: 40px 0;
}

.gm-chart__bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    padding: 0 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gm-chart__col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 8px;
}

.gm-chart__bar {
    width: 100%;
    max-width: 36px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.35);
    transition: opacity 0.15s;
}

.gm-chart__col:hover .gm-chart__bar {
    opacity: 0.85;
}

.gm-chart__day {
    font-size: 0.72rem;
    color: #64748b;
}

.gm-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.gm-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.gm-mini-kpi {
    background: #060b12;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px;
}

.gm-mini-kpi__label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 4px;
}

.gm-mini-kpi strong {
    font-size: 1.2rem;
}

.gm-mini-kpi__small {
    font-size: 0.9rem !important;
}

.gm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.gm-status-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gm-status-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

.gm-link-more {
    display: inline-block;
    margin-top: 12px;
    color: #60a5fa;
    font-size: 0.88rem;
    text-decoration: none;
}

.gm-table code {
    font-size: 0.8rem;
}

/* ——— Meus números (7 dias) ——— */

.numbers-panel {
    background: #0b121c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 22px 24px 18px;
    margin-bottom: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.numbers-panel__title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f1f5f9;
}

.numbers-panel__hint {
    margin: 0 0 16px;
    font-size: 0.82rem;
}

.numbers-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.numbers-kpi {
    background: #060b12;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
}

.numbers-kpi__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
}

.numbers-kpi__value {
    font-size: 1.45rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.numbers-kpi__value--neg {
    color: #f87171;
}

.numbers-kpi__sub {
    display: block;
    margin-top: 6px;
    font-size: 0.72rem;
    line-height: 1.3;
}

.numbers-chart-wrap {
    height: 280px;
    padding: 8px 4px 0;
    background: #060b12;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

/* ——— Métricas (links diretos / pedidos) ——— */

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.page-head__title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 600;
}

.page-head__subtitle {
    margin: 0;
    max-width: 640px;
}

.metric-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.metric-card {
    background: #060b12;
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.metric-card__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.metric-card__icon {
    font-size: 1rem;
    opacity: 0.9;
}

.metric-card__value {
    font-size: 2rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.03em;
    line-height: 1;
}

.metric-card--total {
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.12);
}

.metric-card--available {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.metric-card--waiting {
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.1);
}

.metric-card--used {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.metric-card--error {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.12);
}

.links-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.links-toolbar__delete {
    margin: 0;
}

.links-toolbar__filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    margin-left: auto;
    flex: 1;
    justify-content: flex-end;
    min-width: 280px;
}

.links-toolbar__select {
    width: auto;
    min-width: 140px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #060b12;
    color: #f1f5f9;
}

.links-toolbar__search {
    width: min(280px, 100%);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #060b12;
    color: #f1f5f9;
}

.btn-toolbar-danger {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.55);
    color: #f87171;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.btn-toolbar-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
}

.btn-toolbar-danger:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.smm-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.smm-panel__head h2 {
    margin: 0 0 6px;
}

.smm-panel__balance {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 18px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: #060b12;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.smm-panel__balance-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    width: 100%;
}

.smm-panel__balance-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #4ade80;
    flex: 1;
    min-width: 120px;
}

@media (max-width: 960px) {
    .admin-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .sidebar__nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding-bottom: 8px;
    }

    .sidebar__label {
        width: 100%;
    }

    .sidebar__link {
        flex: 1 1 auto;
        min-width: 140px;
    }

    .gm-balances,
    .gm-grid-2,
    .gm-kpi-row,
    .numbers-kpis,
    .metric-cards {
        grid-template-columns: 1fr;
    }

    .links-toolbar__filters {
        width: 100%;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .links-toolbar__search {
        width: 100%;
    }

    .admin-content {
        padding: 16px;
    }
}

.brand-preview__remove {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--muted);
    cursor: pointer;
}

/* —— Personalização visual —— */
.card--theme {
    background: linear-gradient(180deg, rgba(var(--theme-primary-rgb, 99, 102, 241), 0.06) 0%, var(--surface) 40%);
    border-color: rgba(var(--theme-primary-rgb, 99, 102, 241), 0.2);
}

.theme-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.theme-panel__head h2 {
    margin: 0;
    color: var(--text);
    font-weight: 600;
}

.theme-panel__icon {
    font-size: 1.35rem;
    opacity: 0.9;
}

.theme-panel__hint {
    margin: 0 0 20px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.theme-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.theme-preset {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.22);
    cursor: pointer;
    text-align: left;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    font: inherit;
}

.theme-preset:hover {
    border-color: rgba(var(--theme-primary-rgb, 168, 85, 247), 0.45);
    transform: translateY(-1px);
}

.theme-preset.is-active {
    border-color: rgba(var(--theme-primary-rgb, 168, 85, 247), 0.65);
    box-shadow: 0 0 0 1px rgba(var(--theme-primary-rgb, 168, 85, 247), 0.35), 0 8px 24px rgba(0, 0, 0, 0.25);
    background: rgba(var(--theme-primary-rgb, 168, 85, 247), 0.08);
}

.theme-preset__swatch {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.theme-preset__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.theme-preset__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
}

.theme-preset__emoji {
    font-size: 1rem;
    line-height: 1;
}

.theme-preset__codes {
    font-size: 0.72rem;
    color: var(--muted);
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    word-break: break-all;
}

.theme-colors {
    margin-bottom: 8px;
}

.theme-color-field label {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.theme-color-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-color-input input[type="color"] {
    width: 44px;
    height: 44px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface2);
    cursor: pointer;
    flex-shrink: 0;
}

.theme-color-input input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.theme-color-input input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.theme-color-input input[type="text"] {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.9rem;
}

.theme-actions {
    margin-top: 18px;
}

@media (max-width: 960px) {
    .theme-presets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .theme-presets {
        grid-template-columns: 1fr;
    }
}

/* —— Histórico de saldo (links diretos) —— */
.balance-history-card {
    background: #060b12;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.balance-history-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.balance-history-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
}

.balance-history-card__icon {
    font-size: 1.1rem;
    opacity: 0.85;
}

.balance-history-card__empty {
    margin: 0;
    font-size: 0.9rem;
}

.balance-history-list {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.06);
    scrollbar-width: thin;
}

.balance-history-list::-webkit-scrollbar {
    width: 8px;
}

.balance-history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

.balance-history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

.balance-history-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.balance-history-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.balance-history-item:first-child {
    padding-top: 0;
}

.balance-history-item__info {
    min-width: 0;
    flex: 1;
}

.balance-history-item__meta {
    display: block;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #94a3b8;
    word-break: break-word;
}

.balance-history-item__amount {
    flex-shrink: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f87171;
    white-space: nowrap;
    padding-top: 1px;
}

