:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #65758b;
  --line: #d8e0ea;
  --brand: #1b5d7d;
  --ok: #138a42;
  --error: #bf2f2f;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font: 14px/1.45 "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--bg); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 230px; padding: 22px 18px; background: #17202b; color: #fff; }
.brand { font-weight: 700; font-size: 18px; margin-bottom: 28px; }
.sidebar a, .link-button { display: block; width: 100%; padding: 10px 12px; color: #e9eef4; text-decoration: none; border-radius: 6px; background: transparent; border: 0; text-align: left; font: inherit; cursor: pointer; }
.sidebar a:hover, .link-button:hover { background: #223244; }
.content { margin-left: 230px; padding: 28px; }
h1 { margin: 0 0 20px; font-size: 28px; }
h2 { margin: 8px 0 12px; font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.card, .panel, .login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 1px 2px rgba(10,20,30,.04); }
.card span { display: block; color: var(--muted); }
.card strong { display: block; margin-top: 8px; font-size: 34px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #eaf0f6; font-weight: 650; }
tr:hover { background: #f7fafc; }
tr[onclick] { cursor: pointer; }
label { display: block; margin-bottom: 14px; font-weight: 600; }
input, select { width: 100%; margin-top: 6px; padding: 10px 11px; border: 1px solid #bcc8d5; border-radius: 6px; font: inherit; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; margin: 0; }
button, .button { display: inline-block; border: 0; border-radius: 6px; padding: 10px 14px; background: var(--brand); color: white; text-decoration: none; font: inherit; cursor: pointer; }
.secondary { background: #60758b; }
.danger { background: var(--error); }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; color: #fff; font-size: 12px; }
.badge.ok { background: var(--ok); }
.badge.error { background: var(--error); }
.badge.muted { background: #718096; }
.muted { color: var(--muted); }
.alert { padding: 12px 14px; margin-bottom: 16px; border-radius: 6px; }
.alert.error { background: #ffe7e7; color: #842020; border: 1px solid #ffcaca; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.login-page { display: grid; place-items: center; }
.login-card { width: min(420px, calc(100vw - 32px)); }
pre { padding: 14px; background: #111827; color: #edf2f7; overflow: auto; border-radius: 8px; }
code { word-break: break-all; }
.row-error { background: #fff5f5; }
.row-ok { background: #f1fff6; }
.panel { margin-bottom: 18px; overflow-x: auto; }
@media (max-width: 760px) {
  .sidebar { position: static; width: auto; }
  .brand { margin-bottom: 10px; }
  .content { margin-left: 0; padding: 18px; }
}
