


@keyframes loginFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes loginSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 6px 28px rgba(37, 99, 235, 0.55); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


.auth-layout:has(.auth-split) {
    position: relative; padding: 0;
    min-height: 100vh; min-height: 100dvh;
    background: #06080f;
    align-items: stretch; justify-content: stretch;
    overflow-x: hidden;
}
.auth-layout:has(.auth-split)::before,
.auth-layout:has(.auth-split)::after { display: none; }
.auth-layout:has(.auth-split) .messages-container {
    position: absolute; top: max(16px, env(safe-area-inset-top));
    left: 50%; transform: translateX(-50%); z-index: 20;
    max-width: calc(100% - 2rem);
}


.auth-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 100vh; min-height: 100dvh;
    width: 100%; max-width: 100vw;
    background: #06080f;
}


.auth-hero {
    position: relative;
    min-height: 100vh; min-height: 100dvh;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.auth-hero-bg {
    position: absolute; inset: -5%;
    width: 110%; height: 110%;
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    background-color: #06080f;
    will-change: transform;
    animation: float 20s ease-in-out infinite;
}
.auth-hero-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(6,8,15,0.4) 0%, rgba(6,8,15,0.15) 40%, rgba(6,8,15,0.6) 100%),
        linear-gradient(90deg, transparent 60%, rgba(6,8,15,0.95) 100%);
    z-index: 1;
}
.auth-hero-overlay::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 40% at 30% 70%, rgba(37,99,235,0.12) 0%, transparent 70%);
    pointer-events: none;
}


.auth-hero-logo-corner {
    position: absolute; top: 0; left: 0; z-index: 3;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-left)) 0;
    max-width: min(200px, 25vw); width: 100%;
    animation: loginFadeUp 0.6s ease-out 0.1s backwards;
}
.auth-hero-logo {
    width: 100%; max-width: 100%; height: auto; max-height: 80px;
    display: block; object-fit: contain; object-position: left top;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}
