/* assets/css/style.css - DOMINUS GESTOR ELITE V7.0 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;600;700;800;900&display=swap');

:root {
    --primary: #8B5CF6;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary: #10B981;
    --secondary-glow: rgba(16, 185, 129, 0.2);
    --bg-deep: #020617;
    --bg-card: rgba(15, 23, 42, 0.85);
    --bg-sidebar: #0F172A;
    --border-premium: rgba(255, 255, 255, 0.05);
    --text-main: #F8FAFC;
    --text-dim: #94A3B8;
    --glass-blur: blur(25px);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color-scheme: dark;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.04) 0%, transparent 45%),
        #020617;
}

/* Sidebar V6 Premium */
.sidebar {
    background: #0F172A !important;
    border-right: 1px solid var(--border-premium) !important;
    height: 100vh;
    padding: 30px 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.sidebar .nav-link {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 12px 18px;
    margin-bottom: 6px;
    border-radius: 14px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.sidebar .nav-link:hover {
    background: rgba(139, 92, 246, 0.05);
    color: white;
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
    color: var(--primary);
    font-weight: 700;
    border-right: 3px solid var(--primary);
}

/* Cards & Bento Grid */
.bento-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.glass,
.card,
.card-elite {
    background: var(--bg-card) !important;
    backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--border-premium) !important;
    border-radius: 24px !important;
    transition: var(--transition-smooth);
    color: var(--text-main) !important;
}

.card-premium {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.8)) !important;
    border: 1px solid var(--border-premium) !important;
    border-radius: 28px !important;
    padding: 24px !important;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.card-premium:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-premium .stat-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
    display: block;
}

.card-premium .stat-value {
    font-size: 2.2rem;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    color: white;
}

.card-premium .stat-icon {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 4rem;
    opacity: 0.05;
    color: white;
}

/* UI Elements */
.btn-premium {
    background: linear-gradient(135deg, var(--primary), #7C3AED) !important;
    color: white !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 14px 24px !important;
    font-weight: 700 !important;
    transition: var(--transition-smooth) !important;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2) !important;
}

.btn-premium:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4) !important;
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-premium) !important;
    border-radius: 14px !important;
    color: white !important;
    padding: 12px 18px !important;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 16px 12px !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.2) !important;
}

.animate-in {
    animation: fadeInUp 0.5s cubic-bezier(0.2, 1, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Table Clean Fix */
.table {
    color: var(--text-main) !important;
    border-color: var(--border-premium) !important;
}

.table tr,
.table td,
.table thead,
.table th {
    background: transparent !important;
    background-color: transparent !important;
    border-color: var(--border-premium) !important;
    color: inherit !important;
}

.table thead th {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 2px solid var(--border-premium) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 15px !important;
}

/* Autenticação Elite V7 (Centralização Absoluta) */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: transparent;
}

.login-box {
    width: 100%;
    max-width: 480px;
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--border-premium) !important;
    border-radius: 32px !important;
    padding: 50px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

/* Modais Glassmorphism Elite */
.modal-content {
    background: var(--bg-card) !important;
    backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--border-premium) !important;
    border-radius: 28px !important;
    color: var(--text-main) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 25px !important;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 20px 25px !important;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

/* Modo Privacidade (Blur) */
.privacy-value {
    transition: all 0.3s ease;
}

.privacy-value.blurred {
    filter: blur(8px) grayscale(100%);
    opacity: 0.6;
    user-select: none;
    pointer-events: none;
}

/* Ajustes Finais de UI */
.form-label {
    color: var(--text-dim) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* FIX V7.1: NUCLEAR DARK DROPDOWNS */
select,
.form-select,
option {
    background-color: #0F172A !important;
    color: #F8FAFC !important;
    color-scheme: dark !important;
}

/* Chrome/Edge Specific Fix */
select::-webkit-listbox,
option::-webkit-listbox {
    background-color: #0F172A !important;
    color: white !important;
}

/* Toast System Premium */
#toast-container {
    z-index: 10000;
}

.toast {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden;
}

.toast-header {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: var(--text-main) !important;
    padding: 12px 18px !important;
}

.toast-body {
    padding: 15px 18px !important;
    color: var(--text-dim) !important;
    font-size: 0.85rem;
}

.toast.success {
    border-left: 4px solid var(--secondary) !important;
}

.toast.error {
    border-left: 4px solid #ef4444 !important;
}

.toast.warning {
    border-left: 4px solid #f59e0b !important;
}

.toast.info {
    border-left: 4px solid var(--primary) !important;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Mobile Responsiveness & Bento Grid Fix */
@media (max-width: 991px) {
    .bento-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .sidebar {
        display: none !important;
    }

    main {
        padding: 15px !important;
        margin-top: 10px;
    }

    .bento-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card-premium {
        padding: 20px !important;
    }

    .card-premium .stat-value {
        font-size: 1.8rem;
    }

    .login-box {
        padding: 30px 20px !important;
        border-radius: 24px !important;
    }

    /* Mobile Menu Style Enhancements */
    #mobileMenu {
        border-radius: 0 0 24px 24px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        background: #0F172A !important;
    }

    #mobileMenu .nav-link {
        padding: 12px 20px !important;
        border-radius: 12px;
        margin-bottom: 4px;
        font-weight: 600;
        font-size: 0.9rem;
    }

    #mobileMenu .nav-link:hover,
    #mobileMenu .nav-link.active {
        background: rgba(139, 92, 246, 0.1);
        color: var(--primary) !important;
    }
}