/* ==========================================================================
   STYLE-GLOBAL.CSS (Shell Infrastructure)
   Responsável APENAS por: Navbar, Background, Reset Global e Estrutura Macro.
   Design de Componentes: Vide drr-standards.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   VARIÁVEIS COMPARTILHADAS (Sintonizadas com drr-standards.css v2026.2)
   -------------------------------------------------------------------------- */
:root {
    /* Cores de Identidade (DRR Gold) */
    --gold: #DAA520;       /* Compatibilidade legada com navbar.js */
    --gold-light: #FFD700;
    --gold-dark: #B8860B;
    
    /* Backgrounds */
    --bg-dark: #0a0905;
    --glass-bg: rgba(255, 255, 255, 0.03); /* Usado no navbar */
    --glass-border: 1px solid rgba(218, 165, 32, 0.2);
    --glass-hover: rgba(218, 165, 32, 0.08);

    /* Texto */
    --text-primary: #fdfaf0;
    --text-secondary: rgba(253, 250, 240, 0.7);
    --text-muted: rgba(253, 250, 240, 0.4);

    /* Layout */
    --transition-fast: 0.2s ease;
    --border-radius: 20px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* --------------------------------------------------------------------------
   INFRAESTRUTURA DE FUNDO (Animated Background)
   Injetado dinamicamente pelo navbar.js
   -------------------------------------------------------------------------- */
.background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2;
    background: linear-gradient(135deg, #14120a 0%, #1a180f 50%, #242114 100%);
}

.background::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(120, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(0, 200, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(255, 0, 200, 0.1) 0%, transparent 50%);
}

.orb {
    position: fixed; border-radius: 50%; filter: blur(80px); opacity: 0.4; z-index: -1;
    animation: float 20s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: var(--gold-dark); top: 10%; left: 10%; }
.orb-2 { width: 350px; height: 350px; background: var(--gold); top: 60%; right: 10%; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: #FFBF00; bottom: 10%; left: 30%; animation-delay: -10s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --------------------------------------------------------------------------
   NAVBAR (HEADER FIXO)
   -------------------------------------------------------------------------- */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 30px;
    background: rgba(10, 9, 5, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--glass-border);
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header-left { display: flex; align-items: center; gap: 15px; width: 350px; white-space: nowrap; }

.system-logo {
    font-size: 24px; font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    line-height: 1; display: flex; align-items: center;
}

.system-subtitle {
    font-size: 13px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1px;
    border-left: var(--glass-border); padding-left: 12px;
    font-weight: 600; line-height: 1; height: 24px; display: flex; align-items: center;
}

/* Navegação Central */
.nav-center { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: center; }

.nav-link-item {
    padding: 10px 20px; color: var(--text-secondary);
    font-size: 15px; font-weight: 500; border-radius: 50px;
    display: flex; align-items: center; gap: 8px;
    border: 1px solid transparent; cursor: pointer; position: relative;
    transition: var(--transition-fast);
}

.nav-link-item:hover { background: rgba(255,255,255,0.05); color: var(--gold-light); border-color: rgba(218,165,32,0.2); }
.nav-link-item.active { background: rgba(218,165,32,0.15); color: var(--gold-light); border-color: rgba(218,165,32,0.3); }
.nav-link-item svg { width: 18px; height: 18px; fill: currentColor; opacity: 0.8; }

/* Dropdown de Módulos */
.nav-module-dropdown {
    position: absolute; top: calc(100% + 10px); left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(15, 12, 5, 0.95); backdrop-filter: blur(20px);
    border: var(--glass-border); border-radius: 16px;
    min-width: 240px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0; visibility: hidden; transition: var(--transition-fast);
    z-index: 1000; padding: 8px; text-align: left;
}

.nav-link-item:hover .nav-module-dropdown, .nav-module-dropdown:hover {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}

.dropdown-group { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.dropdown-group:last-child { border-bottom: none; }
.group-title { display: block; padding: 5px 12px; font-size: 11px; text-transform: uppercase; color: var(--gold); font-weight: 700; opacity: 0.8; }

/* Header Right (Perfil) */
.header-right { display: flex; justify-content: flex-end; width: 350px; white-space: nowrap; }

.user-profile-button {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 20px 8px 8px;
    background: rgba(255,255,255,0.03); border: var(--glass-border); border-radius: 50px;
    cursor: pointer; transition: var(--transition-fast);
}
.user-profile-button:hover { background: var(--glass-hover); border-color: var(--gold-light); }

.user-avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 600; font-size: 14px;
}
.user-info { flex: 1; text-align: left; line-height: 1.2; padding-right: 5px; }
.user-name { font-size: 15px; font-weight: 600; color: var(--text-primary); display: block; }
.user-role { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; }

/* Dropdown Usuário */
.dropdown-menu {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: rgba(15, 12, 5, 0.95); backdrop-filter: blur(20px);
    border: var(--glass-border); border-radius: 16px; min-width: 200px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: var(--transition-fast); padding: 6px; z-index: 1000;
}
.user-dropdown.active .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-item {
    padding: 10px 14px; color: var(--text-secondary);
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; transition: var(--transition-fast); border-radius: 10px;
    font-size: 13px; font-weight: 500; width: 100%; background: transparent; border: none; font-family: 'Outfit', sans-serif;
}
.dropdown-item:hover { background: var(--glass-hover); color: var(--gold-light); }

.logout-btn {
    background: linear-gradient(135deg, var(--gold), var(--amber));
    color: white; padding: 8px 16px; border: none; border-radius: 20px;
    font-weight: 600; cursor: pointer; font-size: 12px; margin-left: 10px;
}

/* --------------------------------------------------------------------------
   FOOTER GLOBAL
   -------------------------------------------------------------------------- */
.footer {
    width: 100%; text-align: center; padding: 40px 20px;
    color: var(--text-muted); font-size: 12px; margin-top: auto;
}
.footer p { margin: 4px 0; }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .nav-link-item span { display: none; }
    .header-left, .header-right { width: auto; }
}
@media (max-width: 768px) {
    .navbar { padding: 10px 15px; }
    .nav-center { display: none; }
    .system-subtitle { display: none; }
}
