/**
 * Project READ-TRACK — Login Page Styles
 * Theme: Teal/Emerald (Color of the Year inspired)
 */

:root {
    --rt-primary: #0e7c6b;
    --rt-primary-light: #14b8a6;
    --rt-primary-dark: #065f46;
    --rt-accent: #2dd4bf;
    --rt-glow: rgba(14, 124, 107, 0.3);
    --rt-bg: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #d1fae5 100%);
}

* { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

/* ===== SPLASH SCREEN ===== */
.splash-screen {
    position: fixed; inset: 0; z-index: 99999;
    background: linear-gradient(135deg, #064e3b 0%, #0e7c6b 40%, #065f46 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden; transition: opacity .7s ease, transform .7s ease;
}
.splash-screen.splash-hide { opacity: 0; transform: scale(1.05); pointer-events: none; }
.splash-bg-grid {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 30px 30px;
}
.splash-glow {
    position: absolute; width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(20,184,166,.3) 0%, transparent 70%);
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    animation: splashGlowPulse 4s ease-in-out infinite;
}
@keyframes splashGlowPulse { 0%, 100% { opacity: .5; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } }

.splash-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.splash-particle {
    position: absolute; bottom: -60px; color: rgba(255,255,255,.1);
    animation: splashFloat linear infinite;
}
@keyframes splashFloat { 0% { transform: translateY(0) rotate(0deg); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; } }

.splash-icon-wrap { position: relative; z-index: 2; margin-bottom: 24px; }
.splash-icon-ring {
    position: absolute; width: 120px; height: 120px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.15); top: 50%; left: 50%;
    transform: translate(-50%, -50%); animation: ringRotate 8s linear infinite;
}
.splash-icon-ring-2 {
    position: absolute; width: 140px; height: 140px; border-radius: 50%;
    border: 1px dashed rgba(255,255,255,.1); top: 50%; left: 50%;
    transform: translate(-50%, -50%); animation: ringRotate 12s linear infinite reverse;
}
@keyframes ringRotate { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.splash-icon {
    width: 88px; height: 88px; border-radius: 50%; overflow: hidden;
    background: rgba(255,255,255,.15); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    border: 3px solid rgba(255,255,255,.3);
}
.splash-icon img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; }

