/* ============================================================
   IDENTITY.CSS - Estilos exclusivos para vistas de autenticación
   Tema: Glassmorphism + Agrícola sutil
   Paleta: Variables de custom_var.css (verde menta)
   ============================================================ */


/* -------------------------------------------------------
   A) FONDO AGRÍCOLA - auth-body
   Gradiente verde rico con patrón SVG de hortalizas
   (brócoli, coliflor, ajo, tomate)
   ------------------------------------------------------- */
.auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background:
        /* Patrón agrícola: hortalizas estilizadas (brócoli, coliflor, ajo, tomate) */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3C!-- Brócoli (arriba-izquierda) --%3E%3Cg transform='translate(30,25)'%3E%3Ccircle cx='0' cy='-4' r='6'/%3E%3Ccircle cx='-6' cy='0' r='5'/%3E%3Ccircle cx='6' cy='0' r='5'/%3E%3Ccircle cx='-3' cy='-7' r='4.5'/%3E%3Ccircle cx='3' cy='-7' r='4.5'/%3E%3Crect x='-1.5' y='3' width='3' height='10' rx='1'/%3E%3C/g%3E%3C!-- Tomate (arriba-derecha) --%3E%3Cg transform='translate(155,35)'%3E%3Ccircle cx='0' cy='0' r='10'/%3E%3Cpath d='M-3 -10 C-3 -14 3 -14 3 -10' fill='none' stroke='%23ffffff' stroke-width='1.2' stroke-opacity='0.04'/%3E%3Cpath d='M-6 -9 C-4 -12 -1 -11 0 -10' fill='none' stroke='%23ffffff' stroke-width='0.8' stroke-opacity='0.03'/%3E%3Cpath d='M6 -9 C4 -12 1 -11 0 -10' fill='none' stroke='%23ffffff' stroke-width='0.8' stroke-opacity='0.03'/%3E%3C/g%3E%3C!-- Ajo (abajo-izquierda) --%3E%3Cg transform='translate(45,150)'%3E%3Cellipse cx='0' cy='3' rx='8' ry='10'/%3E%3Cpath d='M-6 0 C-6 -3 -3 -5 0 -8 C3 -5 6 -3 6 0' fill='%23ffffff' fill-opacity='0.02'/%3E%3Cpath d='M0 -8 C0 -12 1 -14 0 -16' fill='none' stroke='%23ffffff' stroke-width='1' stroke-opacity='0.035'/%3E%3Cline x1='0' y1='-2' x2='0' y2='10' stroke='%23ffffff' stroke-width='0.5' stroke-opacity='0.025'/%3E%3Cline x1='-4' y1='0' x2='-4' y2='9' stroke='%23ffffff' stroke-width='0.4' stroke-opacity='0.02'/%3E%3Cline x1='4' y1='0' x2='4' y2='9' stroke='%23ffffff' stroke-width='0.4' stroke-opacity='0.02'/%3E%3C/g%3E%3C!-- Coliflor (abajo-derecha) --%3E%3Cg transform='translate(160,145)'%3E%3Ccircle cx='0' cy='-2' r='5.5'/%3E%3Ccircle cx='-5' cy='1' r='4.5'/%3E%3Ccircle cx='5' cy='1' r='4.5'/%3E%3Ccircle cx='-3' cy='-6' r='4'/%3E%3Ccircle cx='3' cy='-6' r='4'/%3E%3Ccircle cx='0' cy='4' r='4'/%3E%3Cpath d='M-4 7 C-4 12 -2 14 0 15 C2 14 4 12 4 7' fill='%23ffffff' fill-opacity='0.025'/%3E%3C/g%3E%3C!-- Brócoli pequeño (centro) --%3E%3Cg transform='translate(100,95)'%3E%3Ccircle cx='0' cy='-3' r='4.5'/%3E%3Ccircle cx='-4.5' cy='0' r='3.8'/%3E%3Ccircle cx='4.5' cy='0' r='3.8'/%3E%3Ccircle cx='-2' cy='-5.5' r='3.2'/%3E%3Ccircle cx='2' cy='-5.5' r='3.2'/%3E%3Crect x='-1.2' y='2' width='2.4' height='8' rx='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        /* Gradiente verde principal */
        linear-gradient(135deg,
            #064a38 0%,
            #0a6e4f 20%,
            var(--pantone-bg-main) 45%,
            #0da788 70%,
            #14c4a0 100%
        );
    background-attachment: fixed;
}

