:root {
    --azul: #003865;
    --celeste: #00AEEF;
    --fondo: #f4f8fb;
    --texto: #16324f;
    --itau-orange: #ff6b00;
    --itau-orange-2: #ff8d3a;
    --itau-orange-soft: #fff1e7;
    --itau-blue: #003b8f;
    --itau-yellow: #ffd400;
    --muted: #6b7280;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f2f5fa;
    --text: #1f2937;
    --border: #e5e7eb;
    --shadow: 0 12px 35px rgba(0,0,0,.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --sidebar-w: 260px;
    --topbar-h: 84px;
}

body {
    background: var(--fondo);
}

.main {
    margin-left: 270px;
    padding: 24px;
}

/** MENU ASIDE **/


.brand {
    background: rgba(255, 255, 255, .08);
    /*    border: 1px solid rgba(255, 255, 255, .12);*/
    border-radius: 24px;
    padding: 18px;
    backdrop-filter: blur(8px);
    display: flex;
    margin-top: 10px;
}


.brand__bank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--itau-orange);
    color: #fff;
    font-weight: 700;
    font-size: 26px;
    width: 74px;
    height: 74px;
    border-radius: 22px;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.08);
    margin-right: 10px;
}


.brand h1 {
    /*    font-size: 1.1rem;*/
    font-size: 16px;
    line-height: 1.1;
    font-weight: 700;
    margin-top: 5px;
}

.brand__accent {
    color: var(--itau-yellow); /* o blanco si quieres más sobrio */
}

.brand p {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 6px;
}

.brand__logo-servibanca {
    margin-top: 13px;
    width: 120px;
    opacity: 0.85;
}


.sidebar {
    width: 270px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, var(--azul), #075f91);
    padding: 22px 18px;
    color: #fff;
    z-index: 1000;
}

.user-card {
    margin-top: 24px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.13);
    display: flex;
    gap: 12px;
    align-items: center;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--celeste);
    display: grid;
    place-items: center;
    font-weight: bold;
}

.menu a {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #fff !important;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 6px;
    opacity: .9;
}

    .menu a:hover,
    .menu a.active {
        background: #fff;
        color: var(--azul) !important;
        opacity: 1;
    }



.usuario-inactivo td {
    background-color: #fff3f3;
    color: #6c757d;
}

    .usuario-inactivo td .badge {
        opacity: 0.9;
    }





    /* usuario menu lateral**/
.user-card__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-card__name {
    max-width: 170px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card__email {
    max-width: 170px;
    font-size: 0.76rem;
    color: rgba(255,255,255,.78);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card__status {
    max-width: 170px;
    font-size: 0.72rem;
    color: rgba(255,255,255,.58);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-full {
    min-height: 100vh;
    padding: 24px;
    background: var(--fondo);
}

.access-page {
    min-height: calc(100vh - 48px);
    display: grid;
    place-items: center;
}

.access-card {
    width: 100%;
    max-width: 620px;
}
/************************************************************************/


/*** CONTENIDO MAIN ***/

.card {
    background: var(--surface);
    border: 1px solid rgba(226,232,240,.85);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 20px;
    margin-bottom: 20px;
}

.card__header {
    /*    padding: 22px 24px 0;*/
    margin-bottom: 10px;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.card__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--itau-blue);
}

.card__subtitle {
    color: var(--muted);
    margin-top: 6px;
    font-size: .92rem;
}


/** BOTONES **/

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.boton {
    flex: 0 0 auto;
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
    font-family: inherit;
}

    .boton:hover {
        transform: translateY(-1px)
    }

.boton_primary {
    background: var(--itau-orange);
    color: #fff
}

    .boton_primary:hover {
        box-shadow: 0 12px 20px rgba(255,107,0,.24);
    }

.boton_secondary {
    background: var(--itau-blue);
    color: #fff
}

.boton_ghost {
    background: var(--itau-orange-soft);
    color: var(--itau-orange)
}

a {
    text-decoration: none;
}
/************************************************************************/

/* Evita que el correo largo rompa la tarjeta del usuario */
.user-card__info {
    min-width: 0;
}

    .user-card__info small,
    .user-card__info strong {
        display: block;
        max-width: 170px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

/* Página del portal */
.portal-page {
    min-height: calc(100vh - 48px);
}

.portal-hero {
    background: linear-gradient(135deg, var(--itau-blue), var(--azul));
    border-radius: var(--radius-xl);
    padding: 28px;
    color: white;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

    .portal-hero::after {
        content: "";
        position: absolute;
        width: 240px;
        height: 240px;
        right: -70px;
        top: -90px;
        background: rgba(255, 212, 0, .18);
        border-radius: 50%;
    }

.portal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: .86rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.portal-hero h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
}

.portal-hero p {
    margin: 8px 0 0;
    opacity: .82;
}

.portal-user-pill {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    padding: 14px 16px;
    min-width: 260px;
    backdrop-filter: blur(8px);
}

    .portal-user-pill span {
        display: block;
        font-size: .78rem;
        opacity: .75;
        margin-bottom: 4px;
    }

    .portal-user-pill strong {
        font-size: .92rem;
        word-break: break-all;
    }

.portal-card {
    padding: 24px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.portal-system-card {
    min-height: 250px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: .2s ease;
    position: relative;
    overflow: hidden;
}

    .portal-system-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 6px;
        background: linear-gradient(90deg, var(--itau-orange), var(--itau-yellow));
    }

    .portal-system-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 34px rgba(0,0,0,.10);
        border-color: rgba(255, 107, 0, .45);
    }

.portal-system-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--itau-orange-soft);
    color: var(--itau-orange);
    font-size: 1.65rem;
    margin-bottom: 16px;
}

.portal-system-body h3 {
    font-size: 1.14rem;
    color: var(--itau-blue);
    font-weight: 800;
    margin-bottom: 8px;
}

.portal-system-body p {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.45;
    margin-bottom: 18px;
}

.portal-system-btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
}

.portal-system-btn-disabled {
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.portal-system-card.is-disabled {
    opacity: .58;
    filter: grayscale(.8);
    background: #f9fafb;
}

    .portal-system-card.is-disabled::before {
        background: #d1d5db;
    }

    .portal-system-card.is-disabled:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--border);
    }

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
    }

    .main {
        margin-left: 0;
    }

    .portal-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-user-pill {
        min-width: auto;
    }
}
