﻿/* =============================================
   LIBRERÍA GUISELLA
   Login, Registro, OTP, Recuperación,
   Contraseña vencida, Confirmación correo,
   Google Authenticator, Auditoría
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,600&display=swap');

/* ─── RESET ─── */

.lb-auth-page *,
.lb-auth-page *::before,
.lb-auth-page *::after {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════
   FONDO COMPARTIDO — todas las vistas auth
   ═══════════════════════════════════════════ */

.lb-auth-page {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    justify-content: flex-start;
    padding: 40px 24px;
    background: #0A0908;
    overflow-y: auto;
    z-index: 100;
}

    /* Textura de puntos ornamentales */
    .lb-auth-page::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image: radial-gradient(circle, rgba(122,40,40,.07) 1px, transparent 1px);
        background-size: 30px 30px;
        pointer-events: none;
        z-index: 0;
    }

    /* Glow central sutil */
    .lb-auth-page::after {
        content: "";
        position: fixed;
        top: -20%;
        left: 50%;
        transform: translateX(-50%);
        width: 600px;
        height: 500px;
        background: radial-gradient(ellipse, rgba(100,28,28,.16) 0%, transparent 65%);
        filter: blur(40px);
        pointer-events: none;
        z-index: 0;
    }

/* ═══════════════════════════════════════════
   TARJETA BASE
   ═══════════════════════════════════════════ */

.lb-auth-card {
    position: relative;
    z-index: 1;
    width: 440px;
    max-width: calc(100vw - 48px);
    background: #13100F;
    border: 1px solid #2A2420;
    border-top: 2px solid #7A2828;
    border-radius: 18px;
    padding: 52px 48px 44px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 32px 80px rgba(0,0,0,.65), 0 0 100px rgba(80,20,20,.14);
    
    margin: auto 0;
}

    /* Línea ornamental interna bajo el borde rojo */
    .lb-auth-card::before {
        content: "";
        display: block;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(122,40,40,.3) 30%, rgba(155,48,53,.4) 50%, rgba(122,40,40,.3) 70%, transparent);
        margin-bottom: 32px;
        margin-top: -4px;
    }

/* ═══════════════════════════════════════════
   ELEMENTOS COMUNES
   ═══════════════════════════════════════════ */

.lb-auth-logo {
    font-family: 'Cinzel', serif;
    color: #7A2828;
    letter-spacing: 10px;
    font-size: .78rem;
    text-align: center;
    margin-bottom: 24px;
}

.lb-auth-title {
    font-family: 'Cinzel', serif;
    color: #F0EBE3;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    margin: 0 0 10px;
    line-height: 1.2;
}

.lb-auth-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: #908A84;
    font-size: 1rem;
    text-align: center;
    margin: 0 0 30px;
    line-height: 1.6;
}

/* ─── Error / Validación ─── */

.lb-auth-error {
    background: #1E0E0E;
    border: 1px solid #5A2020;
    border-left: 3px solid #C74B4B;
    border-radius: 8px;
    padding: 11px 14px;
    color: #C47070;
    font-size: .9rem;
    margin-bottom: 22px;
    font-family: 'Cormorant Garamond', serif;
    line-height: 1.55;
}

    .lb-auth-error:empty {
        display: none;
    }

/* Alert success dentro de auth */
.lb-auth-card .alert-success,
.lb-auth-page .alert-success {
    background: #0E1E14 !important;
    border: 1px solid #265A3A !important;
    border-left: 3px solid #32854F !important;
    color: #7AB894 !important;
    border-radius: 8px !important;
    padding: 11px 14px !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: .9rem !important;
    margin-bottom: 22px !important;
    box-shadow: none !important;
}

/* Alert danger dentro de auth */
.lb-auth-card .alert-danger,
.lb-auth-page .alert-danger {
    background: #1E0E0E !important;
    border: 1px solid #5A2020 !important;
    border-left: 3px solid #C74B4B !important;
    color: #C47070 !important;
    border-radius: 8px !important;
    padding: 11px 14px !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: .9rem !important;
    margin-bottom: 22px !important;
    box-shadow: none !important;
}

/* ─── Grupos de campo ─── */

.lb-auth-group {
    margin-bottom: 24px;
    position: relative;
}

    .lb-auth-group label {
        display: block;
        color: #B03A40;
        font-family: 'Cinzel', serif;
        font-size: .62rem;
        letter-spacing: 2.5px;
        text-transform: uppercase;
        margin-bottom: 10px;
    }

    /* Input línea inferior */
    .lb-auth-group input,
    .lb-auth-group input.form-control {
        width: 100%;
        padding: 12px 0 !important;
        border: none !important;
        border-bottom: 1px solid #3A3530 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #E8E2D8 !important;
        font-family: 'Cormorant Garamond', serif !important;
        font-size: 1.1rem !important;
        transition: border-color .25s !important;
        display: block;
        box-shadow: none !important;
        outline: none !important;
        -webkit-appearance: none;
    }

        .lb-auth-group input:focus,
        .lb-auth-group input.form-control:focus {
            border-bottom-color: #7A2828 !important;
            background: transparent !important;
            box-shadow: none !important;
            outline: none !important;
        }

        .lb-auth-group input::placeholder,
        .lb-auth-group input.form-control::placeholder {
            color: #4A4642 !important;
            font-style: italic;
        }

    /* Validación inline */
    .lb-auth-group .text-danger {
        display: block;
        color: #9B5050 !important;
        font-size: .7rem;
        font-family: 'Cinzel', serif;
        letter-spacing: .5px;
        margin-top: 7px;
    }

/* ─── Botón principal ─── */

.lb-auth-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #9B3035, #6E2020);
    color: #E8E2D8;
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .25s;
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(100,20,20,.3), inset 0 1px 0 rgba(255,255,255,.06);
}

    .lb-auth-btn + .lb-auth-btn {
        margin-top: 0;
    }

    .lb-auth-btn:hover {
        background: linear-gradient(135deg, #B03A3F, #7A2828);
        transform: translateY(-1px);
        box-shadow: 0 8px 28px rgba(100,20,20,.4);
        color: #fff;
    }

    .lb-auth-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(100,20,20,.25);
    }

    .lb-auth-btn:disabled {
        background: linear-gradient(135deg, #2A1515, #1E1010);
        color: #4A4642;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
        opacity: .65;
    }

        .lb-auth-btn:disabled:hover {
            transform: none;
            box-shadow: none;
        }

/* ─── Footer ─── */

.lb-auth-footer {
    text-align: center;
    color: #6A6460;
    font-size: .95rem;
    font-family: 'Cormorant Garamond', serif;
    padding-top: 22px;
    border-top: 1px solid #222018;
    line-height: 1.9;
}

    .lb-auth-footer a {
        color: #9B3035;
        text-decoration: none;
        font-family: 'Cinzel', serif;
        font-size: .65rem;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        margin-left: 4px;
        transition: color .2s;
        display: inline-block;
    }

        .lb-auth-footer a:hover {
            color: #C74B4B;
        }

/* ═══════════════════════════════════════════
   REGISTRO — elementos específicos
   ═══════════════════════════════════════════ */

/* Password box con botón ojo */
.lb-password-box {
    position: relative;
    display: flex;
    align-items: center;
}

    .lb-password-box input,
    .lb-password-box input.form-control {
        padding-right: 36px !important;
        flex: 1;
    }

.lb-eye {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #4A4642;
    cursor: pointer;
    font-size: .95rem;
    padding: 4px 2px;
    line-height: 1;
    transition: color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .lb-eye:hover {
        color: #9B3035;
    }

/* Barra de fortaleza */
.lb-password-strength {
    width: 100%;
    height: 3px;
    background: #1A1816;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 8px;
    margin-top: -8px;
}

#strengthBar {
    height: 100%;
    width: 0%;
    border-radius: 20px;
    transition: width .35s ease, background .35s ease;
    background: #5A2828;
}

#strengthText {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: .55rem;
    letter-spacing: 1px;
    color: #4A4642;
    text-transform: uppercase;
    margin-bottom: 16px;
    transition: color .3s;
}

