/* ==========================================================
   IMPORTAÇÃO DE TIPOGRAFIA PREMIUM (Google Fonts - Inter)
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================
   VARIÁVEIS SEMÂNTICAS E TEMAS (Importados de temas.txt)
   ========================================================== */
:root {
    /* Fallback padrão de Cores de Fábrica (Classic Light) caso a injeção falhe */
    --theme-background: #F5F7FA;
    --theme-surface: #FFFFFF;
    --theme-surface-alt: #F1F5F9;
    --theme-border: #D9E2EC;
    --theme-text: #1E293B;
    --theme-text-secondary: #64748B;
    --theme-success: #2E7D32;
    --theme-warning: #C77700;
    --theme-danger: #C62828;
    --theme-info: #0284C7;
    --theme-disabled: #94A3B8;
    --color-primary: #2563EB;
    --color-primary-hover: #1D4ED8;

    /* Fundo */
    --background: var(--theme-background);
    --surface: var(--theme-surface);
    --surface-alt: var(--theme-surface-alt);

    /* Texto */
    --text: var(--theme-text);
    --text-secondary: var(--theme-text-secondary);

    /* Bordas */
    --border: var(--theme-border);

    /* Cor principal */
    --primary: var(--color-primary);
    --primary-hover: var(--color-primary-hover);

    /* Estados */
    --success: var(--theme-success);
    --warning: var(--theme-warning);
    --danger: var(--theme-danger);
    --info: var(--theme-info);

    /* Outros */
    --disabled: var(--theme-disabled);
    
    /* Camadas Visuais (Z-Index Map) */
    --z-menu-overlay: 1090;
    --z-menu: 1100;
    --z-modal-comentario: 1200;
    --z-lightbox-imagem: 1300;
    --z-loading-global: 999999;
}

/* Fallback do Tema Claro (Visitantes) */
:root[data-theme="light"] {
    --theme-background: #F5F7FA;
    --theme-surface: #FFFFFF;
    --theme-surface-alt: #F1F5F9;
    --theme-border: #D9E2EC;
    --theme-text: #1E293B;
    --theme-text-secondary: #64748B;
    --theme-success: #2E7D32;
    --theme-warning: #C77700;
    --theme-danger: #C62828;
    --theme-info: #0284C7;
    --theme-disabled: #94A3B8;
    --color-primary: #2563EB;
    --color-primary-hover: #1D4ED8;
}

/* Fallback do Tema Escuro (Visitantes) */
:root[data-theme="dark"] {
    --theme-background: #111827;
    --theme-surface: #1F2937;
    --theme-surface-alt: #1F2937;
    --theme-border: #374151;
    --theme-text: #F3F4F6;
    --theme-text-secondary: #9CA3AF;
    --theme-success: #4ADE80;
    --theme-warning: #FBBF24;
    --theme-danger: #F87171;
    --theme-info: #38BDF8;
    --theme-disabled: #4B5563;
    --color-primary: #3B82F6;
    --color-primary-hover: #60A5FA;
}

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

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Transição suave de cores ao alternar o tema */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ==========================================================
   ESTILOS TIPOGRÁFICOS GLOBAIS
   ========================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5em;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* ==========================================================
   BARRA DE ROLAGEM ESTILIZADA (SCROLLBAR)
   ========================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==========================================================
   UTILITÁRIOS E CLASSES COMUNS (Botões básicos)
   ========================================================== */
.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background-color: var(--disabled);
    cursor: not-allowed;
    transform: none;
}
/* ==========================================================
   6. TELA DE LOADING GLOBAL E PORTÁTIL
   ========================================================== */
#idDivLoading {
    display: flex; 
    position: fixed;
    top: 0; 
    left: 0;
    width: 100vw;  
    height: 100vh; 
    z-index: var(--z-loading-global); /* Bloqueador absoluto de topo */
    background-color: var(--background-loading, rgba(245, 247, 250, 0.85)); 
    align-items: center; 
    justify-content: center;
    pointer-events: auto; 
    transition: opacity 0.3s ease;
}

/* Variação de fundo para o Tema Escuro */
:root[data-theme="dark"] {
    --background-loading: rgba(17, 24, 39, 0.85);
}

.loading-content {
    text-align: center;
    color: var(--primary); /* Usa a cor primária dinâmica do sistema */
    font-weight: 600;
}

.spinner {
    width: 50px; 
    height: 50px;
    border: 5px solid var(--border); /* Cor de trilha cinza claro do tema */
    border-top: 5px solid var(--primary); /* Cor ativa azul do tema */
    border-radius: 50%;
    margin: 0 auto 12px auto;
    animation: spin 1s linear infinite;
}

.loading-img {
    max-width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 12px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================
   ESTILOS PARA O LOGOTIPO SVG DINÂMICO (Branding Dinâmico)
   ========================================================== */
.logo-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
    transition: color 0.3s ease;
}
.logo-wrapper .logo-icon,
.signup-logo .logo-icon,
.auth-public-logo .logo-icon {
    width: 68px;
    height: 68px;
}