/* 26 TITAN CORE - SYSTEM STYLES */
:root {
  --primary: #ce0000;
  --dark-blue: #000024;
  --light: #ffffff;
  --dark: #000000;
  --glass-dark: rgba(0, 0, 36, 0.3);
  --glass-white: rgba(255, 255, 255, 0.85);
  --font-main: 'Outfit', sans-serif;
  --layout-width: 92%;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); -webkit-font-smoothing: antialiased; overflow-x: hidden; }

.container { width: var(--layout-width); max-width: 1600px; margin: 0 auto; }

/* HEADER BASE */
header {
    position: fixed;
    top: 20px; left: 50%; transform: translateX(-50%);
    width: var(--layout-width); max-width: 1600px;
    height: 80px;
    background: var(--glass-dark);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: white; /* Controls the 9-dot grid via currentColor */
}

.brand-lockup { display: flex; align-items: center; text-decoration: none; }
.brand-lockup img { height: 32px; width: auto; transition: transform 0.3s; }
.brand-suffix { font-size: 1.1rem; font-weight: 600; color: white; margin-left: 12px; letter-spacing: 1px; text-transform: uppercase; }

.nav-center { display: none; gap: 30px; }
.nav-link { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

.nav-right { display: flex; align-items: center; gap: 20px; }
.sys-btn { display: flex; align-items: center; gap: 8px; padding: 10px 25px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.3); color: white; text-decoration: none; font-size: 0.8rem; font-weight: 600; transition: all 0.3s; }
.sys-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }

.sign-out-link { color: rgba(255,255,255,0.4); font-size: 0.7rem; text-decoration: none; text-transform: uppercase; margin-left: 15px; transition: color 0.3s; }
.sign-out-link:hover { color: white; }

/* 9-DOT GRID */
.dot-grid { margin-left: 20px; cursor: pointer; display: grid; grid-template-columns: repeat(3, 4px); gap: 3px; }
.dot-grid div { width: 4px; height: 4px; background: currentColor; border-radius: 50%; transition: background 0.3s; }

/* === SCROLLED STATE (WHITE GLASS) === */
header.scrolled {
    background: var(--glass-white);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    color: var(--dark-blue); /* Inverts 9-dot grid */
}

header.scrolled .brand-suffix { color: var(--dark-blue); }
header.scrolled .nav-link { color: var(--dark-blue); }
header.scrolled .sys-btn { color: var(--dark-blue); border-color: rgba(0,0,0,0.2); }
header.scrolled .sign-out-link { color: rgba(0, 0, 36, 0.5); }
header.scrolled .sign-out-link:hover { color: var(--dark-blue); }

@media (min-width: 992px) { .nav-center { display: flex; } }

/* SYSTEM DRAWER */
.system-drawer { position: fixed; top: 0; right: -400px; width: 350px; height: 100vh; background: rgba(0, 0, 10, 0.95); backdrop-filter: blur(30px); z-index: 2000; transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); border-left: 1px solid rgba(255,255,255,0.1); padding: 40px; }
.system-drawer.active { right: 0; }
.drawer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1999; display: none; }
.drawer-overlay.active { display: block; }

/* DRAWER REFINEMENT */
.app-link { 
    display: flex !important; 
    flex-direction: column !important; 
    align-items: center !important; 
    justify-content: center !important;
    padding: 20px !important;
    border-radius: 15px !important;
}

.app-icon { 
    height: 40px !important; /* Forces the size down */
    width: auto !important;
    margin-bottom: 15px !important;
    display: block !important;
}

.app-name { 
    font-size: 0.7rem !important; 
    color: white !important; 
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 600 !important;
}