:root {
    --portal-blue: #1126A8;
    --portal-blue-dark: #0A1A73;
    --portal-soft: #DCEBFF;
    --portal-bg: #F5F7FB;
    --portal-text: #1F2937;
    --portal-muted: #667085;
    --portal-border: #D9E2F1;
    --portal-error: #dc2626;
    --portal-success: #16a34a;
    --portal-warning: #d97706;
}

.auth-page { margin: 0; background: var(--portal-bg); color: var(--portal-text); }
.auth-soft-bg { background: radial-gradient(circle at 15% 10%, var(--portal-soft) 0, transparent 30%), var(--portal-bg); }
.auth-split { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, .95fr) minmax(520px, 1.05fr); }
.auth-hero { position: relative; overflow: hidden; padding: 42px clamp(40px, 6vw, 92px); color: #fff; background: linear-gradient(145deg, var(--portal-blue-dark) 0%, var(--portal-blue) 62%, #1f4bff 100%); display: flex; flex-direction: column; }
.auth-hero::before, .auth-hero::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); }
.auth-hero::before { width: 460px; height: 460px; right: -210px; top: -120px; }
.auth-hero::after { width: 650px; height: 650px; left: -400px; bottom: -410px; }
.auth-brand { color: #fff; display: inline-flex; align-items: center; gap: 12px; font-weight: 800; text-decoration: none; position: relative; z-index: 1; }
.auth-brand:hover { color: #fff; }
.auth-brand-dark { color: var(--portal-text); margin-bottom: 28px; }
.auth-brand-dark:hover { color: var(--portal-text); }
.auth-logo { width: auto; height: 52px; object-fit: contain; border-radius: 10px; background: #fff; padding: 6px 8px; box-shadow: 0 12px 30px rgba(10, 26, 115, .12); }
.auth-logo-bordered { border: 1px solid var(--portal-border); }
.brand-mark-light { color: var(--portal-blue-dark); background: #fff; }
.auth-hero-content { margin: auto 0; max-width: 600px; position: relative; z-index: 1; }
.eyebrow { display: block; margin: 0 0 12px; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-hero h1 { font-size: clamp(2.35rem, 4vw, 4.1rem); line-height: 1.05; letter-spacing: -.045em; margin-bottom: 24px; }
.auth-hero-content > p { color: #eaf1ff; font-size: 1.1rem; line-height: 1.75; max-width: 540px; }
.trust-list { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 32px; color: #eff6ff; font-size: .9rem; }
.auth-hero-foot { position: relative; z-index: 1; color: #dce7ff; font-size: .9rem; font-weight: 800; }
.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: 42px clamp(24px, 5vw, 76px); background: #fff; }
.auth-card { width: 100%; border: 1px solid var(--portal-border); border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(10, 26, 115, .10); padding: clamp(28px, 4vw, 48px); }
.login-card { max-width: 510px; border: 0; box-shadow: none; padding: 0; }
.register-card { max-width: 780px; }
.compact-card { max-width: 500px; }
.auth-heading { margin-bottom: 30px; }
.auth-heading h1, .auth-heading h2 { font-weight: 800; letter-spacing: -.03em; margin-bottom: 10px; }
.auth-heading h1 { font-size: clamp(1.8rem, 3vw, 2.35rem); }
.auth-heading p:not(.eyebrow) { color: var(--portal-muted); margin: 0; line-height: 1.6; }
.auth-mobile-logo { display: none; }
.form-group-modern { margin-bottom: 21px; }
.form-group-modern > label, .label-row label { display: block; color: #334155; font-size: .9rem; font-weight: 700; margin-bottom: 8px; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.label-row a, .auth-switch a, .back-link, .terms-check a { color: var(--portal-blue); text-decoration: none; font-weight: 700; }
.label-row a { font-size: .85rem; }
.form-group-modern .form-control, .form-group-modern .form-select { min-height: 51px; padding: 12px 15px; border: 1px solid var(--portal-border); border-radius: 11px; color: var(--portal-text); background-color: #fff; }
.form-group-modern .form-control:focus, .form-group-modern .form-select:focus { border-color: var(--portal-blue); box-shadow: 0 0 0 4px rgba(17, 38, 168, .14); outline: 0; }
.form-group-modern .input-validation-error { border-color: var(--portal-error); }
.field-validation { display: block; min-height: 18px; margin-top: 5px; color: var(--portal-error); font-size: .78rem; }
.field-validation-valid { min-height: 0; margin: 0; }
.validation-summary { color: var(--portal-error); background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; font-size: .86rem; margin-bottom: 18px; padding: 12px 14px; }
.validation-summary:empty, .validation-summary-valid { display: none; }
.validation-summary ul { padding-left: 18px; margin: 0; }
.btn-primary { background: var(--portal-blue); border-color: var(--portal-blue); }
.btn-primary:hover, .btn-primary:focus { background: var(--portal-blue-dark); border-color: var(--portal-blue-dark); }
.btn-modern { min-height: 52px; border-radius: 11px; font-weight: 750; box-shadow: 0 9px 22px rgba(17, 38, 168, .22); }
.btn-modern:hover { transform: translateY(-1px); }
.text-primary { color: var(--portal-blue) !important; }
.auth-switch { text-align: center; color: var(--portal-muted); margin: 25px 0 0; font-size: .9rem; }
.auth-page-wrap { min-height: calc(100vh - 76px); padding: 32px 20px 70px; display: flex; flex-direction: column; align-items: center; }
.auth-page-center { justify-content: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0 20px; }
.form-grid-full { grid-column: 1 / -1; }
.password-hint { display: flex; flex-wrap: wrap; gap: 7px; margin: -4px 0 20px; color: var(--portal-muted); font-size: .78rem; }
.password-hint span:not(:first-child) { background: #f1f5f9; border-radius: 999px; padding: 4px 8px; }
.password-hint-stack span { background: #f1f5f9 !important; }
.terms-check { padding: 16px 16px 16px 40px; margin-bottom: 20px; background: #f8fafc; border-radius: 11px; color: #475569; font-size: .88rem; }
.terms-check .form-check-input { margin-left: -24px; }
.portal-alert { border: 0; border-radius: 11px; font-size: .9rem; }
.status-icon { width: 58px; height: 58px; margin: 0 auto 22px; border-radius: 18px; display: grid; place-items: center; font-size: 1.45rem; font-weight: 800; }
.status-icon-blue { color: var(--portal-blue); background: var(--portal-soft); }
.status-icon-success { color: var(--portal-success); background: #dcfce7; }
.status-icon-warning { color: var(--portal-warning); background: #ffedd5; }
.warning-text { color: var(--portal-warning); }
.back-link { display: inline-block; margin-top: 25px; font-size: .88rem; }

@media (max-width: 900px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-form-panel { min-height: 100vh; padding: 32px 22px; }
    .login-card { max-width: 480px; }
    .auth-mobile-logo { display: block; width: auto; max-width: 170px; height: auto; margin: 0 auto 22px; border-radius: 12px; }
    .login-card .auth-heading { text-align: center; }
}

@media (max-width: 600px) {
    .auth-card { border-radius: 18px; padding: 25px 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid-full { grid-column: auto; }
    .auth-brand-dark { margin-bottom: 20px; }
    .auth-brand { align-items: flex-start; flex-direction: column; text-align: center; }
}
