/* static/css/accounts/login.css */
:root {
    --brand: #1a3c6e;
    --brand-light: #e8eef7;
    --accent: #e84040;
    --surface: #f5f6f8;
    --border: #e2e4e9;
    --text: #1a1d23;
    --muted: #6b7280;
    --white: #ffffff;
    --gold: #f8c842;
    --facebook: #1877F2;
    --facebook-light: #e7f1ff;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--surface);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text);
}

h1, h2, h3, h4 {
    font-family: 'Sora', sans-serif;
}
.login-wrapper {
    width: 100%;
    max-width: 420px;
}

/* Logo */
.logo-section {
    text-align: center;
    margin-bottom: 16px;
}

.logo-section a {
    display: inline-block;
    text-decoration: none;
}

.logo-section img {
    max-width: 80px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo-section img:hover {
    transform: scale(1.05);
}

/* Card */
.login-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* ═══════════════════════════════════════════════ */
/* LOADING OVERLAY FOR SOCIAL LOGIN               */
/* ═══════════════════════════════════════════════ */
.login-card {
    position: relative;
}

.login-loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border-radius: var(--radius-xl);
}

.login-loader-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.login-loader-content {
    text-align: center;
}

.login-loader-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    border: 3px solid var(--border);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.login-loader-text {
    font-size: 13px;
    color: var(--muted);
    font-family: 'Sora', sans-serif;
    font-weight: 500;
}

.login-loader-text span {
    color: var(--brand);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════ */
/* SOCIAL PROMPT (Google/Facebook redirect cards) */
/* ═══════════════════════════════════════════════ */
.social-prompt {
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    margin-bottom: 12px;
    text-align: center;
    animation: fadeInUp 0.3s ease;
}

.social-prompt--google {
    background: var(--brand-light);
    border: 1px solid var(--brand);
}

.social-prompt--facebook {
    background: var(--facebook-light);
    border: 1px solid var(--facebook);
}

.social-prompt__title {
    font-size: 13px;
    margin-bottom: 6px;
}

.social-prompt--google .social-prompt__title { color: var(--brand); }
.social-prompt--facebook .social-prompt__title { color: var(--facebook); }

.social-prompt__desc {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 14px;
}

.social-prompt__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 100px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.social-prompt__btn--google {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
}

.social-prompt__btn--google:hover {
    border-color: var(--brand);
    background: var(--brand-light);
}

.social-prompt__btn--facebook {
    background: var(--facebook);
    border: 1px solid var(--facebook);
    color: #fff;
}

.social-prompt__btn--facebook:hover {
    background: #166fe5;
}

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

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

/* Header */
.login-header {
    padding: 24px 24px 0;
    text-align: center;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.login-header p {
    font-size: 13px;
    color: var(--muted);
}

.login-header p strong {
    color: var(--brand);
}

/* Content */
.login-content {
    padding: 20px 24px 24px;
}

/* Social Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--white);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
    color: var(--text);
}

.social-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.social-btn .social-icon {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn.google:hover {
    border-color: #4285F4;
    background: #f8fbff;
}

.social-btn.facebook {
    background: var(--facebook);
    border-color: var(--facebook);
    color: #fff;
}

.social-btn.facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 14px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider-text {
    padding: 0 12px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

/* Form */
.form-group {
    margin-bottom: 12px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(26, 60, 110, 0.08);
}

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

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 10px;
    top: 34px;
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
    padding: 4px;
    background: none;
    border: none;
}

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

/* Checkbox & Register */
.ms-check__reg {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
    margin: 2px 0 12px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-container input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--brand);
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-container label {
    font-size: 11px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.checkbox-container label:hover {
    color: var(--brand);
}

.ms-check__reg a {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}

.ms-check__reg a:hover {
    color: #142f58;
    text-decoration: underline;
}

/* Continue Button */
.continue-btn {
    width: 100%;
    padding: 11px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.continue-btn:hover {
    background: #142f58;
}

.continue-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.error-message {
    color: var(--accent);
    font-size: 11px;
    margin-top: 3px;
    display: none;
}

.success-message {
    color: #166534;
    font-size: 11px;
    margin-top: 3px;
    display: none;
}

.password-field {
    display: none;
}

/* Footer */
.login-footer {
    text-align: center;
    padding: 12px 24px;
    color: var(--muted);
    font-size: 10px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    line-height: 1.5;
}

.login-footer a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
}

.w-5 {
    width: 20px;
}
.h-5 {
    height: 20px;
    margin-right: 10px;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 0.8s linear infinite;
}

/* Google prompt animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .login-card {
        border-radius: var(--radius-lg);
    }

    .login-content {
        padding: 16px;
    }

    .login-header {
        padding: 20px 16px 0;
    }

    .login-header h1 {
        font-size: 20px;
    }
}
