/* --- 🛠️ GLOBAL RESET (Fixes the width overflow issue) --- */
* {
    box-sizing: border-box;
}

:root {
    --bg-dark: #050505;
    --glass: rgba(0, 255, 200, 0.05);
    --glass-border: rgba(0, 255, 200, 0.2);
    --neon: #00ffc8;
    --alert: #ff3366;
    --font-main: 'JetBrains Mono', 'Courier New', monospace;
}

body {
    background: var(--bg-dark);
    color: var(--neon);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden; /* Prevents side-scrolling */
}

/* --- ⚡ COMMAND NOTCH (Refined Shape) --- */
.command-notch {
    position: fixed; /* Fixed to stick to top */
    top: 0; left: 0; width: 100%;
    display: flex; justify-content: center;
    z-index: 999;
    pointer-events: none; /* Lets you click things beside it */
}

.notch-wrapper {
    pointer-events: auto; /* Re-enable clicks for the input */
    display: flex; align-items: center;
    width: 60%; max-width: 500px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid var(--glass-border);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 10px 20px;
    box-shadow: 0 5px 20px rgba(0, 255, 200, 0.1);
    backdrop-filter: blur(10px);
}

.status-indicator {
    font-size: 0.7rem; color: #555; margin-right: 15px; white-space: nowrap;
}

.notch-input {
    background: transparent; border: none;
    color: var(--neon); width: 100%;
    font-family: var(--font-main); font-size: 1rem;
    outline: none; text-transform: uppercase;
}

/* --- ⚓ BOTTOM NAVIGATION (Fixed Anchor) --- */
.bottom-nav {
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%;
    height: 80px; /* Taller for better touch target */
    background: rgba(5, 5, 5, 0.95);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    display: flex; justify-content: space-around; align-items: center;
    z-index: 9999; /* Forces it on top of everything */
    padding-bottom: 10px; /* Safe area for modern phones */
}

.nav-item {
    background: transparent; border: none;
    color: #666; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-family: var(--font-main);
    font-size: 0.7rem; cursor: pointer;
    flex: 1; height: 100%;
    transition: 0.2s;
}

.nav-item.active, .nav-item:hover { color: var(--neon); text-shadow: 0 0 8px var(--neon); }
.nav-icon { font-size: 1.4rem; margin-bottom: 5px; }

/* The Hexagon "Apps" Button */
.center-action { position: relative; top: -25px; } /* Floats it up */
.hex-btn {
    width: 55px; height: 55px;
    background: #000;
    border: 1px solid var(--neon);
    display: flex; align-items: center; justify-content: center;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    font-size: 1.5rem; color: var(--neon);
    box-shadow: 0 0 20px rgba(0, 255, 200, 0.2);
    transition: 0.2s;
}
.hex-btn:hover { background: var(--neon); color: #000; transform: scale(1.1); }

/* --- 📱 VIEWPORT CONTENT --- */
.terminal-container {
    width: 100%; min-height: 100vh;
}

.viewport {
    padding-top: 100px; /* Space for Notch */
    padding-bottom: 120px; /* Space for Bottom Nav */
    padding-left: 20px; padding-right: 20px;
    max-width: 800px; margin: 0 auto;
}

.page-content h1 { margin-top: 0; font-size: 1.5rem; border-bottom: 1px solid #333; padding-bottom: 10px; }
.page-content p { color: #888; line-height: 1.6; }

/* --- 🗄️ DRAWER MODULE --- */
.drawer {
    position: fixed; top: 0; left: -320px;
    width: 300px; height: 100vh;
    background: rgba(10, 15, 15, 0.98);
    border-right: 1px solid var(--neon);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000; padding: 80px 20px;
    box-shadow: 50px 0 100px rgba(0,0,0,0.5);
}
.drawer.open { left: 0; }
.drawer-nav button {
    width: 100%; display: flex; align-items: center;
    background: transparent; border: none;
    border-bottom: 1px solid #222;
    color: #aaa; padding: 20px 10px;
    cursor: pointer; font-family: var(--font-main); font-size: 1rem;
    transition: 0.2s;
}
.drawer-nav button:hover { color: var(--neon); padding-left: 20px; background: rgba(0,255,200,0.05); }

/* --- 🧬 DASHBOARD GRID --- */
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.stat-card { background: rgba(255,255,255,0.03); border: 1px solid #333; padding: 20px; border-radius: 8px; text-align: center; }
.stat-card.highlight { border-color: var(--neon); background: rgba(0,255,200,0.05); }
.stat-card .value { font-size: 2rem; font-weight: bold; color: #fff; }
.stat-card .label { font-size: 0.7rem; color: var(--neon); letter-spacing: 1px; margin-top: 5px; }

/* --- 🔒 LOGIN --- */
.login-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 20000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.security-box { width: 90%; max-width: 320px; padding: 30px; border: 1px solid var(--neon); text-align: center; border-radius: 6px; }
.auth-input { width: 100%; padding: 15px; margin: 20px 0; background: #111; border: 1px solid #333; color: var(--neon); text-align: center; font-size: 1.5rem; outline: none; }
.unlock-btn { width: 100%; padding: 15px; background: var(--neon); border: none; font-weight: bold; cursor: pointer; }
.shake { animation: shake 0.4s ease-in-out; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }