/* ============================================================
   LovaBlack 3.0 - Global Unified Style
   Design Moderno, Limpo e Responsivo
   ============================================================ */

/* ============ VARIABLES ============ */
:root {
    --bg-color: #0f1115;
    --surface-color: #1a1d24;
    --border-color: #2a2e37;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    --text-secondary: #e5e7eb;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --sidebar-width: 260px;
    
    --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme='light'] {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --text-secondary: #334155;
    
    --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-modal: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ACESSIBILIDADE DE FOCO */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* SCROLLBAR PERSONALIZADA */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============ RESET & GLOBAL ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

*, *::before, *::after, body, div, p, h1, h2, h3, h4, span, a, button, input, select, textarea, table, th, td {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

a { color: var(--primary-color); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }

/* ============================================================
   BOTÕES E BADGES (GLOBAL)
   ============================================================ */
.btn {
    padding: 0.6rem 1.2rem; border-radius: var(--radius-sm); text-decoration: none; font-size: 0.9rem;
    font-weight: 500; display: inline-flex; align-items: center; gap: 0.5rem;
    cursor: pointer; border: 1px solid transparent; outline: none; white-space: nowrap;
    transition: all 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; text-decoration: none; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.btn-outline { background: transparent; border-color: var(--border-color); color: var(--text-main); }
.btn-outline:hover { background: var(--surface-color); color: var(--text-main); text-decoration: none; border-color: var(--primary-color); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; color: #fff; text-decoration: none; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; color: #fff; text-decoration: none; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }

.badge, .admin-role-badge, .time-remaining, .lifetime-badge {
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-inactive { background: var(--danger-bg); color: var(--danger); }

/* ============================================================
   LANDING PAGE (HOME)
   ============================================================ */
.container { max-width: 1000px; margin: 0 auto; padding: 2rem; }
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border-color);
}
.logo-area { display: flex; align-items: center; gap: 1rem; }
.logo-area img { width: 40px; height: 40px; border-radius: 8px; }
.logo-area h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: 1px; color: var(--text-main); }
.nav-links { display: flex; gap: 1rem; align-items: center; }
.hero { text-align: center; margin: 4rem 0; }
.hero h2 { font-size: 2.5rem; margin-bottom: 1rem; font-weight: 700; color: var(--text-main); }
.hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.video-section { margin: 4rem auto; max-width: 800px; text-align: center; }
.video-section h3 { font-size: 1.8rem; margin-bottom: 1.5rem; font-weight: 700; color: var(--text-main); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.video-container {
    position: relative; padding-bottom: 56.25%; /* 16:9 Aspect Ratio */ height: 0; overflow: hidden;
    border-radius: var(--radius-lg); border: 1px solid var(--border-color); box-shadow: var(--shadow-modal);
    background: #000;
}
.video-container iframe, .video-container video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 4rem; }
.feature-card {
    background: var(--surface-color); padding: 1.5rem; border-radius: var(--radius-lg);
    border: 1px solid var(--border-color); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); }
.feature-card i { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 1rem; display: block; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-main); }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.coming-soon { margin-top: 4rem; background: var(--info-bg); border: 1px dashed var(--primary-color); padding: 2rem; border-radius: var(--radius-lg); text-align: center; }
.coming-soon h3 { color: var(--primary-color); margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.coming-soon p { color: var(--text-muted); }
.site-footer { margin-top: 6rem; padding-top: 2rem; border-top: 1px solid var(--border-color); text-align: center; color: var(--text-muted); font-size: 0.9rem; padding-bottom: 2rem; }

/* ============================================================
   LOGIN & REGISTRO (SPLIT SCREEN)
   ============================================================ */
.login-body {
    min-height: 100vh;
    display: flex;
    background-color: var(--bg-color);
}
.split-left {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
}
.split-left img { max-width: 50%; height: auto; opacity: 0.9; }
.split-right {
    flex: 1.2;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem;
}
.login-box {
    width: 100%; max-width: 400px;
}
.login-box h2 { font-size: 2rem; margin-bottom: 0.5rem; font-weight: 700; color: var(--text-main); }
.login-box p { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.95rem; }
.login-error {
    background: var(--danger-bg); color: var(--danger); padding: 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--danger); margin-bottom: 1.5rem; font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px;
}
.login-success {
    background: var(--success-bg); color: var(--success); padding: 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--success); margin-bottom: 1.5rem; font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px;
}
.btn-login {
    width: 100%; padding: 12px; border-radius: var(--radius-sm); border: none; background: var(--primary-color);
    color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1rem; margin-top: 1rem;
}
.btn-login:hover { background: var(--primary-hover); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); transform: translateY(-1px); }
.extra-links { display: flex; justify-content: space-between; font-size: 0.9rem; margin-top: 1rem; }
.login-footer-text { margin-top: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.login-footer-text a { font-weight: 600; }

@media (max-width: 768px) {
    .login-body { flex-direction: column; }
    .split-left { display: none; }
    .split-right { padding-top: 5rem; align-items: flex-start; }
}

/* ============================================================
   DASHBOARD LAYOUT (SIDEBAR + TOPBAR + MAIN)
   ============================================================ */
.dashboard-body { margin: 0; padding: 0; height: 100vh; overflow: hidden; background: var(--bg-color); }
.dashboard-layout { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width); background: var(--surface-color); border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; height: 100vh; z-index: 10; transition: transform 0.3s ease;
}
.sidebar-brand {
    padding: 1.5rem; border-bottom: 1px solid var(--border-color);
}
.sidebar-brand .brand-text h1 { font-size: 1.25rem; font-weight: 700; color: var(--text-main); margin:0; line-height:1.2; letter-spacing:0.5px; }
.sidebar-brand .brand-text span { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.sidebar-nav { flex: 1; padding: 1.5rem 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.3rem; }
.sidebar-link {
    display: flex; align-items: center; gap: 1rem; padding: 0.8rem 1rem; border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: 0.95rem; font-weight: 500; transition: all 0.15s ease;
}
.sidebar-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-link:hover { background: var(--bg-color); color: var(--text-main); text-decoration: none; }
.sidebar-link.active { background: var(--info-bg); color: var(--primary-color); font-weight: 600; border: 1px solid var(--border-color); }

.sidebar-footer {
    padding: 1.5rem; border-top: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between;
}
.sidebar-user { display: flex; align-items: center; gap: 0.8rem; color: var(--text-main); font-size: 0.9rem; font-weight: 600; }
.sidebar-user i { font-size: 1.5rem; color: var(--text-muted); }
.sidebar-logout { color: var(--danger); font-size: 1.2rem; padding: 0.5rem; border-radius: var(--radius-sm); transition: background 0.2s; }
.sidebar-logout:hover { background: var(--danger-bg); color: var(--danger); }

/* SIDEBAR OVERLAY (MOBILE) */
.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9;
}
.sidebar-overlay.active { display: block; }

