﻿.app-shell {
    --azul-noelie: #002060;
    --azul-profundo: #00143d;
    --azul-medio: #00348d;
    --naranja-noelie: #FCA522;
    --rojo-noelie: #E5232E;
    --bg-page: #F4F6FA;
    --bg-header: rgba(255, 255, 255, 0.94);
    --bg-card: #FFFFFF;
    --texto-principal: #1C2434;
    --texto-secundario: #667085;
    --gris-borde: #E5E9F0;
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: var(--bg-page);
    color: var(--texto-principal);
    font-family: "Segoe UI", Arial, sans-serif;
    transition: background 0.25s ease, color 0.25s ease;
}


    /* MODO OSCURO */

    .app-shell.dark {
        --bg-page: #0B1220;
        --bg-header: rgba(15, 27, 48, 0.95);
        --bg-card: #111D32;
        --texto-principal: #F4F7FC;
        --texto-secundario: #AAB6CA;
        --gris-borde: #263650;
    }


/* ============================================= */
/* SIDEBAR                                       */
/* ============================================= */

.sidebar {
    width: 270px;
    min-width: 270px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    color: white;
    background: radial-gradient( circle at 10% 10%, rgba(252, 165, 34, 0.14), transparent 28% ), linear-gradient( 180deg, #00143d 0%, #002060 50%, #00153f 100% );
    box-shadow: 8px 0 30px rgba(0, 20, 61, 0.15);
    transition: width 0.28s ease, min-width 0.28s ease, transform 0.28s ease;
    z-index: 50;
}

    .sidebar,
    .sidebar * {
        box-sizing: border-box;
    }

.sidebar--oculto {
    width: 0;
    min-width: 0;
    overflow: hidden;
}


/* ============================================= */
/* HEADER SIDEBAR                                */
/* ============================================= */

.sidebar-header {
    min-height: 105px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.brand-logo {
    width: 55px;
    height: 55px;
    min-width: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--naranja-noelie);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.20);
}

    .brand-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    color: white;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

    .brand-name span {
        color: var(--naranja-noelie);
    }

.brand-text small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
}


/* ============================================= */
/* FOOTER SIDEBAR                                */
/* ============================================= */

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
}

.user-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: linear-gradient( 135deg, var(--naranja-noelie), #ffbe58 );
    color: var(--azul-noelie);
    font-size: 14px;
    font-weight: 800;
}

.user-info {
    display: flex;
    flex-direction: column;
}

    .user-info strong {
        font-size: 13px;
    }

    .user-info span {
        margin-top: 2px;
        color: rgba(255, 255, 255, 0.55);
        font-size: 10px;
    }


/* ============================================= */
/* CONTENIDO                                     */
/* ============================================= */

.app-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* ============================================= */
/* BARRA SUPERIOR                                */
/* ============================================= */

.app-header {
    width: 100%;
    height: 72px;
    min-height: 72px;
    box-sizing: border-box;
    padding: 0 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg-header);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--gris-borde);
    box-shadow: 0 4px 16px rgba(0, 32, 96, 0.05);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
}

.header-left {
    gap: 18px;
}

.header-right {
    gap: 12px;
}


/* ============================================= */
/* BOTÓN SIDEBAR                                 */
/* ============================================= */

.btn-toggle-sidebar {
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 10px;
    background: rgba(0, 32, 96, 0.07);
    color: var(--azul-noelie);
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .btn-toggle-sidebar:hover {
        background: rgba(252, 165, 34, 0.18);
        transform: translateY(-1px);
    }

.app-shell.dark .btn-toggle-sidebar {
    background: #16243B;
    color: white;
}


/* ============================================= */
/* BREADCRUMB                                    */
/* ============================================= */

.page-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.page-system {
    color: var(--azul-noelie);
    font-weight: 700;
}

.page-divider {
    color: #AAB2C0;
}

.page-section {
    color: var(--texto-secundario);
}

.app-shell.dark .page-system {
    color: white;
}


/* ============================================= */
/* BOTONES HEADER                                */
/* ============================================= */

.header-action,
.theme-toggle {
    width: 42px;
    height: 42px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gris-borde);
    border-radius: 11px;
    background: var(--bg-card);
    color: var(--texto-principal);
    font-size: 17px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

    .header-action:hover,
    .theme-toggle:hover {
        transform: translateY(-1px);
        border-color: var(--naranja-noelie);
        background: rgba(252, 165, 34, 0.09);
        box-shadow: 0 6px 15px rgba(0, 32, 96, 0.08);
    }


/* ============================================= */
/* USUARIO HEADER                                */
/* ============================================= */

.header-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 4px;
}

.header-avatar {
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: var(--azul-noelie);
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.header-user-info {
    display: flex;
    flex-direction: column;
}

    .header-user-info strong {
        color: var(--texto-principal);
        font-size: 12px;
    }

    .header-user-info span {
        margin-top: 2px;
        color: var(--texto-secundario);
        font-size: 10px;
    }


/* ============================================= */
/* MAIN                                          */
/* ============================================= */

.app-main {
    flex: 1;
    padding: 28px;
    background: radial-gradient( circle at 95% 0%, rgba(252, 165, 34, 0.06), transparent 25% ), var(--bg-page);
    transition: background 0.25s ease;
}

.main-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}


/* ============================================= */
/* RESPONSIVE                                    */
/* ============================================= */

@media (max-width: 850px) {

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
    }

    .sidebar--oculto {
        transform: translateX(-100%);
        width: 270px;
        min-width: 270px;
    }

    .header-user-info {
        display: none;
    }

    .page-info {
        display: none;
    }

    .app-main {
        padding: 18px;
    }
}

@media (max-width: 520px) {

    .app-header {
        padding: 0 14px;
    }

    .header-right {
        gap: 7px;
    }

    .header-user {
        display: none;
    }
}
