:root { color-scheme: light; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; color: #202020; background: #fff; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a { cursor: pointer; }
button { background: #fff; border: 1px solid #aaa; border-radius: 2px; padding: 7px 11px; color: inherit; }
button:hover, button:focus-visible, a:focus-visible { border-color: #333; outline: 2px solid #555; outline-offset: 1px; }
button.primary { background: #222; color: #fff; border-color: #222; }
button:disabled { color: #999; cursor: not-allowed; }
input, select, textarea { border: 1px solid #aaa; border-radius: 2px; padding: 7px 8px; background: #fff; color: inherit; width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 72px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #555; outline-offset: 1px; }
label { display: block; }
a { color: inherit; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 8px; background: #fff; }
.skip:focus { left: 8px; }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 205px; flex: 0 0 205px; border-right: 1px solid #bbb; display: flex; flex-direction: column; }
.brand { padding: 18px 15px; border-bottom: 1px solid #ccc; }
.brand strong, .brand small { display: block; }
.brand small { color: #666; margin-top: 4px; }
#navigation { padding: 7px; display: grid; gap: 2px; }
#navigation a { display: block; padding: 9px 10px; text-decoration: none; border: 1px solid transparent; }
#navigation a:hover, #navigation a.active { border-color: #999; background: #f3f3f3; }
.sidebar-foot { border-top: 1px solid #ccc; color: #666; line-height: 1.6; padding: 12px 15px; margin-top: auto; }
.workspace { flex: 1; min-width: 0; }
.topbar { min-height: 48px; border-bottom: 1px solid #ccc; display: flex; align-items: center; gap: 12px; padding: 0 22px; }
.topbar-right { margin-left: auto; color: #555; }
.menu-toggle { display: none; }
.notice { border-bottom: 1px solid #ddd; padding: 10px 22px; background: #f7f7f7; color: #444; }
main { max-width: 1500px; padding: 22px; margin: 0 auto; }
h1 { font-size: 22px; margin: 0 0 7px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
p { line-height: 1.65; }
.muted { color: #666; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.page-head p { margin: 0; color: #555; }
.tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; border-bottom: 1px solid #bbb; padding-bottom: 8px; }
.tabs a { text-decoration: none; border: 1px solid #bbb; padding: 7px 10px; white-space: nowrap; }
.tabs a.active { background: #222; color: #fff; border-color: #222; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.toolbar label { min-width: 150px; max-width: 220px; flex: 1; color: #444; }
.toolbar label span, .field span { display: block; margin-bottom: 5px; }
.toolbar .search { min-width: 220px; max-width: 330px; }
.toolbar .actions { display: flex; flex-wrap: wrap; gap: 7px; }
.panel { border: 1px solid #bbb; padding: 14px; margin: 0 0 15px; }
.panel p:first-child { margin-top: 0; }
.panel p:last-child { margin-bottom: 0; }
.table-scroll { overflow-x: auto; border: 1px solid #bbb; }
table { width: 100%; border-collapse: collapse; min-width: 690px; }
th, td { padding: 10px 11px; border-bottom: 1px solid #ddd; text-align: left; vertical-align: top; line-height: 1.45; }
th { background: #f5f5f5; font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafafa; }
.table-actions { display: flex; gap: 5px; white-space: nowrap; }
.table-actions button { padding: 4px 8px; }
.empty { padding: 25px; color: #666; text-align: center; }
.count { color: #666; margin-top: 8px; }
.detail { border: 1px solid #bbb; margin-top: 15px; padding: 15px; }
.detail-head { display: flex; justify-content: space-between; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 15px; }
.detail-grid div { border-bottom: 1px solid #eee; padding: 9px 0; overflow-wrap: anywhere; }
.detail-grid dt { color: #666; margin-bottom: 3px; }
.detail-grid dd { margin: 0; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 15px 0; }
.metric { border: 1px solid #bbb; padding: 13px; }
.metric strong { display: block; font-size: 22px; margin-top: 7px; }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.list-plain { margin: 0; padding-left: 20px; line-height: 1.9; }
.list-plain a { text-decoration: underline; }
.rule-note { margin: 13px 0; padding: 10px 12px; border: 1px solid #ccc; background: #fafafa; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field small { display: block; color: #666; margin-top: 4px; }
.dialog-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dialog-head { margin-bottom: 15px; }
.dialog-head h2 { margin: 0; }
.dialog-actions { justify-content: flex-end; margin-top: 18px; }
dialog { width: min(740px, calc(100vw - 26px)); border: 1px solid #555; padding: 18px; max-height: calc(100vh - 30px); overflow-y: auto; }
dialog::backdrop { background: rgb(0 0 0 / .28); }
.toast { display: none; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; max-width: min(650px, calc(100vw - 30px)); z-index: 50; }
.toast.show { display: block; }
.mini-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.mini-form label { min-width: 155px; }
.result { margin-top: 10px; white-space: pre-line; }
@media (max-width: 850px) { .sidebar { width: 170px; flex-basis: 170px; } .metrics { grid-template-columns: repeat(2, 1fr); } .grid-two { grid-template-columns: 1fr; } }
@media (max-width: 630px) { .sidebar { display: none; position: absolute; z-index: 20; background: #fff; min-height: 100vh; } .sidebar.open { display: flex; } .menu-toggle { display: inline-block; } main { padding: 15px; } .topbar, .notice { padding-left: 15px; padding-right: 15px; } .detail-grid, .form-grid { grid-template-columns: 1fr; } .metrics { grid-template-columns: 1fr 1fr; } }

/* Live management views share the prototype's compact navigation and tables. */
:root { --accent: #1b5d55; --ink: #172b2b; --line: #d4dfdc; --paper: #f4f8f6; color: var(--ink); }
[hidden] { display: none !important; }
.sidebar { border-color: var(--line); background: var(--paper); }
.brand, .topbar { border-color: var(--line); }
.brand { padding-block: 20px; }
.nav-group { padding: 4px 0 9px; }
.nav-group > span { display: block; padding: 7px 10px 3px; font-size: 12px; color: #52635e; }
#navigation a.active, #navigation a:hover { border-color: #b8d1c9; background: #e4f0eb; color: #144b44; }
button.primary { background: var(--accent); border-color: var(--accent); }
button.primary:disabled { opacity: .55; }
.public .sidebar { display: none; }
.public .workspace { min-height: 100vh; background: var(--paper); }
.public .topbar { background: #fff; }
.auth-card { max-width: 425px; margin: clamp(30px, 8vh, 96px) auto 25px; padding: clamp(18px, 5vw, 30px); border: 1px solid var(--line); background: #fff; }
.auth-fields { display: grid; gap: 13px; margin-bottom: 12px; }
.auth-card button[type="submit"] { min-width: 92px; }
.secret, .record-number { overflow-wrap: anywhere; }
#totp-qr { max-width: 100%; height: auto; image-rendering: pixelated; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; padding-left: 25px; overflow-wrap: anywhere; }
.check { display: flex; align-items: baseline; gap: 7px; margin: 8px 0; }
.check input { width: auto; margin: 0; }
.form-error, .notice.error { color: #8b2925; white-space: pre-wrap; overflow-wrap: anywhere; }
.form-error:empty { display: none; }
.page-head { align-items: center; }
.page-head .detail-actions, .page-controls { margin-top: 0; }
.page-controls, .pager { margin-bottom: 15px; }
.pager, .pending-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.pending-bar { padding: 10px 12px; margin: 0 0 15px; border: 1px solid #d6c290; background: #fffaed; }
.panel, .table-scroll { border-color: var(--line); }
th { background: var(--paper); }
.panel > h3:not(:first-child) { margin-top: 15px; }
.detail-grid .detail-grid { grid-template-columns: 1fr; margin: 0; }
.detail-grid .detail-grid > div { padding-block: 5px; }
.nested { margin: 0; padding-left: 18px; }
td { overflow-wrap: anywhere; }
td .detail-grid { min-width: 165px; grid-template-columns: 1fr; margin: 0; }
.sensitive { border-inline-start: 3px solid var(--accent); }
.form-grid > .wide { grid-column: 1 / -1; }
#upheld-fields { display: grid; gap: 10px; }
fieldset { border: 1px solid var(--line); }
@media (max-width: 630px) { .sidebar.open { top: 48px; } .page-head { align-items: flex-start; flex-wrap: wrap; } .toolbar label { min-width: min(175px, 100%); } }
