/**
 * ENTROU.VIP - TEMA PREMIUM CLEAN
 * Design Moderno, Minimalista, Dark & Gold
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================================
   VARIÁVEIS CSS
   ======================================== */
:root {
    /* Cores Principais */
    --gold: #d4a853;
    --gold-light: #e8c278;
    --gold-dark: #b8923f;
    --gold-glow: rgba(212, 168, 83, 0.25);
    --gold-subtle: rgba(212, 168, 83, 0.08);

    /* Status */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);

    /* Backgrounds */
    --bg-body: #0a0a0a;
    --bg-sidebar: #0d0d0d;
    --bg-card: #111111;
    --bg-card-hover: #161616;
    --bg-input: #0d0d0d;
    --bg-header: rgba(10, 10, 10, 0.95);

    /* Bordas */
    --border: #1f1f1f;
    --border-light: #2a2a2a;
    --border-gold: rgba(212, 168, 83, 0.2);

    /* Textos */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    /* Layout */
    --sidebar-width: 240px;
    --header-height: 60px;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;

    /* Sombras */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 4px 20px rgba(212, 168, 83, 0.15);

    /* Transições */
    --transition: all 0.2s ease;
}

/* ========================================
   RESET
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

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

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 16px;
}

.sidebar-brand-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
}

/* Menu */
.sidebar-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-section-title {
    padding: 16px 20px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.sidebar-menu .nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-menu .nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-menu .nav-link.active {
    color: var(--gold);
    background: var(--gold-subtle);
    border-left-color: var(--gold);
}

/* User */
.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 600;
    font-size: 13px;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   HEADER
   ======================================== */
.main-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 999;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title i {
    color: var(--gold);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ========================================
   CONTENT
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
}

.content-wrapper {
    padding: 24px;
    max-width: 1400px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-light);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--gold);
}

.card-body {
    padding: 20px;
}

/* ========================================
   STAT CARDS
   ======================================== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* ========================================
   BOTÕES
   ======================================== */
.btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
    color: #000;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.btn-outline-primary {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}

.btn-outline-primary:hover {
    background: var(--gold);
    color: #000;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 14px;
}

/* ========================================
   FORMULÁRIOS
   ======================================== */
.form-control,
.form-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-subtle);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

/* ========================================
   TABELAS - RESPONSIVAS
   ======================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    min-width: 600px;
}

.table thead th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--gold);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-success,
.badge-online,
.badge-active,
.badge-ativo {
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning,
.badge-pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-danger,
.badge-offline,
.badge-inactive {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-info,
.badge-primary {
    background: var(--info-bg);
    color: var(--info);
}

.badge-gold,
.badge-vip {
    background: var(--gold-subtle);
    color: var(--gold);
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-left: 3px solid var(--success);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-left: 3px solid var(--danger);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-left: 3px solid var(--warning);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border-left: 3px solid var(--info);
}

/* ========================================
   MODALS
   ======================================== */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.btn-close {
    filter: invert(1);
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 0.8;
}

/* ========================================
   DROPDOWN
   ======================================== */
.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    box-shadow: var(--shadow);
}

.dropdown-item {
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--gold-subtle);
    color: var(--gold);
}

.dropdown-item.active {
    background: var(--gold-subtle);
    color: var(--gold);
}

.dropdown-item i {
    margin-right: 8px;
}

/* ========================================
   WELCOME BANNER
   ======================================== */
.welcome-banner, .welcome-section {
    background: linear-gradient(135deg, var(--gold-subtle), rgba(0,0,0,0));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.welcome-banner, .welcome-section h1,
.welcome-banner, .welcome-section .h4 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-banner, .welcome-section p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* ========================================
   PLAN CARD
   ======================================== */
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.plan-card.current {
    border-color: var(--gold);
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    background: var(--gold-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    color: var(--gold);
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================
   LOADING
   ======================================== */
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   UTILITIES
   ======================================== */
.text-gold { color: var(--gold) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--gold) !important; }

.bg-gold { background: var(--gold) !important; }
.bg-primary { background: var(--gold) !important; }
.bg-success { background: var(--success) !important; }
.bg-danger { background: var(--danger) !important; }

.border-gold { border-color: var(--border-gold) !important; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

::selection {
    background: var(--gold);
    color: #000;
}

/* ========================================
   MOBILE OVERLAY
   ======================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.show {
    display: block;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 991px) {
    :root {
        --sidebar-width: 260px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .main-header {
        left: 0;
        padding: 0 16px;
    }

    .content-wrapper {
        padding: 20px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 16px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 11px;
    }

    .card-body {
        padding: 16px;
    }

    .welcome-banner, .welcome-section {
        padding: 16px;
    }

    .welcome-banner, .welcome-section h1,
    .welcome-banner, .welcome-section .h4 {
        font-size: 18px;
    }

    .header-title {
        font-size: 14px;
    }

    .header-title i {
        display: none;
    }

    /* Tabelas no mobile */
    .table-responsive {
        margin: 0 -16px;
        padding: 0 16px;
        border-radius: 0;
    }

    .table {
        min-width: 500px;
    }

    .table thead th,
    .table tbody td {
        padding: 10px 12px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .content-wrapper {
        padding: 12px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 16px 12px;
    }

    .stat-content {
        width: 100%;
    }

    .btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .header-actions .btn span {
        display: none;
    }

    .row.g-3, .row.g-4 {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }
}

/* ========================================
   TOASTIFY OVERRIDE
   ======================================== */
.toastify {
    background: var(--bg-card) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow) !important;
}

/* ========================================
   CHART.JS OVERRIDE
   ======================================== */
.chart-container {
    position: relative;
    width: 100%;
}

/* ========================================
   CUSTOM COMPONENTS
   ======================================== */

/* Bot Card */
.bot-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.bot-card:hover {
    border-color: var(--border-gold);
}

/* Progress */
.progress {
    height: 6px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 10px;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 600;
    font-size: 14px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 18px;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* Glass effect */
.glass {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
}

/* Row fix */
.row {
    margin-left: 0;
    margin-right: 0;
}

.row > * {
    max-width: 100%;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
}

.main-content {
    overflow-x: hidden;
}
