@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --bg-dark-mesh: linear-gradient(180deg, #0b1329 0%, #060913 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(226, 232, 240, 0.85);
    --text-slate: #0f172a;
    --text-muted: #64748b;
    --primary-blue: #2563eb;
    --primary-emerald: #10b981;
}

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

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: #060913;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow-x: hidden;
}

/* Background Ambient Dynamic Mesh */
.ambient-bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(147, 51, 234, 0.1) 0px, transparent 50%);
    background-size: 160% 160%;
    animation: ambientMesh 22s ease infinite alternate;
}

@keyframes ambientMesh {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 50% 100%; }
}

/* Container & Card Layout */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 64rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: loginEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 768px) {
    .login-container {
        flex-direction: row;
    }
}

@keyframes loginEntrance {
    0% { opacity: 0; transform: translateY(20px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Hero Panel (Izquierda) */
.login-hero {
    display: none;
    width: 50%;
    background: var(--bg-dark-mesh);
    padding: 3.5rem;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
    .login-hero {
        display: flex;
    }
}

.hero-glow-1 {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 320px;
    height: 320px;
    background: rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    filter: blur(80px);
}

.hero-glow-2 {
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 320px;
    height: 320px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    filter: blur(80px);
}

.hero-brand-badge {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.hero-footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    width: fit-content;
}

/* Form Panel (Derecha) */
.login-form-area {
    width: 100%;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .login-form-area {
        width: 50%;
        padding: 3.5rem 4rem;
    }
}

.form-header-title {
    font-size: 1.875rem;
    font-weight: 900;
    color: var(--text-slate);
    letter-spacing: -0.025em;
}

.form-header-sub {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Alert Error */
.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecdd3;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 0.875rem 1.125rem;
    border-radius: 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Custom Input Controls */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.input-label {
    font-size: 0.625rem;
    font-weight: 900;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.custom-input {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid var(--card-border);
    border-radius: 1.125rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-slate);
    outline: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-input:focus {
    background-color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.btn-submit-neon {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.875rem;
    padding: 1rem 0;
    border-radius: 1.125rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 0.75rem;
}

.btn-submit-neon:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.45);
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

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

.back-link {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 2rem;
}

.back-link:hover {
    color: #2563eb;
    transform: translateX(-3px);
}