/* ═══════════════════════════════════════════════════
   login.css — Acceso coherente con la identidad FuXion
   ═══════════════════════════════════════════════════ */

body.auth-body {
    min-height: 100vh;
    display: flex;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 85% 10%, rgba(76,175,109,.12), transparent 28rem),
        var(--color-bg);
}

.auth-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.auth-panel-left {
    width: 44%;
    min-width: 420px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 4vw, 56px);
    background:
        linear-gradient(145deg, rgba(255,255,255,.03), transparent 45%),
        linear-gradient(145deg, #08150f 0%, #0e2419 52%, #174635 100%);
}

.auth-panel-left::before,
.auth-panel-left::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-panel-left::before {
    width: 420px;
    height: 420px;
    top: -160px;
    right: -130px;
    background: radial-gradient(circle, rgba(76,175,109,.25), transparent 68%);
}

.auth-panel-left::after {
    width: 330px;
    height: 330px;
    bottom: -140px;
    left: -100px;
    background: radial-gradient(circle, rgba(0,169,157,.16), transparent 68%);
}

.auth-brand,
.auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand,
.auth-illustration,
.auth-copy,
.auth-features {
    position: relative;
    z-index: 1;
}

.auth-brand .brand-icon,
.auth-mobile-brand .brand-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--color-success);
    color: #fff;
    font-size: 21px;
    box-shadow: 0 8px 24px rgba(76,175,109,.25);
}

.auth-brand .brand-text,
.auth-mobile-brand .brand-text {
    font-family: 'Fraunces', serif;
    font-size: 19px;
    font-weight: 650;
}

.auth-brand .brand-text {
    color: #fff;
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 28px;
}

.auth-mobile-brand .brand-text {
    color: var(--color-text);
}

.auth-illustration {
    display: grid;
    place-items: center;
    min-height: 180px;
}

.auth-icon-bg {
    color: rgba(255,255,255,.09);
    font-size: clamp(100px, 12vw, 158px);
    filter: drop-shadow(0 18px 45px rgba(76,175,109,.14));
}

.auth-copy {
    max-width: 480px;
}

.auth-copy h2 {
    margin: 0 0 12px;
    color: #fff;
    font-family: 'Fraunces', serif;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 600;
    letter-spacing: -.7px;
    line-height: 1.12;
}

.auth-copy p {
    margin: 0;
    color: rgba(255,255,255,.62);
    font-size: 14px;
    line-height: 1.7;
}

.auth-features {
    display: grid;
    gap: 11px;
    margin-top: 30px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.72);
    font-size: 12px;
}

.auth-feature i {
    color: #7edc9b;
    font-size: 15px;
    flex: 0 0 auto;
}

.auth-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: clamp(28px, 6vw, 72px) 24px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    padding: clamp(24px, 3vw, 38px);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: color-mix(in srgb, var(--color-surface) 94%, transparent);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
}

.auth-card-header {
    margin-bottom: 28px;
}

.auth-card-header h1 {
    margin: 0 0 7px;
    color: var(--color-text);
    font-family: 'Fraunces', serif;
    font-size: 30px;
    font-weight: 650;
    letter-spacing: -.5px;
}

.auth-card-header p {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
}

.form-group-auth {
    margin-bottom: 18px;
}

.form-group-auth .form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .45px;
    text-transform: uppercase;
}

.input-icon-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: var(--color-muted);
    font-size: 15px;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
}

.toggle-password:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.form-control-auth {
    width: 100%;
    min-height: 48px;
    padding: 11px 44px 11px 42px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.form-control-auth:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 4px rgba(31,75,63,.12);
}

.form-control-auth.is-invalid {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 4px rgba(214,69,69,.1);
}

.field-error {
    min-height: 16px;
    margin-top: 5px;
    color: var(--color-danger);
    font-size: 11px;
}

.btn-login {
    width: 100%;
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 11px;
    background: var(--color-primary);
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1px;
    box-shadow: 0 8px 20px rgba(31,75,63,.24);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s;
}

.btn-login:hover {
    transform: translateY(-1px);
    background: var(--color-primary-h);
    box-shadow: 0 10px 26px rgba(31,75,63,.3);
}

.btn-login:active {
    transform: translateY(0);
}

.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 11px 13px;
    border: 1px solid rgba(214,69,69,.2);
    border-radius: 10px;
    background: rgba(214,69,69,.08);
    color: var(--color-danger);
    font-size: 12px;
    animation: authShake .35s ease;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-5px); }
    60% { transform: translateX(5px); }
}

.auth-footer {
    margin-top: 27px;
    color: var(--color-muted);
    font-size: 11px;
    text-align: center;
}

@media (max-width: 991.98px) {
    .auth-panel-left {
        width: 40%;
        min-width: 340px;
        padding: 34px;
    }

    .auth-features {
        display: none;
    }
}

@media (max-width: 767.98px) {
    body.auth-body {
        align-items: center;
    }

    .auth-panel-left {
        display: none;
    }

    .auth-panel-right {
        padding: 20px 14px;
    }

    .auth-card {
        max-width: 460px;
        padding: 24px 20px;
        border-radius: 16px;
    }

    .auth-mobile-brand {
        display: flex;
    }

    .auth-card-header h1 {
        font-size: 27px;
    }
}

@media (max-width: 420px) {
    .auth-panel-right {
        align-items: stretch;
        padding: 0;
    }

    .auth-card {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}
