
/* =========================================================
   SIAM - IDENTIDAD VISUAL INSTITUCIONAL
   Navegación pública / autenticada / Login
   ========================================================= */

/* ---------- VARIABLES INSTITUCIONALES ---------- */

:root {
    --siam-navy: #17245F;
    --siam-indigo: #24145C;
    --siam-blue: #344A91;
    --siam-accent: #6478C8;
    --siam-bg: #F4F6FA;
    --siam-white: #FFFFFF;
    --siam-border: #E2E8F0;
    --siam-text: #1E293B;
    --siam-muted: #64748B;
    --siam-soft: #94A3B8;
    --siam-success: #16A34A;
    --siam-success-bg: #DCFCE7;
    --siam-info: #0369A1;
    --siam-info-bg: #E0F2FE;
    --siam-danger: #DC2626;
    --siam-sidebar-width: 260px;
    --siam-radius: 8px;
    --siam-shadow: 0 8px 24px rgba(23, 36, 95, 0.08);
}

/* ---------- BASE ---------- */

html, body {
    font-family: 'Segoe UI', 'Segoe UI Variable', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--siam-bg);
    color: var(--siam-text);
    margin: 0;
    min-height: 100%;
}

* {
    box-sizing: border-box;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    background: linear-gradient( 180deg, var(--siam-navy) 0%, var(--siam-indigo) 100% ) !important;
    border-right: 1px solid rgba(255,255,255,0.08);
    width: var(--siam-sidebar-width);
    min-width: var(--siam-sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
}

    .sidebar::-webkit-scrollbar {
        width: 5px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.25);
        border-radius: 10px;
    }

/* ---------- MARCA SIAM ---------- */

.brand-header {
    background: rgba(0,0,0,.15) !important;
    color: white !important;
    font-size: 1.25rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    text-align: center;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

    .brand-header small {
        display: block;
        font-size: .62rem;
        font-weight: 500;
        letter-spacing: 1.3px;
        opacity: .7;
        margin-top: 5px;
    }

/* =========================================================
   SECCIONES DE NAVEGACIÓN
   ========================================================= */

.nav-section-title {
    font-size: .69rem;
    font-weight: 800;
    color: #C7D2FE !important;
    padding: 1.35rem 1.5rem .55rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- ETIQUETAS ---------- */

.badge-requires {
    background-color: rgba(56,189,248,.15);
    color: #7DD3FC;
    font-size: .61rem;
    padding: 3px 7px;
    border-radius: 5px;
    font-weight: 700;
    letter-spacing: .3px;
}

.badge-public {
    background-color: rgba(74,222,128,.15);
    color: #86EFAC;
    font-size: .61rem;
    padding: 3px 7px;
    border-radius: 5px;
    font-weight: 700;
}

/* =========================================================
   OPCIONES DEL MENÚ
   ========================================================= */

.nav-item-custom {
    padding: .22rem 1rem;
}

.nav-link-custom {
    color: #E2E8F0 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .88rem;
    font-weight: 500;
    padding: 10px 13px;
    border-radius: var(--siam-radius);
    transition: all .2s ease;
    position: relative;
}

    .nav-link-custom:hover {
        background-color: rgba(255,255,255,.10) !important;
        color: #FFFFFF !important;
        transform: translateX(2px);
    }

    /* ICONOGRAFÍA */

    .nav-link-custom .oi,
    .nav-link-custom i,
    .nav-link-custom svg {
        font-size: 1rem;
        width: 21px;
        min-width: 21px;
        text-align: center;
        color: #A5B4FC;
    }

    /* OPCIÓN ACTIVA */

    .nav-link-custom.active {
        background-color: rgba(255,255,255,.16) !important;
        color: #FFFFFF !important;
        font-weight: 700;
    }

        .nav-link-custom.active::before {
            content: "";
            position: absolute;
            left: 0;
            top: 20%;
            bottom: 20%;
            width: 3px;
            background-color: #93C5FD;
            border-radius: 0 4px 4px 0;
        }

        .nav-link-custom.active .oi,
        .nav-link-custom.active i {
            color: #FFFFFF;
        }

/* SEPARADOR */

.nav-divider {
    height: 1px;
    background-color: rgba(255,255,255,.14);
    margin: 1rem 1.5rem;
}

/* TEXTO DESHABILITADO */

.text-muted-custom {
    color: #94A3B8;
    font-size: .86rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
}

/* =========================================================
   ÁREA PRINCIPAL
   ========================================================= */

main {
    margin-left: var(--siam-sidebar-width);
    background-color: var(--siam-bg);
    min-height: 100vh;
    transition: margin .2s ease;
}

/* BARRA SUPERIOR */

.top-row {
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background-color: var(--siam-white);
    border-bottom: 1px solid var(--siam-border);
    padding: 0 25px;
    box-shadow: 0 2px 5px rgba(15,23,42,.025);
}

/* CONTENIDO */

.siam-content {
    padding: 25px 28px;
}

/* =========================================================
   LOGIN
   ========================================================= */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 62px);
    padding: 25px;
}

