/* ═══════════════════════════════════════════════════════════════
   FuzilCenter — La Casa de Papel Theme
   Tema Cinematográfico com Red (#b3132d), Gold (#e9c98a), Dark (#0a0a14)
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg: #070707;
    --bg-soft: #111111;
    --card: rgba(16, 16, 16, 0.74);
    --border: rgba(255,255,255,.10);
    --text: #f7f2eb;
    --text-muted: rgba(247,242,235,.70);
    --red: #b3132d;
    --red-dark: #8c0d22;
    --gold: #e9c98a;
    --gold-dark: #c8a56a;
    --shadow: 0 30px 80px rgba(0,0,0,.55);
    --radius-xl: 16px;
    --radius-lg: 10px;
}

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

html, body {
    background: #050505;
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
}

/* ═══ BACKGROUND & PARTICLES ═══ */
.bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(180deg, rgba(0,0,0,.48), rgba(0,0,0,.78)),
        linear-gradient(135deg, rgba(179,19,45,.26), rgba(0,0,0,.20) 35%, rgba(233,201,138,.10) 100%),
        url('/static/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transform: scale(1.08);
    animation: cinematicZoom 18s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 20%, rgba(255,216,160,.12), transparent 18%),
        radial-gradient(circle at 15% 50%, rgba(179,19,45,.18), transparent 30%),
        radial-gradient(circle at 85% 60%, rgba(179,19,45,.16), transparent 28%);
    mix-blend-mode: screen;
}

.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(2px);
    background:
        linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.22)),
        repeating-linear-gradient(
            90deg,
            rgba(255,255,255,.00) 0px,
            rgba(255,255,255,.00) 2px,
            rgba(255,255,255,.018) 3px,
            rgba(255,255,255,.00) 4px
        );
    opacity: .5;
}

@keyframes cinematicZoom {
    0%   { transform: scale(1.04) translate3d(0, 0, 0); }
    50%  { transform: scale(1.09) translate3d(0, -6px, 0); }
    100% { transform: scale(1.14) translate3d(0, 4px, 0); }
}

.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233,201,138,.95), rgba(233,201,138,.15));
    box-shadow: 0 0 14px rgba(233,201,138,.45);
    animation: floatUp linear infinite;
    opacity: .55;
}

.particle:nth-child(1) { left: 8%;  bottom: -10px; animation-duration: 10s; animation-delay: -2s; }
.particle:nth-child(2) { left: 18%; bottom: -20px; animation-duration: 13s; animation-delay: -8s; width: 4px; height: 4px; }
.particle:nth-child(3) { left: 30%; bottom: -16px; animation-duration: 11s; animation-delay: -4s; }
.particle:nth-child(4) { left: 42%; bottom: -24px; animation-duration: 15s; animation-delay: -6s; width: 5px; height: 5px; }
.particle:nth-child(5) { left: 55%; bottom: -12px; animation-duration: 12s; animation-delay: -3s; }
.particle:nth-child(6) { left: 68%; bottom: -16px; animation-duration: 16s; animation-delay: -7s; width: 4px; height: 4px; }
.particle:nth-child(7) { left: 78%; bottom: -18px; animation-duration: 14s; animation-delay: -5s; }
.particle:nth-child(8) { left: 88%; bottom: -10px; animation-duration: 11s; animation-delay: -1s; width: 5px; height: 5px; }

@keyframes floatUp {
    0% { transform: translateY(0) scale(.8); opacity: 0; }
    15% { opacity: .7; }
    100% { transform: translateY(-110vh) scale(1.2); opacity: 0; }
}

/* ═══ LOGIN PAGE ═══ */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 2;
    padding: 22px 14px;
}

.login-container {
    width: min(100%, 440px);
    perspective: 1400px;
}

.card {
    position: relative;
    border-radius: var(--radius-xl);
    padding: 28px 28px 20px;
    background:
        linear-gradient(180deg, rgba(10, 10, 10, .22), rgba(4, 4, 4, .30)),
        linear-gradient(145deg, rgba(179,19,45,.04), rgba(233,201,138,.01));
    border: 1px solid var(--border);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05);
    backdrop-filter: blur(6px);
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(179,19,45,.20), transparent 30%),
        radial-gradient(circle at bottom left, rgba(233,201,138,.10), transparent 28%),
        linear-gradient(140deg, rgba(255,255,255,.05), transparent 24%);
    pointer-events: none;
}

.card::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--radius-xl) - 1px);
    border: 1px solid rgba(255,255,255,.04);
    pointer-events: none;
}



.top-glow {
    position: absolute;
    inset: -40px -60px auto auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(179,19,45,.30), transparent 68%);
    filter: blur(26px);
    opacity: .85;
    pointer-events: none;
}

.bottom-glow {
    position: absolute;
    inset: auto auto -80px -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233,201,138,.18), transparent 72%);
    filter: blur(28px);
    opacity: .75;
    pointer-events: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(233,201,138,.24);
    background: rgba(255,255,255,.04);
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 12px rgba(179,19,45,.8);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: .65; }
}

.brand {
    position: relative;
    z-index: 2;
    text-align: center;
    padding-top: 12px;
    margin-bottom: 16px;
}

.chk-emblem {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chk-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    background:
        linear-gradient(#0a0a14, #0a0a14) padding-box,
        conic-gradient(var(--red), var(--gold), var(--red), var(--gold), var(--red)) border-box;
    animation: chkSpin 3s linear infinite;
    filter: drop-shadow(0 0 8px rgba(179,19,45,.35)) drop-shadow(0 0 12px rgba(233,201,138,.2));
}

.chk-ring::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(233,201,138,.12);
}

@keyframes chkSpin {
    to { transform: rotate(360deg); }
}

.chk-text {
    position: relative;
    z-index: 1;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .15em;
    background: linear-gradient(135deg, var(--gold), #fff6eb, var(--gold));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: chkTextShift 4s ease-in-out infinite;
    text-shadow: none;
}

@keyframes chkTextShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.brand h1 {
    font-size: clamp(32px, 7vw, 42px);
    font-weight: 800;
    letter-spacing: .10em;
    color: #fff6eb;
    text-transform: uppercase;
    text-shadow: 0 4px 18px rgba(0,0,0,.45);
    margin-bottom: 10px;
}

.brand-line {
    width: 118px;
    height: 6px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--red), var(--gold), var(--red), var(--gold), var(--red));
    background-size: 300% 100%;
    box-shadow: 0 0 16px rgba(179,19,45,.30);
    animation: brandLineMove 4s ease-in-out infinite;
}

@keyframes brandLineMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.brand p {
    max-width: 300px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.field {
    position: relative;
    z-index: 2;
    margin-top: 16px;
}

.field label {
    display: block;
    margin-bottom: 10px;
    color: #f3e7d3;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    height: 52px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,.10);
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
    color: var(--text);
    padding: 0 52px 0 18px;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: .24s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.input-wrap input::placeholder {
    color: rgba(247,242,235,.42);
}

.input-wrap input:focus {
    border-color: rgba(233,201,138,.48);
    box-shadow:
        0 0 0 4px rgba(233,201,138,.10),
        0 10px 24px rgba(0,0,0,.18),
        inset 0 1px 0 rgba(255,255,255,.06);
    transform: translateY(-1px);
}

.icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    opacity: .7;
    color: var(--gold);
}

.eye-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gold);
    opacity: .6;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: opacity .2s;
    z-index: 2;
}
.eye-toggle:hover {
    opacity: 1;
}

