:root {
    --primary-bg: #0f172a;
    --primary-blue: #0284c7;
    --accent-blue: #2563eb;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-sidebar: #0b111e;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    display: flex;
    background-color: #f8fafc;
}

/* --- Barra Lateral (Desktop) --- */
aside {
    width: 290px;
    background-color: var(--bg-sidebar);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    padding: 25px 15px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1050;
    transition: transform 0.3s ease-in-out;
}

.brand {
    font-size: 15pt;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.brand:hover {
    opacity: 0.85;
}

/* --- Logo de Soma IA en la Barra Lateral --- */
.soma-logo-container {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.05);
}

.soma-logo-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    border-radius: 50%;
    display: block !important;
}

aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

aside ul li {
    margin-bottom: 8px;
}

aside ul li a {
    display: block;
    padding: 11px 14px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

aside ul li a:hover {
    background-color: #1e293b;
    color: #ffffff;
    padding-left: 18px;
}

/* Badge de Construcción / Prox */
.badge-prox {
    background-color: #1e293b;
    color: #64748b;
    font-size: 7.5pt;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    margin-left: auto;
    display: inline-block;
}

/* Marca Corporativa en el fondo del Menú */
.sidebar-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    margin-top: auto;
    font-size: 0.95rem;
    color: #64748b;
    font-weight: normal;
    letter-spacing: 0.025em;
}

/* --- Contenido Principal --- */
main {
    margin-left: 290px;
    padding: 40px 50px;
    max-width: 1000px;
    width: 100%;
}

header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 40px;
}

header h1 {
    font-size: 24pt;
    color: var(--primary-bg);
    margin: 0 0 10px 0;
}

.meta-info {
    font-size: 10.5pt;
    color: var(--text-muted);
}

h2 {
    font-size: 16pt;
    color: var(--primary-bg);
    border-left: 4px solid var(--primary-blue);
    padding-left: 12px;
    margin-top: 45px;
    margin-bottom: 20px;
    scroll-margin-top: 20px;
}

h3 {
    font-size: 12pt;
    color: var(--primary-blue);
    margin-top: 25px;
    margin-bottom: 12px;
}

p {
    margin: 0 0 16px 0;
    text-align: justify;
}

ul, ol {
    margin: 0 0 20px 0;
    padding-left: 24px;
}

li {
    margin-bottom: 10px;
}

.step-box {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.step-title {
    font-weight: bold;
    color: var(--primary-bg);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Bloque Alerta / En Construcción */
.construction-zone {
    background-color: #fef3c7;
    border-left: 4px solid #d97706;
    color: #92400e;
    padding: 15px;
    border-radius: 0 6px 6px 0;
    margin: 25px 0;
}

.construction-title {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Botón Hamburguesa Flotante para Móvil --- */
.mobile-hamburger-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1100;
    background-color: var(--primary-bg);
    color: #ffffff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Overlay/Fondo Oscuro para Cerrar Menú en Móvil */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

/* --- Estilos Responsivos --- */
@media (max-width: 900px) {
    body {
        display: block;
    }

    .mobile-hamburger-btn {
        display: flex; /* Muestra el botón de hamburguesa en pantallas pequeñas */
    }

    aside {
        transform: translateX(-100%); /* Oculta la barra lateral por defecto */
        width: 270px;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
    }

    /* Clase que activa el JS al presionar la hamburguesa */
    aside.active {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    main {
        margin-left: 0;
        padding: 25px 20px;
    }
}