/* =============================================
   AnnotateAI – Auth Page Styles
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:      #6366f1;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99,102,241,0.35);
    --accent:       #06b6d4;
    --surface:      rgba(15,15,25,0.85);
    --surface-2:    rgba(255,255,255,0.05);
    --border:       rgba(255,255,255,0.09);
    --text:         #f1f5f9;
    --text-muted:   #94a3b8;
    --danger:       #ef4444;
    --success:      #22c55e;
    --radius:       16px;
    --font:         'Inter', system-ui, sans-serif;
}

body.auth-body {
    font-family: var(--font);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #080812;
    color: var(--text);
    overflow-x: hidden;
}

/* Background */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    animation: orbFloat 8s ease-in-out infinite alternate;
}
.orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(99,102,241,0.4), transparent 70%);
    top: -100px; left: -100px;
}
.orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.3), transparent 70%);
    bottom: -80px; right: -80px;
    animation-delay: -4s;
}
.orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(236,72,153,0.2), transparent 70%);
    top: 50%; left: 50%;
    animation-delay: -2s;
}
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}
@keyframes orbFloat {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(30px,30px) scale(1.1); }
}

/* Container */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Brand */
.auth-brand { text-align: center; }
.auth-logo {
    width: 72px; height: 72px;
    background-color:white !important;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    color: #fff;
    box-shadow: 0 0 40px var(--primary-glow);
    animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
    0%,100% { box-shadow: 0 0 40px var(--primary-glow); }
    50%      { box-shadow: 0 0 70px var(--primary-glow); }
}
.auth-title { font-size: 2rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

/* Card */
.auth-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: var(--surface-2);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
    border: 1px solid var(--border);
}
.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font);
}
.auth-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form.hidden { display: none; }

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-label i { margin-right: 6px; color: var(--primary); }
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: all 0.2s ease;
    outline: none;
}
.form-input:focus {
    border-color: var(--primary);
    background: rgba(99,102,241,0.07);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input::placeholder { color: rgba(148,163,184,0.5); }

.input-with-icon { position: relative; }
.input-with-icon .form-input { padding-right: 46px; }
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.toggle-password:hover { color: var(--primary); }

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}
.forgot-link { color: var(--primary); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.forgot-link:hover { color: var(--accent); }

/* Auth button */
.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px var(--primary-glow);
    margin-top: 4px;
}
.btn-auth:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}
.btn-auth:active { transform: translateY(0); }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; }

/* Messages */
.auth-message {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}
.auth-message.error   { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.auth-message.success { background: rgba(34,197,94,0.12);  border: 1px solid rgba(34,197,94,0.3);  color: #86efac; }
.auth-message.hidden  { display: none; }

/* Demo credentials */
.demo-credentials {
    background: rgba(99,102,241,0.06);
    border: 1px dashed rgba(99,102,241,0.25);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.demo-credentials p { margin-bottom: 8px; font-weight: 600; color: var(--primary); }
.demo-cred-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}
.btn-fill {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.2s;
}
.btn-fill:hover { background: var(--primary-dark); }

/* Password strength */
.password-strength { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.78rem; color: var(--text-muted); }
.strength-track { flex: 1; height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.strength-fill { height: 100%; width: 0; border-radius: 4px; transition: all 0.3s ease; }

/* Forgot form */
.back-link {
    color: var(--primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.back-link:hover { color: var(--accent); }
.forgot-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.forgot-desc { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 8px; }

/* Footer */
.auth-footer { font-size: 0.78rem; color: rgba(148,163,184,0.5); text-align: center; }

/* Responsive */
@media (max-width: 480px) {
    .auth-card { padding: 24px 18px; }
    .auth-title { font-size: 1.6rem; }
}