.actions {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.btn {
    height: 50px;
    border: 0;
    border-radius: var(--radius-lg);
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .03em;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background .18s ease;
    text-decoration: none;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    color: #fff8ef;
    background: linear-gradient(180deg, #c51a36, #8f1026);
    box-shadow:
        0 16px 34px rgba(179,19,45,.30),
        inset 0 1px 0 rgba(255,255,255,.16);
}

.btn-primary:hover {
    filter: brightness(1.04);
}

.btn-secondary {
    color: var(--gold);
    background: linear-gradient(180deg, rgba(233,201,138,.10), rgba(233,201,138,.04));
    border: 1px solid rgba(233,201,138,.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.btn-secondary:hover {
    background: linear-gradient(180deg, rgba(233,201,138,.14), rgba(233,201,138,.06));
}

.btn-renew-login {
    color: #22c55e;
    background: linear-gradient(180deg, rgba(34,197,94,.10), rgba(34,197,94,.04));
    border: 1px solid rgba(34,197,94,.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.btn-renew-login:hover {
    background: linear-gradient(180deg, rgba(34,197,94,.16), rgba(34,197,94,.08));
}

/* ═══ AUTH TABS ═══ */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-top: 16px;
    margin-bottom: 6px;
    position: relative;
    z-index: 2;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
}
.auth-tab {
    flex: 1;
    height: 42px;
    border: none;
    background: rgba(255,255,255,.03);
    color: rgba(243,231,211,.5);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .2s, color .2s;
}
.auth-tab:not(:last-child) {
    border-right: 1px solid rgba(255,255,255,.06);
}
.auth-tab:hover {
    background: rgba(255,255,255,.06);
    color: rgba(243,231,211,.8);
}
.auth-tab.active {
    background: linear-gradient(180deg, rgba(197,26,54,.25), rgba(143,16,38,.18));
    color: #fff8ef;
    box-shadow: inset 0 -2px 0 #c51a36;
}
.auth-form-panel {
    position: relative;
    z-index: 2;
}

.renew-key-input-box {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.renew-key-input-box input {
    flex: 1;
    background: rgba(20,20,30,.8);
    border: 1px solid rgba(233,201,138,.18);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-family: monospace;
}
.renew-key-status {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255,255,255,.5);
}

.footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.06);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34,197,94,.80);
    animation: pulseGreen 1.8s ease-in-out infinite;
}

@keyframes pulseGreen {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 12px rgba(34,197,94,.80); }
    50% { transform: scale(1.4); opacity: .65; box-shadow: 0 0 20px rgba(34,197,94,1); }
}

/* ═══ DASHBOARD ═══ */
.dashboard-container {
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.main-content {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    background: linear-gradient(180deg, rgba(11, 11, 17, 0.95), rgba(7, 7, 10, 0.98));
    border-right: 1px solid rgba(179, 19, 45, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    padding: 0;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(179, 19, 45, 0.2);
}

.sidebar-header h2 {
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0;
}

.sidebar-group {
    border-bottom: 1px solid rgba(179, 19, 45, 0.15);
}

.sidebar-group h5 {
    cursor: pointer;
    padding: 14px 20px;
    color: rgba(247, 242, 235, 0.5);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.sidebar-group h5:hover {
    color: var(--gold);
}

.sidebar-group h5 i {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
    color: var(--red);
}

.sidebar-group ul {
    display: none;
    list-style: none;
    padding: 0 0 8px 0;
}

.sidebar-group.active ul {
    display: block;
}

.sidebar-group.active h5 {
    color: var(--gold);
}

.sidebar-group ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 30px;
    color: rgba(247, 242, 235, 0.6);
    font-size: 0.9rem;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.sidebar-group ul li a:hover {
    color: var(--gold);
    background: rgba(179, 19, 45, 0.08);
    border-left-color: var(--red);
}

.sidebar-group ul li a i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
}

.sidebar-nav-bottom {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(179, 19, 45, 0.2);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
    justify-content: center;
    cursor: pointer;
    background: transparent;
}

.btn-logout:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: 100vh;
    background: linear-gradient(135deg, rgba(10, 10, 14, 0.8), rgba(15, 12, 18, 0.8));
}

.content-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.time-box {
    flex: 1;
    min-width: 200px;
    background: linear-gradient(135deg, rgba(22, 22, 28, 0.7), rgba(16, 16, 22, 0.8));
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

.time-box h2 {
    font-size: 0.9rem;
    color: var(--gold);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.time-box span {
    font-size: 1.1rem;
    color: #e0e0e0;
    font-weight: 600;
}

.tempo_expira, #tempoExpira {
    font-size: 1.6rem !important;
    font-weight: 700;
    color: var(--red) !important;
    font-family: 'Courier New', monospace;
}

.key-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.key-container span {
    font-family: monospace;
    font-size: 1rem;
    color: var(--gold);
    letter-spacing: 1px;
}

.toggle-key {
    padding: 6px 16px;
    background: rgba(179, 19, 45, 0.15);
    border: 1px solid rgba(233, 201, 138, 0.3);
    border-radius: 6px;
    color: var(--gold);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.toggle-key:hover {
    background: rgba(179, 19, 45, 0.25);
    border-color: var(--gold);
}

.tool-box {
    background: linear-gradient(135deg, rgba(22, 22, 28, 0.7), rgba(16, 16, 22, 0.8));
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.tool-box h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.tool-box h2 i {
    color: var(--red);
}

.tool-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.tool-input-row input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(20, 20, 26, 0.8);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.tool-input-row input:focus {
    outline: none;
    border-color: var(--gold);
}

.btn-tool {
    padding: 10px 18px;
    background: linear-gradient(180deg, var(--red), var(--red-dark));
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(179, 19, 45, 0.3);
}

.btn-tool:hover {
    background: linear-gradient(180deg, #c91f3e, #9a1429);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(179, 19, 45, 0.4);
}

.btn-danger-sm {
    background: #ff6b6b;
    color: #fff;
}

.btn-danger-sm:hover {
    background: #ff5252;
}

.tool-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    background: rgba(10, 10, 14, 0.8);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 6px;
    color: var(--text);
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-top: 10px;
}

.tool-textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.tool-result {
    margin-top: 14px;
}

/* ═══ CHECKER ═══ */
.checker-wrapper {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 10px;
    position: relative;
    z-index: 2;
}

.checker-main, .checker-stats {
    background: linear-gradient(135deg, rgba(22, 22, 28, 0.7), rgba(16, 16, 22, 0.8));
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.form-checker {
    width: 100%;
    padding: 12px;
    background: rgba(10, 10, 14, 0.8);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 6px;
    color: var(--text);
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 14px;
}

.form-checker:focus {
    outline: none;
    border-color: var(--gold);
}

.checker-selects select {
    width: 100%;
    padding: 10px;
    background: rgba(20, 20, 26, 0.8);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    text-align: center;
}

.checker-selects select:focus {
    outline: none;
    border-color: var(--gold);
}

.checker-buttons {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.checker-buttons .btn {
    flex: 1;
}

.test-item {
    background: rgba(20, 20, 26, 0.7);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.test-item:hover {
    transform: translateY(-2px);
    border-color: var(--red);
}

.test-item.approved {
    border-left: 4px solid #22c55e;
}

.test-item.reproved {
    border-left: 4px solid #ff6b6b;
}

.test-item.warning {
    border-left: 4px solid var(--gold);
}

.test-body {
    padding: 12px 14px;
    color: rgba(247, 242, 235, 0.8);
    font-size: 0.9rem;
    font-family: monospace;
    word-break: break-all;
}

/* ═══ ALERTS & TOASTS ═══ */
.custom-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    backdrop-filter: blur(5px);
}

.custom-alert.show {
    opacity: 1;
    transform: translateX(0);
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.alert-error {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
}

.toast-msg {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid rgba(100, 100, 140, 0.4);
    color: #e2e2e8;
    border-radius: 8px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    backdrop-filter: blur(8px);
}

.toast-msg.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-msg.toast-success {
    background: rgba(16, 60, 30, 0.95);
    border-color: rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.toast-msg.toast-error {
    background: rgba(60, 16, 16, 0.95);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.toast-msg.toast-info {
    background: rgba(16, 30, 60, 0.95);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
}

.toast-msg.toast-warning {
    background: rgba(60, 50, 16, 0.95);
    border-color: rgba(234, 179, 8, 0.5);
    color: #facc15;
}

/* ═══ BUY MODAL ═══ */
.btn-buy-plan {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(179, 19, 45, 0.2), rgba(179, 19, 45, 0.1));
    border: 1px solid rgba(179, 19, 45, 0.4);
    color: var(--gold);
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
}

.btn-buy-plan:hover {
    background: linear-gradient(180deg, rgba(179, 19, 45, 0.3), rgba(179, 19, 45, 0.15));
    border-color: var(--red);
}

.buy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.buy-modal {
    background: linear-gradient(135deg, rgba(22, 22, 28, 0.95), rgba(16, 16, 22, 0.98));
    border: 1px solid rgba(179, 19, 45, 0.3);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.buy-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(247, 242, 235, 0.5);
    font-size: 24px;
    cursor: pointer;
}

.buy-close:hover {
    color: var(--red);
}

.buy-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
    text-align: center;
}

.buy-title i {
    color: var(--gold);
    margin-right: 8px;
}

.buy-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.buy-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.buy-plan-card {
    background: rgba(179, 19, 45, 0.1);
    border: 1px solid rgba(179, 19, 45, 0.3);
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
}

.buy-plan-card:hover {
    border-color: var(--gold);
    background: rgba(233, 201, 138, 0.08);
    transform: translateY(-2px);
}

.buy-plan-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    background: rgba(179, 19, 45, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--red);
}

.buy-plan-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    font-size: 14px;
}

.buy-plan-price {
    color: var(--gold);
    font-weight: 700;
    font-size: 16px;
}

.buy-key-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 14px;
    margin: 16px 0;
    justify-content: center;
}

.buy-key-box code {
    font-family: monospace;
    font-size: 15px;
    color: #22c55e;
    word-break: break-all;
}

.buy-warn {
    text-align: center;
    color: var(--gold);
    font-size: 13px;
    margin-top: 12px;
}

.buy-status {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 16px;
}

.pix-qr-box {
    background: rgba(10, 10, 14, 0.8);
    border: 2px solid rgba(179, 19, 45, 0.3);
    border-radius: 8px;
    padding: 16px;
    display: inline-block;
}

.pix-copy-area {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.pix-copy-area input {
    flex: 1;
    background: rgba(10, 10, 14, 0.8);
    border: 1px solid rgba(179, 19, 45, 0.2);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-family: monospace;
}

.btn-copy-pix {
    background: rgba(179, 19, 45, 0.2);
    border: 1px solid rgba(179, 19, 45, 0.4);
    color: var(--gold);
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-copy-pix:hover {
    background: rgba(179, 19, 45, 0.3);
    border-color: var(--red);
}

/* ═══ ADMIN PANELS ═══ */
.admin-wrapper {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 10px;
    position: relative;
    z-index: 2;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(179, 19, 45, 0.2);
}

.admin-header h2 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold);
}

.admin-header h2 i {
    color: var(--red);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-card {
    background: linear-gradient(135deg, rgba(22, 22, 28, 0.7), rgba(16, 16, 22, 0.8));
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.admin-card h4 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: var(--gold);
}

.admin-card h4 i {
    color: var(--red);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-form select,
.admin-form input {
    padding: 10px 14px;
    background: rgba(20, 20, 26, 0.8);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
}

.admin-form select:focus,
.admin-form input:focus {
    outline: none;
    border-color: var(--gold);
}

.generated-keys {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gen-key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 14, 0.6);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--gold);
}

.btn-copy-key {
    background: none;
    border: none;
    color: rgba(233, 201, 138, 0.5);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    transition: color 0.2s;
}

.btn-copy-key:hover {
    color: var(--gold);
}

.keys-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.keys-table th {
    background: rgba(10, 10, 14, 0.6);
    color: var(--gold);
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid rgba(179, 19, 45, 0.2);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keys-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(179, 19, 45, 0.1);
    color: rgba(247, 242, 235, 0.7);
}

.keys-table tr:hover {
    background: rgba(179, 19, 45, 0.05);
}

.key-cell {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--gold);
}

.status-active {
    color: #22c55e;
    font-weight: 600;
}

.status-expired {
    color: #ff6b6b;
    font-weight: 600;
}

.btn-del {
    background: none;
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-del:hover {
    background: rgba(255, 107, 107, 0.15);
}

/* ═══ RENEWAL & PAYMENT ═══ */
.renew-container {
    padding: 10px 0;
    position: relative;
    z-index: 2;
}

.renew-title {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 6px;
}

.renew-title i {
    color: var(--red);
    margin-right: 8px;
}

.renew-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.renew-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.renew-plan-card {
    background: linear-gradient(135deg, rgba(22, 22, 28, 0.7), rgba(16, 16, 22, 0.8));
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 6px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.renew-plan-card:hover {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(233, 201, 138, 0.08), rgba(233, 201, 138, 0.05));
    transform: translateY(-2px);
}

.renew-plan-icon {
    font-size: 1.6rem;
    color: var(--red);
}

.renew-plan-label {
    font-size: 1rem;
    color: var(--text);
    font-weight: 600;
}

.renew-plan-price {
    font-size: 1.2rem;
    color: var(--gold);
    font-weight: 700;
}

.pix-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pix-modal {
    background: linear-gradient(135deg, rgba(22, 22, 28, 0.95), rgba(16, 16, 22, 0.98));
    border: 1px solid rgba(179, 19, 45, 0.3);
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    padding: 28px 24px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.pix-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(247, 242, 235, 0.5);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 8px;
}

.pix-modal-close:hover {
    color: var(--red);
}

.pix-modal-header {
    text-align: center;
    margin-bottom: 22px;
}

.pix-modal-icon {
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 8px;
}

.pix-modal-header h3 {
    color: var(--text);
    font-size: 1.2rem;
    margin: 0 0 10px;
}

.pix-plan-name {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.pix-plan-price {
    background: rgba(179, 19, 45, 0.2);
    color: var(--red);
    padding: 4px 14px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid rgba(179, 19, 45, 0.4);
}

.pix-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
    color: var(--text-muted);
}

.pix-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(179, 19, 45, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pix-instruction {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.pix-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(10, 10, 14, 0.8);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 5px;
}

.pix-status-dot {
    width: 10px;
    height: 10px;
    background: #ffa500;
    border-radius: 50%;
    animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

#modalStatusText {
    color: #ffa500;
    font-size: 0.9rem;
}

.pix-modal-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 0;
    text-align: center;
}

.pix-success-icon {
    font-size: 3.5rem;
    color: #22c55e;
    animation: successPop 0.4s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.pix-modal-success h3 {
    color: #22c55e;
    margin: 0;
    font-size: 1.3rem;
}

.pix-modal-success p {
    color: var(--text-muted);
    margin: 0;
}

.pix-new-expires {
    color: #22c55e !important;
    font-weight: 600;
    font-size: 0.95rem;
}

.pix-expired-icon {
    font-size: 3rem;
    color: #ff6b6b;
}

.pix-modal-expired h3 {
    color: #ff6b6b;
    margin: 0;
}

.pix-modal-expired p {
    color: var(--text-muted);
    margin: 0;
}

/* ═══ ONLINE USERS ═══ */
.online-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.online-badge {
    background: #22c55e;
    color: #000;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 14px;
}

.online-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(179, 19, 45, 0.08);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 8px;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px #22c55e;
}

.online-info {
    flex: 1;
}

.online-key {
    font-weight: 600;
    color: var(--text);
    font-family: monospace;
    font-size: 14px;
}

.online-detail {
    color: var(--text-muted);
    font-size: 12px;
}

/* ═══ PLAN EDITOR ═══ */
.plan-editor-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    background: rgba(179, 19, 45, 0.08);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 8px;
    padding: 18px;
}

.plan-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.plan-field label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.plan-field input {
    background: rgba(20, 20, 26, 0.8);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 14px;
}

.plan-field input:focus {
    border-color: var(--gold);
    outline: none;
}

.icon-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.icon-opt {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(179, 19, 45, 0.1);
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}

.icon-opt:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.icon-opt.selected {
    background: rgba(179, 19, 45, 0.2);
    border-color: var(--red);
    color: var(--red);
}

.plan-preview-wrap {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(179, 19, 45, 0.2);
}

.preview-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.plan-preview-card {
    width: 180px;
    background: linear-gradient(135deg, rgba(179, 19, 45, 0.15), rgba(233, 201, 138, 0.08));
    border: 1px solid rgba(179, 19, 45, 0.3);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
}

.plan-pv-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: rgba(179, 19, 45, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--red);
}

.plan-pv-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.plan-pv-duration {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.plan-pv-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--gold);
}

.plans-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.plan-mgmt-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(22, 22, 28, 0.7), rgba(16, 16, 22, 0.8));
    border: 1px solid rgba(179, 19, 45, 0.2);
    border-radius: 10px;
    padding: 16px;
    transition: all .25s;
}

