:root {
  color-scheme: light dark;
  --bg: #f5f6f8; --panel: #ffffff; --text: #1a1d23; --muted: #5d6573; --line: #dfe2e8;
  --accent: #2456c9; --accent-text: #ffffff; --danger: #b3261e;
  --ok-bg: #e7f5ec; --ok: #17633a; --warn-bg: #fdf3dc; --warn: #7a5200; --err-bg: #fce9e7; --err: #a1211a;
  --off-bg: #eceef2; --off: #4d5563;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a; --panel: #1d2026; --text: #e8eaee; --muted: #a0a7b4; --line: #333843;
    --accent: #7ba2f7; --accent-text: #10131a; --danger: #f2998f;
    --ok-bg: #16301f; --ok: #8fd8a8; --warn-bg: #36290f; --warn: #eec771; --err-bg: #3a1a18; --err: #f2a59d;
    --off-bg: #2a2e36; --off: #b4bac6;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { font-weight: 650; color: var(--text); text-decoration: none; }
main { max-width: 1120px; margin: 0 auto; padding: 24px; display: grid; gap: 20px; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; min-width: 0; }
.narrow { max-width: 680px; width: 100%; margin: 0 auto; }
.layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.login { max-width: 380px; width: 100%; margin: 48px auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
label { display: block; font-weight: 550; margin: 12px 0 4px; }
label.choice { font-weight: 400; margin: 4px 0; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 550; padding: 0; margin-bottom: 4px; }
input[type=text], input[type=password], input:not([type]), select { width: 100%; padding: 8px 10px; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, .button { display: inline-block; font: inherit; font-weight: 550; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); margin-top: 16px; }
.danger { color: var(--danger); padding: 4px 10px; }
.quiet { font-weight: 450; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 13px; }
.warn { color: var(--warn); }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.alert { margin: 0 0 12px; padding: 10px 14px; border-radius: 6px; overflow-wrap: anywhere; }
main > .alert { margin: 0; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-error { background: var(--err-bg); color: var(--err); }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.list-head h2 { margin: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 13px; }
.chip-on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.links { width: 100%; border-collapse: collapse; }
.links th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 550; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.links td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.links tr:last-child td { border-bottom: 0; }
.actions { text-align: right; }
.state { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 13px; }
.state-active { background: var(--ok-bg); color: var(--ok); }
.state-expired { background: var(--warn-bg); color: var(--warn); }
.state-revoked { background: var(--off-bg); color: var(--off); }
.empty { color: var(--muted); padding: 24px 0; text-align: center; margin: 0; }
.url-block { margin: 16px 0; }
.url-block label { margin-top: 0; }
.copy-row { display: flex; gap: 8px; margin-top: 8px; }
.url { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 760px) {
  .top { padding: 12px 16px; }
  main { padding: 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .links thead { display: none; }
  .links, .links tbody, .links tr, .links td { display: block; width: 100%; }
  .links tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .links tr:last-child { border-bottom: 0; }
  .links td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  .links td[data-label]::before { content: attr(data-label); color: var(--muted); text-align: left; flex: none; }
  .links td.actions { justify-content: flex-end; padding-top: 8px; }
}
