@import url("/static/css/fonts.css?v=20260718-noto-sans-sc");

:root {
  color-scheme: light;
  font-family: var(--hongtai-font-sans);
  color: #102a4c;
  background: #f5f7fa;
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

/* Shared account screens retain a compact, neutral surface. */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: #f3f6fb;
}

.auth-card {
  width: min(100%, 440px);
  padding: 38px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(20, 48, 84, .11);
}

.auth-brand {
  color: #1f68c7;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .1em;
}

h1 {
  margin: 12px 0 7px;
  color: #102a4c;
  font-size: 30px;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.auth-subtitle { margin: 0 0 30px; color: #687991; line-height: 1.6; }
label { display: block; margin: 21px 0 8px; color: #17365f; font-size: 14px; font-weight: 700; }

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #cdd7e5;
  border-radius: 8px;
  background: #fff;
  color: #102a4c;
  font: inherit;
  outline: none;
}

input:focus,
select:focus {
  border-color: #1f68c7;
  box-shadow: 0 0 0 3px rgba(31, 104, 199, .14);
}

.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  z-index: 1;
}

.password-toggle:hover { background: #edf4fd; }
.password-toggle:focus-visible { outline: 3px solid rgba(31, 104, 199, .3); outline-offset: 2px; }
.password-toggle img { display: block; width: 20px; height: 20px; }

.captcha-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.captcha-expression { color: #102a4c; font-size: 21px; font-weight: 750; letter-spacing: .055em; }
.link-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #1f68c7;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.link-button:hover { color: #0e4d9b; text-decoration: underline; text-underline-offset: 3px; }
.link-button:focus-visible,
.primary-button:focus-visible { outline: 3px solid rgba(31, 104, 199, .3); outline-offset: 3px; }

.primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 28px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #1f68c7;
  font: inherit;
  font-weight: 750;
  letter-spacing: .02em;
  cursor: pointer;
}

.primary-button:hover { background: #1558ad; }
.primary-button:disabled { opacity: .65; cursor: wait; }
.form-message { margin: 16px 0 0; font-size: 14px; line-height: 1.55; }
.error { color: #b42318; }
.success { color: #067647; }
.password-hint { margin: 8px 0 0; color: #718096; font-size: 13px; line-height: 1.55; }

/* Selected account workspace: institutional navy navigation with a bright work surface. */
.account-page {
  min-width: 320px;
  background: #f4f6f9;
  color: #112e52;
}

.account-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
}

.account-layout--no-sidebar { grid-template-columns: minmax(0, 1fr); }

.account-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100vh;
  height: 100vh;
  flex-direction: column;
  overflow: auto;
  background: #062f5d;
  color: #fff;
  box-shadow: 8px 0 30px rgba(6, 34, 68, .08);
}

.account-nav { padding: 24px 0; }
.account-nav a {
  position: relative;
  display: flex;
  min-height: 64px;
  align-items: center;
  padding: 0 30px;
  color: #d5e1ee;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.account-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.account-nav a.is-active {
  background: #0c447d;
  color: #f6c451;
}
.account-nav a.is-active::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #f6c451;
  content: "";
}

.account-sidebar__collapse {
  margin: auto 24px 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #c4d4e5;
  font-size: 13px;
  text-decoration: none;
}
.account-sidebar__collapse:hover { color: #fff; }

.account-workspace { min-width: 0; }
.account-topbar {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 40px;
  border-bottom: 1px solid #dfe5ee;
  background: rgba(255, 255, 255, .96);
}

.account-topbar h1 {
  margin: 0;
  color: #102f55;
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -.02em;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 0;
}

.account-actions > a,
.account-actions > button {
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-left: 1px solid #dfe5ee;
  background: transparent;
  color: #173b68;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.account-actions > a { display: inline-flex; align-items: center; }
.account-actions > a:hover,
.account-actions > button:hover { color: #0d65c7; }

.account-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: 16px;
}
.account-identity__avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #0b3a6d;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
}
.account-identity strong,
.account-identity small { display: block; }
.account-identity strong { color: #15375f; font-size: 14px; }
.account-identity small { margin-top: 2px; color: #8290a3; font-size: 11px; }

.account-main {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 30px 34px 54px;
}

.account-panel {
  border: 1px solid #dce3ec;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(18, 48, 82, .035);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.panel-heading h2,
.security-note h2 {
  margin: 0;
  color: #14365f;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.015em;
}
.panel-heading p {
  margin: 7px 0 0;
  color: #7b899b;
  font-size: 13px;
  line-height: 1.55;
}
.panel-heading--bordered {
  padding-bottom: 23px;
  border-bottom: 1px solid #e5eaf1;
}
.panel-count {
  padding: 6px 10px;
  border-radius: 4px;
  background: #f2f5f9;
  color: #708097;
  font-size: 12px;
  white-space: nowrap;
}

.user-create-panel { padding: 24px 26px 27px; }
.user-create-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1.15fr) minmax(160px, 1.15fr) minmax(140px, .8fr) minmax(220px, 1.35fr) auto;
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}
.user-create-grid label,
.password-settings-form label,
.account-dialog label {
  margin: 0;
  color: #1c416d;
  font-size: 13px;
  font-weight: 700;
}
.user-create-grid input,
.user-create-grid select {
  min-height: 48px;
  margin-top: 8px;
}
.user-create-grid .password-field { display: block; margin-top: 8px; }
.user-create-grid .password-field input { margin-top: 0; }
.field-hint {
  display: block;
  margin-top: 7px;
  color: #7a899d;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

.account-primary-button {
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid #0a3565;
  border-radius: 4px;
  background: #073665;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.account-primary-button:hover { background: #0c4d8c; }
.account-primary-button:active { transform: translateY(1px); }
.user-create-submit { min-width: 122px; margin-top: 27px; }

.user-table-panel { margin-top: 26px; padding: 24px 18px 18px; }
.user-table-panel > .panel-heading { padding: 0 8px 20px; }
.user-table-wrap { overflow-x: auto; border: 1px solid #dbe2eb; }
.user-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  color: #284664;
  font-size: 14px;
}
.user-table th {
  height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid #dbe2eb;
  background: #f6f8fb;
  color: #183b65;
  font-size: 13px;
  font-weight: 740;
  text-align: left;
  white-space: nowrap;
}
.user-table td {
  height: 68px;
  padding: 10px 18px;
  border-bottom: 1px solid #e7ebf1;
  vertical-align: middle;
}
.user-table tbody tr:last-child td { border-bottom: 0; }
.user-table tbody tr:hover td { background: #fbfcfe; }
.user-table td strong { color: #173b68; font-weight: 700; }

.table-role-select {
  width: auto;
  min-width: 102px;
  min-height: 34px;
  padding: 5px 28px 5px 10px;
  border-color: transparent;
  background-color: #edf4fe;
  color: #1c67bd;
  font-size: 12px;
}
.table-role-select:disabled {
  opacity: 1;
  background-color: #fbf2df;
  color: #9b6818;
}
.status-badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}
.status-badge--active { background: #e6f6ed; color: #178153; }
.status-badge--disabled { background: #f2f4f7; color: #7a8797; }
.table-actions { display: flex; gap: 8px; white-space: nowrap; }
.table-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #cfd8e4;
  border-radius: 4px;
  background: #fff;
  color: #415977;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.table-button:hover { border-color: #8da4c0; color: #153f70; }
.table-button--accent { border-color: #e2bd68; color: #98681b; }
.table-button:disabled { cursor: not-allowed; opacity: .45; }

.account-dialog {
  width: min(92vw, 480px);
  padding: 30px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(5, 31, 62, .24);
}
.account-dialog::backdrop { background: rgba(13, 33, 58, .54); backdrop-filter: blur(2px); }
.account-dialog label { display: block; margin: 24px 0 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.dialog-actions .account-primary-button { min-height: 38px; }

.password-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
  align-items: start;
  gap: 26px;
  max-width: 1080px;
  margin: 22px auto 0;
}
.password-settings-grid--single {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  max-width: none;
}
.password-settings-panel { padding: 34px 38px 38px; }
.section-kicker {
  display: block;
  margin-bottom: 8px;
  color: #b47d21;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .12em;
}
.password-settings-form { max-width: 570px; margin-top: 27px; }
.password-settings-form label { margin-top: 20px; margin-bottom: 8px; }
.password-settings-form label:first-child { margin-top: 0; }
.password-submit { min-width: 150px; margin-top: 26px; }

.security-note { padding: 34px 30px; }
.security-note h2 { margin-top: 0; font-size: 18px; }
.security-note ul {
  margin: 22px 0 0;
  padding-left: 20px;
  color: #61748c;
  font-size: 13px;
  line-height: 2;
}
.security-note li::marker { color: #d2a13b; }
.security-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e4e9f0;
}
.security-account span { color: #7b899a; font-size: 12px; }
.security-account strong { color: #173b67; font-size: 14px; }

.profile-panel {
  max-width: 980px;
  margin: 22px auto 0;
  padding: 34px 38px 38px;
}
.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 34px;
  margin: 8px 0 0;
}
.profile-detail-grid > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid #e7ebf1;
}
.profile-detail-grid dt { color: #7b899b; font-size: 13px; }
.profile-detail-grid dd {
  margin: 0;
  color: #173b68;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.profile-actions { display: flex; gap: 12px; margin-top: 28px; }
.profile-action-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

@media (max-width: 1180px) {
  .user-create-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .user-create-submit { width: 160px; margin-top: 0; }
}

@media (max-width: 720px) {
  .profile-panel { padding: 26px 22px 30px; }
  .profile-detail-grid { grid-template-columns: 1fr; }
  .profile-detail-grid > div { grid-template-columns: 112px minmax(0, 1fr); }
  .profile-actions { flex-direction: column; }
}

@media (max-width: 920px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; min-height: auto; height: auto; }
  .account-nav { display: flex; overflow-x: auto; padding: 0; }
  .account-nav a { min-width: max-content; min-height: 52px; padding: 0 24px; }
  .account-nav a.is-active::before { inset: auto 0 0; width: auto; height: 3px; }
  .account-sidebar__collapse { display: none; }
  .account-topbar { min-height: 76px; padding: 0 24px; }
  .account-main { padding: 24px; }
  .password-settings-grid { grid-template-columns: 1fr; margin-top: 0; }
}

@media (max-width: 680px) {
  .account-topbar { align-items: flex-start; flex-direction: column; padding: 18px 20px; }
  .account-actions { width: 100%; flex-wrap: wrap; }
  .account-identity { width: 100%; margin: 0 0 10px; }
  .account-actions > a,
  .account-actions > button { border-left: 0; padding: 0 16px 0 0; }
  .account-main { padding: 18px 14px 36px; }
  .user-create-panel,
  .password-settings-panel,
  .security-note { padding: 22px 18px; }
  .user-create-grid { grid-template-columns: 1fr; gap: 16px; }
  .user-create-submit { width: 100%; }
  .panel-heading { align-items: flex-start; }
  .panel-count { display: none; }
}

/* Selected login design: a calm institutional brand field and a focused work surface. */
.login-page .auth-shell--login {
  min-height: 100svh;
  grid-template-columns: minmax(440px, 1.03fr) minmax(520px, .97fr);
  place-items: stretch;
  padding: 0;
  background: #fbfaf7;
}

.auth-hero {
  display: grid;
  align-items: center;
  padding: clamp(56px, 9vw, 148px);
  background: #062b56;
  color: #fff;
}

.auth-hero__content { max-width: 590px; }
.auth-hero__brand {
  margin: 0;
  color: #d7a947;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: .08em;
}

.auth-hero__title {
  margin: 27px 0 0;
  color: #fff;
  font-size: clamp(44px, 5vw, 78px);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: 1.12;
}

.auth-hero__rule {
  display: block;
  width: 66px;
  height: 4px;
  margin: 43px 0 46px;
  background: #d7a947;
}

.auth-hero__statement {
  margin: 0;
  color: #dce8f7;
  font-size: clamp(17px, 1.55vw, 24px);
  line-height: 1.6;
  letter-spacing: .035em;
}

.auth-hero__description {
  max-width: 510px;
  margin: 28px 0 0;
  color: #b7c9df;
  font-size: 16px;
  line-height: 1.9;
}

.auth-card--login {
  align-self: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 100px) clamp(48px, 4.5vw, 68px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-card--login .auth-brand { font-size: 16px; }
.auth-card--login h1 { margin-top: 15px; font-size: clamp(32px, 3.1vw, 43px); }
.auth-card--login .auth-subtitle { margin-bottom: 35px; font-size: 16px; }
.auth-card--login label { margin-top: 25px; }
.auth-card--login input { min-height: 52px; }
.auth-card--login .captcha-row { margin-top: 25px; }
.auth-card--login .captcha-row + input { margin-top: 0; }
.auth-card--login .primary-button { min-height: 54px; margin-top: 32px; }

@media (max-width: 980px) {
  .login-page .auth-shell--login { grid-template-columns: minmax(360px, .84fr) minmax(470px, 1fr); }
  .auth-hero { padding: 48px; }
  .auth-hero__title { font-size: 48px; }
  .auth-hero__description { font-size: 14px; }
}

@media (max-width: 760px) {
  .auth-shell { padding: 20px; }
  .login-page .auth-shell--login { display: block; background: #fbfaf7; }
  .auth-hero { display: none; }
  .auth-card--login { min-height: 100svh; padding: 52px 26px 38px; }
  .auth-card--login h1 { font-size: 34px; }
}

@media (max-width: 520px) {
  .auth-card { padding: 28px 22px; border-radius: 12px; }
  .auth-card--login { padding: 46px 22px 32px; }
  .auth-card--login h1 { font-size: 31px; }
  .auth-card--login .auth-subtitle { margin-bottom: 27px; font-size: 15px; }
  .captcha-expression { font-size: 19px; }
}
