.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
}

.auth-card {
    box-sizing: border-box;
    background: #ffffff; /* We'll use a clean light card for the auth to match the sample's high contrast */
    border-radius: 24px;
    padding: 60px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
    color: #1e293b; /* Dark text for the light card */
}

.auth-card h1 {
    color: #0f172a;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.auth-card p.subtitle {
    color: #475569;
    font-size: 16px;
    margin-bottom: 40px;
}

/* --- Social Login (Google) --- */
.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* 🔑 Required for absolute icon positioning */
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.social-login-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.google-icon {
    position: absolute;
    left: 20px; /* 🔑 Anchor icon to the left */
    width: 20px;
    height: 20px;
}

/* --- Divider --- */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider::before { margin-right: 16px; }
.auth-divider::after { margin-left: 16px; }

/* --- Forms --- */
.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    color: #0f172a;
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* --- Submit Button --- */
.auth-submit-btn {
    width: 100%;
    background: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    margin-bottom: 24px;
}

.auth-submit-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* --- Footer --- */
.auth-footer {
    color: #64748b;
    font-size: 14px;
    margin-top: 10px;
}

.legal-footer {
    margin-top: 32px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}

.legal-footer a {
    color: #3b82f6;
    text-decoration: none;
}

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

.auth-link {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

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

.auth-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
    padding: 12px 14px;
    text-align: left;
}

.auth-actions,
.remember-me {
    color: #64748b;
}

.auth-form input[type="checkbox"] {
    accent-color: #10b981;
}

body.dark-mode .auth-card,
.dark-mode .auth-card {
    background: #101a2d;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    color: #e5eefb;
}

body.dark-mode .auth-card h1,
.dark-mode .auth-card h1 {
    color: #f8fafc;
}

body.dark-mode .auth-card p.subtitle,
.dark-mode .auth-card p.subtitle {
    color: #b9c9dd;
}

body.dark-mode .social-login-btn,
.dark-mode .social-login-btn {
    background: #172235;
    border-color: rgba(148, 163, 184, 0.28);
    color: #e5eefb;
}

body.dark-mode .social-login-btn:hover,
.dark-mode .social-login-btn:hover {
    background: #1e2b40;
    border-color: rgba(96, 165, 250, 0.42);
}

body.dark-mode .auth-divider,
.dark-mode .auth-divider,
body.dark-mode .auth-footer,
.dark-mode .auth-footer,
body.dark-mode .legal-footer,
.dark-mode .legal-footer,
body.dark-mode .auth-actions,
.dark-mode .auth-actions,
body.dark-mode .remember-me,
.dark-mode .remember-me {
    color: #a9b8cc !important;
}

body.dark-mode .auth-divider::before,
body.dark-mode .auth-divider::after,
.dark-mode .auth-divider::before,
.dark-mode .auth-divider::after {
    border-bottom-color: rgba(148, 163, 184, 0.26);
}

body.dark-mode .form-group label,
.dark-mode .form-group label {
    color: #cbd5e1;
}

body.dark-mode .form-group input,
.dark-mode .form-group input {
    background: #172235 !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #f8fafc !important;
}

body.dark-mode .form-group input::placeholder,
.dark-mode .form-group input::placeholder {
    color: #7f8ea3;
}

body.dark-mode .form-group input:focus,
.dark-mode .form-group input:focus {
    background: #101a2d !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18) !important;
}

body.dark-mode .auth-submit-btn,
.dark-mode .auth-submit-btn {
    background: #10b981;
    color: #04130e;
}

body.dark-mode .auth-submit-btn:hover,
.dark-mode .auth-submit-btn:hover {
    background: #34d399;
}

body.dark-mode .auth-link,
.dark-mode .auth-link,
body.dark-mode .legal-footer a,
.dark-mode .legal-footer a {
    color: #60a5fa;
}

body.dark-mode .auth-errors,
.dark-mode .auth-errors {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(248, 113, 113, 0.34);
    color: #fecaca;
}

body.dark-mode .helptext,
.dark-mode .helptext {
    color: #a9b8cc !important;
}

@media (max-width: 640px) {
    .auth-container {
        min-height: auto;
        padding: 14px 8px 28px;
        align-items: flex-start;
    }

    .auth-card {
        max-width: 100%;
        border-radius: 16px;
        padding: 28px 18px;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    }

    .auth-card h1 {
        font-size: 23px;
        line-height: 1.25;
        margin-bottom: 8px;
    }

    .auth-card p.subtitle {
        font-size: 14px;
        margin-bottom: 26px;
        line-height: 1.45;
    }

    .social-login-btn {
        min-height: 46px;
        padding: 12px 14px 12px 46px;
        font-size: 14px;
        border-radius: 10px;
        line-height: 1.25;
    }

    .google-icon {
        left: 16px;
        width: 18px;
        height: 18px;
    }

    .auth-divider {
        margin: 18px 0;
        font-size: 12px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .form-group input {
        min-height: 44px;
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 10px;
    }

    .auth-actions {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 18px !important;
        font-size: 13px !important;
    }

    .remember-me {
        min-height: 28px;
    }

    .auth-submit-btn {
        min-height: 46px;
        padding: 13px;
        font-size: 15px;
        border-radius: 10px;
        margin-bottom: 18px;
    }

    .auth-footer,
    .legal-footer {
        font-size: 12px;
        line-height: 1.5;
    }

    .legal-footer {
        margin-top: 22px;
    }

    .auth-errors {
        font-size: 12px;
        padding: 10px 12px;
        border-radius: 10px;
    }
}

@media (max-width: 380px) {
    .auth-card {
        padding: 24px 14px;
    }

    .auth-card h1 {
        font-size: 21px;
    }

    .social-login-btn {
        font-size: 13px;
    }
}