/* Checklist contraseña */
.lb-password-checklist {
    background: rgba(0,0,0,.2);
    border: 1px solid #1E1C1A;
    border-left: 2px solid #4A2424;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.lb-password-title {
    color: #4A4642;
    font-family: 'Cinzel', serif;
    font-size: .56rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.lb-password-checklist ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.lb-password-checklist li {
    font-family: 'Cormorant Garamond', serif;
    font-size: .88rem;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: color .25s;
    line-height: 1.3;
    list-style: none;
}

    .lb-password-checklist li.invalid {
        color: #3E3A36;
    }

        .lb-password-checklist li.invalid::before {
            content: "✖";
            color: #5A2828;
            font-size: .62rem;
            flex-shrink: 0;
        }

    .lb-password-checklist li.valid {
        color: #7AB894;
    }

        .lb-password-checklist li.valid::before {
            content: "✔";
            color: #32854F;
            font-size: .62rem;
            flex-shrink: 0;
        }

/* Divisor entre contraseña y preguntas de seguridad */
.lb-auth-divider {
    border: none;
    border-top: 1px solid #1E1C1A;
    margin: 28px 0 24px;
    position: relative;
}

    .lb-auth-divider::after {
        content: "✦";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: #13100F;
        color: #4A2424;
        font-size: .65rem;
        padding: 0 10px;
        letter-spacing: 4px;
    }

/* ═══════════════════════════════════════════
   OTP — código de 6 dígitos
   ═══════════════════════════════════════════ */

/* Input de código numérico grande y centrado */
.lb-auth-group input[maxlength="6"],
.lb-auth-group input[inputmode="numeric"] {
    font-family: 'Cinzel', serif !important;
    font-size: 1.8rem !important;
    letter-spacing: 10px !important;
    text-align: center !important;
    padding: 14px 0 !important;
    border-bottom: 2px solid #3A3630 !important;
    color: #E8E2D8 !important;
}

    .lb-auth-group input[maxlength="6"]:focus,
    .lb-auth-group input[inputmode="numeric"]:focus {
        border-bottom-color: #7A2828 !important;
    }

/* Botón reenviar — variante outline */
form + form .lb-auth-btn {
    background: transparent;
    border: 1px solid #3A3630;
    color: #8A8682;
    box-shadow: none;
    font-size: .68rem;
    letter-spacing: 2px;
    padding: 11px;
    margin-top: 0;
}

    form + form .lb-auth-btn:hover {
        border-color: #7A2828;
        color: #D6D0C8;
        background: rgba(122,40,40,.08);
        transform: none;
        box-shadow: none;
    }

/* ═══════════════════════════════════════════
   CONFIRMACIÓN DE CORREO — estados visuales
   ═══════════════════════════════════════════ */

/* Ícono de estado centrado sobre el título */
.lb-auth-card .lb-auth-title + .lb-auth-subtitle {
    margin-bottom: 32px;
}

/* Botón como link de navegación (lb-auth-btn como <a>) */
a.lb-auth-btn {
    display: block;
    text-align: center;
    text-decoration: none;
}

/* ═══════════════════════════════════════════
   GOOGLE AUTHENTICATOR — QR y código manual
   ═══════════════════════════════════════════ */

.lb-profile-card img[alt*="QR"],
.lb-profile-card img[alt*="Authenticator"] {
    display: block;
    margin: 16px auto;
    border-radius: 10px;
    border: 2px solid #3A3630;
    padding: 10px;
    background: #fff;
}

.lb-profile-card code {
    display: block;
    background: #1A1817;
    border: 1px solid #3A3630;
    border-left: 3px solid #7A2828;
    border-radius: 8px;
    padding: 10px 14px;
    color: #9B3035;
    font-size: .85rem;
    letter-spacing: 2px;
    margin: 8px 0 20px;
    word-break: break-all;
    font-family: 'Cinzel', serif;
}

.lb-profile-card p {
    color: #A8A39C;
    font-size: .92rem;
    line-height: 1.65;
    margin-bottom: 12px;
}

/* ═══════════════════════════════════════════
   AUDITORÍA DEL SISTEMA — tabla
   ═══════════════════════════════════════════ */

.lb-page h2 {
    font-family: 'Cinzel', serif;
    color: #E8E2D8;
    font-size: 1.3rem;
    letter-spacing: 2px;
    margin: 0 0 6px;
}

.lb-page > p {
    color: #7D7770;
    font-style: italic;
    font-size: .9rem;
    margin-bottom: 20px;
}

/* Tabla de auditoría */
.table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Cormorant Garamond', serif;
    font-size: .9rem;
    margin-top: 8px;
}

    .table thead tr {
        border-bottom: 2px solid #4A2424;
    }

    .table thead th {
        font-family: 'Cinzel', serif;
        font-size: .6rem;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        color: #9B3035;
        padding: 12px 14px;
        text-align: left;
        font-weight: 500;
        white-space: nowrap;
    }

    .table tbody tr {
        border-bottom: 1px solid #1E1C1A;
        transition: background .2s;
    }

        .table tbody tr:hover {
            background: rgba(122,40,40,.05);
        }