/* Decoración agrícola: silueta de paisaje con huerto en la parte inferior */
.auth-body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200' preserveAspectRatio='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3C!-- Colinas suaves --%3E%3Cpath d='M0 200 C200 140 350 160 500 130 C650 100 750 120 900 110 C1050 100 1200 130 1440 100 L1440 200Z'/%3E%3C!-- Surcos del huerto --%3E%3Cpath d='M0 200 C180 165 380 175 550 155 C720 135 850 150 1050 140 C1250 130 1350 145 1440 135 L1440 200Z' fill-opacity='0.025'/%3E%3C!-- Planta de tomate izquierda --%3E%3Cg transform='translate(120,80)' fill-opacity='0.04'%3E%3Cline x1='0' y1='120' x2='0' y2='40' stroke='%23ffffff' stroke-width='1.5' stroke-opacity='0.04'/%3E%3Ccircle cx='-8' cy='55' r='6'/%3E%3Ccircle cx='7' cy='45' r='5'/%3E%3Ccircle cx='-3' cy='40' r='5.5'/%3E%3Cpath d='M-8 35 C-6 30 -2 28 0 32' fill='none' stroke='%23ffffff' stroke-width='0.8' stroke-opacity='0.03'/%3E%3C/g%3E%3C!-- Brócoli derecha --%3E%3Cg transform='translate(1300,85)' fill-opacity='0.035'%3E%3Ccircle cx='0' cy='50' r='12'/%3E%3Ccircle cx='-10' cy='55' r='9'/%3E%3Ccircle cx='10' cy='55' r='9'/%3E%3Ccircle cx='-5' cy='43' r='8'/%3E%3Ccircle cx='5' cy='43' r='8'/%3E%3Crect x='-2.5' y='62' width='5' height='20' rx='2'/%3E%3C/g%3E%3C!-- Ajos centrales --%3E%3Cg transform='translate(720,95)' fill-opacity='0.025'%3E%3Cellipse cx='-15' cy='70' rx='6' ry='8'/%3E%3Cellipse cx='15' cy='65' rx='5' ry='7'/%3E%3Cpath d='M-15 60 L-15 52' stroke='%23ffffff' stroke-width='0.8' stroke-opacity='0.025'/%3E%3Cpath d='M15 56 L15 48' stroke='%23ffffff' stroke-width='0.8' stroke-opacity='0.025'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 0;
}


/* -------------------------------------------------------
   B) CONTENEDOR Y TARJETA GLASSMORPHISM
   ------------------------------------------------------- */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    padding: 1rem;
    /* margin:auto garantiza el centrado horizontal cuando el contenedor
       NO vive dentro del flex de .auth-body (p. ej. AccessDenied servido
       desde el layout principal con sesión activa). */
    margin-left: auto;
    margin-right: auto;
}


/* -------------------------------------------------------
   B-bis) WRAPPER PARA VISTAS DE ESTADO DENTRO DEL LAYOUT
          PRINCIPAL (.app-body) — reproduce el ambiente del
          Login sin necesidad de un layout dedicado.
   ------------------------------------------------------- */
.auth-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Calcula la altura útil descontando navbar (~64px) y footer (~48px)
       del layout principal. El min-height asegura que el panel se vea
       como una zona de estado dedicada y no como un fragmento perdido. */
    min-height: calc(100vh - 180px);
    padding: 2.5rem 1rem;
    margin: 0.5rem 0 1rem;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    background:
        /* Mismo patrón agrícola y gradiente verde que auth-body, sin
           el ::after de paisaje fijo para no escapar del wrapper. */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cg transform='translate(30,25)'%3E%3Ccircle cx='0' cy='-4' r='6'/%3E%3Ccircle cx='-6' cy='0' r='5'/%3E%3Ccircle cx='6' cy='0' r='5'/%3E%3Ccircle cx='-3' cy='-7' r='4.5'/%3E%3Ccircle cx='3' cy='-7' r='4.5'/%3E%3Crect x='-1.5' y='3' width='3' height='10' rx='1'/%3E%3C/g%3E%3Cg transform='translate(155,35)'%3E%3Ccircle cx='0' cy='0' r='10'/%3E%3C/g%3E%3Cg transform='translate(45,150)'%3E%3Cellipse cx='0' cy='3' rx='8' ry='10'/%3E%3C/g%3E%3Cg transform='translate(160,145)'%3E%3Ccircle cx='0' cy='-2' r='5.5'/%3E%3Ccircle cx='-5' cy='1' r='4.5'/%3E%3Ccircle cx='5' cy='1' r='4.5'/%3E%3Ccircle cx='-3' cy='-6' r='4'/%3E%3Ccircle cx='3' cy='-6' r='4'/%3E%3Ccircle cx='0' cy='4' r='4'/%3E%3C/g%3E%3Cg transform='translate(100,95)'%3E%3Ccircle cx='0' cy='-3' r='4.5'/%3E%3Ccircle cx='-4.5' cy='0' r='3.8'/%3E%3Ccircle cx='4.5' cy='0' r='3.8'/%3E%3Ccircle cx='-2' cy='-5.5' r='3.2'/%3E%3Ccircle cx='2' cy='-5.5' r='3.2'/%3E%3Crect x='-1.2' y='2' width='2.4' height='8' rx='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg,
            #064a38 0%,
            #0a6e4f 20%,
            var(--pantone-bg-main) 45%,
            #0da788 70%,
            #14c4a0 100%
        );
}

