/* Modern Login Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    margin: 0;
    padding: 0 !important; /* Force override any padding from old common CSS */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
}

.modern-page-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    margin-top: 0 !important; /* Force override */
    padding-top: 0 !important; /* Force override */
}

/* Force hide any old empty header wrappers that might take up space on login pages */
.header, .header-v2, .top-header, .header-top, .index-header, .header-container-modern, .mobile-header-modern, .idcos-nav {
    display: none !important;
}

/* Top Navigation Bar */
.login-top-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through empty areas */
}

.login-top-nav > * {
    pointer-events: auto; /* Re-enable clicks on children */
}

.nav-brand {
    display: none; /* Hidden on desktop because left hero has it, shown on mobile */
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 20px;
    font-weight: 700;
}

.nav-brand img {
    height: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 8px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-divider {
    width: 1px;
    height: 14px;
    background-color: var(--border-color);
}

/* Left Hero Section */
.modern-page-left {
    width: 50%;
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: white;
}

/* Animated Background */
.animated-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: radial-gradient(circle at center, #1e3a8a 0%, #0f172a 100%);
}

/* Cloud Computing Security Animation */
.center-shield {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: #60a5fa;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3), inset 0 0 40px rgba(59, 130, 246, 0.3);
    animation: pulseShield 4s ease-in-out infinite alternate;
}

.center-shield::before {
    content: '';
    position: absolute;
    inset: -20px;
    border: 1px dashed rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    animation: spinRotate 20s linear infinite;
}

.orbit-path {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.orbit-node {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    font-size: 16px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.orbit-1 { width: 280px; height: 280px; animation: spinRotate 15s linear infinite; }
.orbit-2 { width: 420px; height: 420px; animation: spinRotateReverse 25s linear infinite; }
.orbit-3 { width: 560px; height: 560px; animation: spinRotate 35s linear infinite; }
.orbit-4 { width: 700px; height: 700px; animation: spinRotateReverse 45s linear infinite; }

/* Keep nodes upright while orbiting */
.orbit-1 .orbit-node { animation: spinRotateReverse 15s linear infinite; }
.orbit-2 .orbit-node { animation: spinRotate 25s linear infinite; }
.orbit-3 .orbit-node { animation: spinRotateReverse 35s linear infinite; }
.orbit-4 .orbit-node { animation: spinRotate 45s linear infinite; }

@keyframes pulseShield {
    0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 30px rgba(59, 130, 246, 0.2), inset 0 0 30px rgba(59, 130, 246, 0.2); }
    100% { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 0 60px rgba(59, 130, 246, 0.5), inset 0 0 60px rgba(59, 130, 246, 0.5); }
}

@keyframes spinRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spinRotateReverse {
    0% { transform: translate(-50%, -50%) rotate(360deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

/* Left Content */
.modern-left-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 80px;
}

.brand-logo img {
    height: 48px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px;
    background: linear-gradient(to right, #fff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 500;
    color: #e2e8f0;
    margin: 0 0 24px;
}

.hero-desc {
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 500px;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item i {
    color: #60a5fa;
}

/* Right Login Form Section */
.modern-page-right {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 40px;
}

.mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 30px;
}
.mobile-logo img { height: 40px; }

.login-header {
    margin-bottom: 40px;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.label-row label { margin-bottom: 0; }

.forgot-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.forgot-link:hover { text-decoration: underline; }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 44px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-main);
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-wrapper input:focus + .input-icon {
    color: var(--primary-color);
}

.input-wrapper select {
    width: 100%;
    height: 52px;
    padding: 0 40px 0 44px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--text-main);
    font-size: 15px;
    transition: all 0.3s ease;
    appearance: auto;
    box-sizing: border-box;
}

.input-wrapper select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-wrapper select:disabled {
    cursor: not-allowed;
    background: #f8fafc;
    color: #94a3b8;
}

.get-code-btn {
    white-space: nowrap;
    padding: 0 20px;
    height: 52px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.get-code-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #eff6ff;
}

.get-code-btn:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: var(--border-color);
}

.input-toggle {
    position: absolute;
    right: 16px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
}
.input-toggle:hover { color: var(--text-main); }

.captcha-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-img-box {
    height: 52px;
    width: 140px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
}
.captcha-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modern-submit-btn {
    width: 100%;
    height: 52px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 32px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modern-submit-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.modern-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-arrow {
    transition: transform 0.3s ease;
}
.modern-submit-btn:hover:not(:disabled) .btn-arrow {
    transform: translateX(4px);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 15px;
}
.text-gray { color: var(--text-muted); }
.register-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}
.register-link:hover { text-decoration: underline; }

.legal-text {
    text-align: center;
    margin-top: 40px;
    font-size: 13px;
    color: #94a3b8;
}
.legal-text a {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
}
.legal-text a:hover {
    color: var(--primary-color);
}

/* Keep social sign-in compact while preserving the provider's accessible name. */
.telegram-login-widget {
    display: flex;
    justify-content: center;
    min-height: 40px;
}

.telegram-login-widget iframe {
    display: block;
    max-width: 100%;
}

.social-login-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 48px;
    margin-top: 12px;
}

.social-login-links:not(:has(.social-login-link)) {
    display: none;
}

.social-login-link {
    display: inline-flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dbe3ec;
    border-radius: 50%;
    background: #ffffff;
    color: #334155;
    font-size: 22px;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.social-login-link:hover {
    border-color: #b8c4d2;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 7px 17px rgba(15, 23, 42, 0.14);
    transform: translateY(-2px);
}

.social-login-link:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.28);
    outline-offset: 3px;
}

.social-login-google {
    color: #4285f4;
}

.social-login-qq {
    border-color: #d7ebf8;
    background: #f4fbff;
}

.social-login-qq img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.social-login-github {
    border-color: #24292f;
    background: #24292f;
    color: #ffffff;
}

.social-login-github:hover {
    border-color: #111418;
    background: #111418;
    color: #ffffff;
}

/* Registration profile details: visually separate optional contact data from credentials. */
.register-contact-section {
    margin: 28px 0 4px;
    padding: 20px 18px 4px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.register-contact-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 17px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8eef6;
}

.register-contact-heading h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.register-contact-heading h3 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.register-contact-heading p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.register-contact-badge {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid #cfe0fb;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 700;
}

.register-contact-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 14px;
}

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

