@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg: #060810;
    --surface: #0b0e18;
    --surface-2: #101421;
    --border: rgba(255,255,255,0.07);
    --primary: #6366f1;
    --primary-hover: #4f51d8;
    --primary-dim: rgba(99,102,241,0.1);
    --primary-glow: rgba(99,102,241,0.3);
    --text: #f1f5f9;
    --text-2: #8892a4;
    --text-3: #4a5568;
    --danger: #ef4444;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; display: flex; align-items: center; justify-content: center; min-height: 100vh; overflow: hidden; position: relative; }

.bg-orb { position: fixed; border-radius: 50%; pointer-events: none; filter: blur(90px); z-index: 0; }
.bg-orb-1 { width: 700px; height: 700px; background: radial-gradient(circle, rgba(99,102,241,0.13) 0%, transparent 65%); top: -250px; right: -150px; }
.bg-orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(139,92,246,0.09) 0%, transparent 65%); bottom: -180px; left: -120px; }
.bg-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(rgba(99,102,241,0.028) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,0.028) 1px, transparent 1px); background-size: 52px 52px; }

.login-outer { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 20px; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 44px 40px 40px; position: relative; overflow: hidden; box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(99,102,241,0.04); }
.login-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(99,102,241,0.5), rgba(139,92,246,0.4), transparent); }

.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.login-logo { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; border: 1px solid rgba(99,102,241,0.2); }
.login-brand-name { font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; line-height: 1.2; }
.login-brand-sub { font-size: 0.71rem; color: var(--text-2); font-weight: 500; }

.login-heading { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); margin-bottom: 6px; }
.login-sub { font-size: 0.875rem; color: var(--text-2); margin-bottom: 30px; line-height: 1.55; }

.form-field { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-2); margin-bottom: 7px; letter-spacing: 0.01em; }
.form-input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 11px 14px; font-size: 0.9rem; color: var(--text); font-family: 'Inter', sans-serif; transition: all 0.15s ease; outline: none; }
.form-input::placeholder { color: var(--text-3); }
.form-input:focus { border-color: rgba(99,102,241,0.5); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.form-input.error-state { border-color: rgba(239,68,68,0.5); box-shadow: 0 0 0 3px rgba(239,68,68,0.08); }

.error-alert { display: none; align-items: center; gap: 9px; background: rgba(239,68,68,0.07); border: 1px solid rgba(239,68,68,0.18); border-radius: 8px; padding: 10px 14px; margin-bottom: 18px; font-size: 0.835rem; color: #f87171; }
.error-alert.show { display: flex; }
.error-alert svg { width: 14px; height: 14px; flex-shrink: 0; }

.login-btn { width: 100%; padding: 12px 20px; background: var(--primary); color: #fff; border: none; border-radius: 10px; font-size: 0.9rem; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.15s ease; position: relative; overflow: hidden; }
.login-btn:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 8px 28px var(--primary-glow); }
.login-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.login-btn-icon { width: 16px; height: 16px; transition: transform 0.2s; }
.login-btn:hover:not(:disabled) .login-btn-icon { transform: translateX(3px); }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }

.login-hint { margin-top: 22px; text-align: center; font-size: 0.82rem; color: var(--text-3); }
.login-hint code { background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.14); color: #a5b4fc; padding: 2px 7px; border-radius: 5px; font-size: 0.85em; }

.login-public-links { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.05); flex-wrap: wrap; }
.login-public-links a { font-size: 0.78rem; color: var(--text-3); text-decoration: none; transition: color 0.15s; }
.login-public-links a:hover { color: var(--text-2); }
.login-public-links .sep { color: rgba(255,255,255,0.08); }

@media (max-width: 480px) { .login-card { padding: 32px 24px; } }