/* Cuando el wrapper ya está dentro del propio fondo de autenticación
   (página de Login, Forgot, etc., con body.auth-body), neutralizamos el
   .auth-shell para evitar un doble panel y conservar el centrado flex
   provisto por .auth-body. display:contents hace que el wrapper "no
   exista" para el layout y los hijos pasen a ser flex items del body. */
.auth-body .auth-shell {
    display: contents;
    background: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
    min-height: 0;
    overflow: visible;
}

.auth-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Acento decorativo: línea gradiente superior */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--pantone-bg-grd-green);
    border-radius: 1.25rem 1.25rem 0 0;
}


/* -------------------------------------------------------
   C) ENCABEZADO DE MARCA - auth-brand
   ------------------------------------------------------- */
.auth-brand {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.auth-title {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--pantone-bg-main);
    margin: 0;
    letter-spacing: 0.5px;
}

.auth-subtitle {
    font-size: 0.78rem;
    color: #7a8a82;
    margin: 0.15rem 0 0 0;
    letter-spacing: 0.3px;
}


/* -------------------------------------------------------
   D) SEPARADOR DECORATIVO con hoja
   ------------------------------------------------------- */
.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    gap: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 139, 111, 0.2), transparent);
}

/* Hoja decorativa central */
.auth-divider-leaf {
    display: inline-block;
    width: 20px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M12 2 C6 2 2 8 2 14 C5 10 8 8 12 8 C16 8 19 10 22 14 C22 8 18 2 12 2Z' fill='%23008b6f' fill-opacity='0.3'/%3E%3Cpath d='M12 8 L12 14' stroke='%23008b6f' stroke-width='0.6' stroke-opacity='0.25'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


/* -------------------------------------------------------
   E) ICONOS DE PÁGINA
   ------------------------------------------------------- */
.auth-icon {
    font-size: 3rem;
    color: var(--pantone-bg-main);
    display: inline-block;
    opacity: 0.85;
}

/* Versión para estados de confirmación */
.auth-status-icon {
    font-size: 4rem;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.auth-status-icon.text-success {
    color: var(--pantone-bg-main) !important;
}

.auth-status-icon.text-warning {
    color: #e6a817 !important;
}

.auth-status-icon.text-danger {
    color: #dc3545 !important;
}

/* Animación de pulso suave para iconos de éxito */
@keyframes auth-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.auth-icon-pulse {
    animation: auth-pulse 2s ease-in-out infinite;
}


/* -------------------------------------------------------
   F) TÍTULOS DE PÁGINA
   ------------------------------------------------------- */
.auth-page-title {
    font-weight: 600;
    font-size: 1.15rem;
    color: #2c3e36;
    margin-bottom: 0.25rem;
}

.auth-description {
    font-size: 0.85rem;
    color: #6b7d74;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}


/* -------------------------------------------------------
   G) INPUTS MEJORADOS
   ------------------------------------------------------- */
.auth-card .form-floating > .form-control {
    border-radius: 0.75rem;
    border: 1.5px solid #d0ddd6;
    padding: 1rem 0.85rem;
    font-size: 0.92rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: rgba(255, 255, 255, 0.7);
}

.auth-card .form-floating > .form-control:focus {
    border-color: var(--pantone-bg-main);
    box-shadow: 0 0 0 3px rgba(0, 139, 111, 0.12);
    background-color: #fff;
}

.auth-card .form-floating > label {
    color: #7a8a82;
    font-size: 0.9rem;
}

.auth-card .form-floating > .form-control:focus ~ label,
.auth-card .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--pantone-bg-main);
    font-weight: 500;
}


/* -------------------------------------------------------
   H) PASSWORD WRAPPER - Toggle visibilidad
   ------------------------------------------------------- */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-floating {
    flex: 1;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7a8a82;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 1.1rem;
    z-index: 5;
    transition: color 0.2s ease;
    line-height: 1;
}

.password-toggle:hover {
    color: var(--pantone-bg-main);
}


/* -------------------------------------------------------
   I) BOTÓN PRIMARIO
   ------------------------------------------------------- */
.btn-auth-primary {
    background: var(--pantone-bg-grd-green);
    border: none;
    color: white;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.3px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.btn-auth-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 139, 111, 0.35);
    color: white;
    opacity: 0.95;
}