.register-contact-full {
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 992px) {
    .modern-page-left { display: none; }
    .modern-page-right { width: 100%; background: var(--bg-light); }
    .login-top-nav { padding: 20px; }
    .nav-brand { display: flex; }
    .login-card { 
        background: #fff; 
        border-radius: 24px; 
        box-shadow: 0 20px 40px rgba(0,0,0,0.05);
        padding: 40px 30px;
        margin-top: 60px;
    }
    .mobile-logo { display: none; }
}

@media (max-width: 560px) {
    .register-contact-section {
        margin-top: 24px;
        padding: 17px 14px 2px;
    }

    .register-contact-grid {
        display: block !important;
        grid-template-columns: none !important;
    }

    .register-contact-heading h3 {
        font-size: 17px;
    }
}

/* Registration refresh is scoped so it cannot reshape login or recovery forms. */
*, *::before, *::after { box-sizing: border-box; }
.auth-register-page { background: #f3f7fc; }
.auth-register-page .modern-page-right { align-items: flex-start; overflow-y: auto; padding: 112px clamp(20px, 2.5vw, 42px) 48px !important; background: #f7faff !important; }
.auth-register-page .modern-page-right::before { width: 7px; background: linear-gradient(180deg, #4f8df7 0%, #6d73f5 100%); opacity: 1; }
.auth-register-page .login-card { width: min(100%, 620px) !important; max-width: 620px !important; margin: 0 auto !important; padding: 38px 42px 34px !important; border: 1px solid #e3ebf5 !important; border-radius: 8px !important; background: rgba(255, 255, 255, 0.96) !important; box-shadow: 0 22px 60px rgba(32, 64, 108, 0.12) !important; }
.auth-register-page .login-header { margin-bottom: 28px !important; padding-bottom: 23px; }
.auth-register-page .login-header::after { width: 56px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #4f8df7, #6d73f5); }
.auth-register-page .register-form-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 13px; color: #7c8da4; font-size: 10px; font-weight: 800; letter-spacing: 0; }
.auth-register-page .register-form-kicker i { color: #4f8df7; font-size: 12px; }
.auth-register-page .login-header h2 { font-size: 34px !important; letter-spacing: 0 !important; }
.auth-register-page .login-header p { color: #8392a6 !important; }
.auth-register-page .login-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; align-items: start; }
.auth-register-page .login-form > .form-group { margin-bottom: 18px !important; }
.auth-register-page .register-field { min-width: 0; }
.auth-register-page .register-field-username { grid-column: 1; grid-row: 1; }
.auth-register-page .register-field-email { grid-column: 2; grid-row: 1; }
.auth-register-page .register-field-wide { grid-column: 1 / -1; }
.auth-register-page .register-field-password { grid-column: 1; grid-row: 2; }
.auth-register-page .register-field-repassword { grid-column: 2; grid-row: 2; }
.auth-register-page .register-contact-toggle,
.auth-register-page .contact-reveal-enter-active,
.auth-register-page .contact-reveal-leave-active,
.auth-register-page .register-contact-section,
.auth-register-page .modern-submit-btn,
.auth-register-page .login-footer,
.auth-register-page .legal-text { grid-column: 1 / -1; }
.auth-register-page .form-group label,
.auth-register-page .label-row label { margin-bottom: 9px !important; color: #34445b !important; font-size: 13px !important; font-weight: 750 !important; }
.auth-register-page .input-wrapper { min-height: 56px !important; border-color: #dfe8f2 !important; border-radius: 8px !important; background: #fbfdff !important; }
.auth-register-page .input-wrapper:focus-within { border-color: #6c91eb !important; box-shadow: 0 0 0 4px rgba(79, 141, 247, 0.12) !important; }
.auth-register-page .input-wrapper input { height: 54px !important; min-width: 0; font-size: 15px !important; }
.auth-register-page .input-wrapper select { height: 54px !important; min-width: 0; padding-left: 46px; border-color: #dfe8f2; border-radius: 8px; background: #fbfdff; font-size: 15px; }
.auth-register-page .input-wrapper select:focus { border-color: #6c91eb; box-shadow: 0 0 0 4px rgba(79, 141, 247, 0.12); }
.auth-register-page .input-wrapper select:disabled { color: #94a3b8; background: #f5f8fc; }
.auth-register-page .input-icon { flex-basis: 46px; color: #9aa9bd !important; }
.auth-register-page .captcha-wrapper { gap: 9px !important; }
.auth-register-page .get-code-btn { min-height: 56px !important; border-radius: 8px !important; }
.auth-register-page .register-contact-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 58px; margin: 24px 0 0; padding: 0 17px; border: 1px solid #d9e5f3; border-radius: 8px; background: #f7faff; color: #4a6c9f; font-size: 14px; font-weight: 750; text-align: left; cursor: pointer; transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, color 180ms ease; }
.auth-register-page .register-contact-toggle:hover,
.auth-register-page .register-contact-toggle.is-open { border-color: #9abcf2; background: #f0f6ff; color: #326fc7; box-shadow: 0 8px 22px rgba(79, 141, 247, 0.09); }
.auth-register-page .register-contact-toggle:focus-visible { outline: 3px solid rgba(79, 141, 247, 0.24); outline-offset: 3px; }
.auth-register-page .register-contact-toggle-main { display: inline-flex; align-items: center; gap: 11px; }
.auth-register-page .register-contact-toggle-main i { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: #e4efff; color: #4f8df7; font-size: 14px; }
.auth-register-page .register-contact-toggle-arrow { color: #7f9bc4; font-size: 12px; transition: transform 180ms ease; }
.auth-register-page .register-contact-toggle.is-open .register-contact-toggle-arrow { transform: rotate(180deg); }
.auth-register-page .register-contact-section { margin: 12px 0 0; padding: 21px 18px 5px; border-color: #dce7f3; border-radius: 8px; background: #fbfdff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.8); }
.auth-register-page .register-contact-heading { margin-bottom: 17px; padding-bottom: 14px; border-bottom-color: #e7eef6; }
.auth-register-page .register-contact-heading h3 { color: #2f4159; font-size: 17px; }
.auth-register-page .register-contact-heading p { color: #8a99ad; }
.auth-register-page .register-contact-badge { border-color: #cfe0fb; background: #edf5ff; color: #4f8df7; }
.auth-register-page .contact-reveal-enter-active,
.auth-register-page .contact-reveal-leave-active { overflow: hidden; transition: opacity 180ms ease, transform 180ms ease, max-height 220ms ease; }
.auth-register-page .contact-reveal-enter,
.auth-register-page .contact-reveal-leave-to { max-height: 0; opacity: 0; transform: translateY(-5px); }
.auth-register-page .contact-reveal-enter-to,
.auth-register-page .contact-reveal-leave { max-height: 680px; opacity: 1; transform: translateY(0); }
.auth-register-page .modern-submit-btn { min-height: 58px !important; margin-top: 22px !important; border: 0 !important; border-radius: 8px !important; background: linear-gradient(100deg, #4f8df7 0%, #6d73f5 100%) !important; box-shadow: 0 14px 28px rgba(79, 141, 247, 0.24) !important; font-size: 16px !important; }
.auth-register-page .modern-submit-btn:hover:not(:disabled) { background: linear-gradient(100deg, #4382ee 0%, #625fe9 100%) !important; box-shadow: 0 17px 32px rgba(79, 141, 247, 0.3) !important; }
.auth-register-page .login-footer { margin-top: 22px !important; color: #8392a6 !important; }
.auth-register-page .legal-text { margin-top: 15px !important; color: #9aa9bb !important; }

/* Login layout: single-column controls with stable heights at every viewport. */
.auth-login-page .modern-page-right { min-height: 100svh; overflow-y: auto; padding: 104px clamp(34px, 5vw, 72px) 42px; background: #f7faff; }
.auth-login-page .login-card { width: min(100%, 460px); max-width: 460px; margin: auto; padding: 34px 36px 30px; border: 1px solid #e1e9f2; border-radius: 8px; background: #ffffff; box-shadow: 0 18px 48px rgba(15, 49, 86, 0.10); }
.auth-login-page .login-header { margin-bottom: 28px; }
.auth-login-page .login-header h2 { font-size: 30px; letter-spacing: 0; }
.auth-login-page .login-form { display: block; }
.auth-login-page .login-form > .form-group { margin-bottom: 20px; }
.auth-login-page .input-wrapper,
.auth-login-page .input-wrapper input,
.auth-login-page .captcha-img-box { min-height: 52px; }
.auth-login-page .captcha-wrapper { display: grid; grid-template-columns: minmax(0, 1fr) 126px; gap: 10px; align-items: stretch; }
.auth-login-page .captcha-wrapper .input-wrapper { min-width: 0; }
.auth-login-page .captcha-img-box { width: 126px; height: 52px; }
.auth-login-page .modern-submit-btn { margin-top: 10px; }
.auth-login-page .third-party-login { margin-top: 24px !important; }
.auth-login-page .login-footer { margin-top: 18px !important; }
.auth-login-page .legal-text { margin-top: 14px; line-height: 1.7; }

@media (max-width: 1100px) {
    .auth-register-page .modern-page-right { padding-right: 42px !important; padding-left: 42px !important; }
    .auth-register-page .login-card { width: min(100%, 580px) !important; max-width: 580px !important; }

    .auth-login-page .modern-page-right { padding: 90px clamp(28px, 4vw, 40px) 28px; }
    .auth-login-page .login-card { padding: 30px 32px 26px; }
    .auth-login-page .login-header { margin-bottom: 24px; }
}

@media (max-width: 992px) {
    .auth-login-page .login-top-nav { min-height: 70px; padding: 0 20px; }
    .auth-login-page .nav-brand { min-height: 0; padding: 0; }
    .auth-login-page .modern-page-right { align-items: flex-start; padding: 94px clamp(24px, 7vw, 64px) 38px; }
    .auth-login-page .login-card { margin: 0 auto; }
}

@media (max-width: 900px) {
    .auth-register-page .modern-page-right { padding: 98px clamp(22px, 7vw, 70px) 42px !important; }
    .auth-register-page .login-card { padding: 32px clamp(22px, 5vw, 42px) 28px !important; }
}

@media (max-width: 680px) {
    .auth-register-page .login-form { display: block; }
    .auth-register-page .login-form > .form-group { margin-bottom: 18px !important; }
}

@media (max-width: 560px) {
    .auth-register-page .modern-page-right { padding: 86px 16px 30px !important; }
    .auth-register-page .login-card { border-radius: 8px !important; padding: 28px 18px 24px !important; }
    .auth-register-page .login-header h2 { font-size: 29px !important; }
    .auth-register-page .register-contact-toggle { min-height: 54px; padding: 0 14px; font-size: 13px; }

    .auth-login-page .modern-page-right { padding: 82px 14px 26px; }
    .auth-login-page .login-card { padding: 28px 20px 24px; }
    .auth-login-page .login-header h2 { font-size: 27px; }
    .auth-login-page .captcha-wrapper { grid-template-columns: minmax(0, 1fr) 108px; gap: 8px; }
    .auth-login-page .captcha-img-box { width: 108px; }
    .auth-login-page .login-top-nav { width: 100%; min-height: 64px; height: 64px; padding: 0 14px; }
    .auth-login-page .nav-brand { height: auto; font-size: 15px; }
    .auth-login-page .nav-brand img { width: auto; height: 30px; max-width: 112px; margin: 0; object-fit: contain; }
    .auth-login-page .nav-brand span { max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .auth-login-page .nav-links { gap: 0; padding: 3px; }
    .auth-login-page .nav-links a { justify-content: center; width: 32px; min-height: 32px; padding: 0; font-size: 0; }
    .auth-login-page .nav-links a i { font-size: 15px; }
    .auth-login-page .nav-divider { display: none; }
}

@media (max-width: 360px) {
    .auth-login-page .login-card { padding-right: 16px; padding-left: 16px; }
    .auth-login-page .captcha-wrapper { grid-template-columns: minmax(0, 1fr) 96px; }
    .auth-login-page .captcha-img-box { width: 96px; }
}

/* Login shell: fill the viewport while keeping the form itself compact. */
@media (min-width: 993px) {
    body:has(.auth-login-page) { min-height: 100vh; background: #eef4fb; }
    .auth-login-page {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        border: 0;
        border-radius: 0;
        overflow: hidden;
        box-shadow: none;
    }
    .auth-login-page .modern-page-left,
    .auth-login-page .modern-page-right { min-height: 100%; }
    .auth-login-page .login-top-nav { width: 100%; }
    .auth-login-page .modern-page-right { padding: 84px clamp(34px, 4vw, 76px) 34px; }
    .auth-login-page .login-card { width: min(100%, 560px); max-width: 560px; padding: 36px 42px 32px; }
}

@media (max-width: 992px) {
    body:has(.auth-login-page) { background: #f3f7fc; }
    .auth-login-page { width: 100%; min-height: 100vh; min-height: 100dvh; margin: 0; border: 0; border-radius: 0; overflow: hidden; box-shadow: none; }
    .auth-login-page .modern-page-right { min-height: 100vh; min-height: 100dvh; }
    .auth-login-page .login-card { width: 100%; max-width: 620px; }
}
