/* =========================================
   LOGIN.CSS (Auth Layout)
   ========================================= */

/* Use the exact same styles as join-us.css */
@import url('join-us.css');

.form-header a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 700;
}

/* Customization for Login Background Image */
.auth-visual {
    background-image: url('https://images.unsplash.com/photo-1517486808906-6ca8b3f04846?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

/* Vertical Centering & Balanced Proportions (Optically biased slightly above center) */
.auth-form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    padding: 40px 30px 70px;
}

.form-wrapper {
    width: 100%;
    max-width: 440px;
    transform: translateY(-16px);
}

@media (max-width: 1024px) {
    .auth-form-side {
        padding: 32px 20px 80px;
        justify-content: center;
    }
    .form-wrapper {
        transform: translateY(-28px);
    }
}

/* Input Fields Theme-Adaptive */
.input-field {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main);
}

.input-field input {
    color: var(--text-main) !important;
}

.input-field input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.65;
}

/* Password Row & Forgot Button */
.input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.input-label-row label {
    margin-bottom: 0 !important;
}

.forgot-link-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.forgot-link-btn:hover {
    color: var(--accent-hover, #1D4ED8);
    background: rgba(37, 99, 235, 0.08);
}

.forgot-link-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Switch Link ("Create one" below sign in button) */
.auth-switch-link {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.auth-switch-link a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 700;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.auth-switch-link a:hover {
    color: var(--accent-hover, #1D4ED8);
    text-decoration: underline;
}

/* =========================================
   AUTH ALERTS & NOTIFICATIONS
   ========================================= */
.auth-alert {
    display: none;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    animation: alertSlideIn 0.25s ease-out forwards;
}

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

.auth-alert.visible {
    display: flex;
}

.auth-alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}
.auth-alert-error i {
    color: #DC2626;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}
.auth-alert-success i {
    color: #16A34A;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-alert-info {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E40AF;
}
.auth-alert-info i {
    color: #2563EB;
    flex-shrink: 0;
    margin-top: 2px;
}

/* =========================================
   FORGOT / RESET PASSWORD MODAL
   ========================================= */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-card {
    background: var(--surface, #FFFFFF);
    border: 1px solid var(--border, var(--border-light));
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    padding: 32px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-overlay.active .auth-modal-card {
    transform: scale(1);
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.auth-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.auth-modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

.auth-modal-close {
    background: var(--bg-surface);
    border: 1px solid var(--border, var(--border-light));
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.auth-modal-close:hover {
    background: var(--border, #E2E8F0);
    color: var(--text-main);
}

[data-theme="dark"] .auth-alert-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #FCA5A5;
}

[data-theme="dark"] .auth-alert-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86EFAC;
}

[data-theme="dark"] .auth-alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    color: #93C5FD;
}

.input-password-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

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

.token-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1D4ED8;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}