.plan-mgmt-card:hover {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(179, 19, 45, 0.12), rgba(233, 201, 138, 0.08));
}

.plan-mgmt-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(179, 19, 45, 0.2), rgba(233, 201, 138, 0.1));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gold);
    flex-shrink: 0;
}

.plan-mgmt-body {
    flex: 1;
}

.plan-mgmt-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}

.plan-mgmt-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

.plan-mgmt-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--gold);
    margin-top: 4px;
}

.plan-mgmt-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s;
}

.btn-edit-icon {
    background: rgba(179, 19, 45, 0.2);
    color: var(--gold);
}

.btn-edit-icon:hover {
    background: rgba(179, 19, 45, 0.3);
}

.btn-del-icon {
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
}

.btn-del-icon:hover {
    background: rgba(255, 107, 107, 0.2);
}

/* ═══ AVISO TEMPO ═══ */
.aviso-tempo {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 193, 7, 0.2);
    padding: 6px;
    text-align: center;
    font-size: 12px;
    color: #ffc107;
    border-bottom: 1px solid #ffc10755;
    z-index: 9999;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: unset;
        flex-direction: column;
        border-right: none;
        border-bottom: 1px solid rgba(179, 19, 45, 0.3);
        padding: 0;
    }

    .sidebar-header {
        width: 100%;
        padding: 14px 16px 10px;
    }

    .sidebar-header h2 {
        font-size: 1.1rem;
    }

    /* Hide group titles on mobile — show items directly */
    .sidebar-group {
        border-bottom: none;
    }

    .sidebar-group h5 {
        display: none;
    }

    /* Force all sub-menus open on mobile */
    .sidebar-group ul {
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 12px 8px;
    }

    .sidebar-group ul li {
        flex: 1;
        min-width: calc(50% - 8px);
    }

    .sidebar-group ul li a {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 14px 8px;
        font-size: 0.85rem;
        font-weight: 600;
        text-align: center;
        background: rgba(179, 19, 45, 0.1);
        border: 1px solid rgba(179, 19, 45, 0.2);
        border-radius: 10px;
        border-left: none;
        color: rgba(247, 242, 235, 0.85);
        min-height: 60px;
    }

    .sidebar-group ul li a:hover,
    .sidebar-group ul li a:active {
        background: rgba(179, 19, 45, 0.25);
        border-color: var(--red);
        color: var(--gold);
        transform: scale(0.97);
    }

    .sidebar-group ul li a i {
        font-size: 1.2rem;
        width: auto;
        color: var(--red);
    }

    .sidebar-nav-bottom {
        padding: 8px 12px 12px;
        margin-top: 0;
        border-top: none;
    }

    .btn-logout {
        padding: 12px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .content-area {
        padding: 16px;
        max-height: unset;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .renew-plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plans-card-grid {
        grid-template-columns: 1fr;
    }

    .plan-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .card {
        padding: 22px 16px 16px;
        border-radius: 12px;
    }

    .brand h1 {
        font-size: 30px;
    }

    .btn {
        height: 48px;
    }

    .buy-modal {
        width: 95%;
    }

    .pix-modal {
        max-width: 95%;
    }

    /* Smaller phones: 3 columns for sidebar items */
    .sidebar-group ul li {
        min-width: calc(33.33% - 8px);
    }

    .sidebar-group ul li a {
        padding: 12px 4px;
        font-size: 0.78rem;
        min-height: 55px;
    }

    .sidebar-group ul li a i {
        font-size: 1.1rem;
    }
}

/* ═══ LOGIN CARD — MOBILE COMPACT ═══ */
@media (max-width: 520px) {
    .login-container {
        width: min(100%, 360px);
        padding: 10px;
    }

    .login-container .card {
        padding: 16px 16px 14px;
        border-radius: 12px;
    }

    /* Shrink emblem */
    .login-container .chk-emblem {
        width: 44px;
        height: 44px;
        margin-bottom: 8px;
    }

    .login-container .chk-text {
        font-size: 13px;
    }

    .login-container .chk-ring {
        border-width: 2px;
    }

    /* Shrink brand */
    .login-container .brand {
        padding-top: 6px;
        margin-bottom: 8px;
    }

    .login-container .brand h1 {
        font-size: 22px;
        letter-spacing: .06em;
        margin-bottom: 4px;
    }

    .login-container .brand-line {
        width: 70px;
        height: 3px;
        margin-bottom: 6px;
    }

    /* Shrink badge */
    .login-container .badge {
        padding: 4px 8px;
        font-size: 9px;
        gap: 5px;
    }

    .login-container .badge-dot {
        width: 6px;
        height: 6px;
    }

    /* Shrink glow effects */
    .login-container .top-glow {
        width: 120px;
        height: 120px;
        inset: -20px -30px auto auto;
    }

    .login-container .bottom-glow {
        width: 130px;
        height: 130px;
        inset: auto auto -40px -40px;
    }

    /* Shrink tabs */
    .login-container .auth-tabs {
        margin-top: 10px;
        margin-bottom: 4px;
    }

    .login-container .auth-tab {
        height: 34px;
        font-size: 12px;
    }

    /* Shrink fields */
    .login-container .field {
        margin-top: 10px;
    }

    .login-container .field label {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .login-container .input-wrap input {
        height: 40px;
        font-size: 13px;
        padding: 0 40px 0 12px;
    }

    /* Shrink button */
    .login-container .actions {
        margin-top: 12px;
    }

    .login-container .btn {
        height: 40px;
        font-size: 13px;
    }

    /* Shrink footer */
    .login-container .footer {
        margin-top: 10px;
    }

    .login-container .status {
        font-size: 10px;
    }
}

/* ═══ LOGIN FORM (login.html / admin_login.html) ═══ */
.login-container h1 {
    font-size: clamp(32px, 7vw, 42px);
    font-weight: 800;
    letter-spacing: .10em;
    color: #fff6eb;
    text-transform: uppercase;
    text-shadow: 0 4px 18px rgba(0,0,0,.45);
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.login-container h1 i {
    color: var(--gold);
    margin-right: 6px;
}

.login-form {
    position: relative;
    z-index: 2;
}

.input-group {
    margin-bottom: 14px;
}

.input-group input {
    width: 100%;
    height: 52px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,.10);
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
    color: var(--text);
    padding: 0 18px;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: .24s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.input-group input::placeholder {
    color: rgba(247,242,235,.42);
}

.input-group input:focus {
    border-color: rgba(233,201,138,.48);
    box-shadow: 0 0 0 4px rgba(233,201,138,.10), 0 10px 24px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06);
    transform: translateY(-1px);
}

.btn-login {
    width: 100%;
    height: 60px;
    border: 0;
    border-radius: var(--radius-lg);
    color: #fff8ef;
    background: linear-gradient(180deg, #c51a36, #8f1026);
    box-shadow: 0 16px 34px rgba(179,19,45,.30), inset 0 1px 0 rgba(255,255,255,.16);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .03em;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    margin-top: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.btn-login:active {
    transform: translateY(0);
}

/* ═══ CHECKER PAGE ═══ */
.checker-row {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    margin-bottom: 16px;
}

.card-body {
    padding: 20px;
    position: relative;
}

.card-body h4,
.card-body h5 {
    color: var(--text);
    margin-bottom: 6px;
}

.card-body h4 strong {
    color: var(--gold);
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-center { text-align: center; }

.text-success { color: #22c55e; }
.text-danger { color: #ff6b6b; }

.float-right { float: right; }

.checker-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.checker-header h4 {
    flex: 1;
    margin: 0;
    text-align: center;
    padding-right: 48px;
}

.back-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(179,19,45,.15);
    border: 1px solid rgba(179,19,45,.3);
    color: var(--gold);
    text-decoration: none;
    transition: all .2s;
}

.back-btn:hover {
    background: rgba(179,19,45,.25);
    border-color: var(--red);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
}

.badge-success {
    background: rgba(34,197,94,.15);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,.3);
}

.badge-danger {
    background: rgba(255,107,107,.15);
    color: #ff6b6b;
    border: 1px solid rgba(255,107,107,.3);
}

.badge-info {
    background: rgba(59,130,246,.15);
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,.3);
}

.badge-primary {
    background: rgba(179,19,45,.15);
    color: var(--gold);
    border: 1px solid rgba(179,19,45,.3);
}

.badge-expire {
    background: rgba(255,165,0,.15);
    color: #ffa500;
    border: 1px solid rgba(255,165,0,.3);
    font-family: 'Courier New', monospace;
}

.btn-success {
    color: #fff;
    background: linear-gradient(180deg, #16a34a, #15803d);
    box-shadow: 0 6px 16px rgba(22,163,74,.3);
}

.btn-success:hover {
    filter: brightness(1.1);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(180deg, #dc2626, #b91c1c);
    box-shadow: 0 6px 16px rgba(220,38,38,.3);
}

.btn-danger:hover {
    filter: brightness(1.1);
}

.btn-sm {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-play, .btn-stop {
    border-radius: 8px;
}

.btn-play:disabled, .btn-stop:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.results-section {
    margin-top: 16px;
}

.results-section .card {
    animation: none;
}

.checker-main hr,
.checker-stats hr {
    border: none;
    border-top: 1px solid rgba(179,19,45,.15);
    margin: 8px 0;
}

/* ═══ DASHBOARD SECTIONS ═══ */
.time-section {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.time-section .time-box {
    flex: 1;
    min-width: 180px;
}

.database-info {
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(22,22,28,.7), rgba(16,16,22,.8));
    border: 1px solid rgba(179,19,45,.2);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.database-info h3 {
    font-size: 1.1rem;
    margin-bottom: 14px;
    color: var(--gold);
}

.hist-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.hist-filters select,
.hist-filters input {
    padding: 8px 12px;
    background: rgba(20,20,26,.8);
    border: 1px solid rgba(179,19,45,.2);
    border-radius: 6px;
    color: var(--text);
    font-size: .9rem;
}

.hist-filters select:focus,
.hist-filters input:focus {
    outline: none;
    border-color: var(--gold);
}

.historico-list {
    max-height: 500px;
    overflow-y: auto;
}

.hist-item {
    background: rgba(20,20,26,.5);
    border: 1px solid rgba(179,19,45,.15);
    border-left: 4px solid var(--red);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: transform .15s;
}

.hist-item:hover {
    transform: translateX(4px);
}

.hist-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.hist-status {
    font-weight: 700;
    font-size: .9rem;
}

.hist-date {
    color: var(--text-muted);
    font-size: .8rem;
}

.hist-card {
    font-family: monospace;
    font-size: .85rem;
    color: var(--text);
    word-break: break-all;
    margin-bottom: 6px;
}

.hist-bottom {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: var(--text-muted);
}

.hist-retorno {
    flex: 1;
    word-break: break-all;
}

.hist-gate {
    flex-shrink: 0;
    color: var(--gold);
    padding-left: 10px;
}

.hist-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

/* ═══ SEPARATOR OPTIONS ═══ */
.sep-options {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin: 10px 0;
    align-items: center;
}

.sep-opt {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: .9rem;
    cursor: pointer;
}

.sep-opt input[type="checkbox"] {
    accent-color: var(--red);
    width: 16px;
    height: 16px;
}

.sep-stats {
    margin-top: 10px;
    font-size: .85rem;
    color: var(--text-muted);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ═══ BIN INFO GRID ═══ */
.bin-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
    background: rgba(10,10,14,.6);
    border: 1px solid rgba(179,19,45,.2);
    border-radius: 8px;
    font-size: .9rem;
}

.bin-info-grid strong {
    color: var(--gold);
}

/* ═══ TOOL ACTIONS ═══ */
.tool-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tool-actions .btn-sm {
    padding: 8px 14px;
    font-size: .85rem;
}

/* ═══ PIX EXTRAS ═══ */
.pix-copy-btn {
    background: rgba(179,19,45,.2);
    border: 1px solid rgba(179,19,45,.4);
    color: var(--gold);
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: .85rem;
    white-space: nowrap;
    transition: all .2s;
}

.pix-copy-btn:hover {
    background: rgba(179,19,45,.3);
    border-color: var(--red);
}

.pix-qr-container {
    text-align: center;
    margin-bottom: 16px;
}

.pix-modal-content {
    padding-top: 10px;
}

.pix-reload-btn {
    margin-top: 12px;
}

.pix-modal-expired {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 0;
    text-align: center;
}

/* ═══ MISC HELPERS ═══ */
.dim {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.renew-loading, .renew-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

a { text-decoration: none; color: inherit; }

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(10,10,14,.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(179,19,45,.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red);
}

/* ═══ RESPONSIVE EXTRAS ═══ */
@media (max-width: 768px) {
    .checker-row {
        grid-template-columns: 1fr;
    }

    .time-section {
        flex-direction: column;
    }

    .bin-info-grid {
        grid-template-columns: 1fr;
    }

    .hist-filters {
        flex-direction: column;
    }

    .checker-wrapper {
        width: 100%;
        padding: 0 6px;
        margin: 10px auto;
    }

    .card-body {
        padding: 14px 10px;
    }

    .test-body {
        padding: 10px 10px;
        font-size: 0.76rem;
        word-break: break-all;
        overflow-wrap: anywhere;
    }

    .card-title {
        font-size: 0.95rem;
        gap: 6px;
    }

    .checker-header h4 {
        font-size: 0.9rem;
        padding-right: 38px;
    }

    .form-checker {
        font-size: 0.8rem;
        padding: 10px;
    }

    .checker-selects select {
        font-size: 0.82rem;
        padding: 8px;
    }

    .badge {
        padding: 3px 8px;
        font-size: 12px;
    }

    .btn-sm {
        height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }

    .float-right {
        display: flex;
        gap: 4px;
    }

    .results-section {
        margin-top: 10px;
    }
}

@media (max-width: 520px) {
    .checker-wrapper {
        padding: 0 4px;
        margin: 6px auto;
    }

    .card-body {
        padding: 12px 8px;
    }

    .test-body {
        padding: 8px;
        font-size: 0.72rem;
        line-height: 1.4;
    }

    .checker-header h4 {
        font-size: 0.82rem;
        padding-right: 0;
    }

    .checker-header {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 520px) {
    .login-container h1 {
        font-size: 36px;
    }
}

/* ╔══════════════════════════════════════════════════════╗
   ║             ADMIN PANEL — LA CASA DE PAPEL          ║
   ╚══════════════════════════════════════════════════════╝ */

/* ── section titles ── */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title i {
    color: var(--red);
    font-size: 1.1rem;
}

/* ── admin section box ── */
.admin-section-box {
    background: linear-gradient(180deg, rgba(18,18,18,.60), rgba(8,8,8,.70));
    border: 1px solid rgba(179,19,45,.18);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(12px);
}
.admin-section-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-section-box h4 i {
    color: var(--red);
}

/* ── stats grid ── */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.stat-card {
    background: linear-gradient(135deg, rgba(18,18,18,.65), rgba(12,12,12,.80));
    border: 1px solid rgba(179,19,45,.15);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color .3s, transform .2s;
}
.stat-card:hover {
    border-color: var(--red);
    transform: translateY(-2px);
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: rgba(179,19,45,.15);
    color: var(--red);
    flex-shrink: 0;
}
.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.stat-label {
    font-size: .75rem;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* stat color variants */
.stat-active .stat-icon { background: rgba(34,197,94,.15); color: #22c55e; }
.stat-used .stat-icon { background: rgba(59,130,246,.15); color: #3b82f6; }
.stat-expired .stat-icon { background: rgba(239,68,68,.15); color: #ef4444; }
.stat-tests .stat-icon { background: rgba(233,201,138,.15); color: var(--gold); }
.stat-lives .stat-icon { background: rgba(34,197,94,.15); color: #22c55e; }
.stat-dies .stat-icon { background: rgba(239,68,68,.15); color: #ef4444; }
.stat-gates .stat-icon { background: rgba(139,92,246,.15); color: #8b5cf6; }
.stat-bins .stat-icon { background: rgba(249,115,22,.15); color: #f97316; }
.stat-plans .stat-icon { background: rgba(233,201,138,.15); color: var(--gold); }

/* ── gen form ── */
.gen-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.gen-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.gen-form-row label {
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255,255,255,.65);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.gen-form-row input,
.gen-form-row select {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(179,19,45,.20);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: .9rem;
    outline: none;
    transition: border-color .3s;
}
.gen-form-row input:focus,
.gen-form-row select:focus {
    border-color: var(--red);
}
.gen-form-row select option {
    background: #111;
    color: #fff;
}
.btn-gen {
    margin-top: 6px;
    padding: 12px;
    font-weight: 700;
    font-size: .95rem;
    border-radius: 10px;
}
.generated-keys {
    margin-top: 14px;
}
.generated-keys .gen-key-item {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(179,19,45,.12);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: monospace;
    font-size: .85rem;
    color: var(--gold);
}

/* ── keys toolbar & table ── */
.keys-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}
.keys-search {
    position: relative;
    flex: 1;
    min-width: 180px;
}
.keys-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.35);
    font-size: .85rem;
}
.keys-search input {
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(179,19,45,.18);
    border-radius: 8px;
    padding: 9px 12px 9px 36px;
    color: #fff;
    font-size: .85rem;
    outline: none;
    transition: border-color .3s;
}
.keys-search input:focus {
    border-color: var(--red);
}
.keys-toolbar select {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(179,19,45,.18);
    border-radius: 8px;
    padding: 9px 12px;
    color: #fff;
    font-size: .85rem;
    outline: none;
}
.keys-toolbar select option {
    background: #111;
}
.keys-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
}
.keys-table {
    width: 100%;
    border-collapse: collapse;
}
.keys-table th {
    background: rgba(179,19,45,.12);
    color: var(--gold);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
}
.keys-table td {
    padding: 10px 12px;
    font-size: .83rem;
    color: rgba(255,255,255,.80);
    border-bottom: 1px solid rgba(255,255,255,.05);
    white-space: nowrap;
}
.keys-table tr:hover td {
    background: rgba(179,19,45,.06);
}
.keys-table .date-cell {
    font-size: .75rem;
    color: rgba(255,255,255,.50);
}
.keys-table .badge-plan {
    background: rgba(233,201,138,.12);
    color: var(--gold);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
}
.empty-row td {
    text-align: center;
    color: rgba(255,255,255,.30);
    padding: 30px;
}

/* ── gates ── */
.gates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.gate-card {
    background: linear-gradient(135deg, rgba(18,18,18,.60), rgba(10,10,10,.75));
    border: 1px solid rgba(179,19,45,.15);
    border-radius: 12px;
    padding: 18px;
    transition: border-color .3s;
}
.gate-card:hover {
    border-color: var(--red);
}
.gate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.gate-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}
.gate-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.gate-detail {
    display: flex;
    justify-content: space-between;
    font-size: .82rem;
}
.gate-label {
    color: rgba(255,255,255,.45);
}
.gate-detail span:last-child {
    color: rgba(255,255,255,.80);
}

/* ── switch / slider toggle ── */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.12);
    border-radius: 22px;
    cursor: pointer;
    transition: .3s;
}
.slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
}
input:checked + .slider {
    background: var(--red);
}
input:checked + .slider::before {
    transform: translateX(20px);
}

/* ── bins ── */
.bins-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.bins-add {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}
.bins-add input {
    flex: 1;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(179,19,45,.18);
    border-radius: 8px;
    padding: 9px 12px;
    color: #fff;
    font-size: .85rem;
    outline: none;
}
.bins-add input:focus {
    border-color: var(--red);
}
.bins-count {
    font-size: .8rem;
    color: rgba(255,255,255,.45);
    font-weight: 600;
}
.bins-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.bin-chip {
    background: rgba(179,19,45,.12);
    border: 1px solid rgba(179,19,45,.22);
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
    font-size: .85rem;
    color: var(--gold);
}
.bin-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,.35);
    cursor: pointer;
    font-size: .75rem;
    transition: color .2s;
}
.bin-remove:hover {
    color: #ef4444;
}

/* ── history ── */
.history-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}
.history-toolbar select,
.history-toolbar input {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(179,19,45,.18);
    border-radius: 8px;
    padding: 9px 12px;
    color: #fff;
    font-size: .85rem;
    outline: none;
}
.history-toolbar select option { background: #111; }
.history-toolbar input { flex: 1; min-width: 150px; }
.history-stats-mini {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.hstat {
    background: rgba(255,255,255,.04);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255,255,255,.60);
}
.hstat .val {
    color: #fff;
    font-weight: 800;
    margin-left: 4px;
}
.global-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 500px;
    overflow-y: auto;
}
.hist-key {
    font-family: monospace;
    font-size: .75rem;
    color: rgba(255,255,255,.40);
}

/* ── recent list (overview) ── */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}
.recent-item, .recent-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .83rem;
    color: rgba(255,255,255,.75);
}
.recent-status {
    font-weight: 700;
    font-size: .75rem;
    padding: 2px 8px;
    border-radius: 6px;
}
.recent-date {
    font-size: .72rem;
    color: rgba(255,255,255,.35);
    margin-left: auto;
}
.recent-gate {
    font-size: .72rem;
    color: rgba(255,255,255,.40);
    background: rgba(255,255,255,.06);
    padding: 2px 8px;
    border-radius: 4px;
}

/* status badges (shared) */
.live, .approved {
    color: #22c55e;
    background: rgba(34,197,94,.12);
}
.die, .dead, .declined {
    color: #ef4444;
    background: rgba(239,68,68,.12);
}
.err, .error {
    color: #f97316;
    background: rgba(249,115,22,.12);
}

/* ── online ── */
.online-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.online-badge {
    background: rgba(34,197,94,.15);
    color: #22c55e;
    padding: 4px 14px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
}
.online-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── plans ── */
.plan-form-box {
    margin-bottom: 0;
}
.plan-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.plan-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.plan-field label {
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255,255,255,.60);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.plan-field input {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(179,19,45,.18);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: .88rem;
    outline: none;
    transition: border-color .3s;
}
.plan-field input:focus {
    border-color: var(--red);
}
.icon-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.icon-opt {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.50);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}
.icon-opt:hover { border-color: var(--gold); color: var(--gold); }
.icon-opt.selected { border-color: var(--red); color: var(--red); background: rgba(179,19,45,.12); }

.plan-preview-wrap {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.preview-label {
    font-size: .75rem;
    font-weight: 600;
    color: rgba(255,255,255,.40);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
    display: block;
}
.plan-preview-card {
    background: linear-gradient(135deg, rgba(179,19,45,.10), rgba(233,201,138,.05));
    border: 1px solid rgba(179,19,45,.20);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    max-width: 200px;
}
.plan-pv-icon {
    font-size: 1.5rem;
    color: var(--red);
    margin-bottom: 8px;
}
.plan-pv-name {
    font-weight: 700;
    color: #fff;
    font-size: .95rem;
    margin-bottom: 4px;
}
.plan-pv-duration {
    font-size: .75rem;
    color: rgba(255,255,255,.45);
    margin-bottom: 8px;
}
.plan-pv-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold);
}
.plan-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.plans-count-badge {
    background: rgba(179,19,45,.15);
    color: var(--red);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: .75rem;
    font-weight: 700;
    margin-left: 8px;
}
.plans-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.plan-mgmt-card {
    background: linear-gradient(135deg, rgba(18,18,18,.65), rgba(10,10,10,.80));
    border: 1px solid rgba(179,19,45,.15);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: border-color .3s;
}
.plan-mgmt-card:hover {
    border-color: var(--gold);
}
.plan-mgmt-id {
    font-family: monospace;
    font-size: .72rem;
    color: rgba(255,255,255,.30);
    margin-bottom: 6px;
}
.plan-mgmt-dur {
    font-size: .75rem;
    color: rgba(255,255,255,.45);
    margin: 4px 0 10px;
}

/* ── settings ── */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.settings-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.settings-row label {
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255,255,255,.60);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.settings-row input {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(179,19,45,.18);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: .88rem;
    outline: none;
    transition: border-color .3s;
}
.settings-row input:focus {
    border-color: var(--red);
}
.settings-row input:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.system-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.sys-info-item {
    background: rgba(255,255,255,.04);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sys-label {
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255,255,255,.40);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.sys-value {
    font-size: .88rem;
    font-weight: 600;
    color: var(--gold);
    font-family: monospace;
}

/* ── sidebar logout ── */
.sidebar-logout {
    margin-top: auto;
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-logout a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.45);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    transition: color .3s;
}
.sidebar-logout a:hover {
    color: var(--red);
}

/* ── toast ── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    background: linear-gradient(135deg, rgba(18,18,18,.92), rgba(10,10,10,.96));
    border: 1px solid rgba(179,19,45,.25);
    border-radius: 10px;
    padding: 12px 18px;
    color: #fff;
    font-size: .85rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    animation: toastIn .3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
}
.toast.success { border-color: rgba(34,197,94,.35); }
.toast.error { border-color: rgba(239,68,68,.35); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ── dim text ── */
.dim {
    color: rgba(255,255,255,.30);
    font-size: .85rem;
}

/* ── misc admin buttons ── */
.btn-sm {
    padding: 7px 14px;
    font-size: .8rem;
    border-radius: 8px;
}
.btn-icon-danger {
    background: none;
    border: none;
    color: rgba(255,255,255,.35);
    cursor: pointer;
    font-size: .85rem;
    padding: 4px;
    transition: color .2s;
}
.btn-icon-danger:hover {
    color: #ef4444;
}
.btn-secondary {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.70);
    border: 1px solid rgba(255,255,255,.12);
}
.btn-secondary:hover {
    background: rgba(255,255,255,.14);
    color: #fff;
}

/* ── dashboard-header (admin top bar) ── */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    margin-bottom: 16px;
}

/* ── admin responsive ── */
@media (max-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .plan-form-grid {
        grid-template-columns: 1fr;
    }
    .gates-grid {
        grid-template-columns: 1fr;
    }
    .system-info-grid {
        grid-template-columns: 1fr;
    }
    .keys-toolbar {
        flex-direction: column;
    }
    .history-toolbar {
        flex-direction: column;
    }
}
@media (max-width: 480px) {
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    .plans-card-grid {
        grid-template-columns: 1fr;
    }
}

/* ╔══════════════════════════════════════════════════════╗
   ║        AFFILIATE / REFERRAL — DASHBOARD + ADMIN     ║
   ╚══════════════════════════════════════════════════════╝ */

.aff-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ── Incentive Banner ── */
.aff-incentive-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(179,19,45,.18), rgba(233,201,138,.10));
    border: 1px solid rgba(233,201,138,.25);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
}
.aff-incentive-icon {
    font-size: 32px;
    color: var(--gold);
    min-width: 48px;
    text-align: center;
}
.aff-incentive-text h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--gold);
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.aff-incentive-text p {
    font-size: 13px;
    color: rgba(255,255,255,.75);
    margin: 0;
    line-height: 1.5;
}
.aff-incentive-text strong {
    color: #22c55e;
}

