/**
 * Mavikon Auth Pages CSS
 * Login, Register, Verify Email pages
 */

:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --border-color: rgba(148, 163, 184, 0.2);
    --border-focus: rgba(59,130,246,0.6);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-dark: #1e40af;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}

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

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

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: -30%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -25%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

/* Container */
.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.auth-container.wide {
    max-width: 500px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    text-decoration: none;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Card */
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: var(--error);
}

.alert-success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    color: var(--success);
}

/* Social Buttons */
.social-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-social:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(59,130,246,0.15);
    transform: translateY(-1px);
}

.btn-social i {
    font-size: 18px;
}

.btn-google:hover { border-color: #ea4335; }

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    background: rgba(59,130,246,0.1);
}

.form-control.is-invalid {
    border-color: var(--error);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.invalid-feedback {
    color: var(--error);
    font-size: 12px;
    margin-top: 6px;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-fill.weak { width: 33%; background: var(--error); }
.strength-fill.medium { width: 66%; background: var(--warning); }
.strength-fill.strong { width: 100%; background: var(--success); }

.strength-text {
    font-size: 11px;
    color: var(--text-muted);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: var(--accent);
    cursor: pointer;
}

.checkbox-wrapper label {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-wrapper label a {
    color: var(--accent);
    text-decoration: none;
}

.checkbox-wrapper label a:hover {
    text-decoration: underline;
}

.forgot-link {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
}

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

/* Terms Text */
.terms-text {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}

.terms-text input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    border-radius: 4px;
    accent-color: var(--accent);
    cursor: pointer;
}

.terms-text label {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.terms-text a {
    color: var(--accent);
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    margin-top: 12px;
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(59,130,246,0.1);
}

/* Link Text */
.auth-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Back Link */
.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
}

.back-link:hover {
    color: var(--text-secondary);
}

/* Info Box */
.info-box {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.info-box i {
    color: var(--accent);
    font-size: 16px;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================================
   VERIFY EMAIL PAGE SPECIFIC
   =========================================== */

/* OTP Container */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
}

.otp-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.otp-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(59,130,246,0.15);
}

.otp-input.filled {
    border-color: var(--success);
    background: rgba(16,185,129,0.15);
}

.otp-input.error {
    border-color: var(--error);
    background: rgba(239,68,68,0.15);
}

/* Email Display */
.email-display {
    background: rgba(59,130,246,0.1);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    margin-bottom: 8px;
}

.email-display i {
    color: var(--accent);
    margin-right: 8px;
}

.email-display span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Countdown */
.countdown-wrapper {
    text-align: center;
    margin-top: 24px;
}

.countdown-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.countdown-timer {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
}

/* Resend Button */
.resend-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.resend-btn:hover:not(:disabled) {
    background: rgba(59,130,246,0.1);
}

.resend-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Verify Icon */
.verify-icon {
    width: 80px;
    height: 80px;
    background: rgba(59,130,246,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.verify-icon i {
    font-size: 36px;
    color: var(--accent);
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .otp-input {
        width: 44px;
        height: 52px;
        font-size: 20px;
    }
    
    .otp-container {
        gap: 8px;
    }
}

/* ============================================
   Register Page Specific
   ============================================ */
.required {
    color: var(--error);
}

.strength-fill.fair {
    width: 50%;
    background: var(--warning);
}

.strength-fill.good {
    width: 75%;
    background: #84cc16;
}

