:root {
    --auth-navy-980: #04143b;
    --auth-navy-920: #0b2368;
    --auth-navy-860: #153a9f;
    --auth-blue-700: #2F5BD8;
    --auth-cyan-500: #31d6ff;
    --auth-cyan-300: #94efff;
    --auth-gold-500: #f6c84c;
    --auth-gold-300: #ffe39b;
    --auth-surface: #ffffff;
    --auth-surface-soft: #F9FAFB;
    --auth-border: #E4E7EC;
    --auth-border-strong: #D0D5DD;
    --auth-line: #F2F4F7;
    --auth-ink: #101828;
    --auth-ink-mid: #475467;
    --auth-ink-soft: #667085;
    --auth-ink-faint: #98A2B3;
    --auth-accent-soft: #EFF4FF;
    --auth-success: #067647;
    --auth-warning: #B54708;
    --auth-danger: #B42318;
    --auth-shadow-xl: 0 4px 12px rgba(16, 24, 40, 0.10);
    --auth-shadow-lg: 0 1px 2px rgba(16, 24, 40, 0.06);
    --auth-radius-2xl: 6px;
    --auth-radius-xl: 6px;
    --auth-radius-lg: 6px;
    --auth-radius-md: 6px;
    --auth-font-sans: "Aptos", "Segoe UI", "PingFang SC", "PingFang HK", "PingFang TC", "Microsoft YaHei UI", "Microsoft YaHei", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans CJK SC", "Noto Sans CJK TC", "Noto Sans SC", "Noto Sans TC", Arial, sans-serif;
    --auth-font-display: "Aptos", "Segoe UI", "PingFang SC", "PingFang HK", "PingFang TC", "Microsoft YaHei UI", "Microsoft YaHei", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans CJK SC", "Noto Sans CJK TC", "Noto Sans SC", "Noto Sans TC", Arial, sans-serif;
    --auth-font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --scrollbar-size: 14px;
    --scrollbar-track: #f7f9fc;
    --scrollbar-track-line: rgba(185, 203, 229, 0.86);
    --scrollbar-thumb-start: #88aff5;
    --scrollbar-thumb-end: #6d91eb;
    --scrollbar-thumb-hover-start: #789ff0;
    --scrollbar-thumb-hover-end: #597fdc;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb-end) rgba(227, 236, 250, 0.96);
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--auth-font-sans);
    color: var(--auth-ink);
    background: #071c57;
}

::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}

::-webkit-scrollbar-track {
    border-radius: 4px;
    background: var(--scrollbar-track);
    box-shadow: inset 0 0 0 1px var(--scrollbar-track-line);
}

::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 4px;
    background: var(--scrollbar-thumb-start);
    background-clip: padding-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover-start);
    background-clip: padding-box;
}

[hidden] {
    display: none !important;
}

.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(4, 20, 59, 0.18);
    pointer-events: none;
}

.auth-layout {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(640px, 1.08fr) minmax(720px, 0.92fr);
}

.auth-hero {
    position: relative;
    min-height: 100vh;
    padding: 32px clamp(24px, 3vw, 48px);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    isolation: isolate;
}

.auth-hero__media,
.auth-hero__image,
.auth-hero__overlay {
    position: absolute;
    inset: 0;
}

.auth-hero__media {
    background: rgba(6, 21, 61, 0.96);
}

.auth-hero__image {
    inset: 34px;
    width: calc(100% - 68px);
    height: calc(100% - 68px);
    object-fit: contain;
    object-position: center center;
    opacity: 0.98;
    filter: saturate(1.08) contrast(1.02);
}

.auth-hero__overlay {
    background: rgba(4, 20, 59, 0.42);
}

.auth-accent {
    position: absolute;
    width: 200px;
    height: 200px;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    opacity: 0.94;
    z-index: 1;
}

.auth-accent--gold {
    top: 0;
    left: 0;
    background: var(--auth-gold-500);
}

.auth-accent--cyan {
    right: 0;
    bottom: 0;
    transform: rotate(180deg);
    background: var(--auth-cyan-300);
}

.auth-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    display: grid;
    align-content: space-between;
    gap: 24px;
}

.auth-hero__topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.hero-brand {
    display: grid;
    gap: 8px;
}

