/* ═══════════════════════════════════════════
   TRACK360 ERP - Login Page (Light Theme)
   ═══════════════════════════════════════════ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 104px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecf4 50%, #f5f7fa 100%);
    position: relative;
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
}

.login-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }

.login-orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.5; }
.login-orb-1 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(37,99,235,0.12), transparent); top: 5%; left: 10%; animation: float 8s ease-in-out infinite; }
.login-orb-2 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(124,58,237,0.08), transparent); bottom: 10%; right: 8%; animation: float 10s ease-in-out infinite 2s; }
.login-orb-3 { width: 250px; height: 250px; background: radial-gradient(circle, rgba(5,150,105,0.08), transparent); top: 55%; left: 55%; animation: float 12s ease-in-out infinite 4s; }

.login-grid-overlay {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(37,99,235,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,0.03) 1px, transparent 1px);
    background-size: 50px 50px; z-index: 1;
}

.login-card {
    position: relative; z-index: 10;
    width: 100%; max-width: 420px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 44px 36px 36px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    animation: scaleIn 0.5s ease-out both;
}

.login-brand { text-align: center; margin-bottom: 28px; }

.login-logo {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(37,99,235,0.25);
}
.login-logo svg { width: 28px; height: 28px; color: #fff; }

.login-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.login-subtitle { font-size: 13px; color: var(--muted); }

.login-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text); }
.form-input-wrapper { position: relative; }

.form-input {
    width: 100%; height: 44px; padding: 0 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px; color: var(--text);
    font-family: 'DM Sans', sans-serif; font-size: 14px;
    outline: none; transition: all 0.2s;
}
.form-input::placeholder { color: var(--muted2); }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); background: #fff; }

.password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--muted); padding: 4px;
    display: flex; align-items: center; transition: color 0.15s;
}
.password-toggle:hover { color: var(--text); }
.password-toggle svg { width: 18px; height: 18px; }

.login-btn {
    width: 100%; height: 46px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none; border-radius: 10px; color: #fff;
    font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.35); }
.login-btn:active { transform: translateY(0); }
.login-btn.loading { pointer-events: none; opacity: 0.8; }
.login-btn.loading .btn-text { display: none; }
.login-btn.loading .btn-spinner { display: block; }
.btn-spinner { display: none; animation: spin 0.8s linear infinite; }

.demo-accounts {
    margin-top: 20px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px; padding: 14px;
}
.demo-accounts-title {
    font-size: 11px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.demo-accounts-title svg { width: 13px; height: 13px; color: var(--accent3); }

.demo-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 8px; margin: 0 -8px;
    font-size: 12px; cursor: pointer; transition: all 0.15s; border-radius: 6px;
}
.demo-row:hover { background: var(--accent-light); }

.demo-creds { color: var(--text); font-family: 'DM Mono', monospace; font-size: 11px; }
.demo-creds span { color: var(--muted2); margin: 0 4px; }

.demo-role { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.demo-role.admin { background: var(--accent-light); color: var(--accent); }
.demo-role.hr { background: var(--purple-light); color: var(--purple); }
.demo-role.employee { background: var(--accent2-light); color: var(--accent2); }

.login-error {
    padding: 10px 14px;
    background: var(--accent4-light);
    border: 1px solid rgba(220,38,38,0.2);
    border-radius: 8px; color: var(--accent4);
    font-size: 12px; font-weight: 500;
    display: none; align-items: center; gap: 8px;
}
.login-error.show { display: flex; }
.login-error svg { width: 16px; height: 16px; flex-shrink: 0; }

.login-footer {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    font-size: 11px; color: var(--muted2); text-align: center; z-index: 5;
}

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