:root {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #19352f;
  background: #f6f8fa;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
.initial-loading { display: grid; place-items: center; min-height: 100vh; color: #657973; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 2rem; font-weight: 600; }
h2 { font-size: 1.45rem; font-weight: 600; }
.muted { color: #657973; line-height: 1.55; }
.small { font-size: .83rem; }
.brand-name { font-size: 1.85rem; font-weight: 500; letter-spacing: -.03em; }
.card { background: #fff; border-radius: 16px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 20px; border-radius: 6px;
  border: 1px solid transparent; font: inherit; font-size: .9rem;
  cursor: pointer; white-space: nowrap;
}
.button:disabled { cursor: not-allowed; opacity: .55; }
.button.primary { background: #111a2e; color: #fff; }
.button.primary:hover:not(:disabled) { background: #25334d; }
.button.outline { background: #fff; color: #233331; border-color: #cfdbd8; }
.button.outline:hover:not(:disabled) { background: #f2f6f4; }
.button.destructive { background: #e84848; color: #fff; }
.button.destructive:hover:not(:disabled) { background: #c72f35; }
input {
  display: block; width: 100%; min-height: 40px; border: 1px solid #cbd8df;
  border-radius: 6px; background: #fff; padding: 8px 12px;
  color: #19352f; font: inherit;
}
input::placeholder { color: #8ea1b7; }
input:focus-visible, .button:focus-visible {
  outline: 3px solid #5ea5a0; outline-offset: 2px;
}
label { display: block; font-size: .9rem; font-weight: 500; }
.form-stack { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form-stack label:not(:first-child) { margin-top: 16px; }
.form-status { min-height: 1.2em; color: #b44743; font-size: .85rem; }
.form-status.success { color: #287157; }
.form-status.neutral { color: #657973; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.login-layout { display: grid; grid-template-columns: minmax(350px, 36%) 1fr; min-height: 100vh; }
.brand-panel {
  display: flex; flex-direction: column; justify-content: space-between;
  background: #123330; color: #f4fbf4; padding: 100px 64px 76px;
}
.brand-panel h1 { font-size: 1.45rem; font-weight: 500; margin: 32px 0 24px; }
.brand-panel p:not(.brand-name) { color: #c2dbcd; line-height: 1.7; }
.brand-footnote { font-size: .9rem; }
.login-content { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(480px, 100%); min-height: 640px; padding: 54px 48px; }
.login-card h2 { font-size: 1.85rem; margin-bottom: 8px; }
.login-card .form-stack { margin-top: 64px; }
.login-card .form-status { margin: 20px 0 0; }
.login-card .small { margin-top: 42px; }
.register-entry { margin: 30px 0 0; font-size: .9rem; }
.register-entry a { color: #287157; }
.login-card #registration-policy-message { margin-top: 12px; }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 76px; padding: 12px 56px;
  background: #123330; color: #f4fbf4;
}
.site-header .brand-name { font-size: 1.7rem; }
.header-actions { display: flex; align-items: center; gap: 24px; font-size: .9rem; }
.security-content { max-width: 1440px; margin: auto; padding: 48px 96px 80px; }
.security-content h1 { margin-bottom: 4px; }
.security-grid { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(440px, 1.18fr); gap: 24px; margin-top: 52px; }
.security-card { min-height: 614px; padding: 32px; }
.security-card h2 { margin-bottom: 8px; }
.security-card .form-stack { margin-top: 48px; max-width: 390px; }
.security-card .form-stack .small { margin: 20px 0 0; }
.security-card .form-stack .button { justify-self: start; min-width: 190px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin-top: 38px; }
th, td { padding: 16px 12px; text-align: left; font-size: .88rem; }
th { background: #f2f6f5; color: #60746b; font-weight: 500; }
tbody tr:nth-child(even) { background: #f9fbfa; }
td:last-child { text-align: right; }
td .button { min-height: 34px; padding: 0 12px; }
.token-status.active { color: #287157; }
.token-status.expired, .token-status.revoked { color: #7c8985; }
.empty-state { margin-top: 38px; padding: 44px 16px; text-align: center; background: #f8faf9; }
dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  border: 1px solid #d8e2de; border-radius: 12px; padding: 0;
  box-shadow: 0 24px 70px #0c252038; color: #19352f;
}
dialog::backdrop { background: #102b2a99; }
.dialog-body { display: grid; gap: 16px; padding: 30px; }
.dialog-body h2 { margin: 0; }
.dialog-body p { margin-bottom: 0; }
.dialog-body label { margin-top: 12px; }
.expiry-heading { margin-top: 12px; font-size: .9rem; font-weight: 500; }
.expiry-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.expiry-presets .button { min-height: 36px; padding: 0 12px; }
.expiry-presets .expiry-preset[aria-pressed="true"] { background: #123330; border-color: #123330; color: #fff; }
.expiry-preview { padding: 12px 14px; border-radius: 6px; background: #f2f6f5; color: #35584d; font-size: .9rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.token-secret {
  display: block; overflow-wrap: anywhere; padding: 20px; border-radius: 8px;
  background: #f1f6f4; font-size: .95rem;
}
@media (max-width: 850px) {
  .login-layout { display: block; }
  .brand-panel { min-height: 156px; padding: 28px; }
  .brand-panel h1 { font-size: 1rem; margin: 16px 0 0; }
  .brand-panel p:not(.brand-name), .brand-footnote { display: none; }
  .login-content { display: block; padding: 30px 20px; }
  .login-card { width: 100%; min-height: 515px; padding: 32px 24px; }
  .login-card h2 { font-size: 1.55rem; }
  .login-card .form-stack { margin-top: 52px; }
  .login-card .small { margin-top: 30px; }
  .login-card #registration-policy-message { margin-top: 10px; }
  .site-header { padding: 14px 20px; }
  .site-header .brand-name { font-size: 1.5rem; }
  .header-actions { gap: 8px; font-size: .78rem; }
  .header-actions > span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-actions .button { min-height: 34px; padding: 0 8px; }
  .security-content { padding: 32px 20px 60px; }
  .security-content h1 { font-size: 1.65rem; }
  .security-grid { grid-template-columns: 1fr; margin-top: 32px; gap: 32px; }
  .security-card { min-height: unset; padding: 24px 20px; }
  .security-card .form-stack { margin-top: 36px; max-width: none; }
  .security-card .form-stack .button { width: 100%; }
  .section-heading { display: block; }
  .section-heading .button { width: 100%; margin-top: 22px; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  table { margin-top: 30px; }
  tbody tr { position: relative; margin-bottom: 12px; padding: 8px; background: #f2f6f5 !important; }
  td { padding: 4px 8px; }
  td::before { content: attr(data-label) "："; color: #60746b; }
  td:last-child { position: absolute; right: 8px; top: 20px; }
  td:last-child::before { content: ""; }
  .dialog-body { padding: 24px; }
}
