/* ============================================
   AUTENTICACIÓN - ESTILOS PROFESIONALES
   Paleta Marrón Académica
   ============================================ */

.auth-body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #3e2723 0%, #5d4037 50%, #6d4c41 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Patrón decorativo de fondo */
.auth-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(176, 141, 87, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(176, 141, 87, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: #faf6f1;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    border: 2px solid #b08d57;
}

.auth-card-large {
    max-width: 600px;
    margin: 0 auto;
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #d4c4a8;
}

.auth-logo i {
    font-size: 48px;
    color: #b08d57;
    margin-bottom: 15px;
    display: block;
}

.auth-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: #3e2723;
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
}

.auth-subtitle {
    font-size: 14px;
    color: #5d4037;
    margin-top: 8px;
    font-style: italic;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #fee;
    border-left: 4px solid #8b2500;
    color: #8b2500;
}

.alert-success {
    background: #efe;
    border-left: 4px solid #2e5c3e;
    color: #2e5c3e;
}

.alert i {
    font-size: 20px;
}

/* Formulario */
.auth-form {
    margin-top: 20px;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: #3e2723;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-header p {
    font-size: 14px;
    color: #5d4037;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #3e2723;
    margin-bottom: 8px;
}

.form-group label i {
    color: #b08d57;
    font-size: 16px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #d4c4a8;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #2c1810;
    background: #ffffff;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #b08d57;
    box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.1);
}

.form-group input::placeholder {
    color: #7a6555;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #7a6555;
    margin-top: 5px;
    font-style: italic;
}

/* Password wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7a6555;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
}

.toggle-password:hover {
    color: #b08d57;
}

/* Password strength indicator */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #e0d5c1;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.strength-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--strength-width, 0%);
    background: linear-gradient(90deg, #8b2500, #a0522d, #b08d57, #2e5c3e);
    transition: width 0.3s ease;
}

.strength-text {
    font-size: 11px;
    color: #7a6555;
    min-width: 150px;
}

/* Form options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5d4037;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #b08d57;
}

.forgot-link {
    font-size: 13px;
    color: #b08d57;
    text-decoration: none;
    font-weight: 600;
}

.forgot-link:hover {
    color: #967641;
    text-decoration: underline;
}

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3e2723 0%, #5d4037 100%);
    color: #faf6f1;
    border: 2px solid #b08d57;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #b08d57 0%, #967641 100%);
    color: #3e2723;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(176, 141, 87, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #d4c4a8;
}

.auth-divider span {
    background: #faf6f1;
    padding: 0 15px;
    color: #7a6555;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* Footer */
.auth-footer {
    text-align: center;
    font-size: 14px;
    color: #5d4037;
}

.auth-footer a {
    color: #b08d57;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    color: #967641;
    text-decoration: underline;
}

/* Back link */
.auth-back {
    text-align: center;
    margin-top: 25px;
}

.auth-back a {
    color: #faf6f1;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.auth-back a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-logo h1 {
        font-size: 26px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-container {
        max-width: 100%;
    }
    
    .auth-card {
        padding: 25px 15px;
        border-radius: 8px;
    }
    
    .auth-logo i {
        font-size: 36px;
    }
    
    .auth-logo h1 {
        font-size: 22px;
    }
}

