/* ==========================================================
   CATCINE - IDENTIDADE VISUAL DARK CINEMATIC PREMIUM
   Paleta: #FF2D2D, #FF8A00, #FFC107, #0B0B0F, #15151B, #262630
   Tipografia: Montserrat & Inter
========================================================== */

:root {
    --primary: #FF2D2D;
    --primary-hover: #E02626;
    --orange: #FF8A00;
    --gold: #FFC107;
    --bg-dark: #0B0B0F;
    --bg-surface: #15151B;
    --bg-card: #262630;
    --bg-card-hover: #2C2C38;
    --text-primary: #F5F5F5;
    --text-secondary: #A9A9B3;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(255, 45, 45, 0.4);
    --success: #10B981;
    --danger: #FF2D2D;
    --warning: #F59E0B;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --sidebar-width: 270px;
    --topbar-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-logo {
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================
   LOGO
========================================================== */
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.logo-image {
    display: block;
    height: auto;
    object-fit: contain;
}
.logo-login {
    max-width: 220px;
    height: 65px;
    margin: 0 auto;
}
.logo-sidebar {
    max-width: 140px;
    height: 42px;
}

/* ==========================================================
   TELA DE LOGIN
========================================================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1E1214 0%, #0B0B0F 80%);
    padding: 20px;
}

.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.brand-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-leading-icon,
.input-with-icon > i:first-child,
.input-with-icon > svg:first-child {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.btn-toggle-password:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-toggle-password i {
    width: 18px;
    height: 18px;
}

.input-with-icon input,
.form-control {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 12px 14px 12px 42px;
    font-size: 14px;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.form-control:not(.has-icon) {
    padding-left: 14px;
}

.input-with-icon input:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--border-focus);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-secondary);
    font-size: 11px;
}

/* ==========================================================
   BOTÕES & BADGES
========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #D41C1C 100%);
    color: #FFF;
    box-shadow: 0 4px 12px rgba(255, 45, 45, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FF4545 0%, var(--primary) 100%);
    box-shadow: 0 6px 16px rgba(255, 45, 45, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--text-secondary);
}

.btn-block {
    width: 100%;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.badge-admin { background: rgba(255, 45, 45, 0.2); color: var(--primary); border: 1px solid rgba(255, 45, 45, 0.4); }
.badge-reseller { background: rgba(255, 138, 0, 0.2); color: var(--orange); border: 1px solid rgba(255, 138, 0, 0.4); }
.badge-active { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge-suspended { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge-warning { background: rgba(245, 197, 24, 0.2); color: var(--gold); border: 1px solid rgba(245, 197, 24, 0.4); }
.badge-trial { background: rgba(255, 193, 7, 0.2); color: var(--gold); }

/* ==========================================================
   LAYOUT PRINCIPAL (SIDEBAR + TOPBAR + MAIN)
========================================================== */
#main-screen {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-user-info {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #07080d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.15);
}

.user-meta strong {
    display: block;
    font-size: 13px;
}

.user-credits {
    font-size: 11px;
    color: var(--gold);
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 18px 12px;
}

.nav-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
    padding: 8px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-item i {
    width: 18px;
    height: 18px;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(255, 45, 45, 0.12);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

.sidebar-footer {
    padding: 18px;
    border-top: 1px solid var(--border-color);
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left h2 {
    font-size: 20px;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.wallet-pill {
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: var(--gold);
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.live-clock {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

.view-content {
    padding: 32px;
    flex: 1;
}

/* ==========================================================
   CARDS DE INDICADORES (DASHBOARD)
========================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-card-info h4 {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.stat-card-info .stat-value {
    font-size: 26px;
    font-weight: 800;
    font-family: var(--font-heading);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--primary);
}

/* ==========================================================
   TABELAS & PAINÉIS DE DADOS
========================================================== */
.data-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 24px;
}

.data-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.data-card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

/* ==========================================================
   MODAIS
========================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-close:hover {
    color: #FFF;
}

.modal-body {
    padding: 24px;
}

.modal-dialog.modal-wide {
    max-width: min(1280px, 96vw);
}

.modal-dialog.modal-wide .modal-body {
    padding: 16px 20px;
    max-height: calc(100vh - 130px);
    overflow: auto;
}

/* ==========================================================
   DIÁLOGO DE CONFIRMAÇÃO (Não escurece a tela inteira)
========================================================= */
.confirm-backdrop {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.28) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 20px;
    animation: confirmFadeIn 0.18s ease-out;
}

@keyframes confirmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.confirm-dialog {
    background: linear-gradient(180deg, #1D1D25 0%, #17171E 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--danger);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 420px;
    padding: 22px 24px 20px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(239, 68, 68, 0.08);
    animation: confirmPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes confirmPopIn {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.confirm-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 8px;
}

.confirm-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: var(--danger);
}

.confirm-icon i {
    width: 21px;
    height: 21px;
}

.confirm-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    padding-top: 2px;
}

.confirm-message {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0 0 4px 56px;
}

.confirm-message strong {
    color: var(--text-primary);
}

.confirm-warn {
    margin: 14px 0 0 56px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #F5C97B;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirm-warn i {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.confirm-actions .btn {
    min-width: 108px;
    justify-content: center;
}

.btn-danger {
    background: linear-gradient(135deg, var(--primary) 0%, #D41C1C 100%);
    color: #FFF;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 45, 45, 0.3);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #FF4545 0%, var(--primary) 100%);
    box-shadow: 0 6px 16px rgba(255, 45, 45, 0.45);
}

.btn-danger:active {
    transform: scale(0.98);
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid rgba(255, 45, 45, 0.4);
    color: var(--primary);
    transition: all 0.2s ease;
}

.btn-outline-danger:hover {
    background: rgba(255, 45, 45, 0.12);
    border-color: var(--primary);
    color: #FF5555;
}

@media (max-width: 480px) {
    .confirm-dialog {
        padding: 20px 18px 18px;
    }

    .confirm-message,
    .confirm-warn {
        margin-left: 0;
    }

    .confirm-message {
        margin-top: 10px;
    }

    .confirm-actions {
        flex-direction: column-reverse;
    }

    .confirm-actions .btn {
        width: 100%;
    }
}

/* ==========================================================
   PAGINAÇÃO UNIVERSAL
========================================================== */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 8px 4px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-page-indicator {
    padding: 6px 12px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
    background: rgba(229, 9, 20, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(229, 9, 20, 0.2);
}

/* ==========================================================
   TOASTS
========================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastIn 0.3s ease;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--orange); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================
   CARDS DE PACOTES PIX (EM BREVE)
========================================================== */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.package-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.package-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 184, 0, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.package-badge-soon {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 138, 0, 0.2);
    color: var(--orange);
    border: 1px solid rgba(255, 138, 0, 0.4);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.package-credits {
    font-size: 32px;
    font-weight: 900;
    color: var(--gold);
    margin: 12px 0 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
}

.package-bonus-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(34, 197, 94, 0.4);
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1;
    letter-spacing: -0.2px;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.25);
    animation: pulseBonus 2.5s infinite;
}

@keyframes pulseBonus {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.package-total-info {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.package-total-info strong {
    color: #22c55e;
}

.package-price {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.package-unit-cost {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ==========================================================
   CATCINE REWARDS & SISTEMA DE XP
========================================================= */
.user-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    background: rgba(255, 184, 0, 0.12);
    border: 1px solid rgba(255, 184, 0, 0.25);
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.user-level-badge:hover {
    background: rgba(255, 184, 0, 0.22);
    border-color: rgba(255, 184, 0, 0.45);
}

.level-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 184, 0, 0.12);
    border: 1px solid rgba(255, 184, 0, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    cursor: pointer;
    transition: all 0.2s ease;
}
.level-pill:hover {
    background: rgba(255, 184, 0, 0.2);
    border-color: rgba(255, 184, 0, 0.5);
    transform: translateY(-1px);
}

.level-bonus-tag {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
    font-size: 11px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
}

.rewards-hero-card {
    background: linear-gradient(135deg, rgba(24, 24, 32, 0.95), rgba(32, 26, 16, 0.95));
    border: 1px solid rgba(255, 184, 0, 0.35);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.rewards-hero-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 184, 0, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.rewards-progress-container {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
    margin: 14px 0 8px 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.rewards-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #ff8a00, #22c55e);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rewards-tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.reward-tier-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    position: relative;
    transition: all 0.2s ease;
}
.reward-tier-card.active-tier {
    border-color: var(--gold);
    background: linear-gradient(180deg, rgba(255, 184, 0, 0.1), var(--bg-surface));
    box-shadow: 0 0 18px rgba(255, 184, 0, 0.22);
}
.reward-tier-card.achieved-tier {
    border-color: rgba(34, 197, 94, 0.4);
}
.reward-tier-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================
   RESPONSIVIDADE GERAL (MOBILE / TABLET)
========================================================= */

/* Botão hambúrguer — oculto no desktop */
.btn-sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 12px;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 45, 45, 0.5);
    color: var(--primary);
}

.btn-sidebar-toggle i {
    width: 20px;
    height: 20px;
}

.topbar-left {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.topbar-left h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Overlay da sidebar no mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 95;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Botão de fechar dentro da sidebar (apenas mobile) */
.sidebar-close-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;
}

.sidebar-close-btn:hover {
    color: var(--primary);
    border-color: rgba(255, 45, 45, 0.5);
}

.sidebar-close-btn i {
    width: 18px;
    height: 18px;
}

/* Tabelas sempre roláveis horizontalmente em telas pequenas */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 640px;
}

/* Grids de filtros: viram coluna única no mobile */
@media (max-width: 992px) {
    .btn-sidebar-toggle {
        display: inline-flex;
    }

    .sidebar-close-btn {
        display: inline-flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.22, 0.72, 0.26, 1);
        z-index: 100;
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.6);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        padding: 0 16px;
    }

    .view-content {
        padding: 20px 16px;
    }
}

@media (max-width: 768px) {
    .topbar {
        height: auto;
        min-height: 62px;
        padding: 10px 12px;
        gap: 8px;
    }

    .topbar-left h2 {
        font-size: 16px;
    }

    .topbar-right {
        gap: 8px;
    }

    .wallet-pill {
        padding: 5px 10px;
        font-size: 11px;
    }

    .live-clock {
        display: none;
    }

    .view-content {
        padding: 16px 12px;
    }

    .login-card {
        padding: 26px 20px;
        border-radius: var(--radius-md);
    }

    /* Filtros e grids em coluna única */
    .view-content div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .view-content div[style*="grid-template-columns"] .btn {
        width: 100%;
        height: 42px;
    }

    .modal-dialog {
        max-width: 100%;
    }

    .modal-body {
        padding: 18px 16px;
        max-height: calc(100dvh - 140px);
        overflow-y: auto;
    }

    .modal-header {
        padding: 16px 18px;
    }

    .data-card-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .data-card-header .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .topbar-left h2 {
        font-size: 14px;
    }

    .wallet-pill span {
        font-size: 10px;
    }

    .btn {
        padding: 9px 14px;
        font-size: 12px;
    }

    .login-card {
        padding: 22px 16px;
    }

    .table-responsive table {
        min-width: 560px;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .toast {
        width: 100%;
    }
}
