:root {
    color-scheme: only light;
    --ink: #172033;
    --muted: #5f6b7a;
    --line: #d8e1ee;
    --soft: #f5f8fc;
    --paper: #ffffff;
    --accent: #2b5fab;
    --accent-dark: #1e3a73;
    --accent-soft: #eaf2ff;
    --shadow: 0 18px 48px rgba(30, 58, 95, .10);
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    color: var(--ink);
    background: #eaf0f1;
}

* { box-sizing: border-box; }
html { min-height: 100%; color-scheme: only light; background: #eaf0f1; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: #eaf0f1; line-height: 1.65; }
.portal-frame {
    width: min(1500px, calc(100% - 32px));
    min-height: calc(100vh - 64px);
    margin: 18px auto 46px;
    overflow: hidden;
    border: 1px solid #d7e1e3;
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 0 16px 42px rgba(20, 45, 49, .09);
}
.site-header {
    min-height: 78px;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(30, 58, 95, .08);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: clamp(180px, 16vw, 230px); height: auto; }
.page-shell { max-width: 1240px; margin: 0 auto; padding: 48px 32px 64px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.security-form-card { max-width: 760px; margin: 0 auto; }
h1 { margin-top: 0; font-size: 30px; }
.hint { color: var(--muted); line-height: 1.7; }
label { display: block; margin: 20px 0 8px; font-weight: 600; }
input[type="tel"], input[type="text"], input[type="password"] { width: 100%; padding: 13px 14px; border: 1px solid #b9c6d8; border-radius: 9px; color: var(--ink); background: #fff; font-size: 16px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0; font-weight: 400; }
.primary, .secondary, .link-button { border: 0; border-radius: 9px; cursor: pointer; font-size: 16px; }
.primary { width: 100%; margin-top: 22px; padding: 13px; background: var(--accent); color: #fff; font-weight: 700; }
.primary-link { display: block; text-align: center; text-decoration: none; }
.secondary { margin-top: 12px; padding: 10px 14px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.link-button { background: transparent; color: var(--accent-dark); }
.validation, .message-error { color: #b42318; }
.validation { display: block; margin-top: 6px; font-size: 14px; }
.validation:empty { display: none; }
.field-hint { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.message-success { color: #067647; }
.account-value { font-size: 20px; font-weight: 650; }
.card-spaced { margin-top: 24px; }
.button-link { display: inline-block; padding: 11px 15px; border-radius: 9px; background: #1769e0; color: #fff; text-decoration: none; }
.security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.security-item { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid #d9e1ee; border-radius: 12px; text-decoration: none; color: #172033; }
.security-item span, .session-row span, .event-row span { color: #5f6b7c; }
.session-row, .event-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid #e5e9f2; }
.event-row { align-items: flex-start; flex-direction: column; gap: 4px; }
.danger { padding: 10px 14px; border: 1px solid #b42318; border-radius: 9px; background: #fff; color: #b42318; cursor: pointer; }
.danger-zone { margin-top: 24px; padding-top: 20px; border-top: 1px solid #f0c7c3; }
fieldset { margin: 24px 0; padding: 18px; border: 1px solid #d9e1ee; border-radius: 12px; }
legend { font-weight: 700; }
@media (max-width: 640px) { .page-shell { margin-top: 28px; } .card { padding: 22px; } .security-grid { grid-template-columns: 1fr; } .session-row { align-items: flex-start; flex-direction: column; } }
a { color: var(--accent-dark); }
.auth-shell { display: grid; grid-template-columns: minmax(0, .95fr) minmax(390px, .85fr); gap: clamp(48px, 8vw, 108px); align-items: center; min-height: 620px; }
.auth-intro h1 { margin: 10px 0 14px; font-size: clamp(36px, 5vw, 56px); line-height: 1.08; letter-spacing: -.035em; }
.auth-intro p { max-width: 30rem; color: var(--muted); font-size: 18px; line-height: 1.7; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.auth-card { padding: 36px; }
.auth-links { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; }
.password-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 8px; }
.field-action { padding: 2px 0; border: 0; background: transparent; color: var(--accent-dark); cursor: pointer; font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.field-action:hover { color: var(--accent); }
.has-password-toggle { position: relative; }
.has-password-toggle > input[type="password"], .has-password-toggle > input[data-password-visible="true"] { padding-right: 52px; }
.password-visibility-toggle { position: absolute; z-index: 2; right: 8px; width: 38px; height: 38px; min-width: 38px; min-height: 38px; padding: 0; border: 0; border-radius: 50%; color: #526079; background: transparent; transform: translateY(-50%); cursor: pointer; }
.password-visibility-toggle:hover { color: var(--accent-dark); background: rgba(43, 95, 171, .09); }
.password-visibility-toggle svg { width: 20px; height: 20px; pointer-events: none; }
.auth-footnote { margin: 24px 0 0; text-align: center; color: #5f6b7c; }
.register-completion { margin-top: 24px; padding-top: 8px; border-top: 1px solid #e5e9f2; }
.recovery-completion { margin-top: 26px; padding-top: 18px; border-top: 1px solid #e5e9f2; }
.completion-hint { margin: 8px 0 18px; color: #68758a; font-size: 14px; }
.register-completion :disabled { cursor: not-allowed; opacity: .62; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(43, 95, 171, .28); outline-offset: 2px; }
@media (max-width: 780px) { .auth-shell { grid-template-columns: 1fr; gap: 24px; min-height: auto; } .auth-intro p { margin-bottom: 0; } }
@media (max-width: 640px) { .portal-frame { width: 100%; min-height: 100vh; margin: 0; border: 0; border-radius: 0; } .site-header { min-height: 68px; padding: 10px 18px; } .brand img { width: 170px; } .page-shell { padding: 30px 20px 48px; } }
@media (max-width: 480px) { .auth-links { flex-direction: column; } }
.registration-success { max-width: 760px; margin: 72px auto; padding: clamp(32px, 6vw, 64px); border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); text-align: center; }
.success-mark { width: 72px; height: 72px; margin: 0 auto 24px; color: #16794f; }
.success-mark svg { display: block; width: 100%; height: 100%; fill: #ecfdf3; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.registration-success h1 { margin-bottom: 10px; font-size: clamp(36px, 6vw, 52px); line-height: 1.12; letter-spacing: -.03em; }
.success-lead { margin: 0; color: var(--muted); font-size: 18px; }
.next-step-panel { margin: 32px 0 22px; padding: 24px; border: 1px solid #cbdcf5; border-radius: 14px; background: var(--accent-soft); text-align: left; }
.next-step-panel p { margin: 0; }
.next-step-title { margin-bottom: 6px !important; color: var(--accent-dark); font-size: 14px; font-weight: 800; }
.next-step-panel p:last-child { color: var(--ink); font-size: 18px; font-weight: 650; }
.success-note { max-width: 620px; margin: 0 auto; color: var(--muted); }
.success-finish { margin: 24px 0 0; color: var(--accent-dark); font-weight: 700; }
@media (max-width: 640px) { .registration-success { margin: 24px auto; } .next-step-panel { padding: 20px; } }