.login-card {
    background: var(--siam-white);
    width: 100%;
    max-width: 430px;
    padding: 45px 40px;
    border-radius: 16px;
    box-shadow: var(--siam-shadow);
    border: 1px solid var(--siam-border);
}

    .login-card h2 {
        text-align: center;
        color: var(--siam-navy) !important;
        font-weight: 800;
        letter-spacing: 1px;
        margin-bottom: 7px;
    }

    .login-card p {
        text-align: center;
        color: var(--siam-muted);
        margin-bottom: 30px;
        font-size: .94rem;
    }

/* IDENTIDAD DEL LOGIN */

.login-brand {
    text-align: center;
    color: var(--siam-navy);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

    .login-brand small {
        display: block;
        color: var(--siam-muted);
        font-size: .65rem;
        letter-spacing: 1.5px;
        font-weight: 600;
    }

/* FORMULARIO */

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        font-size: .87rem;
        color: #334155;
        font-weight: 600;
        margin-bottom: 7px;
        display: block;
    }

    .form-group input {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #CBD5E1;
        border-radius: 8px;
        font-size: .95rem;
        color: var(--siam-text);
        background: #FFFFFF;
        transition: all .2s;
    }

        .form-group input:focus {
            outline: none;
            border-color: var(--siam-blue);
            box-shadow: 0 0 0 3px rgba(52,74,145,.12);
        }

/* BOTÓN LOGIN */

.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient( 110deg, var(--siam-navy), var(--siam-indigo) ) !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: .96rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    margin-top: 10px;
}

    .btn-login:hover {
        background: var(--siam-indigo) !important;
        box-shadow: 0 5px 15px rgba(23,36,95,.2);
        transform: translateY(-1px);
    }

    .btn-login:disabled {
        opacity: .6;
        cursor: not-allowed;
        transform: none;
    }

/* ERRORES */

.error-msg {
    color: var(--siam-danger);
    font-size: .85rem;
    text-align: center;
    margin-top: 15px;
}

/* =========================================================
   ELEMENTOS GENERALES SIAM
   ========================================================= */

.siam-card {
    background: #FFFFFF;
    border: 1px solid var(--siam-border);
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(15,23,42,.035);
    padding: 20px;
}

.siam-section-title {
    color: var(--siam-navy);
    font-size: 1.15rem;
    font-weight: 750;
    margin-bottom: 15px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {

    :root {
        --siam-sidebar-width: 0px;
    }

    .sidebar {
        width: 260px;
        min-width: 260px;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

        .sidebar.show {
            transform: translateX(0);
        }

    main {
        margin-left: 0;
    }

    .top-row {
        padding: 0 15px;
    }

    .siam-content {
        padding: 16px;
    }

    .login-card {
        padding: 35px 25px;
    }
}