.hero-brand__mark {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: var(--auth-font-display);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-brand__sub {
    color: rgba(247, 251, 255, 0.82);
    font-size: 12px;
    letter-spacing: 0;
}

.hero-status-card {
    display: grid;
    gap: 4px;
    flex: 1 1 240px;
    min-width: 240px;
    max-width: min(440px, 58%);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(7, 28, 87, 0.34);
    text-align: right;
}

.hero-status-card span {
    color: rgba(247, 251, 255, 0.72);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-status-card strong {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.auth-hero__content {
    max-width: min(740px, 100%);
    min-width: 0;
    color: #fff;
}

.auth-language-dock {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 12;
}

.auth-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(7, 28, 87, 0.34);
    box-shadow: none;
    color: #fff;
}

.auth-language-switch__label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

.auth-language-switch__select {
    min-width: 124px;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    outline: none;
}

.auth-language-switch__select option {
    color: var(--auth-ink);
}

.auth-language-switch__select:focus-visible {
    outline: 2px solid rgba(148, 239, 255, 0.88);
    outline-offset: 2px;
    border-radius: 4px;
}

.hero-eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--auth-cyan-300);
    font-family: var(--auth-font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-title {
    display: grid;
    gap: 8px;
    margin: 0;
}

.hero-title__latin {
    font-family: var(--auth-font-display);
    font-size: clamp(28px, 2.6vw, 36px);
    font-weight: 600;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.hero-title__cn {
    font-size: clamp(24px, 2.2vw, 30px);
    line-height: 1.25;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.hero-title--register .hero-title__latin,
.hero-title--disclaimer .hero-title__latin {
    font-size: clamp(24px, 2.2vw, 30px);
}

.hero-title--register .hero-title__cn,
.hero-title--disclaimer .hero-title__cn {
    font-size: clamp(20px, 1.9vw, 26px);
}

.hero-lead {
    margin: 16px 0 0;
    max-width: 640px;
    color: rgba(247, 251, 255, 0.88);
    font-size: 13px;
    line-height: 1.6;
}

.hero-flow,
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-flow {
    margin-top: 24px;
}

.hero-flow span,
.hero-tags span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.hero-stat {
    padding: 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
}

.hero-stat strong {
    display: block;
    color: #fff;
    font-family: var(--auth-font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.hero-stat span {
    display: block;
    margin-top: 4px;
    color: rgba(247, 251, 255, 0.82);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.hero-feature-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.hero-feature {
    padding: 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(4, 20, 59, 0.26);
}

.hero-feature h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
}

.hero-feature p {
    margin: 0;
    color: rgba(247, 251, 255, 0.84);
    font-size: 13px;
    line-height: 1.6;
}

.auth-panel {
    position: relative;
    padding: clamp(16px, 2vw, 32px);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 6px;
    background: #F9FAFB;
    box-shadow: var(--auth-shadow-xl);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    align-self: stretch;
    margin: auto;
    display: grid;
    gap: 24px;
    padding: clamp(24px, 2.4vw, 32px);
    border-radius: var(--auth-radius-2xl);
    border: 1px solid var(--auth-border);
    background: #FFFFFF;
    box-shadow: var(--auth-shadow-lg);
}

.auth-card__tools {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 8px;
}

.auth-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--auth-border);
    background: #FFFFFF;
    box-shadow: none;
    color: var(--auth-ink);
    font-size: 13px;
}

.auth-language-switch__label {
    color: var(--auth-ink-soft);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
}

.auth-language-switch select {
    min-width: 152px;
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--auth-border);
    border-radius: 4px;
    background: #FFFFFF;
    color: var(--auth-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    outline: none;
}

.auth-language-switch select:focus {
    border-color: rgba(36, 87, 222, 0.34);
    box-shadow: 0 0 0 4px rgba(36, 87, 222, 0.12);
}

.brand-mark {
    width: 128px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: #F9FAFB;
    border: 1px solid var(--auth-border);
    box-shadow: none;
    overflow: hidden;
}

.brand-mark__logo-image {
    display: block;
    width: 88%;
    max-height: 38px;
    object-fit: contain;
}

.panel-head {
    display: grid;
    gap: 12px;
}

.panel-head__copy h1,
.panel-head__copy h2 {
    margin: 0;
    color: var(--auth-ink);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.section-copy {
    margin: 0;
    color: var(--auth-ink-mid);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.panel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.panel-tags span {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--auth-accent-soft);
    border: 1px solid var(--auth-border);
    color: var(--auth-blue-700);
    font-size: 12px;
    font-weight: 500;
}

.alert {
    display: none;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.alert.is-visible {
    display: flex;
}

.alert-error {
    background: #FEF3F2;
    border-color: var(--auth-danger);
    color: var(--auth-danger);
}

.alert-success {
    background: #ECFDF3;
    border-color: var(--auth-success);
    color: var(--auth-success);
}

.alert-icon {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 600;
    flex: none;
}

.alert-content {
    flex: 1;
    line-height: 1.6;
    font-size: 13px;
    font-weight: 400;
}

.alert-close {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.role-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.role-btn {
    min-height: 88px;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid var(--auth-border);
    background: var(--auth-surface);
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.role-btn:hover {
    transform: translateY(-1px);
    border-color: var(--auth-border-strong);
    box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08);
}

.role-btn.is-active,
.role-btn.active {
    border-color: var(--auth-blue-700);
    background: var(--auth-accent-soft);
    box-shadow: none;
}

.role-label {
    display: block;
    color: var(--auth-ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.role-desc {
    display: block;
    margin-top: 4px;
    color: var(--auth-ink-mid);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.auth-form,
.dialog-form {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--auth-ink-mid);
}

.input-wrapper {
    position: relative;
}

.input-wrapper.has-icon .form-input {
    padding-left: 40px;
}

.input-wrapper.has-action .form-input {
    padding-right: 56px;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--auth-ink-faint);
}

.input-icon svg {
    width: 18px;
    height: 18px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 4px;
    border: 1px solid var(--auth-border-strong);
    background: #fff;
    color: var(--auth-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-textarea {
    min-height: 120px;
    padding-top: 12px;
    padding-bottom: 12px;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: rgba(36, 87, 222, 0.35);
    box-shadow: 0 0 0 4px rgba(36, 87, 222, 0.12);
}

.form-input.success {
    border-color: var(--auth-success);
}

.form-input.error {
    border-color: var(--auth-danger);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--auth-ink-faint);
    cursor: pointer;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.captcha-board {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    background: var(--auth-surface-soft);
    border: 1px solid var(--auth-border);
}

.captcha-label {
    margin: 0;
    color: var(--auth-ink-soft);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.captcha-prompt {
    display: inline-block;
    margin-top: 4px;
    color: var(--auth-ink);
    font-family: var(--auth-font-display);
    font-size: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bot-trap {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.form-options,
.register-actions,
.disclaimer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.remember-me,
.terms,
.checkline {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--auth-ink-mid);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.remember-me input,
.terms input,
.checkline input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--auth-blue-700);
}

.helper-text,
.forgot-link,
.register-status-note,
.footer-note {
    color: var(--auth-ink-soft);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
}

.footer-note a,
.register-link a {
    color: var(--auth-blue-700);
    font-weight: 500;
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 4px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled,
.btn.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    color: #fff;
    background: #2f5bd8;
    box-shadow: none;
}

.btn-secondary {
    color: var(--auth-blue-700);
    background: var(--auth-accent-soft);
    border-color: var(--auth-border-strong);
}

.btn-ghost {
    color: var(--auth-ink);
    background: transparent;
    border-color: var(--auth-border-strong);
}

.btn-block {
    width: 100%;
}

.support-card,
.auth-note-card,
.registration-closed-panel,
.compliance-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--auth-border);
    background: var(--auth-surface-soft);
}

.support-card__item,
.note-line {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.support-card__label,
.note-label {
    color: var(--auth-ink-soft);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: uppercase;
}

.support-card strong,
.note-value {
    color: var(--auth-ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.auth-note-card.is-success,
.register-status-banner.is-success {
    background: #ECFDF3;
    border-color: var(--auth-success);
}

.auth-note-card.is-warning,
.register-status-banner.is-warning {
    background: #FFFAEB;
    border-color: var(--auth-warning);
}

.register-link {
    display: grid;
    gap: 8px;
}

.register-link__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.password-strength {
    display: none;
    gap: 12px;
}

.password-strength.is-visible {
    display: grid;
}

.strength-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.strength-segment {
    height: 4px;
    border-radius: 4px;
    background: var(--auth-border);
}

.strength-segment.active.weak {
    background: var(--auth-danger);
}

.strength-segment.active.fair {
    background: var(--auth-warning);
}

.strength-segment.active.good {
    background: var(--auth-blue-700);
}

.strength-segment.active.strong {
    background: var(--auth-success);
}

.requirements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.requirement,
.match-status {
    color: var(--auth-ink-soft);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}

.requirement.met,
.match-status.is-match {
    color: var(--auth-success);
    font-weight: 500;
}

.match-status.is-mismatch {
    color: var(--auth-danger);
    font-weight: 500;
}

.disclaimer-doc {
    display: grid;
    gap: 24px;
}

.disclaimer-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.doc-pill {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--auth-accent-soft);
    border: 1px solid var(--auth-border);
    color: var(--auth-blue-700);
    font-size: 12px;
    font-weight: 500;
}

.disclaimer-intro {
    padding: 12px 16px;
    border-radius: 6px;
    background: var(--auth-accent-soft);
    border: 1px solid var(--auth-border);
    color: var(--auth-ink-mid);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.disclaimer-checks,
.disclaimer-sections,
.reference-notes {
    display: grid;
    gap: 12px;
}

.check-card,
.disclaimer-section-card,
.reference-card {
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--auth-border);
    background: var(--auth-surface-soft);
}

.check-card strong,
.disclaimer-section-card h3,
.reference-card strong {
    display: block;
    margin: 0 0 4px;
    color: var(--auth-ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.check-card p,
.reference-card p {
    margin: 0;
    color: var(--auth-ink-mid);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.check-card ul,
.disclaimer-section-card ul {
    margin: 0;
    padding-left: 16px;
    color: var(--auth-ink-mid);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.disclaimer-section-card h3 {
    color: var(--auth-ink);
}

.loading-state {
    display: grid;
    place-items: center;
    min-height: 240px;
    color: var(--auth-ink-soft);
    font-size: 13px;
}

.shake {
    animation: auth-shake 0.38s ease;
}

@keyframes auth-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
}

@media (max-width: 1480px) {
    .auth-layout {
        grid-template-columns: minmax(520px, 1fr) minmax(560px, 1fr);
    }

    .auth-card {
        max-width: 820px;
    }
}

@media (max-width: 1200px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: 56vh;
    }

    .auth-hero__image {
        inset: 24px;
        width: calc(100% - 48px);
        height: calc(100% - 48px);
    }

    .auth-panel {
        padding-top: 0;
    }

    .auth-panel::before {
        inset: 0;
        border-radius: 6px 6px 0 0;
    }
}

@media (max-width: 820px) {
    .auth-language-dock {
        top: 14px;
        left: 14px;
        right: 14px;
    }

    .auth-hero {
        padding: 24px 16px 32px;
    }

    .auth-hero__topline {
        flex-direction: column;
    }

    .auth-panel {
        padding: 16px 16px 24px;
    }

    .auth-card {
        padding: 24px 16px;
    }

    .auth-card__tools {
        margin: 0 0 8px;
    }

    .auth-language-switch {
        width: 100%;
        justify-content: space-between;
    }

    .auth-language-switch__select {
        min-width: 0;
        width: 100%;
    }

    .form-grid,
    .role-selector,
    .hero-stat-grid,
    .requirements {
        grid-template-columns: 1fr;
    }

    .form-options,
    .register-actions,
    .disclaimer-actions,
    .captcha-board {
        align-items: stretch;
        flex-direction: column;
    }

    .btn,
    .captcha-refresh {
        width: 100%;
    }
}

button,
.btn,
.role-btn,
.captcha-refresh,
.alert-close {
    position: relative;
    isolation: isolate;
}

button.is-feedback,
.btn.is-feedback,
.role-btn.is-feedback,
.captcha-refresh.is-feedback,
.alert-close.is-feedback {
    outline: 3px solid rgba(14, 165, 233, 0.3);
    outline-offset: 2px;
    animation: global-button-feedback-pulse 1.2s ease;
    box-shadow: 0 0 0 7px rgba(14, 165, 233, 0.14);
}

button.is-feedback::after,
.btn.is-feedback::after,
.role-btn.is-feedback::after,
.captcha-refresh.is-feedback::after,
.alert-close.is-feedback::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid rgba(14, 165, 233, 0.72);
    box-shadow: 0 0 0 5px rgba(14, 165, 233, 0.16);
    pointer-events: none;
    z-index: 3;
    animation: global-button-feedback-ring 760ms ease-out;
}

button:active,
.btn:active,
.role-btn:active,
.captcha-refresh:active,
.alert-close:active {
    transform: translateY(1px) scale(0.98);
}

@keyframes global-button-feedback-pulse {
    0% { filter: brightness(1); }
    35% { filter: brightness(1.08); }
    100% { filter: brightness(1); }
}

@keyframes global-button-feedback-ring {
    0% { transform: scale(0.98); opacity: 1; }
    100% { transform: scale(1.08); opacity: 0; }
}

/* ── 语言切换器：全部 auth 页面统一成登录页的样式 ────────────────
   原先只有 .auth-page-login 下有这套规则，注册 / 免责声明 / 找回密码
   三个页面落到本文件上方的通用样式上，仍是"框中框"——深蓝半透明外壳里
   再套一个 select，还把"语言"二字显示出来，一个次要控件的视觉权重
   压过了页面主表单，和登录页明显不一致。
   放在文件末尾按同等特异性覆盖上方旧规则；login-page.css 里那份更具体的
   选择器仍然生效，两边取值保持一致。
   select 上已有 aria-label="切换界面语言"，优先级高于 <label>，
   所以把可见的"语言"二字做视觉隐藏不损失无障碍语义。 */
.auth-language-dock {
    top: 16px;
    right: clamp(16px, 2vw, 24px);
    z-index: 20;
}

.auth-language-switch {
    min-height: 0;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--auth-ink);
    box-shadow: none;
}

.auth-language-switch__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-language-switch__select,
.auth-language-switch select {
    min-width: 118px;
    min-height: 40px;
    height: 40px;
    padding: 0 32px 0 12px;
    border: 1px solid var(--auth-border);
    border-radius: 4px;
    background: #FFFFFF;
    color: var(--auth-ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}