.btn-auth-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 139, 111, 0.25);
}

.btn-auth-primary:focus-visible {
    outline: 2px solid var(--pantone-bg-main);
    outline-offset: 2px;
}

/* Botón secundario para links tipo botón */
.btn-auth-secondary {
    background: transparent;
    border: 1.5px solid var(--pantone-bg-main);
    color: var(--pantone-bg-main);
    border-radius: 0.75rem;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-auth-secondary:hover {
    background: var(--pantone-bg-main);
    color: white;
}


/* -------------------------------------------------------
   J) LINKS DE NAVEGACIÓN
   ------------------------------------------------------- */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 139, 111, 0.1);
}

.auth-links a {
    color: var(--pantone-bg-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease, text-decoration 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.auth-links a:hover {
    color: #064a38;
    text-decoration: underline;
}

.auth-links-separator {
    color: #c0cec6;
    margin: 0 0.5rem;
    font-size: 0.7rem;
}


/* -------------------------------------------------------
   K) TARJETAS DE ESTADO / CONFIRMACIÓN
   ------------------------------------------------------- */

/* Success */
.auth-card.auth-card-success {
    border-left: 4px solid var(--pantone-bg-main);
}

.auth-card.auth-card-success::before {
    background: linear-gradient(90deg, var(--pantone-bg-main), #16ebc0);
}

/* Warning */
.auth-card.auth-card-warning {
    border-left: 4px solid #e6a817;
}

.auth-card.auth-card-warning::before {
    background: linear-gradient(90deg, #e6a817, #f5d060);
}

/* Error */
.auth-card.auth-card-error {
    border-left: 4px solid #dc3545;
}

.auth-card.auth-card-error::before {
    background: linear-gradient(90deg, #dc3545, #f58b95);
}

.auth-status-message {
    font-size: 0.95rem;
    color: #3a4a42;
    line-height: 1.5;
    text-align: center;
}


/* -------------------------------------------------------
   L) FOOTER DE AUTENTICACIÓN
   ------------------------------------------------------- */
.auth-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0.75rem 1rem;
    z-index: 1;
}

.auth-footer p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.auth-footer a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}


/* -------------------------------------------------------
   M) VALIDACIÓN - text-danger
   ------------------------------------------------------- */
.auth-card .text-danger {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.auth-card [role="alert"].text-danger {
    background: rgba(220, 53, 69, 0.06);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}


/* -------------------------------------------------------
   N) RESPONSIVE
   ------------------------------------------------------- */
@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.25rem;
        border-radius: 1rem;
    }

    .auth-container {
        padding: 0.5rem;
    }

    .auth-logo {
        width: 48px;
        height: 48px;
    }

    .auth-title {
        font-size: 1.15rem;
    }

    .auth-icon {
        font-size: 2.5rem;
    }

    .auth-status-icon {
        font-size: 3rem;
    }

    .auth-page-title {
        font-size: 1.05rem;
    }

    .auth-body::after {
        height: 120px;
    }

    .auth-footer {
        position: relative;
        margin-top: 1rem;
    }
}

@media (min-width: 1200px) {
    .auth-card {
        box-shadow:
            0 12px 48px rgba(0, 0, 0, 0.12),
            0 4px 12px rgba(0, 0, 0, 0.06);
    }
}

/* Pantallas muy altas: reforzar centrado */
@media (min-height: 900px) {
    .auth-body {
        padding-bottom: 3rem;
    }
}

/* -------------------------------------------------------
   O) MI CUENTA - contexto operativo dentro del layout principal
   ------------------------------------------------------- */
.account-page {
    --account-green: rgb(0, 139, 111);
    --account-green-dark: #064a38;
    --account-ink: #1f3530;
    --account-muted: #60736e;
    --account-line: rgba(0, 139, 111, 0.16);
    --account-shadow: 0 8px 24px rgba(24, 54, 48, 0.08);
    display: grid;
    gap: 1rem;
    color: var(--account-ink);
    padding-bottom: 1.5rem;
}

.account-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    padding: 1.35rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(6, 74, 56, 0.98), rgba(0, 139, 111, 0.94) 58%, rgba(13, 167, 136, 0.92)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 100%);
    background-size: auto, 32px 32px;
    box-shadow: var(--account-shadow);
}

