:root {
    --navy: #1F3864;
    --navy-dark: #14294A;
    --navy-bright: #2C4E8C;
    --gold: #B8860B;
    --grey: #6B7280;
    --border: #E1E4E8;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.login-shell {
    display: flex;
    min-height: 100vh;
}

/* ================= PANEL DE MARCA ================= */
.login-brand {
    flex: 0 0 44%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-bright) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.login-brand::before {
    content: '';
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184,134,11,0.20), transparent 70%);
    top: -140px;
    right: -180px;
}

.login-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        135deg,
        rgba(255,255,255,0.045) 0px,
        rgba(255,255,255,0.045) 2px,
        transparent 2px,
        transparent 28px
    );
}

.brand-logo {
    position: relative;
    z-index: 1;
    display: block;
    width: 230px;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(10, 20, 45, 0.35));
}

.brand-tagline {
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,0.88);
    font-size: 14.5px;
    letter-spacing: 0.2px;
    margin: 26px 0 0;
    text-align: center;
}

/* ================= PANEL DE FORMULARIO ================= */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 40px 32px;
}

.login-form-wrap { width: 100%; max-width: 360px; }

.login-form-wrap h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 6px;
}

.login-form-wrap .subtitle {
    color: var(--grey);
    font-size: 14px;
    margin: 0 0 26px;
}

.login-form-wrap label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #4B5563;
    letter-spacing: 0.2px;
    margin: 16px 0 6px;
}

.login-form-wrap input[type="email"],
.login-form-wrap input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14.5px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.login-form-wrap input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(31,56,100,0.12);
}

.login-form-wrap button {
    width: 100%;
    margin-top: 26px;
    padding: 13px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s ease, transform .05s ease;
}
.login-form-wrap button:hover { opacity: 0.92; }
.login-form-wrap button:active { transform: scale(0.99); }

.alert {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}
.alert-error { background: #FDECEA; color: #9C1C1C; border: 1px solid #F3C1BD; }

/* ================= RESPONSIVE ================= */
@media (max-width: 860px) {
    .login-shell { flex-direction: column; }
    .login-brand { flex: none; padding: 32px 24px; min-height: 220px; }
    .brand-logo { width: 170px; }
    .brand-tagline { margin-top: 18px; }
    .login-form-panel { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-form-wrap button { transition: none; }
}
