/* ==========================================================================
   2026 Modern SaaS Authentication Styles (Login / Register / Password Reset)
   ========================================================================== */
body,
body.auth-modern-body {
    margin: 0;
    background-color: #f4f6fb !important;
    background-image:
        radial-gradient(circle at 16% 12%, rgba(79, 70, 229, 0.12), transparent 36%),
        radial-gradient(circle at 84% 86%, rgba(6, 182, 212, 0.10), transparent 38%),
        linear-gradient(180deg, #f4f6fb 0%, #eef2f9 100%) !important;
    background-attachment: fixed !important;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: transparent !important;
    position: relative;
    overflow: hidden;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    border-radius: 22px;
    padding: 28px 30px 30px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.07), 0 4px 12px rgba(15, 23, 42, 0.03);
    position: relative;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #06b6d4);
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.auth-back-link,
.auth-query-link {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
}

.auth-back-link {
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.auth-back-link:hover {
    color: #0f172a;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.auth-query-link {
    color: #4f46e5;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
}

.auth-query-link:hover {
    color: #4338ca;
    background: #e0e7ff;
}

.brand-header {
    margin-bottom: 22px;
    text-align: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.brand-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.22);
    border: 2px solid #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.30);
}

.auth-title {
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin: 0 0 6px;
    text-align: center;
}

.auth-subtitle {
    color: #64748b;
    text-align: center;
    line-height: 1.5;
}

.form-floating > .form-control,
.form-floating > .form-control-plaintext {
    background-color: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    color: #0f172a !important;
    font-size: 14.5px;
    font-weight: 500;
    transition: all 0.18s ease;
}

.form-floating > label {
    color: #64748b !important;
    font-size: 13.5px;
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    color: #0f172a !important;
}

.form-floating > .form-control:focus {
    background-color: #ffffff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12) !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #4f46e5 !important;
    opacity: 0.9;
}

.form-floating > .form-control:focus ~ label::after,
.form-floating > .form-control:not(:placeholder-shown) ~ label::after {
    background-color: transparent !important;
}

.btn-gradient {
    background-image: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28) !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
}

.btn-gradient:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.36) !important;
    color: #ffffff !important;
}

.auth-code-btn,
.btn-outline-primary.send-email-code,
.btn-outline-primary.send-phone-captcha,
.btn-outline-primary.send-email-captcha {
    border-radius: 12px !important;
    border: 1.5px solid #c7d2fe !important;
    background: #eef2ff !important;
    color: #4f46e5 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    transition: all 0.18s ease !important;
}

.auth-code-btn:hover,
.btn-outline-primary.send-email-code:hover,
.btn-outline-primary.send-phone-captcha:hover,
.btn-outline-primary.send-email-captcha:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
}

.form-check {
    padding: 0;
    margin: 0;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-check input[type=checkbox] {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid #94a3b8;
    border-radius: 5px;
    background: #f8fafc;
    cursor: pointer;
    position: relative;
    transition: all 0.18s ease;
}

.form-check input[type=checkbox]:hover {
    border-color: #4f46e5;
}

.form-check input[type=checkbox]:checked {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-color: #4f46e5;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.28);
}

.form-check input[type=checkbox]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.form-check label {
    cursor: pointer;
    user-select: none;
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
}

.form-check label:hover {
    color: #4f46e5;
}

.image-code,
.prompt-image-code {
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    margin-left: 0;
    cursor: pointer;
    height: 58px;
    object-fit: contain;
    background: #ffffff;
    padding: 4px 8px;
    transition: border-color 0.18s ease;
}

.image-code:hover {
    border-color: #6366f1;
}

.divider {
    position: relative;
    text-align: center;
    margin: 18px 0;
    color: #94a3b8;
}

.divider::after,
.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.text-link {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
}

.text-link:hover {
    color: #4338ca;
    text-decoration: underline;
}

a {
    text-decoration: none;
}

@media (max-width: 576px) {
    .auth-card {
        padding: 22px 20px 24px;
    }
}