/* MAIN AREA & TOPBAR */
.main-area { flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: var(--bg-color); }
.topbar {
    height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 2rem;
    background: var(--surface-color); border-bottom: 1px solid var(--border-color);
}
.topbar-title { font-size: 1.25rem; font-weight: 600; color: var(--text-main); margin: 0; }
.topbar-menu-btn { display: none; background: none; border: none; color: var(--text-main); font-size: 1.4rem; cursor: pointer; }
.topbar-right { display: flex; align-items: center; }

/* CONTENT AREA */
.content-area { flex: 1; padding: 2rem; overflow-y: auto; }
.dash-section { display: none; animation: fadeIn 0.3s ease; }
.dash-section.active { display: block; }

.section-header { margin-bottom: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.section-header h3 { font-size: 1.5rem; font-weight: 600; color: var(--text-main); margin: 0; display: flex; align-items: center; gap: 0.5rem; }

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.85rem; font-weight: 500; color: var(--text-main); }
.input-with-icon { position: relative; }
.input-with-icon i:not(.toggle-pass-btn > i) { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.form-control, input[type="text"], input[type="password"], input[type="email"], input[type="number"], select, textarea {
    width: 100%; padding: 0.8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    background: var(--bg-color); color: var(--text-main); font-size: 0.95rem; font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus, input:focus, select:focus, textarea:focus { border-color: var(--primary-color); outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.input-with-icon .form-control { padding-left: 2.5rem; }

.checkbox-group { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.checkbox-group input { width: auto; cursor: pointer; }
.checkbox-group label { margin-bottom: 0; cursor: pointer; font-size: 0.9rem; }

/* ============================================================
   PASSWORD TOGGLE BUTTON (GLOBAL FIX)
   ============================================================ */
.toggle-pass-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: color 0.2s ease;
    line-height: 1;
}
.toggle-pass-btn:hover {
    color: var(--primary-color);
}

/* Input wrapper for login/register pages */
.input-icon-wrapper {
    position: relative;
}
.input-icon-wrapper i:first-child:not(.toggle-pass-btn i) {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 2;
    pointer-events: none;
}
.input-icon-wrapper input {
    width: 100%;
    padding: 0.8rem 2.8rem 0.8rem 2.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-icon-wrapper input:focus { border-color: var(--primary-color); outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

/* Search bar wrapper */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.search-bar .input-icon-wrapper {
    flex: 1;
    min-width: 250px;
}
.input-icon-left {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-select {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.filter-select:focus { border-color: var(--primary-color); outline: none; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); overflow-x: auto; box-shadow: var(--shadow-subtle);
}
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th, .data-table td { padding: 1rem 1.2rem; border-bottom: 1px solid var(--border-color); }
.data-table th { background: var(--surface-color); color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.2s; }
.data-table tbody tr:hover { background: var(--bg-color); }

.code-snippet {
    background: var(--bg-color); border: 1px solid var(--border-color); padding: 0.3rem 0.6rem;
    border-radius: 4px; font-family: monospace; font-size: 0.85rem; color: var(--primary-color);
}
.action-btn { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 0.3rem; margin-right: 0.5rem; transition: color 0.2s; outline: none; }
.action-btn:hover { color: var(--primary-color); }
.action-btn.danger:hover { color: var(--danger); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-box {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 92%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}
.modal-overlay.active .modal-box {
    transform: scale(1);
}
.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 600;
}
.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover {
    color: var(--text-main);
}
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
    display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: var(--radius-sm);
    color: #fff; font-size: 0.95rem; font-weight: 500; box-shadow: var(--shadow-modal);
    animation: slideInRight 0.3s ease forwards; max-width: 350px; cursor: pointer;
}
.toast:hover { opacity: 0.9; }
.toast.removing { animation: slideOutRight 0.3s ease forwards; }
.toast i { font-size: 1.2rem; }
.toast-success { background: var(--success); border: 1px solid #059669; }
.toast-error { background: var(--danger); border: 1px solid #dc2626; }
.toast-warning { background: var(--warning); border: 1px solid #d97706; }
.toast-info { background: var(--primary-color); border: 1px solid var(--primary-hover); }

/* ============================================================
   MISC & UTILS
   ============================================================ */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop { 0% { opacity: 0; transform: scale(0.95) translateY(10px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes slideInRight { 0% { opacity: 0; transform: translateX(50px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { 0% { opacity: 1; transform: translateX(0); } 100% { opacity: 0; transform: translateX(50px); } }

/* ============================================================
   DASHBOARD CARDS & COMPONENTS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); }
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-main); line-height: 1.2; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.section-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
    margin-bottom: 2rem;
    overflow: hidden;
}
.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.card-header h3, .card-header h4 { font-size: 1.1rem; margin: 0; display: flex; align-items: center; gap: 0.5rem; color: var(--text-main); }
.card-body { padding: 1.5rem; }
.card-description {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.card-description i { color: var(--primary-color); margin-right: 0.3rem; }

/* ============================================================
   FORMS & SETTINGS (Panel buttons fix)
   ============================================================ */
.settings-form {
    max-width: 600px;
}
.settings-form .btn-primary,
.section-card .btn-primary,
.card-body .btn-primary,
form .btn-primary,
button.btn-primary {
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}
.settings-form .btn-primary:hover,
.section-card .btn-primary:hover,
.card-body .btn-primary:hover,
form .btn-primary:hover,
button.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

/* ============================================================
   TABLE UTILS (Badges, Progress Bars, Actions)
   ============================================================ */
.badge-suspended { background: var(--warning-bg); color: var(--warning); }
.badge-expired { background: var(--danger-bg); color: var(--danger); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.duration-value-cell { font-family: monospace; font-size: 0.9rem; }

.btn-group { display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; }
.btn-sm { padding: 0.3rem 0.5rem; border-radius: 4px; border: none; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; color: #fff; outline: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-sm:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm-primary { background: var(--primary-color); }
.btn-sm-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-sm-info { background: #0ea5e9; }
.btn-sm-info:hover:not(:disabled) { background: #0284c7; }
.btn-sm-warning { background: var(--warning); }
.btn-sm-warning:hover:not(:disabled) { background: #d97706; }
.btn-sm-success { background: var(--success); }
.btn-sm-success:hover:not(:disabled) { background: #059669; }
.btn-sm-danger { background: var(--danger); }
.btn-sm-danger:hover:not(:disabled) { background: #dc2626; }

.sha256-display { display: flex; align-items: center; gap: 0.5rem; }
.sha256-text { font-family: monospace; background: var(--bg-color); padding: 0.2rem 0.4rem; border-radius: 4px; border: 1px solid var(--border-color); font-size: 0.85rem; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; color: var(--text-main); }
.btn-copy { background: none; border: none; color: var(--text-muted); cursor: pointer; transition: color 0.2s; padding: 0.2rem; }
.btn-copy:hover { color: var(--primary-color); }
.btn-copy.copied { color: var(--success); }

.device-count { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 500; }
.device-bar { width: 100%; height: 6px; background: var(--border-color); border-radius: 3px; overflow: hidden; }
.device-bar-fill { height: 100%; background: var(--success); border-radius: 3px; transition: width 0.3s; }
.device-bar-fill.warn { background: var(--warning); }
.device-bar-fill.full { background: var(--danger); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-wrapper { display: block; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 0.3rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.pagination .btn-sm { font-size: 0.85rem; padding: 0.4rem 0.8rem; }

/* ============================================================
   ELEMENTOS DINÂMICOS & BADGES
   ============================================================ */
.lifetime-badge {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--info-bg);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}
.time-remaining {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-main);
}
.key-generated-box {
    background: var(--bg-color);
    border: 1px dashed var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    margin-top: 1rem;
}
.generated-key {
    font-family: monospace;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 700;
    word-break: break-all;
    user-select: all;
}
.twofa-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.twofa-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.twofa-status-icon.enabled { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.twofa-status-icon.disabled { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.twofa-qr-container { text-align: center; }
.twofa-qr-container #qrcode { display: flex; justify-content: center; margin: 1rem 0; }
.twofa-secret-display {
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 2px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.6rem;
    border-radius: 6px;
    display: inline-block;
    margin: 0.5rem 0 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: -100%; top: 0; bottom: 0; box-shadow: var(--shadow-modal); }
    .sidebar.open { left: 0; }
    .topbar-menu-btn { display: block; }
    .content-area { padding: 1rem; }
    .section-header h3 { font-size: 1.2rem; }
    .hero h2 { font-size: 1.8rem; }
    .features-grid { grid-template-columns: 1fr; }
    .navbar { flex-direction: column; gap: 1rem; }
    .nav-links { flex-wrap: wrap; justify-content: center; }
}
