/* ═══════════════════════════════════════════════════════════
   Auth Pages - Login, Register, Forgot Password, Reset
   ═══════════════════════════════════════════════════════════ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    background: var(--bg-primary);
}

/* Left Panel - Brand */
.auth-brand {
    flex: 1;
    background: linear-gradient(135deg, var(--color-deep-navy) 0%, var(--color-deep-navy-dark) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 194, 168, 0.1) 0%, transparent 50%);
    animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 400px;
}

.auth-brand .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.auth-brand .logo-icon {
    font-size: 48px;
}

.auth-brand .logo-text {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: white;
}

.auth-brand h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    line-height: 1.3;
}

.auth-brand p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.auth-brand-features {
    margin-top: 48px;
    text-align: left;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.auth-feature-item i {
    color: var(--color-primary);
}

/* Right Panel - Form */
.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    max-width: 600px;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 32px;
}

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

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

.auth-form-header p a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-form-header p a:hover {
    text-decoration: underline;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 194, 168, 0.1);
}

.auth-form input::placeholder {
    color: var(--text-tertiary);
}

.auth-form .input-wrapper {
    position: relative;
}

.auth-form .input-wrapper i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

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

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Form row */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.form-check label {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

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

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn-primary {
    background: var(--color-primary);
    color: white;
}

.auth-btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 194, 168, 0.3);
}

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

/* Google button */
.auth-btn-google {
    background: white;
    color: #3c4043;
    border: 2px solid #dadce0;
    font-weight: 500;
    text-decoration: none;
}

.auth-btn-google:hover {
    background: #f8f9fa;
    border-color: #c6c9cc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-btn-google svg {
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

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

.auth-divider span {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Password strength */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.password-strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.password-strength-bar.weak { background: var(--danger); }
.password-strength-bar.fair { background: var(--warning); }
.password-strength-bar.good { background: var(--success); }
.password-strength-bar.strong { background: var(--color-primary); }

.password-strength-text {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

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

.terms-text a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* Error display */
.auth-errors {
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.auth-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-errors li {
    font-size: 14px;
    color: var(--danger-dark);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-errors li::before {
    content: '•';
    color: var(--danger-dark);
}

/* Success display */
.auth-success {
    background: var(--success-light);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.auth-success p {
    font-size: 14px;
    color: var(--success-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Loading spinner - auth button specific (white on transparent) */
.auth-form .spinner,
.auth-btn .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;
}

/* spin defined in components.css */

/* Mobile auth */
@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-brand {
        display: none;
    }

    .auth-form-panel {
        max-width: 100%;
        padding: 40px 24px;
    }
}

/* Reset password success */
.reset-success {
    text-align: center;
    padding: 40px 0;
}

.reset-success .success-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.reset-success h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.reset-success p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Verify email */
.verify-email {
    text-align: center;
    padding: 40px 0;
}

.verify-email .verify-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.verify-email h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.verify-email p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.resend-link {
    font-size: 14px;
    color: var(--text-secondary);
}

.resend-link a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

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

/* Expired token */
.token-expired {
    text-align: center;
    padding: 40px 0;
}

.token-expired .expired-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.token-expired h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.token-expired p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}