.account-kicker,
.account-section-kicker {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.account-kicker {
    color: rgba(255, 255, 255, 0.76);
    margin-bottom: 0.35rem;
}

.account-hero h1,
.account-panel h2 {
    margin: 0;
    font-weight: 800;
    line-height: 1.15;
}

.account-hero h1 {
    color: #fff;
    font-size: 2rem;
}

.account-hero p {
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.84);
    overflow-wrap: anywhere;
}

.account-hero-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.account-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 0.32rem 0.7rem;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    font-weight: 700;
}

.account-status-badge.is-ok {
    background: rgba(22, 163, 74, 0.2);
}

.account-status-badge.is-warning {
    background: rgba(234, 179, 8, 0.22);
}

.account-status-badge.is-danger {
    background: rgba(220, 53, 69, 0.22);
}

.account-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    border-radius: 8px;
}

.account-layout,
.account-grid {
    display: grid;
    gap: 1rem;
}

.account-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    align-items: start;
}

.account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-panel {
    border: 1px solid var(--account-line);
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(31, 56, 50, 0.06);
}

.account-panel-main {
    min-height: 100%;
}

.account-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.account-section-heading > i {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 139, 111, 0.18);
    border-radius: 8px;
    background: rgba(0, 139, 111, 0.08);
    color: var(--account-green-dark);
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.account-section-kicker {
    color: var(--account-green);
    margin-bottom: 0.2rem;
}

.account-panel h2 {
    color: var(--account-ink);
    font-size: 1.05rem;
}

.account-password-form .form-control {
    border-radius: 8px;
}

.account-password-form .password-toggle {
    right: 0.8rem;
}

.account-password-form .form-floating > .form-control {
    padding-right: 2.75rem;
}

.account-submit {
    width: 100%;
}

.account-role-panel {
    border-color: rgba(150, 124, 11, 0.22);
    background:
        linear-gradient(135deg, rgba(150, 124, 11, 0.08), transparent 42%),
        #fff;
}

.account-role-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(150, 124, 11, 0.24);
    border-radius: 8px;
    background: rgba(150, 124, 11, 0.1);
    color: #6f5b08;
    font-size: 1.45rem;
}

.account-role-panel p {
    margin: 0.55rem 0 0;
    color: var(--account-muted);
    line-height: 1.45;
}

.account-capability-list {
    display: grid;
    gap: 0.45rem;
    margin: 0.85rem 0 0;
    padding: 0;
    list-style: none;
}

.account-capability-list li {
    display: flex;
    gap: 0.45rem;
    color: #405852;
    font-size: 0.86rem;
    line-height: 1.35;
}

.account-capability-list i {
    color: var(--account-green);
    flex: 0 0 auto;
}

.account-metrics,
.account-card-grid {
    display: grid;
    gap: 0.75rem;
}

.account-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-metric {
    border: 1px solid rgba(0, 139, 111, 0.12);
    border-radius: 8px;
    padding: 0.85rem;
    background: rgba(0, 139, 111, 0.04);
    min-width: 0;
}

