/* Trackfy — auth pages (login, forgot/reset password) */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a1a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-border: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-input-focus: rgba(255, 255, 255, 0.08);
    --border-input: rgba(255, 255, 255, 0.1);
    --border-input-focus: #7c3aed;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-glow: rgba(124, 58, 237, 0.4);
    --gradient-start: #a855f7;
    --gradient-end: #6366f1;
    --error-bg: rgba(239, 68, 68, 0.1);
    --error-border: #ef4444;
    --error-text: #fca5a5;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--gradient-start);
    top: -200px;
    right: -100px;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: var(--gradient-end);
    bottom: -150px;
    left: -100px;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.login-container {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bg-card-border);
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px var(--accent-glow);
}

.login-header {
    padding: 48px 40px 32px;
    text-align: center;
}

.login-header .logo-wrapper {
    margin-bottom: 20px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.login-header .logo-wrapper img {
    height: 44px;
    width: auto;
}

.login-header .tagline {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 24px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.login-body {
    padding: 0 40px 40px;
}

.error-message {
    background: var(--error-bg);
    color: var(--error-text);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    border-left: 3px solid var(--error-border);
    font-size: 13px;
    font-weight: 500;
    animation: fadeInUp 0.3s ease;
}

.form-group {
    margin-bottom: 20px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.form-group:nth-child(2) { animation-delay: 0.25s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

.form-label {
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    background: var(--bg-input-focus);
    border-color: var(--border-input-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.form-checkbox input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-input);
    border-radius: 5px;
    background: var(--bg-input);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.form-checkbox input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-checkbox label {
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-login:active {
    transform: translateY(0);
}

.login-links {
    text-align: center;
    margin-top: 24px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

.login-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.login-links a:hover {
    color: var(--gradient-start);
}

.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-muted);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.login-footer span {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .login-header { padding: 36px 24px 24px; }
    .login-body { padding: 0 24px 32px; }
}
    
.auth-desc {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin: -8px 0 24px;
    line-height: 1.5;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    border-left: 3px solid #22c55e;
    font-size: 13px;
    font-weight: 500;
}

.btn-secondary {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-input);
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}
