/* Look In Ora Login Experience */

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #eef2f7 0%, #e5ebf4 45%, #f5f7fb 100%);
    font-family: var(--font-sans);
    color: #0f2f5d;
}

body.theme-dark {
    background: linear-gradient(135deg, #0f172a 0%, #111827 100%);
    color: #e5e7eb;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: clamp(24px, 4vw, 54px);
    align-items: center;
    padding: clamp(20px, 3vw, 42px) clamp(18px, 4vw, 56px);
    max-width: 1800px;
    margin: 0 auto;
}

.login-hero-panel {
    position: relative;
    padding: clamp(22px, 4vw, 56px);
    border-radius: 28px;
    overflow: hidden;
    min-height: clamp(520px, 72vh, 760px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(circle at 18% 18%, rgba(124, 58, 237, 0.1), transparent 40%),
        radial-gradient(circle at 82% 64%, rgba(236, 72, 153, 0.09), transparent 36%),
        linear-gradient(160deg, #f5f3ff 0%, #f6f0ff 55%, #fdf2f8 100%);
    box-shadow: 0 30px 70px rgba(124, 58, 237, 0.16);
}

.login-hero-panel::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 170px;
    background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    clip-path: polygon(0 26%, 100% 0, 93% 100%, 0% 100%);
    opacity: 0.96;
    z-index: 1;
}

.hero-logo,
.login-header .login-logo {
    width: min(94%, 760px);
    height: auto;
}

.hero-logo {
    margin-top: clamp(-20px, -2vh, 0px);
    margin-bottom: 0;
    background: transparent !important;
    mix-blend-mode: normal;
    position: relative;
    z-index: 2;
}

.login-hero-panel h1 {
    font-size: clamp(2rem, 4.2vw, 4rem);
    line-height: 1.08;
    margin: 0;
    color: #0f2f5d;
    max-width: 18ch;
}

.login-container {
    width: 100%;
    max-width: 620px;
    justify-self: center;
}

.login-box {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 22px;
    padding: clamp(20px, 2.5vw, 36px);
    box-shadow: 0 20px 48px rgba(17, 41, 75, 0.13);
    border: 1px solid #d6dde9;
    animation: fade-in 0.45s ease-out;
}

body.theme-dark .login-box {
    background: rgba(17, 24, 39, 0.95);
    border-color: rgba(148, 163, 184, 0.2);
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    margin-bottom: clamp(14px, 2vw, 24px);
}

.login-header h2 {
    font-size: clamp(1.6rem, 2vw, 2.1rem);
    font-weight: 700;
    color: #0f2f5d;
    margin-bottom: 6px;
}

.login-header p {
    color: #526987;
    font-size: 0.96rem;
    margin: 0;
}

#loginForm .form-group,
#registerForm .form-group {
    margin-bottom: 14px;
}

#loginForm label,
#registerForm label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #0f2f5d;
}

.split-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-control {
    border-radius: 10px;
    border: 1px solid #bcc9db;
    background: #f8fbff;
}

.form-control:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.password-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-3);
    color: var(--slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: #1d4b8b;
}

.password-toggle-btn i {
    font-size: 1rem;
}

.login-status {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 10px;
    min-height: 20px;
    transition: all 0.2s;
}

.login-status.error { color: var(--danger-600); background-color: var(--danger-50); }
.login-status.success { color: var(--success-600); background-color: var(--success-50); }

#loginBtn,
#registerBtn {
    font-size: 1rem;
    padding: 14px;
    border-radius: 12px;
}

.form-toggle {
    text-align: center;
    margin-top: 14px;
    font-size: 0.94rem;
    color: #5a708d;
}

.form-toggle a {
    color: #1d4b8b;
    font-weight: 600;
    text-decoration: none;
}

.form-toggle a:hover {
    text-decoration: underline;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    max-width: 460px;
    width: 92%;
    padding: 20px;
    animation: fade-in 0.35s ease;
}

.loading-logo {
    margin-bottom: 26px;
}

.loading-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
    animation: bounce 2s infinite;
}

.loading-logo .logo-text {
    font-size: 1.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.loading-logo .logo-tagline {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-top: 8px;
    letter-spacing: 1px;
}

.loading-spinner-container {
    margin: 20px auto;
}

.loading-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading-spinner-ring {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
}

.loading-spinner-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.28);
    animation: spin 0.8s linear infinite;
}

.loading-spinner-ring-average::before {
    border-top-color: #8b5cf6;
    border-right-color: #ec4899;
}

.loading-spinner-ring-current::before {
    border-top-color: #60a5fa;
    border-right-color: #8b5cf6;
}

.loading-progress-container {
    margin: 18px auto;
    max-width: 320px;
}

.loading-progress-percent {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.loading-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    border-radius: 10px;
    width: 0%;
    transition: width 0.25s ease;
}

.loading-status-text {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 8px;
}

.loading-modules {
    margin-top: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-modules-title {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-align: left;
}

.module-progress {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.module-item .module-icon {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

.module-item .module-name {
    flex: 1;
    text-align: left;
    color: #d1d5db;
}

.module-item .module-status {
    font-size: 0.9rem;
    min-width: 24px;
    text-align: right;
}

.module-item.loading {
    background: rgba(245, 158, 11, 0.18);
}

.module-item.loaded {
    background: rgba(16, 185, 129, 0.15);
}

.module-item.error {
    background: rgba(239, 68, 68, 0.15);
}

.module-item.loaded .module-name { color: #10b981; }
.module-item.error .module-name { color: #ef4444; }

.module-status.loading {
    animation: pulse 1.2s infinite;
    color: #f59e0b;
}

.module-status.done { color: #10b981; }
.module-status.error { color: #ef4444; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

@media (max-width: 720px) {
    .module-progress {
        grid-template-columns: 1fr;
    }
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
    color: #7a8ca5;
}
.login-footer p { margin: 0; }

@media (max-width: 1180px) {
    .login-shell {
        grid-template-columns: 1fr;
    }
    .login-hero-panel {
        min-height: 420px;
    }
}

@media (max-width: 760px) {
    .login-shell {
        padding: 14px;
        gap: 14px;
    }
    .login-hero-panel {
        min-height: 340px;
        padding: 22px 18px;
    }
    .hero-logo {
        width: min(96%, 420px);
        margin-top: -12px;
    }
    .login-hero-panel::after {
        height: 120px;
        clip-path: polygon(0 32%, 100% 4%, 96% 100%, 0% 100%);
    }
    .split-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