/* ── Benefits Grid ── */
.aff-benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.aff-benefit-card {
    background: rgba(10,10,10,.45);
    border: 1px solid rgba(233,201,138,.10);
    border-radius: var(--radius-lg);
    padding: 16px 14px;
    text-align: center;
    transition: border-color .2s;
}
.aff-benefit-card:hover {
    border-color: rgba(233,201,138,.3);
}
.aff-benefit-card i {
    font-size: 22px;
    color: var(--gold);
    margin-bottom: 8px;
    display: block;
}
.aff-benefit-card h5 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
}
.aff-benefit-card p {
    font-size: 11px;
    color: rgba(255,255,255,.55);
    margin: 0;
    line-height: 1.4;
}
.aff-benefit-card strong {
    color: var(--gold);
}

@media (max-width: 768px) {
    .aff-benefits-grid {
        grid-template-columns: 1fr 1fr;
    }
    .aff-incentive-banner {
        flex-direction: column;
        text-align: center;
    }
}
@media (max-width: 420px) {
    .aff-benefits-grid {
        grid-template-columns: 1fr;
    }
}

.aff-link-box {
    background: linear-gradient(135deg, rgba(18,18,18,.60), rgba(8,8,8,.70));
    border: 1px solid rgba(179,19,45,.20);
    border-radius: 14px;
    padding: 22px;
    backdrop-filter: blur(12px);
}
.aff-link-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.aff-link-box h4 i { color: var(--red); }
.aff-desc {
    font-size: .85rem;
    color: rgba(255,255,255,.55);
    margin-bottom: 14px;
    line-height: 1.5;
}
.aff-desc strong {
    color: var(--gold);
}
.aff-link-row {
    display: flex;
    gap: 10px;
}
.aff-link-row input {
    flex: 1;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(179,19,45,.20);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--gold);
    font-size: .85rem;
    font-family: monospace;
    outline: none;
}
.aff-code-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.aff-code-label {
    font-size: .78rem;
    color: rgba(255,255,255,.40);
    text-transform: uppercase;
    font-weight: 600;
}
.aff-code-value {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--red);
    letter-spacing: 2px;
}