/* Filas alternas (table-striped) */
.table-striped tbody tr:nth-child(odd) {
    background: rgba(255,255,255,.015);
}

    .table-striped tbody tr:nth-child(odd):hover {
        background: rgba(122,40,40,.06);
    }

.table tbody td {
    padding: 10px 14px;
    color: #A8A39C;
    vertical-align: middle;
    line-height: 1.45;
}

    .table tbody td:first-child {
        color: #7D7770;
        font-size: .82rem;
        white-space: nowrap;
        font-family: 'Cinzel', serif;
        letter-spacing: .5px;
    }

    .table tbody td:nth-child(2) {
        color: #C8C4BC;
        font-style: italic;
    }

    .table tbody td:nth-child(3) {
        color: #D6D0C8;
        font-family: 'Cinzel', serif;
        font-size: .75rem;
        letter-spacing: .5px;
        text-transform: uppercase;
    }

/* ═══════════════════════════════════════════
   PERFIL — rediseño completo
   ═══════════════════════════════════════════ */

/* Header de perfil */
.lb-profile-header {
    text-align: center;
    padding: 10px 0 28px;
    position: relative;
}

    /* Línea ornamental debajo del header */
    .lb-profile-header::after {
        content: "❦ ✦ ❦";
        display: block;
        color: #4A2424;
        letter-spacing: 8px;
        font-size: .65rem;
        font-family: 'Cinzel', serif;
        margin-top: 16px;
    }

.lb-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7A2828, #4A1818);
    color: #E8E2D8;
    font-size: 2.2rem;
    font-family: 'Cinzel', serif;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border: 2px solid #4A2424;
    box-shadow: 0 0 0 4px rgba(122,40,40,.1), 0 8px 24px rgba(0,0,0,.4);
}

.lb-profile-header h2 {
    font-family: 'Cinzel', serif;
    color: #E8E2D8;
    font-size: 1.3rem;
    letter-spacing: 2px;
    margin: 0 0 6px;
}

.lb-member {
    display: inline-block;
    color: #9B3035;
    letter-spacing: 3px;
    font-size: .62rem;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    border: 1px solid #4A2424;
    border-radius: 20px;
    padding: 4px 12px;
    background: rgba(122,40,40,.08);
}