.auth-hero-logo-fallback { display: none; padding: 8px 0; }
.auth-hero-logo-fallback .auth-hero-brand {
    font-size: clamp(1rem, 3.5vw, 1.35rem); font-weight: 800;
    letter-spacing: 0.02em; color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.auth-hero-logo-fallback .auth-hero-tagline {
    font-size: clamp(0.45rem, 1.5vw, 0.6rem);
    letter-spacing: 0.12em; color: rgba(255,255,255,0.85); margin-top: 2px;
}


.auth-panel {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    padding: max(32px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
    overflow-y: auto; overflow-x: hidden;
    min-height: 100vh; min-height: 100dvh;
    -webkit-overflow-scrolling: touch;
}
.auth-panel-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    min-height: 100%;
    filter: blur(2px) brightness(0.4);
}
.auth-panel-overlay {
    position: absolute; inset: 0; min-height: 100%;
    background: linear-gradient(160deg, rgba(6,8,15,0.92) 0%, rgba(15,23,42,0.88) 50%, rgba(6,8,15,0.94) 100%);
    z-index: 0;
}


.auth-panel-inner {
    position: relative; z-index: 1;
    width: 100%; max-width: min(400px, calc(100vw - 48px));
    padding: 28px 28px 24px;
    background: rgba(15,23,42,0.4);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
    animation: loginSlideIn 0.5s ease-out 0.15s backwards;
}


.auth-panel-header { margin-bottom: 22px; }
.auth-panel-title {
    font-size: clamp(1.5rem, 4vw, 1.75rem); font-weight: 800;
    margin: 0 0 6px; letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.auth-panel-title::after {
    content: ''; display: block;
    width: 52px; height: 4px; margin-top: 12px; border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 0 12px rgba(37,99,235,0.4);
}
.auth-panel-desc {
    font-size: clamp(0.88rem, 2vw, 0.95rem); color: rgba(255,255,255,0.75); margin: 0;
}


.auth-form .form-group {
    margin-bottom: 14px;
    animation: loginFadeUp 0.4s ease-out backwards;
}
.auth-form .form-group:nth-child(1) { animation-delay: 0.25s; }
.auth-form .form-group:nth-child(2) { animation-delay: 0.32s; }
.auth-form .form-group:nth-child(3) { animation-delay: 0.39s; }
.auth-form .form-group:nth-child(4) { animation-delay: 0.46s; }

.auth-form .form-group label {
    display: block; font-size: 0.88rem; font-weight: 600;
    color: rgba(255,255,255,0.9); margin-bottom: 6px;
}
.auth-form .form-control {
    width: 100%; min-height: 46px; padding: 12px 14px;
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 12px; font-size: 1rem;
    background: rgba(255,255,255,0.06); color: #fff;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.auth-form .form-control::placeholder { color: rgba(255,255,255,0.35); }
.auth-form .form-control:hover {
    border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08);
}
.auth-form .form-control:focus {
    outline: none; border-color: var(--primary);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.2);
}


.auth-terms-group { margin-top: 4px; }
.auth-terms-label {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: pointer; font-weight: 500; color: rgba(255,255,255,0.9);
}
.auth-terms-label input[type="checkbox"] {
    margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--primary);
}
.auth-terms-label a { color: #93c5fd; text-decoration: underline; }
.auth-terms-label a:hover { color: #bfdbfe; }
.auth-terms-desc { display: block; font-size: 0.78rem; color: rgba(255,255,255,0.5); margin: 4px 0 0 28px; }
.optional { font-weight: 400; opacity: 0.7; }


.auth-messages { margin-bottom: 16px; }
.auth-messages .alert { padding: 10px 14px; border-radius: var(--radius); font-size: 0.88rem; }
.auth-messages .alert-error { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.auth-messages .alert-success { background: rgba(16,185,129,0.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }


.btn-primary-login {
    width: 100%; margin-top: 8px; min-height: 50px;
    padding: 13px 20px; font-size: 1.05rem; font-weight: 700;
    border-radius: 14px; border: none;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #fff; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.25s;
    box-shadow: 0 4px 18px rgba(37,99,235,0.45), inset 0 1px 0 rgba(255,255,255,0.15);
    -webkit-tap-highlight-color: transparent;
    animation: loginFadeUp 0.4s ease-out 0.5s backwards;
    position: relative; overflow: hidden;
}
.btn-primary-login::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    opacity: 0; transition: opacity 0.2s;
}
.btn-primary-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37,99,235,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary-login:hover::before { opacity: 1; }
.btn-primary-login:active { transform: translateY(0); }


.auth-divider {
    text-align: center; margin: 18px 0 16px; position: relative;
    animation: loginFadeUp 0.4s ease-out 0.55s backwards;
}
.auth-divider::before {
    content: ''; position: absolute; left: 0; top: 50%; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}
.auth-divider span {
    position: relative; background: transparent;
    padding: 0 16px; font-size: 0.78rem; font-weight: 600;
    color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em;
}


.auth-social-ctas {
    display: flex; flex-direction: column; gap: 10px;
    animation: loginFadeUp 0.4s ease-out 0.6s backwards;
}
.btn-social {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 46px; padding: 12px 18px;
    font-size: 0.95rem; font-weight: 600;
    border-radius: 12px; border: 1.5px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04); color: #fff;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.btn-social:hover {
    background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.35);
    transform: translateY(-1px); color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-meta:hover { border-color: #1877F2; background: rgba(24,119,242,0.15); color: #93c5fd; }
.btn-tiktok:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.06); }


.auth-footer-text {
    text-align: center; margin-top: 18px; font-size: 0.88rem; color: rgba(255,255,255,0.65);
}
.auth-footer-text a { color: #93c5fd; font-weight: 600; text-decoration: none; }
.auth-footer-text a:hover { text-decoration: underline; color: #bfdbfe; }

.auth-legal-social {
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06); text-align: center;
}
.auth-legal-tagline { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin: 0 0 8px; line-height: 1.4; }
.auth-legal-links {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 0.4rem 0.6rem; margin-bottom: 10px; font-size: 0.8rem;
}
.auth-legal-links a { color: #93c5fd; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.auth-legal-links a:hover { color: #bfdbfe; text-decoration: underline; }
.auth-legal-sep { color: rgba(255,255,255,0.3); }

.auth-social-icons {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px;
}
.auth-social-icons a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; color: rgba(255,255,255,0.7);
    text-decoration: none; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    transition: all 0.2s; -webkit-tap-highlight-color: transparent;
}
.auth-social-icons a:hover { color: #fff; transform: scale(1.1); background: rgba(255,255,255,0.08); }
.auth-social-icons a i { font-size: 1rem; }
.auth-social-icons a i.fa-facebook-f { color: #60a5fa; }
.auth-social-icons a i.fa-instagram { color: #f9a8d4; }
.auth-social-icons a i.fa-whatsapp { color: #86efac; }
.auth-social-icons a i.fa-tiktok { color: rgba(255,255,255,0.85); }
.auth-social-icons a i.fa-phone-alt { color: #67e8f9; }
.auth-social-icons a:hover i { color: #fff !important; }




@media (min-width: 1400px) {
    .auth-panel-inner { max-width: 420px; padding: 32px 32px 28px; }
    .auth-hero-bg { animation: float 25s ease-in-out infinite; }
}


@media (max-width: 1024px) {
    .auth-split {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }
    .auth-hero { min-height: 44vh; min-height: 44dvh; max-height: min(520px, 55vh); }
    .auth-hero-bg {
        inset: 0; width: 100%; height: 100%;
        background-size: cover; background-position: center 18%;
        animation: none;
    }
    .auth-hero-logo-corner { max-width: min(160px, 38vw); padding: max(16px, env(safe-area-inset-top)) 16px 0; }
    .auth-hero-logo { max-height: 56px; }
    .auth-panel { padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); min-height: auto; }
    .auth-panel-inner { max-width: 440px; border-radius: 20px; }
}


@media (max-width: 768px) {
    .auth-hero { min-height: 42vh; min-height: 42dvh; max-height: min(480px, 52vh); }
    .auth-hero-bg { background-position: center 22%; }
    .auth-hero-overlay {
        background: linear-gradient(180deg, rgba(6,8,15,0.3) 0%, rgba(6,8,15,0.15) 40%, rgba(6,8,15,0.7) 100%);
    }
    .auth-hero-logo-corner { max-width: min(130px, 36vw); padding: max(14px, env(safe-area-inset-top)) 14px 0; }
    .auth-hero-logo { max-height: 48px; }
    .auth-panel { padding: 20px 16px max(20px, env(safe-area-inset-bottom)); }
    .auth-panel-inner { padding: 24px 22px 20px; }
}


@media (max-width: 480px) {
    .auth-hero { min-height: 40vh; min-height: 40dvh; max-height: min(420px, 48vh); }
    .auth-hero-bg { background-position: center 25%; background-size: cover; }
    .auth-hero-logo-corner { max-width: min(110px, 34vw); padding: max(12px, env(safe-area-inset-top)) 12px 0; }
    .auth-hero-logo { max-height: 40px; }
    .auth-panel { padding: 16px 14px max(16px, env(safe-area-inset-bottom)); }
    .auth-panel-inner { padding: 22px 18px 18px; border-radius: 18px; }
    .auth-panel-title { font-size: 1.4rem; }
    .auth-form .form-control { min-height: 44px; padding: 10px 12px; font-size: 0.95rem; }
    .btn-primary-login { min-height: 46px; font-size: 1rem; }
    .btn-social { min-height: 44px; font-size: 0.9rem; }
    .auth-social-icons a { width: 36px; height: 36px; }
}


@media (max-width: 360px) {
    .auth-hero { min-height: 36vh; min-height: 36dvh; max-height: min(360px, 46vh); }
    .auth-hero-logo-corner { max-width: min(90px, 30vw); }
    .auth-hero-logo { max-height: 34px; }
    .auth-panel { padding: 14px 12px; }
    .auth-panel-inner { padding: 18px 14px 16px; border-radius: 16px; }
    .auth-panel-title { font-size: 1.25rem; }
    .auth-social-ctas { gap: 8px; }
}


@media (max-height: 500px) and (orientation: landscape) {
    .auth-split { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
    .auth-hero { min-height: 100vh; max-height: none; }
    .auth-panel { min-height: 100vh; }
    .auth-panel-inner { max-height: calc(100vh - 32px); overflow-y: auto; padding: 18px 20px; }
}
