/* ===== BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== LOGIN HERO ===== */
.login-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #1d4ed8 75%, #1e40af 100%);
    color: white;
    min-height: calc(100vh - 68px);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0 4rem;
}

/* Blobs animados — mismos que index */
.login-hero::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    top: -280px;
    right: -150px;
    animation: heroBlobA 10s ease-in-out infinite;
    pointer-events: none;
}

.login-hero::after {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 50%;
    bottom: -180px;
    left: -120px;
    animation: heroBlobB 12s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes heroBlobA {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-40px) scale(1.06); }
}

@keyframes heroBlobB {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(30px) scale(1.08); }
}

.login-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.login-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

/* ===== PANEL IZQUIERDO — MARCA ===== */
.login-brand-panel {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.login-logo {
    text-align: center;
}

.login-logo-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.login-logo-wrap::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    animation: ringPulse 3.5s ease-in-out infinite;
}

.login-logo-wrap::after {
    content: '';
    position: absolute;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.08);
    animation: ringPulse 3.5s ease-in-out 0.9s infinite;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.12); opacity: 0.15; }
}

.logo-image {
    width: 90px;
    height: 90px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-logo h1 {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fde68a, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.35rem;
}

.login-logo p {
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 500;
    line-height: 1.5;
}

/* Feature list glassmorphism */
.login-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    cursor: default;
}

.login-feature-item:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.28);
}

.lf-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.login-feature-item span:last-child {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.92;
    line-height: 1.35;
}

.login-tagline {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.65;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* ===== PANEL DERECHO — FORMULARIO ===== */
.login-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-form-box {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 440px;
    color: var(--text-primary);
    overflow: hidden;
    animation: fadeInUp 0.55s ease-out both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Barra superior degradada */
.login-form-box::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.login-form-inner {
    padding: 2.5rem;
}

.login-form-box h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* ===== FORM ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    animation: fadeInUp 0.5s ease-out both;
}

.form-group:nth-child(1) { animation-delay: 0.08s; }
.form-group:nth-child(2) { animation-delay: 0.16s; }
.form-group:nth-child(3) { animation-delay: 0.24s; }

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.825rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    letter-spacing: 0.01em;
}

.form-label i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 0.825rem 1rem 0.825rem 2.875rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all 0.25s ease;
    background: var(--background-color);
    color: var(--text-primary);
    font-family: inherit;
}

.form-input:hover {
    border-color: var(--border-hover);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-icon {
    position: absolute;
    left: 0.9rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.25s ease;
}

.form-input:focus ~ .input-icon {
    color: var(--primary-color);
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger-color);
    display: none;
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.form-error::before {
    content: '⚠';
    font-size: 0.7rem;
}

.form-group:not(.error) .form-error {
    display: none;
}

.form-group.error .form-error {
    display: flex;
}

.form-group.error .form-input {
    border-color: var(--danger-color);
    background: rgba(220, 38, 38, 0.03);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group.correct .form-input {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-group.error .input-icon {
    color: var(--danger-color);
}

.form-group.correct .input-icon {
    color: var(--success-color);
}

/* ===== BOTÓN LOGIN ===== */
.btn-login {
    width: 100%;
    padding: 0.9rem 2rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45);
    font-family: inherit;
}

.btn-login:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.55);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.4);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading state */
.btn-login.loading {
    position: relative;
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== MENSAJES ===== */
.form-message {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.form-message.success {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success-color);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.form-message.error {
    background: rgba(220, 38, 38, 0.07);
    color: var(--danger-color);
    border: 1px solid rgba(220, 38, 38, 0.18);
}

.form-message.hidden {
    display: none;
}

/* ===== LINKS ===== */
.login-links {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
}

.login-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.login-links a:hover {
    color: var(--primary-color);
}

/* ===== WAVE ===== */
.login-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    line-height: 0;
    z-index: 2;
    pointer-events: none;
}

.login-wave svg {
    display: block;
    width: 100%;
    height: 50px;
}

/* ===== FOOTER (igual que index) ===== */
.footer {
    background: #0f172a;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
}

.footer-brand h3 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.55;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.25s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-links a::before {
    content: '›';
    color: #fbbf24;
    font-size: 1.1rem;
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    color: #cbd5e1;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.footer-contact p i {
    color: #fbbf24;
    width: 16px;
    text-align: center;
}

.footer-bottom {
    padding-top: 1.75rem;
    text-align: center;
    color: #475569;
    font-size: 0.875rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .login-hero {
        padding: 2.5rem 0 3.5rem;
        min-height: auto;
    }

    .login-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .login-brand-panel {
        align-items: center;
        gap: 1.5rem;
    }

    .login-logo {
        text-align: center;
    }

    .login-logo h1 {
        font-size: 2.25rem;
    }

    .login-feature-list {
        display: none;
    }

    .login-tagline {
        display: none;
    }

    .login-form-inner {
        padding: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-contact {
        text-align: center;
    }

    .footer-contact p {
        justify-content: center;
    }

    .footer-links a {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .login-hero {
        padding: 2rem 0 3rem;
    }

    .logo-image {
        width: 70px;
        height: 70px;
    }

    .login-logo h1 {
        font-size: 1.9rem;
    }

    .login-logo-wrap::before { width: 110px; height: 110px; }
    .login-logo-wrap::after  { width: 82px;  height: 82px;  }

    .login-form-inner {
        padding: 1.5rem;
    }

    .login-form-box h2 {
        font-size: 1.5rem;
    }
}