/* Tarjetas de perfil */
.lb-profile-card {
    background: #25211F;
    border: 1px solid #3A3630;
    border-top: 2px solid #4A2424;
    border-radius: 14px;
    padding: 24px 20px;
    margin-bottom: 14px;
}

    /* mt-3 de Bootstrap dentro de perfil */
    .lb-profile-card.mt-3 {
        margin-top: 14px !important;
    }

/* Secciones dentro de la tarjeta */
.lb-profile-section {
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

    .lb-profile-section:last-child {
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom: none;
    }

    .lb-profile-section.mt-3 {
        margin-top: 22px !important;
    }

    .lb-profile-section h4 {
        font-family: 'Cinzel', serif;
        color: #9B3035;
        font-size: .68rem;
        letter-spacing: 2px;
        text-transform: uppercase;
        margin: 0 0 16px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        /* Línea decorativa al lado del h4 */
        .lb-profile-section h4::after {
            content: "";
            flex: 1;
            height: 1px;
            background: linear-gradient(90deg, rgba(122,40,40,.3), transparent);
        }

    /* Labels dentro del perfil */
    .lb-profile-card > form label,
    .lb-profile-section label {
        display: block;
        color: #7D7770;
        font-family: 'Cinzel', serif;
        font-size: .58rem;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        margin-bottom: 7px;
        margin-top: 16px;
    }

        .lb-profile-card > form label:first-of-type,
        .lb-profile-section label:first-of-type {
            margin-top: 0;
        }

    /* Inputs dentro del perfil */
    .lb-profile-card input.form-control,
    .lb-profile-card select.form-control,
    .lb-profile-section input.form-control,
    .lb-profile-section select.form-control {
        width: 100%;
        padding: 10px 12px !important;
        border: 1px solid #2C2826 !important;
        border-radius: 8px !important;
        background: #1A1817 !important;
        color: #E8E2D8 !important;
        font-family: 'Cormorant Garamond', serif !important;
        font-size: .98rem !important;
        transition: border-color .25s, background .25s !important;
        box-shadow: none !important;
        margin-bottom: 4px;
        display: block;
    }

        .lb-profile-card input.form-control:focus,
        .lb-profile-card select.form-control:focus,
        .lb-profile-section input.form-control:focus,
        .lb-profile-section select.form-control:focus {
            border-color: #7A2828 !important;
            background: #25211F !important;
            outline: none !important;
            box-shadow: none !important;
        }

    /* Texto de estado (OTP/TOTP) */
    .lb-profile-section p {
        color: #7D7770;
        font-size: .9rem;
        margin: 0 0 12px;
        font-family: 'Cormorant Garamond', serif;
    }

        .lb-profile-section p strong {
            color: #C8C4BC;
            font-family: 'Cinzel', serif;
            font-size: .8rem;
            letter-spacing: .5px;
        }

    /* Botones dentro del perfil */
    .lb-profile-section .lb-save-btn,
    .lb-profile-section .lb-logout-btn,
    .lb-profile-section a.lb-save-btn {
        margin-top: 0;
    }

.lb-profile-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Validación */
.lb-profile-card .text-danger {
    color: #9B5050 !important;
    font-size: .72rem;
    font-family: 'Cinzel', serif;
    letter-spacing: .5px;
    display: block;
    margin-top: 5px;
}

/* mt-2 y mt-3 de Bootstrap */
.mt-2 {
    margin-top: 8px !important;
}

.mt-3 {
    margin-top: 14px !important;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (min-width: 769px) {
    .lb-auth-card {
        width: 440px;
        padding: 56px 52px 48px;
    }

    .lb-auth-page::before {
        background-size: 32px 32px;
    }
}

@media (max-width: 480px) {
    .lb-auth-page {
        padding: 24px 16px;
    }

    .lb-auth-card {
        padding: 36px 22px 32px;
    }

    .lb-auth-title {
        font-size: 1.3rem;
    }

    .lb-password-checklist ul {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: .78rem;
    }

        .table thead th,
        .table tbody td {
            padding: 8px 8px;
        }
}
