@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --painel-bg: #1e293b;
    --painel-text: #f8fafc;
    --cor-primaria: #2563eb;
    --cor-primaria-hover: #1d4ed8;
    --input-border: #e2e8f0;
    --input-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --painel-bg: #020617;
    --painel-text: #f8fafc;
    --cor-primaria: #3b82f6;
    --cor-primaria-hover: #60a5fa;
    --input-border: #334155;
    --input-bg: #1e293b;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* =========================================
   ESTRUTURA DE LOGIN (SPLIT SCREEN PREMIUM)
========================================= */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    padding: 20px; /* Espaço para a borda flutuante */
    box-sizing: border-box;
    background-color: var(--bg-color);
}

.auth-sidebar {
    display: none;
    flex: 1.2;
    position: relative;
    border-radius: 24px; /* Bordas na imagem */
    overflow: hidden;
    background-color: var(--painel-bg);
    background-image: linear-gradient(to bottom right, rgba(15, 23, 42, 0.85), rgba(37, 99, 235, 0.4)), url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.auth-sidebar-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 50px;
    color: white;
    pointer-events: none; /* Deixa o mouse interagir com o canvas atrás */
}

.auth-sidebar-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-sidebar-content p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 450px;
    line-height: 1.6;
}

@media (min-width: 900px) {
    .auth-sidebar { display: block; }
}

.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5%;
}

.auth-form-container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

.auth-form-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.auth-form-container .subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 35px;
    line-height: 1.5;
}

.input-group { margin-bottom: 20px; }

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.input-group input, .input-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background-color: var(--cor-primaria);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--cor-primaria-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    font-size: 0.95rem;
}

.auth-links a {
    color: var(--cor-primaria);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.auth-links a:hover { opacity: 0.8; }

.hidden { display: none !important; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --painel-bg: #1e293b;
    --painel-text: #f8fafc;
    --cor-primaria: #2563eb;
    --cor-primaria-hover: #1d4ed8;
    --input-border: #e2e8f0;
    --input-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --painel-bg: #020617;
    --painel-text: #f8fafc;
    --cor-primaria: #3b82f6;
    --cor-primaria-hover: #60a5fa;
    --input-border: #334155;
    --input-bg: #1e293b;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden; /* Evita scroll horizontal */
}

/* =========================================
   ESTRUTURA DE LOGIN (SPLIT SCREEN PREMIUM)
========================================= */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background-color: var(--bg-color);
}

.auth-sidebar {
    display: none;
    flex: 1.2;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background-color: var(--painel-bg);
    background-image: linear-gradient(to bottom right, rgba(15, 23, 42, 0.85), rgba(37, 99, 235, 0.4)), url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.auth-sidebar-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 50px;
    color: white;
    pointer-events: none;
}

.auth-sidebar-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-sidebar-content p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 450px;
    line-height: 1.6;
}

@media (min-width: 900px) {
    .auth-sidebar { display: block; }
}

.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5%;
}

.auth-form-container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

.auth-form-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.auth-form-container .subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 35px;
    line-height: 1.5;
}

.input-group { margin-bottom: 20px; }

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.input-group input, .input-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background-color: var(--cor-primaria);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--cor-primaria-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    font-size: 0.95rem;
}

.auth-links a {
    color: var(--cor-primaria);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.auth-links a:hover { opacity: 0.8; }

/* =========================================
   MODAIS (POPUPS) - ESTILO ENTERPRISE
========================================= */
.modal-overlay {
    display: none; /* Oculto por padrão */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6); /* Overlay escuro */
    backdrop-filter: blur(8px); /* Efeito Blur Glass */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-color);
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--input-border);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
/* Importando Phosphor Icons via CSS para garantir carregamento */
@import url("https://unpkg.com/@phosphor-icons/web/src/bold/style.css");
@import url("https://unpkg.com/@phosphor-icons/web/src/regular/style.css");

:root {
    /* Cores do Tema Claro (Padrão) */
    --bg-body: #f1f5f9;
    --bg-painel: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-color: #2563eb; /* Azul Royal */
    --accent-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --sidebar-active-bg: rgba(255, 255, 255, 0.1);
    
    /* Variáveis de Controle de Interface (Acessibilidade) */
    --ui-scale: 1;
    --base-font-size: 16px;
}

[data-theme="dark"] {
    --bg-body: #020617;
    --bg-painel: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --border-color: #1e293b;
    --sidebar-bg: #0b1120; /* Quase preto */
    --sidebar-text: #64748b;
    --sidebar-active: #f8fafc;
    --sidebar-active-bg: rgba(59, 130, 246, 0.15);
}

* { box-sizing: border-box; outline: none; }

html {
    font-size: var(--base-font-size);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    overflow: hidden; /* Scroll apenas no conteúdo */
    transform: scale(var(--ui-scale)); /* Zoom do sistema */
    transform-origin: top left;
    width: calc(100% / var(--ui-scale));
    height: calc(100vh / var(--ui-scale));
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

/* Layout Principal */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ===========================
   SIDEBAR (Lateral Premium)
   =========================== */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.05);
    transition: width 0.3s ease;
    z-index: 10;
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.brand-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 12px;
}

.menu-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    margin-top: 20px;
    padding-left: 12px;
    font-weight: 600;
    opacity: 0.6;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--sidebar-text);
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: #fff;
    transform: translateX(4px);
}

.nav-item.active {
    background-color: var(--sidebar-active-bg);
    color: var(--accent-color);
    font-weight: 600;
}

.nav-item i { font-size: 1.2rem; }

/* ===========================
   ÁREA DE CONFIGURAÇÕES (Footer)
   =========================== */
.sidebar-footer {
    background-color: rgba(0,0,0,0.2);
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.user-info h4 { margin: 0; color: white; font-size: 0.9rem; }
.user-info span { font-size: 0.75rem; opacity: 0.7; }

.system-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 botões lado a lado */
    gap: 8px;
}

.control-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 8px;
    height: 36px;
    color: var(--sidebar-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.control-btn:hover { background: var(--accent-color); color: white; }
.control-btn.logout:hover { background: #ef4444; } /* Vermelho no logout */

/* ===========================
   CONTEÚDO PRINCIPAL (Palco)
   =========================== */
.main-content {
    flex: 1;
    background-color: var(--bg-body);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Onde as páginas carregam */
#palco-conteudo {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    opacity: 0; /* Inicia invisível para animação */
    animation: fadeIn 0.4s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
    from { opacity: 0; transform: translateY(10px); }
}

/* Scrollbar Bonita */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(150,150,150,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(150,150,150,0.5); }
