:root {
    /* Tema Claro Premium (Padrão) */
    --color-bg: #f4f6f9;
    --color-card: rgba(255, 255, 255, 0.9);
    --color-text: #2c3e50;
    --color-muted: #7f8c8d;
    --color-border: #e0e6ed;
    --color-accent: #d4af37; /* Dourado */
    --color-accent-hover: #c5a017;
    --card-gradient: linear-gradient(145deg, #ffffff, #f9fafb);
    --sidebar-gradient: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);

    /* Variaveis Login (Inspirado no Solucione) */
    --login-bg-1: #e2e8f0;
    --login-bg-2: #ffffff;
    --login-bg-3: #f8fafc;
    --form-bg: #ffffff;
    --logo-bg: #f8fafc;
    --label-color: #474b57;
    --input-bg: #ffffff;
    --input-border: #ccd1d9;
    --btn-bg: linear-gradient(135deg, #d4af37 0%, #b8962c 100%);
    --btn-shadow: rgba(212, 175, 55, 0.3);
}

body.theme-dark {
    /* Tema Escuro (Preto/Dourado) */
    --color-bg: linear-gradient(135deg, #261f10 0%, #0f0d0a 50%, #000000 100%);
    --color-card: rgba(15, 15, 15, 0.6);
    --color-text: #f3f4f6;
    --color-muted: #9ca3af;
    --color-border: rgba(212, 175, 55, 0.2);
    --color-accent: #d4af37;
    --color-accent-hover: #b8860b;
    --card-gradient: linear-gradient(145deg, rgba(30, 28, 20, 0.8) 0%, rgba(10, 10, 10, 0.95) 100%);
    --sidebar-gradient: linear-gradient(180deg, #1c160a 0%, #050505 100%);
    --shadow-sm: 0 10px 30px rgba(212, 175, 55, 0.08);

    /* Variaveis Login Dark (Mais preto, menos dourado) */
    --login-bg-1: #000000;
    --login-bg-2: #0f0d05; 
    --login-bg-3: #1c1809; 
    --form-bg: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(5, 5, 5, 0.98) 100%);
    --logo-bg: linear-gradient(135deg, rgba(20, 18, 12, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
    --label-color: #d4af37;
    --input-bg: rgba(0, 0, 0, 0.6);
    --input-border: #4a3e20;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--color-bg);
    background-attachment: fixed;
    color: var(--color-text);
    transition: color 0.3s;
}

/* ============================================================
   TELA DE LOGIN (ESTILO SOLUCIONE MULTAS)
   ============================================================ */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
    /* Fundo Animado Respirando */
    background: linear-gradient(-45deg, var(--login-bg-1), var(--login-bg-2), var(--login-bg-3), var(--login-bg-1));
    background-size: 400% 400%;
    animation: breathingBG 12s ease-in-out infinite alternate;
}

@keyframes breathingBG {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Ícones Flutuantes (Tesouras ao fundo) */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}
.floating-icons i {
    position: absolute;
    color: rgba(212, 175, 55, 0.03); /* Muito de leve, 3% de dourado */
    font-size: 30px;
    animation: floatIcon 40s infinite linear;
}
.icon-1 { top: 10%; left: 10%; animation-duration: 35s; font-size: 35px; }
.icon-2 { top: 25%; right: 15%; animation-duration: 45s; animation-direction: reverse; font-size: 25px; }
.icon-3 { bottom: 15%; left: 20%; animation-duration: 50s; font-size: 40px; }
.icon-4 { top: 40%; left: 35%; animation-duration: 40s; font-size: 28px; }
.icon-5 { bottom: 30%; right: 25%; animation-duration: 38s; animation-direction: reverse; font-size: 32px; }
.icon-6 { top: 60%; left: 5%; animation-duration: 42s; font-size: 22px; }
.icon-7 { top: 15%; left: 50%; animation-duration: 55s; animation-direction: reverse; font-size: 38px; }
.icon-8 { bottom: 40%; right: 5%; animation-duration: 48s; font-size: 26px; }
.icon-9 { top: 75%; left: 45%; animation-duration: 35s; font-size: 45px; }
.icon-10 { bottom: 10%; right: 45%; animation-duration: 52s; animation-direction: reverse; font-size: 30px; }
.icon-11 { top: 5%; right: 35%; animation-duration: 39s; font-size: 20px; }
.icon-12 { bottom: 65%; left: 15%; animation-duration: 46s; animation-direction: reverse; font-size: 36px; }
.icon-13 { top: 30%; right: 45%; animation-duration: 41s; font-size: 24px; }
.icon-14 { bottom: 5%; left: 40%; animation-duration: 58s; animation-direction: reverse; font-size: 42px; }
.icon-15 { top: 50%; right: 10%; animation-duration: 44s; font-size: 28px; }

@keyframes floatIcon {
    0% { transform: translateY(0) translateX(0) rotate(0deg); }
    33% { transform: translateY(20px) translateX(15px) rotate(45deg); }
    66% { transform: translateY(-15px) translateX(-10px) rotate(90deg); }
    100% { transform: translateY(0) translateX(0) rotate(360deg); }
}

.login-container {
    display: flex;
    width: 780px;
    height: 440px;
    max-width: 90%;
    background: var(--color-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    border: 1px solid var(--color-border);
    position: relative;
    z-index: 10;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-form-section {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--form-bg);
    transition: background 0.4s ease;
}

.login-form-section h2 {
    color: var(--color-accent);
    margin-bottom: 5px;
    margin-top: 0;
    font-size: 28px;
    font-weight: 800;
}

.login-form-section p.subtitle {
    color: var(--label-color);
    margin-bottom: 30px;
    font-size: 14px;
    font-weight: 400;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    position: absolute;
    top: 15px;
    left: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--label-color);
    transition: all 0.3s ease;
    pointer-events: none;
    background: var(--form-bg);
    padding: 0 4px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--color-text);
    background-color: transparent;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Floating label effect */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -8px;
    left: 12px;
    font-size: 12px;
    color: var(--color-accent);
}

.input-group input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.25);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    background: linear-gradient(135deg, #d4af37 0%, #a67c00 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    margin-top: 10px;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* SEÇÃO DO LOGO */
.logo-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--logo-bg);
    position: relative;
    overflow: hidden;
    border-left: 1px solid var(--color-border);
    transition: background 0.4s ease;
}