/* stats grid */
.aff-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}
.aff-stat-card {
    background: linear-gradient(135deg, rgba(18,18,18,.60), rgba(10,10,10,.75));
    border: 1px solid rgba(179,19,45,.15);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color .3s, transform .2s;
}
.aff-stat-card:hover {
    border-color: var(--red);
    transform: translateY(-2px);
}
.aff-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(179,19,45,.15);
    color: var(--red);
    flex-shrink: 0;
}
.aff-stat-earn .aff-stat-icon { background: rgba(34,197,94,.15); color: #22c55e; }
.aff-stat-pend .aff-stat-icon { background: rgba(233,201,138,.15); color: var(--gold); }
.aff-stat-paid .aff-stat-icon { background: rgba(59,130,246,.15); color: #3b82f6; }
.aff-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.aff-stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.aff-stat-label {
    font-size: .72rem;
    color: rgba(255,255,255,.40);
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* history */
.aff-history-box {
    background: linear-gradient(135deg, rgba(18,18,18,.60), rgba(8,8,8,.70));
    border: 1px solid rgba(179,19,45,.15);
    border-radius: 14px;
    padding: 20px;
}
.aff-history-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.aff-history-box h4 i { color: var(--red); }
.aff-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 350px;
    overflow-y: auto;
}
.aff-hist-item {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.aff-hist-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
}
.aff-hist-commission .aff-hist-icon {
    background: rgba(34,197,94,.12);
    color: #22c55e;
}
.aff-hist-withdraw .aff-hist-icon {
    background: rgba(239,68,68,.12);
    color: #ef4444;
}
.aff-hist-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.aff-hist-desc {
    font-size: .82rem;
    color: rgba(255,255,255,.75);
}
.aff-hist-date {
    font-size: .72rem;
    color: rgba(255,255,255,.35);
}
.aff-hist-amount {
    font-weight: 800;
    font-size: .95rem;
    color: #22c55e;
}
.aff-withdraw-amount {
    color: #ef4444;
}

/* admin config */
.aff-admin-config {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.aff-admin-config .settings-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.aff-admin-config .settings-row input[type="number"] {
    width: 120px;
    text-align: center;
}

@media (max-width: 600px) {
    .aff-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .aff-link-row {
        flex-direction: column;
    }
    .aff-admin-config .settings-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ═══════════════════════════════════════════════════════════
   ║        AFFILIATE WITHDRAW + BUY WITH BALANCE            ║
   ═══════════════════════════════════════════════════════════ */
.aff-withdraw-box,
.aff-buy-box {
    background: rgba(10,10,10,.45);
    border: 1px solid rgba(233,201,138,.12);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 18px;
}
.aff-withdraw-box h4,
.aff-buy-box h4 {
    color: var(--gold);
    margin-bottom: 10px;
    font-size: 16px;
}
.aff-pix-form {
    margin: 12px 0;
}
.aff-pix-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.aff-pix-select {
    background: rgba(20,20,30,.8);
    border: 1px solid rgba(233,201,138,.18);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    min-width: 110px;
}
.aff-pix-row input {
    flex: 1;
    background: rgba(20,20,30,.8);
    border: 1px solid rgba(233,201,138,.18);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}
.aff-withdraw-btn {
    margin-top: 14px;
    width: 100%;
    padding: 12px;
    font-size: 15px;
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity .2s;
}
.aff-withdraw-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.aff-withdraw-btn:not(:disabled):hover {
    opacity: .85;
}
.aff-wd-status {
    margin-top: 8px;
    font-size: 13px;
}
.aff-buy-box .renew-plans-grid {
    margin-top: 12px;
}
.aff-hist-purchase .aff-hist-icon {
    color: #3b82f6;
}

/* ═══ ADMIN: WITHDRAWAL REQUESTS ═══ */
.wd-badge {
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 6px;
    font-weight: 700;
}
.wd-pix-cell {
    font-family: monospace;
    font-size: 12px;
}
.wd-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.status-pending {
    background: rgba(234,179,8,.2);
    color: #eab308;
    border: 1px solid rgba(234,179,8,.3);
}
.status-approved {
    background: rgba(34,197,94,.2);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,.3);
}
.status-rejected {
    background: rgba(239,68,68,.2);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,.3);
}

@media (max-width: 520px) {
    .aff-pix-row {
        flex-direction: column;
    }
    .aff-pix-select {
        width: 100%;
    }
}

/* ═══ PayPal Sub-Mode Modal ═══ */
.pp-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn .2s;
}
.pp-modal-overlay.pp-hidden {
    display: none !important;
}
.pp-modal {
    background: #141428;
    border: 1px solid rgba(255,215,0,.25);
    border-radius: 10px;
    width: 380px;
    max-width: 92vw;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    overflow: hidden;
}
.pp-modal-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: #f0e68c;
    font-weight: 700;
    font-size: 15px;
}
.pp-modal-close {
    margin-left: auto;
    background: none; border: none;
    color: #fff; font-size: 22px;
    cursor: pointer; opacity: .6;
}
.pp-modal-close:hover { opacity: 1; }
.pp-modal-body {
    padding: 14px 18px 18px;
    display: flex; flex-direction: column; gap: 10px;
}
.pp-opt {
    display: flex; align-items: center; gap: 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    padding: 14px 16px;
    color: #eee;
    cursor: pointer;
    transition: all .2s;
    text-align: left;
}
.pp-opt:hover {
    background: rgba(255,215,0,.1);
    border-color: rgba(255,215,0,.4);
    transform: translateY(-1px);
}
.pp-opt i {
    font-size: 22px;
    color: #ffd700;
    width: 28px; text-align: center;
    flex-shrink: 0;
}
.pp-opt strong {
    display: block;
    color: #fff;
    font-size: 14px;
    margin-bottom: 2px;
}
.pp-opt small {
    display: block;
    color: #aaa;
    font-size: 11px;
}