.account-metric span,
.account-definition-list dt,
.account-mini-foot,
.account-linked-id {
    display: block;
    color: var(--account-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.account-metric strong {
    display: block;
    margin: 0.28rem 0 0.12rem;
    color: var(--account-ink);
    font-size: 1.18rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.account-metric small {
    color: var(--account-muted);
}

.account-definition-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.account-definition-list div {
    border-bottom: 1px solid rgba(0, 139, 111, 0.1);
    padding-bottom: 0.55rem;
}

.account-definition-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.account-definition-list dd {
    margin: 0.16rem 0 0;
    color: var(--account-ink);
    overflow-wrap: anywhere;
}

.account-linked-person {
    display: grid;
    gap: 0.22rem;
    border: 1px solid rgba(13, 110, 175, 0.18);
    border-radius: 8px;
    padding: 0.9rem;
    background: rgba(13, 110, 175, 0.05);
}

.account-linked-person strong {
    color: var(--account-ink);
    overflow-wrap: anywhere;
}

.account-linked-person small {
    color: var(--account-muted);
}

.account-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.account-card-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.account-mini-card {
    position: relative;
    border: 1px solid rgba(0, 139, 111, 0.14);
    border-left: 4px solid var(--account-green);
    border-radius: 8px;
    padding: 0.85rem;
    background: #fff;
    min-width: 0;
}

.account-mini-card h3 {
    margin: 0.45rem 0 0.2rem;
    color: var(--account-ink);
    font-size: 0.96rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.account-mini-card p,
.account-mini-card small {
    margin: 0;
    color: var(--account-muted);
    overflow-wrap: anywhere;
}

.account-mini-badge {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    background: rgba(0, 139, 111, 0.1);
    color: var(--account-green-dark);
    font-size: 0.72rem;
    font-weight: 800;
}

.account-mini-foot {
    margin-top: 0.6rem;
    color: var(--account-green-dark);
}

.account-empty-state {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px dashed rgba(0, 139, 111, 0.3);
    border-radius: 8px;
    padding: 0.9rem;
    background: rgba(0, 139, 111, 0.04);
    color: var(--account-muted);
}

.account-empty-state i {
    color: var(--account-green);
    font-size: 1.15rem;
}

@media (max-width: 1199.98px) {
    .account-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .account-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-hero-status {
        justify-content: flex-start;
    }

    .account-layout,
    .account-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .account-page {
        gap: 0.8rem;
    }

    .account-hero,
    .account-panel {
        padding: 0.9rem;
    }

    .account-hero h1 {
        font-size: 1.55rem;
    }

    .account-metrics {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------
   P) MI CUENTA - variante compacta y viva
   ------------------------------------------------------- */
.account-page {
    --account-green-light: #17b894;
    --account-green-glow: rgba(0, 139, 111, 0.2);
    --account-green-wash: rgba(0, 139, 111, 0.055);
    gap: 0.72rem;
    padding-bottom: 1rem;
}

.account-hero {
    position: relative;
    align-items: center;
    overflow: hidden;
    padding: 0.85rem 1rem;
    background:
        linear-gradient(135deg, #05382d 0%, #008b6f 58%, #17b894 100%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 100%);
    background-size: auto, 28px 28px;
    box-shadow: 0 10px 24px rgba(5, 56, 45, 0.16);
}

.account-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.16) 48%, transparent 72%);
    opacity: 0;
    transform: translateX(-38%);
    transition: opacity 0.25s ease, transform 0.55s ease;
    pointer-events: none;
}

.account-hero:hover::after {
    opacity: 1;
    transform: translateX(38%);
}

.account-hero > * {
    position: relative;
    z-index: 1;
}

.account-kicker,
.account-section-kicker {
    font-size: 0.65rem;
}

.account-hero h1 {
    font-size: 1.28rem;
}

.account-hero p {
    margin-top: 0.18rem;
    font-size: 0.8rem;
}

.account-status-badge {
    padding: 0.22rem 0.52rem;
    font-size: 0.7rem;
}

.account-layout,
.account-grid {
    gap: 0.72rem;
}

.account-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
}

.account-panel {
    position: relative;
    overflow: hidden;
    padding: 0.78rem;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 253, 251, 0.98)),
        linear-gradient(135deg, var(--account-green-wash), transparent 58%);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease,
        background-color 0.18s ease;
}

.account-panel::after,
.account-metric::after,
.account-mini-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 18%, rgba(23, 184, 148, 0.14) 50%, transparent 78%);
    opacity: 0;
    transform: translateX(-28%);
    transition: opacity 0.22s ease, transform 0.42s ease;
    pointer-events: none;
}

.account-panel:hover,
.account-metric:hover,
.account-mini-card:hover {
    border-color: rgba(0, 139, 111, 0.34);
    box-shadow: 0 10px 22px rgba(5, 56, 45, 0.12), 0 0 0 1px rgba(23, 184, 148, 0.08);
    transform: translateY(-2px);
}