.splash-text { position: relative; z-index: 2; text-align: center; }
.splash-label { font-size: 14px; letter-spacing: 4px; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 4px; }
.splash-title { font-size: 48px; font-weight: 900; color: #fff; letter-spacing: 4px; text-shadow: 0 0 40px rgba(45,212,191,.3); }
.splash-letter { display: inline-block; opacity: 0; transform: translateY(20px); animation: letterIn .5s forwards; }
@keyframes letterIn { to { opacity: 1; transform: translateY(0); } }
.splash-accent { width: 60px; height: 4px; background: linear-gradient(90deg, #14b8a6, #2dd4bf); border-radius: 2px; margin: 12px auto; }
.splash-version { font-size: 12px; color: rgba(255,255,255,.4); }

.splash-tagline { z-index: 2; font-size: 13px; color: rgba(255,255,255,.7); text-align: center; margin: 16px 0; max-width: 400px; }

.splash-acronym { z-index: 2; display: flex; gap: 16px; margin: 12px 0; flex-wrap: wrap; justify-content: center; }
.splash-acr-item { display: flex; align-items: center; gap: 4px; }
.splash-acr-letter { font-size: 20px; font-weight: 900; color: #2dd4bf; }
.splash-acr-word { font-size: 12px; color: rgba(255,255,255,.6); }

.splash-loader { z-index: 2; width: 200px; margin-top: 24px; text-align: center; }
.splash-loader-track { width: 100%; height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden; }
.splash-loader-bar { height: 100%; width: 0; background: linear-gradient(90deg, #14b8a6, #2dd4bf); border-radius: 2px; transition: width .1s; }
.splash-loader-text { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 6px; }

.splash-stats { z-index: 2; display: flex; gap: 20px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }
.splash-stat-card {
    text-align: center; padding: 12px 18px; border-radius: 12px;
    background: rgba(255,255,255,.08); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.1); min-width: 100px;
}
.splash-stat-icon { font-size: 1.2rem; color: #2dd4bf; margin-bottom: 4px; }
.splash-stat-value { font-size: 1.4rem; font-weight: 800; color: #fff; }
.splash-stat-label { font-size: .65rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 1px; }

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--rt-bg); padding: 24px; position: relative; overflow: hidden;
}

.bg-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bg-shapes .shape {
    position: absolute; border-radius: 50%; opacity: .12;
    animation: shapeFloat 20s ease-in-out infinite;
}
.bg-shapes .shape:nth-child(1) {
    width: 400px; height: 400px; background: var(--rt-primary);
    top: -150px; right: -100px; animation-delay: 0s;
}
.bg-shapes .shape:nth-child(2) {
    width: 300px; height: 300px; background: var(--rt-accent);
    bottom: -100px; left: -80px; animation-delay: -7s;
}
.bg-shapes .shape:nth-child(3) {
    width: 200px; height: 200px; background: var(--rt-primary-light);
    top: 40%; left: 60%; animation-delay: -14s;
}
@keyframes shapeFloat { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 25% { transform: translate(30px, -40px) rotate(5deg); } 50% { transform: translate(-20px, 20px) rotate(-3deg); } 75% { transform: translate(15px, 30px) rotate(2deg); } }

.login-card {
    width: 100%; max-width: 420px; background: #fff; border-radius: 24px;
    box-shadow: 0 20px 60px rgba(14,124,107,.12); overflow: hidden;
    position: relative; z-index: 1;
}

.logo-container { text-align: center; padding: 28px 0 0; }
.logo-wrap { display: inline-block; }
.logo-placeholder {
    width: 72px; height: 72px; border-radius: 20px;
    background: linear-gradient(135deg, var(--rt-primary), var(--rt-primary-light));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto; box-shadow: 0 8px 24px var(--rt-glow);
}
.logo-placeholder i { font-size: 2rem; color: #fff; }

.header-banner { text-align: center; padding: 16px 28px; }
.login-title { font-size: 1.5rem; font-weight: 900; color: #0f172a; margin: 0; }
.login-subtitle { font-size: .78rem; color: #64748b; margin: 4px 0; }
.login-division { font-size: .7rem; color: #94a3b8; }

.login-form { padding: 8px 28px 16px; }
.form-group { margin-bottom: 14px; }
.form-group .form-label { font-size: .78rem; font-weight: 600; color: #334155; margin-bottom: 4px; }
.input-group-icon { position: relative; }
.input-group-icon .form-control {
    padding-left: 42px; border-radius: 12px; font-size: .88rem;
    border: 1.5px solid #e2e8f0; height: 48px;
}
.input-group-icon .form-control:focus { border-color: var(--rt-primary); box-shadow: 0 0 0 3px rgba(14,124,107,.12); }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 1rem; }
.password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #94a3b8; cursor: pointer; padding: 4px;
}

.btn-login {
    width: 100%; padding: 14px; font-weight: 700; font-size: .95rem;
    border: none; border-radius: 14px; display: flex; align-items: center;
    justify-content: center; gap: 8px; cursor: pointer;
    background: linear-gradient(135deg, var(--rt-primary), var(--rt-primary-light));
    color: #fff; box-shadow: 0 8px 20px var(--rt-glow);
    transition: transform .2s, box-shadow .2s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(14,124,107,.4); }

.login-help-section { margin-bottom: 8px; }

.login-register-section { text-align: center; padding: 8px 28px 16px; }

.login-footer { text-align: center; padding: 12px 28px 20px; }
.login-footer p { font-size: .68rem; color: #94a3b8; margin: 0; }

/* Stagger animation */
.stagger { opacity: 0; transform: translateY(16px); animation: staggerIn .5s ease forwards; }
.stagger:nth-child(1) { animation-delay: .1s; }
.stagger:nth-child(2) { animation-delay: .2s; }
.stagger:nth-child(3) { animation-delay: .3s; }
.stagger:nth-child(4) { animation-delay: .4s; }
.stagger:nth-child(5) { animation-delay: .5s; }
.stagger:nth-child(6) { animation-delay: .6s; }
.stagger:nth-child(7) { animation-delay: .7s; }
.stagger:nth-child(8) { animation-delay: .8s; }
.stagger:nth-child(9) { animation-delay: .9s; }
@keyframes staggerIn { to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 480px) {
    .login-card { border-radius: 20px; }
    .splash-title { font-size: 32px; letter-spacing: 2px; }
    .splash-acronym { gap: 8px; }
    .splash-stats { gap: 12px; }
    .splash-stat-card { min-width: 80px; padding: 8px 12px; }
}