/* Acceso profesional V3 */
.auth-login-page {
    display: block;
    padding: 28px;
    background: #eee8df;
    color: #2b211d;
}
.auth-login-page::before {
    background: radial-gradient(circle at 12% 18%, rgba(176,141,87,.22), transparent 28%), radial-gradient(circle at 88% 86%, rgba(92,57,45,.12), transparent 32%);
}
.auth-skip { position: fixed; left: 20px; top: -60px; z-index: 20; padding: 10px 14px; border-radius: 7px; background: #fff; color: #38251f; font-weight: 700; transition: top .2s; }
.auth-skip:focus { top: 15px; }
.login-shell { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(430px, 1.05fr) minmax(430px, .95fr); width: min(1220px, 100%); min-height: calc(100vh - 56px); margin: 0 auto; overflow: hidden; border: 1px solid rgba(86,55,43,.16); border-radius: 24px; background: #fffdf9; box-shadow: 0 35px 90px rgba(60,38,30,.19); }
.login-story { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 42px 48px 36px; overflow: hidden; background: radial-gradient(circle at 82% 24%, rgba(206,164,90,.25), transparent 25%), linear-gradient(145deg, #231512 0%, #432820 48%, #614535 100%); color: #fff8ea; isolation: isolate; }
.login-story::before { content: ''; position: absolute; right: -160px; bottom: -180px; width: 480px; height: 480px; border: 1px solid rgba(232,200,138,.13); border-radius: 50%; box-shadow: 0 0 0 55px rgba(232,200,138,.035), 0 0 0 110px rgba(232,200,138,.025); z-index: -1; }
.login-story::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 38px 38px; z-index: -2; }
.login-brand { display: inline-flex; align-items: center; align-self: flex-start; gap: 12px; color: inherit; text-decoration: none; }
.login-brand > span { width: 45px; height: 45px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; background: #d8b46c; color: #2d1c17; font-size: 20px; }
.login-brand div { display: flex; flex-direction: column; }
.login-brand strong { font-family: Georgia, serif; font-size: 22px; line-height: 1; }
.login-brand small { margin-top: 5px; color: rgba(255,255,255,.58); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.login-story-copy { max-width: 550px; margin-top: clamp(45px, 8vh, 88px); }
.login-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 15px; color: #e7c986; font-size: 10px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.login-story-copy h1 { max-width: 520px; margin: 0 0 18px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(42px, 4.4vw, 67px); font-weight: 500; line-height: .98; letter-spacing: -.04em; }
.login-story-copy p { max-width: 510px; margin: 0; color: rgba(255,255,255,.7); font-size: 15px; line-height: 1.7; }
.login-book-showcase { position: relative; height: 230px; margin: 32px 0 22px; }
.login-book-showcase img { position: absolute; bottom: 0; width: 128px; aspect-ratio: 2 / 3; border: 1px solid rgba(255,255,255,.23); border-radius: 5px; object-fit: cover; box-shadow: 0 20px 35px rgba(0,0,0,.36); transition: transform .3s ease; }
.login-book-showcase img:nth-child(1) { left: 8%; transform: rotate(-8deg); }
.login-book-showcase img:nth-child(2) { left: 34%; z-index: 2; width: 143px; transform: translateY(-9px); }
.login-book-showcase img:nth-child(3) { left: 61%; transform: rotate(8deg); }
.login-book-showcase:hover img:nth-child(1) { transform: translateX(-6px) rotate(-11deg); }
.login-book-showcase:hover img:nth-child(2) { transform: translateY(-15px); }
.login-book-showcase:hover img:nth-child(3) { transform: translateX(6px) rotate(11deg); }
.login-story-footer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: auto; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.13); }
.login-story-footer div { display: flex; flex-direction: column; }
.login-story-footer strong { color: #f2d794; font-family: Georgia, serif; font-size: 23px; }
.login-story-footer span { margin-top: 2px; color: rgba(255,255,255,.54); font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }
.login-panel { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 55px clamp(42px, 6vw, 78px); background: #fffdf9; }
.login-mobile-brand { display: none; }
.login-panel-header { margin-bottom: 28px; }
.login-panel-kicker { display: block; margin-bottom: 8px; color: #997344; font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.login-panel-header h2 { margin: 0 0 9px; color: #34231d; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(32px, 3vw, 43px); font-weight: 600; letter-spacing: -.025em; }
.login-panel-header p { margin: 0; color: #77675d; font-size: 13px; }
.login-panel .alert { border-radius: 9px; }
.login-form { margin-top: 0; }
.login-form .form-group { margin-bottom: 17px; }
.login-form .form-group label { margin-bottom: 8px; color: #4b352d; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.login-input-wrap { position: relative; }
.login-form .login-input-wrap input { min-height: 51px; padding: 13px 45px 13px 14px; border: 1px solid #d8cbbc; border-radius: 9px; background: #fff; font-size: 14px; }
.login-form .login-input-wrap input:focus { border-color: #9f7843; box-shadow: 0 0 0 4px rgba(176,141,87,.13); }
.login-input-wrap > .fa-at { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #a18f82; }
.login-form .toggle-password { right: 9px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 7px; }
.login-form .toggle-password:hover { background: #f2e9dc; }
.login-options { margin: 4px 0 22px; }
.login-options .checkbox-label { color: #67574e; font-size: 11px; }
.login-help { color: #967044; font-size: 11px; font-weight: 750; cursor: help; }
.login-help i { margin-right: 4px; }
.login-submit { min-height: 52px; justify-content: space-between; padding: 0 19px; border: 0; border-radius: 9px; background: linear-gradient(135deg, #38231c, #5a382c); box-shadow: 0 12px 23px rgba(69,40,31,.18); }
.login-submit:hover { background: linear-gradient(135deg, #5a382c, #7c543c); color: #fff; }
.login-security { display: flex; flex-wrap: wrap; justify-content: center; gap: 13px 18px; margin: 17px 0 0; color: #86766b; font-size: 9px; }
.login-security i { margin-right: 4px; color: #7a976f; }
.login-register-box { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 27px; padding: 16px 17px; border: 1px solid #e2d7c9; border-radius: 11px; background: #f8f3ec; }
.login-register-box strong { display: block; color: #463129; font-size: 12px; }
.login-register-box p { margin: 3px 0 0; color: #817065; font-size: 10px; }
.login-register-box a { flex-shrink: 0; color: #765128; font-size: 11px; font-weight: 850; text-decoration: none; }
.login-register-box a i { margin-left: 5px; }
.login-back-link { display: inline-flex; align-items: center; align-self: flex-start; gap: 7px; margin-top: 22px; color: #79675c; font-size: 11px; font-weight: 700; text-decoration: none; }
.login-back-link:hover { color: #4e3429; }
.login-legal { margin: 19px 0 0; color: #aa9d93; font-size: 9px; }
@media (max-width: 1040px) {
    .login-shell { grid-template-columns: minmax(360px, .85fr) minmax(420px, 1fr); }
    .login-story { padding-inline: 35px; }
    .login-book-showcase img { width: 110px; }
    .login-book-showcase img:nth-child(2) { width: 125px; }
}
@media (max-width: 850px) {
    .auth-login-page { padding: 18px; }
    .login-shell { display: block; max-width: 620px; min-height: calc(100vh - 36px); }
    .login-story { display: none; }
    .login-panel { min-height: calc(100vh - 36px); padding: 42px clamp(25px, 8vw, 62px); }
    .login-mobile-brand { display: inline-flex; align-items: center; align-self: flex-start; gap: 9px; margin-bottom: 45px; color: #422b23; font-family: Georgia, serif; font-size: 19px; text-decoration: none; }
    .login-mobile-brand i { color: #a27a42; }
}
@media (max-width: 520px) {
    .auth-login-page { padding: 0; background: #fffdf9; }
    .login-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
    .login-panel { min-height: 100vh; padding: 30px 20px; }
    .login-mobile-brand { margin-bottom: 34px; }
    .login-panel-header h2 { font-size: 32px; }
    .login-options { align-items: flex-start; }
    .login-register-box { align-items: flex-start; flex-direction: column; }
    .login-security { justify-content: flex-start; }
}