.logo-3d-wrapper {
    position: relative;
    text-align: center;
    animation: floatingLogoLogin 8s infinite ease-in-out;
}

.logo-3d-wrapper::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 30%, rgba(212, 175, 55, 0.2) 50%, rgba(255, 255, 255, 0) 70%);
    z-index: 3;
    pointer-events: none;
    animation: shineEffect 5s infinite linear;
}

@keyframes shineEffect {
    0% { left: -150%; }
    15% { left: 150%; }
    100% { left: 150%; }
}

@keyframes floatingLogoLogin {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}



/* BOTÕES MOBILE - Fora do media query ficam invisíveis no desktop */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 900;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    color: var(--color-accent);
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    align-items: center;
    justify-content: center;
}

.mobile-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 22px;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 20px;
}

/* ============================================================
   DASHBOARD E SIDEBAR
   ============================================================ */
.layout-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background: var(--sidebar-gradient);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, background 0.3s ease;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--color-border);
    font-weight: bold;
    color: var(--color-accent);
    font-size: 20px;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 10px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: background-color 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.nav-item i {
    width: 25px;
    color: var(--color-muted);
}

.nav-item:hover, .nav-item.active {
    background-color: var(--color-bg);
}

.nav-item:hover i, .nav-item.active i {
    color: var(--color-accent);
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--color-border);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* ============================================================
   SHORTCUTS / MENU RÁPIDO (DASHBOARD)
   ============================================================ */
.shortcuts-grid {
    display: grid;
    /* Grid 100% responsivo (Mobile-first nativo) */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.shortcut-card {
    background: var(--card-gradient);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 35px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.shortcut-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shortcut-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.12);
}

.shortcut-card:hover::before {
    opacity: 1;
}

.shortcut-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.05);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.shortcut-card:hover .shortcut-icon {
    background: var(--color-accent);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.shortcut-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.shortcut-card p {
    font-size: 13px;
    color: var(--color-muted);
}


@media (max-width: 768px) {
    body.login-page {
        padding: 15px;
    }
    .login-container {
        flex-direction: column;
        height: auto;
        width: 100%;
        max-width: 420px;
    }
    .logo-section {
        flex: 0 0 auto;
        padding: 45px 20px;
        border-left: none;
        border-bottom: 1px solid var(--color-border);
        border-radius: 16px 16px 0 0;
    }
    .logo-3d-wrapper h1 {
        font-size: 58px !important;
    }
    .logo-3d-wrapper p {
        font-size: 13px !important;
        letter-spacing: 6px !important;
    }
    .login-form-section {
        flex: 1;
        padding: 40px 30px;
        justify-content: flex-start;
        border-radius: 0 0 16px 16px;
    }
    .login-form-section h2 {
        font-size: 24px;
    }

    /* DASHBOARD MOBILE RESPONSIVO */
    .layout-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%); /* Escondido por padrão */
        box-shadow: 5px 0 25px rgba(0,0,0,0.8);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(3px);
        z-index: 999;
    }
    
    .sidebar-overlay.open {
        display: block;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-close-btn {
        display: block;
    }
    
    .main-content {
        padding: 80px 15px 20px 15px; /* Espaço pro header no topo no mobile */
        width: 100%;
    }
    
    /* 2 Botoes por coluna no mobile e ajuste de tamanho para caber */
    .shortcuts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .shortcut-card {
        padding: 20px 10px;
    }
    .shortcut-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
        margin-bottom: 12px;
    }
    .shortcut-card h3 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    .shortcut-card p {
        font-size: 11px;
    }
}