.account-panel:hover::after,
.account-metric:hover::after,
.account-mini-card:hover::after {
    opacity: 1;
    transform: translateX(28%);
}

.account-panel > * {
    position: relative;
    z-index: 1;
}

.account-section-heading {
    align-items: center;
    margin-bottom: 0.62rem;
}

.account-section-heading > i {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(0, 139, 111, 0.16), rgba(23, 184, 148, 0.08));
    font-size: 1rem;
}

.account-panel h2 {
    font-size: 0.95rem;
}

.account-password-form .form-floating > .form-control {
    min-height: 3rem;
    height: 3rem;
    padding-top: 1.25rem;
    padding-bottom: 0.32rem;
    font-size: 0.86rem;
}

.account-password-form .form-floating > label {
    padding: 0.68rem 0.75rem;
    font-size: 0.8rem;
}

.account-submit {
    padding: 0.48rem 0.75rem;
    font-size: 0.86rem;
}

.account-role-panel {
    border-color: rgba(0, 139, 111, 0.22);
    background:
        linear-gradient(135deg, rgba(0, 139, 111, 0.12), rgba(23, 184, 148, 0.035) 48%),
        #fff;
}

.account-role-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 0.55rem;
    border-color: rgba(0, 139, 111, 0.24);
    background: linear-gradient(135deg, rgba(0, 139, 111, 0.16), rgba(23, 184, 148, 0.08));
    color: var(--account-green-dark);
    font-size: 1.15rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.account-role-panel:hover .account-role-icon {
    box-shadow: 0 0 0 4px rgba(0, 139, 111, 0.08);
    transform: translateY(-1px) scale(1.04);
}

.account-role-panel p {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    line-height: 1.35;
}

.account-capability-list {
    gap: 0.32rem;
    margin-top: 0.62rem;
}

.account-capability-list li {
    align-items: flex-start;
    border-radius: 6px;
    padding: 0.22rem 0.35rem;
    background: rgba(0, 139, 111, 0.045);
    font-size: 0.78rem;
}

.account-metrics,
.account-card-grid {
    gap: 0.55rem;
}

.account-metric {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.58rem;
    align-items: center;
    padding: 0.62rem;
    background:
        linear-gradient(135deg, rgba(0, 139, 111, 0.095), rgba(23, 184, 148, 0.035)),
        #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.account-metric > i {
    grid-row: 1 / span 3;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 139, 111, 0.16), rgba(23, 184, 148, 0.08));
    color: var(--account-green-dark);
    font-size: 1rem;
}

.account-metric span,
.account-definition-list dt,
.account-mini-foot,
.account-linked-id {
    font-size: 0.66rem;
}

.account-metric strong {
    margin-top: 0.08rem;
    font-size: 0.98rem;
}

.account-metric small,
.account-definition-list dd,
.account-mini-card p,
.account-mini-card small,
.account-linked-person small {
    font-size: 0.78rem;
}

.account-definition-list {
    gap: 0.48rem;
}

.account-definition-list div {
    padding-bottom: 0.42rem;
}

.account-linked-person,
.account-empty-state {
    padding: 0.68rem;
}

.account-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.account-card-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.account-mini-card {
    overflow: hidden;
    border-left-width: 3px;
    padding: 0.65rem;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(248, 253, 251, 0.98)),
        linear-gradient(135deg, rgba(0, 139, 111, 0.06), transparent 64%);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.account-mini-card h3 {
    margin-top: 0.32rem;
    font-size: 0.84rem;
}

.account-mini-badge {
    padding: 0.14rem 0.42rem;
    font-size: 0.66rem;
}

.account-mini-foot {
    margin-top: 0.42rem;
}

.account-empty-state {
    font-size: 0.82rem;
}

@media (max-width: 575.98px) {
    .account-hero,
    .account-panel {
        padding: 0.78rem;
    }

    .account-hero h1 {
        font-size: 1.18rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .account-hero::after,
    .account-panel,
    .account-panel::after,
    .account-metric,
    .account-metric::after,
    .account-mini-card,
    .account-mini-card::after,
    .account-role-icon {
        transition: none;
    }

    .account-panel:hover,
    .account-metric:hover,
    .account-mini-card:hover {
        transform: none;
    }
}
