:root {
  font-family: Inter, system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #152638;
  background: #f5f7fa;
  line-height: 1.55;
  --surface: #fff;
  --line: #dce4ee;
  --muted: #526579;
  --primary: #174c9c;
  --danger: #a4283a;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--primary); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, p, dl { margin: 0; }
h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -.025em; line-height: 1.25; }
h2 { font-size: 1.15rem; line-height: 1.35; }
p { color: var(--muted); }
code { font-family: "IBM Plex Mono", ui-monospace, monospace; overflow-wrap: anywhere; }
.container { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-bar, .site-nav, .site-account { display: flex; align-items: center; gap: 1.25rem; }
.site-bar { min-height: 4.25rem; padding-block: .6rem; flex-wrap: wrap; }
.site-nav { gap: 1rem; }
.site-nav a { font-weight: 600; }
.site-account { margin-left: auto; gap: .7rem; min-width: 0; }
.site-account span { overflow-wrap: anywhere; }
.brand { font-size: 1.25rem; font-weight: 750; color: #12223b; text-decoration: none; letter-spacing: .035em; }
.main { padding-block: 2.4rem 4rem; }
.centered { min-height: 65vh; display: grid; place-items: center; }
.page-heading { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; padding: 1.35rem; margin-bottom: 1rem; }
.panel > * + * { margin-top: .75rem; }
.entry { width: min(100%, 30rem); padding: clamp(1.5rem, 5vw, 2.5rem); }
.entry > * + * { margin-top: 1.15rem; }
.button { appearance: none; border: 1px solid #b6c5d6; background: #fff; padding: .48rem .85rem; border-radius: .43rem; display: inline-block; color: #22364c; text-decoration: none; font-weight: 600; text-align: center; }
.button:hover { background: #eef4fa; }
.button.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.button.primary:hover { background: #123d80; }
.button.quiet { border-color: transparent; background: none; }
.status { display: inline-block; border-radius: .35rem; padding: .1rem .45rem; background: #edf1f7; color: #445870; font-size: .85rem; font-weight: 650; white-space: nowrap; }
.status.active, .status.online, .status.allowed, .status.healthy { background: #e6f5ec; color: #17623a; }
.status.pending, .status.degraded { background: #fff2d9; color: #7b4b0b; }
.status.disabled, .status.denied, .status.unavailable { background: #faebee; color: #97273a; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.table-panel { padding: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; text-align: left; border-collapse: collapse; }
th, td { padding: .72rem .9rem; vertical-align: top; }
thead { background: #f4f7fb; color: #42566c; }
tr + tr, tbody { border-top: 1px solid var(--line); }
@media (max-width: 34rem) {
  .site-bar { gap: .65rem; }
  .site-nav { gap: .65rem; }
  .main { padding-top: 1.4rem; }
}
.panel-heading, .form-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.panel-heading { justify-content: space-between; }
.form-panel { max-width: 37rem; }
.stacked-form { display: grid; gap: .45rem; justify-items: start; }
.stacked-form label { font-weight: 650; }
.stacked-form input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]) {
  border: 1px solid #889bb2;
  border-radius: .42rem;
  background: var(--surface);
  color: inherit;
  padding: .5rem .68rem;
  width: min(100%, 26rem);
}
.stacked-form input.otp { max-width: 12rem; font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .2em; }
.form-actions { margin-top: .45rem; }
.qr-code { display: block; max-width: 100%; height: auto; }
summary { cursor: pointer; color: var(--primary); }
.secret { display: inline-block; padding: .4rem .55rem; border-radius: .35rem; background: #f1f5fa; }
.notice { border: 1px solid #b7ddc6; background: #edf8f0; color: #17502e; border-radius: .5rem; margin-bottom: 1rem; padding: .7rem .9rem; }
.notice.warning { border-color: #ebc578; color: #754710; background: #fff7e6; }
.button.danger { color: var(--danger); border-color: #e0a8b1; }
.button.danger:hover { background: #ffeff2; }
.status.valid { background: #e6f5ec; color: #17623a; }
.status.revoked { background: #faebee; color: #97273a; }
:focus-visible { outline: 3px solid #1c68c5; outline-offset: 3px; }
.admin-nav { display: flex; align-items: center; gap: .35rem .65rem; flex-wrap: wrap; padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.35rem; }
.admin-nav a { text-decoration: none; padding: .45rem .62rem; border-radius: .4rem; color: #3a5069; }
.admin-nav a:hover { background: #eaf1fa; }
.admin-nav a[aria-current="page"] { background: #e2edf9; color: #123e80; font-weight: 700; }
.secondary { color: var(--muted); display: block; font-size: .88rem; overflow-wrap: anywhere; }
.filter { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pagination { display: flex; align-items: center; gap: .8rem; }
.destinations { margin: .45rem 0 0; padding-inline-start: 1.2rem; min-width: 12rem; }
.destinations li + li { margin-top: .5rem; }
.audit-form { gap: .7rem; }
.policy-choice { border: 1px solid var(--line); padding: .7rem; border-radius: .5rem; display: flex; align-items: flex-start; gap: .5rem; width: 100%; cursor: pointer; }
.policy-choice:has(:checked) { background: #f1f6fd; border-color: #88acd9; }
.policy-choice input { margin-top: .29rem; }
.policy-choice .secondary { font-weight: 400; }
