:root {
    /* Paleta "Terminal High-End" */
    --bg-dark: #0a0a0c;       /* Casi negro */
    --bg-panel: #16161a;      /* Gris muy oscuro para tarjetas */
    --accent: #00ff9d;        /* Verde cian técnico */
    --accent-dim: rgba(0, 255, 157, 0.1);
    --text-main: #e2e8f0;     /* Blanco suave */
    --text-muted: #64748b;    /* Gris texto secundario */
    --font-stack: 'Inter', 'Segoe UI', sans-serif;
    --mono-stack: 'IBM Plex Mono', monospace;
}

/* RESET & BASE */
* { box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-stack);
    margin: 0;
    height: 100vh; /* Fuerza altura completa */
    overflow: hidden; /* Evita scroll en el body */
}

/* APP SHELL GRID */
#app-shell {
    display: none; /* Se mantendrá así, pero JS lo cambiará a 'grid' */
    height: 100vh;
    grid-template-columns: 260px 1fr;
    grid-template-rows: 60px 1fr;
    grid-template-areas: 
        "sidebar header"
        "sidebar content";
}

/* 1. SIDEBAR */
.app-sidebar {
    grid-area: sidebar;
    background-color: var(--bg-dark);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.brand {
    font-family: var(--mono-stack);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

/* Navegación */
.nav-item {
    display: block;
    padding: 10px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(255,255,255,0.03);
    color: var(--text-main);
}

.nav-item.active {
    border-left: 2px solid var(--accent);
}

/* User Profile (Bottom Sidebar) */
.user-profile {
    margin-top: auto; /* Empuja al fondo */
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background: #333;
    border-radius: 50%;
}

.user-info .role {
    display: block;
    font-size: 0.7rem;
    color: var(--accent);
    font-family: var(--mono-stack);
}

/* 2. HEADER */
.app-header {
    grid-area: header;
    background-color: rgba(22, 22, 26, 0.5); /* Semi transparente */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.current-path {
    font-family: var(--mono-stack);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.system-metrics {
    display: flex;
    gap: 20px;
    font-family: var(--mono-stack);
    font-size: 0.75rem;
    align-items: center;
}

.status-light {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

/* 3. CONTENT AREA */
.app-content {
    grid-area: content;
    background-color: var(--bg-panel);
    overflow-y: auto; /* SCROLL SOLO AQUÍ */
    padding: 2rem;
    position: relative;
}

/* Boot Screen Styles (Overlay) */
#boot-sequence {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    z-index: 9999; /* Muy alto */
    display: flex;
    flex-direction: column; /* Para que los párrafos se apilen */
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease; /* Para el fade out */
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    #app-shell {
        grid-template-columns: 1fr; /* Una sola columna */
        grid-template-areas: 
            "header"
            "content";
    }

    .app-sidebar {
        position: fixed;
        left: -100%; /* Oculto por defecto */
        top: 0;
        bottom: 0;
        z-index: 1000;
        width: 260px;
        transition: left 0.3s ease;
        background: var(--bg-dark);
    }

    .app-sidebar.active {
        left: 0;
    }

    /* Mostrar un botón de menú en el header solo en móvil */
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: 1px solid var(--accent);
        color: var(--accent);
        padding: 5px 10px;
        font-family: var(--mono-stack);
        cursor: pointer;
    }
}

.mobile-menu-toggle { display: none; } /* Oculto en desktop */

/* Estilos extra para las nuevas tarjetas */
.identity-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 2rem;
    border-radius: 8px;
}
.accent-text { color: var(--accent); font-family: var(--mono-stack); }