/* ====================================================
   StockAI Pro - Ultra Premium Authentication Styles
   ==================================================== */

:root {
    --bg-dark: #07090e;
    --card-bg: rgba(15, 20, 31, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --accent-glow: rgba(99, 102, 241, 0.25);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --emerald: #10b981;
    --rose: #f43f5e;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Cyber Glow Background */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: 20%;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(139, 92, 246, 0.08) 45%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -15%;
    right: 15%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(16, 185, 129, 0.06) 50%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

/* Subtle Tech Grid overlay */
.auth-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 10;
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 42px 38px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 
                0 0 35px 0 rgba(99, 102, 241, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.7), 
                0 0 45px 0 rgba(99, 102, 241, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 1.85em;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 500;
}

.premium-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 20px;
    color: #a5b4fc;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

/* Premium Segmented Tabs */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 26px;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

/* Tab Content Visibility */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: authFadeIn 0.3s ease forwards;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    font-size: 0.85em;
    font-weight: 600;
    color: #cbd5e1;
}

.form-group label i {
    color: #818cf8;
    font-size: 0.9em;
}

.form-group input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92em;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #818cf8;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.form-group input::placeholder {
    color: #475569;
}

.pass-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pass-wrapper input {
    padding-right: 44px;
}

.toggle-pass {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.95em;
    transition: color 0.2s;
    padding: 4px;
}

.toggle-pass:hover {
    color: var(--text-primary);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.85em;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #6366f1;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-link {
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.98em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
    transition: all 0.25s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.45);
    filter: brightness(1.08);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Flashed Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88em;
    font-weight: 500;
}

.alert-error {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fb7185;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

/* Password Strength & Requirements */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
}

.strength-text {
    display: block;
    font-size: 0.75em;
    color: var(--text-dim);
    margin-top: 4px;
}

.password-reqs {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 0.78em;
    color: var(--text-muted);
}

.password-reqs p {
    font-weight: 600;
    margin-bottom: 5px;
    color: #cbd5e1;
}

.password-reqs ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.password-reqs li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-reqs li i {
    font-size: 0.55em;
    color: var(--text-dim);
}

.password-reqs li.valid {
    color: var(--emerald);
}

.password-reqs li.valid i {
    color: var(--emerald);
}

/* Error helper messages */
.error-msg {
    display: block;
    color: var(--rose);
    font-size: 0.78em;
    margin-top: 5px;
}
