:root {
  color-scheme: light;
  --accent: #1b61c9; --accent-hover: #164fa5; --link: #1b61c9;
  --text: #181d26; --muted: #5e6878; --bg: #f6f8fb; --surface: #fff;
  --sidebar: #fff; --subtle: #f8fafc; --border: #e0e2e6; --input-border: #a3adbb;
  --active: #eaf2ff; --active-text: #174f9e; --focus: #1b61c9;
  --success-bg: #eaf5ee; --success-text: #24613c; --neutral-bg: #f0f2f5;
  --shadow: 0 2px 6px rgba(24, 29, 38, .025); --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px; line-height: 1.55; letter-spacing: .12px;
  color: var(--text); background: var(--bg);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --link: #9cc2ff; --text: #e8edf5; --muted: #acb8c9; --bg: #101722;
  --surface: #182230; --sidebar: #141e2b; --subtle: #1c2838;
  --border: #354154; --input-border: #718096; --active: #223b60;
  --active-text: #c4dbff; --focus: #9cc2ff; --success-bg: #193b2e;
  --success-text: #99dbb1; --neutral-bg: #293446; --shadow: none;
}
* { box-sizing: border-box; }
.action-bar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:16px 0; }
.server-state { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:8px 16px; font-size:13px; }.server-state dt { color:var(--muted); }.server-state dd { margin:0; overflow-wrap:anywhere; }
.form-card { padding:22px; }.form-card>h2 { margin-bottom:12px; }.stack { display:grid; gap:8px; max-width:720px; }
.form-grid,.target-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:18px; }
select { font:inherit; min-height:44px; border:1px solid var(--input-border); border-radius:12px; padding:10px 12px; color:var(--text); background:var(--surface); max-width:100%; }
select:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.field-output { display:block; padding:10px 12px; border:1px solid var(--border); border-radius:12px; background:var(--subtle); overflow-wrap:anywhere; }
.check { width:20px; height:20px; min-height:20px; flex-shrink:0; accent-color:var(--accent); }
.target-choice { display:flex; align-items:center; gap:12px; margin:0; padding:12px; border:1px solid var(--border); border-radius:12px; font-weight:400; }
.preview-list li { padding:6px 0; overflow-wrap:anywhere; }.form-card legend { font-weight:600; padding:0 8px; }
body { margin: 0; min-height: 100vh; }
.workspace { display: flex; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
button, input { font: inherit; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 15px; border: 1px solid transparent; border-radius: 12px; color: #fff; background: var(--accent); cursor: pointer; font-weight: 600; }
button:hover { background: var(--accent-hover); }
.secondary { color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.secondary:hover { background: var(--subtle); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, .table:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; } main:focus { outline: none; }
.skip-link { position: fixed; top: -70px; left: 16px; padding: 12px; background: var(--surface); z-index: 10; border-radius: 12px; }.skip-link:focus { top: 12px; }
.sidebar { width: 246px; flex-shrink: 0; padding: 28px 16px 20px; border-right: 1px solid var(--border); background: var(--sidebar); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-size: 18px; font-weight: 700; line-height: 1.3; }.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 23px; }
.brand small { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; color: var(--muted); }
.nav-label { margin: 34px 10px 10px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .5px; }
.sidebar nav { display: grid; gap: 4px; }.sidebar nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-size: 13px; font-weight: 500; }
.sidebar nav a:hover { background: var(--subtle); color: var(--text); text-decoration: none; }.sidebar nav a[aria-current="page"] { color: var(--active-text); background: var(--active); font-weight: 600; }
.nav-icon { width: 20px; text-align: center; font-size: 19px; line-height: 1; }
.sidebar-footer { margin-top: auto; padding: 22px 8px 0; border-top: 1px solid var(--border); }.sidebar-footer p { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; background: var(--success-text); border-radius: 50%; }.logout { width: 100%; font-size: 13px; }
.workspace main { flex: 1; min-width: 0; max-width: 1560px; margin: 0 auto; padding: 0 36px 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; border-bottom: 1px solid var(--border); }
.breadcrumb { color: var(--muted); font-size: 12px; }.breadcrumb span { margin: 0 9px; }
.theme-toggle { font-size: 12px; font-weight: 500; white-space: nowrap; }.theme-symbol { font-size: 18px; line-height: 1; }
.page-header { margin-top: 27px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }.eyebrow { color: var(--muted); font-size: 12px; margin: 0 0 3px; }
h1 { font-size: 26px; line-height: 1.3; letter-spacing: -.4px; margin: 0; font-weight: 650; }h2 { font-size: 15px; line-height: 1.4; margin: 0; font-weight: 600; }h3 { font-size: 15px; }
.muted { color: var(--muted); }.page-description { margin: 12px 0 22px; font-size: 13px; }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; font-size: 11px; font-weight: 500; line-height: 1.6; border: 1px solid var(--border); white-space: nowrap; }
.readonly { background: var(--active); color: var(--active-text); border-color: transparent; }.success { background: var(--success-bg); color: var(--success-text); border-color: transparent; }.neutral { background: var(--neutral-bg); color: var(--muted); border-color: transparent; }
.toolbar { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }.search-field { width: min(100%, 420px); }label { display: block; font-size: 12px; font-weight: 600; margin: 0 0 6px; }
input { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--input-border); border-radius: 12px; color: var(--text); background: var(--surface); }input::placeholder { color: var(--muted); opacity: 1; }.search-hint { margin: 0 0 12px; font-size: 12px; }
.notices { margin-bottom: 20px; display: grid; gap: 8px; }.notice { margin: 0; background: var(--active); color: var(--active-text); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; font-size: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }.row-count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.table { overflow: auto; max-width: 100%; }table { border-collapse: collapse; width: 100%; font-size: 13px; }th, td { text-align: left; padding: 13px 20px; border-top: 1px solid var(--border); vertical-align: middle; min-width: 110px; overflow-wrap: anywhere; max-width: 520px; }th { background: var(--subtle); color: var(--muted); font-size: 11px; font-weight: 600; }tbody tr:hover { background: var(--subtle); }.record-link { font-weight: 500; }
[hidden] { display: none !important; }.empty-state { text-align: center; padding: 36px 20px; border-top: 1px solid var(--border); }.empty-state>span { color: var(--muted); font-size: 25px; }.empty-state h3 { margin: 10px 0 6px; }.empty-state p { margin: 0; }
.pager { display: flex; justify-content: space-between; gap: 16px; }.page-link { padding: 9px 15px; border-radius: 12px; font-size: 13px; }.page-footer { margin-top: 24px; font-size: 11px; }
.login { display: grid; place-items: center; padding: 96px 20px 30px; }.login-theme { position: absolute; top: 24px; right: 28px; }.login-shell { width: min(100%, 460px); }.login-brand { justify-content: center; margin-bottom: 26px; }.login-card { padding: 30px; }.login-card h1 { margin: 18px 0 12px; font-size: 25px; }.login-card p { font-size: 13px; }.login-card form { margin-top: 24px; }.field-help { font-size: 12px !important; margin: 7px 0 18px; }.login-submit { width: 100%; justify-content: space-between; }
.login-security { display: flex; align-items: flex-start; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }.login-security p { margin: 0; font-size: 11px; overflow-wrap: anywhere; }.login-security>span { color: var(--muted); }.login-footer { text-align: center; font-size: 11px; }
@media (max-width: 1000px) { .workspace main { padding: 0 22px 24px; }.sidebar { width: 224px; }.search-hint { display: none; } }
@media (max-width: 760px) {
  .workspace { display: block; }.sidebar { position: static; width: 100%; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--border); }.brand { font-size: 16px; }.brand-mark { width: 34px; height: 34px; }.nav-label { display: none; }
  .sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 16px; }.sidebar nav a { flex-direction: column; gap: 5px; min-height: 62px; justify-content: center; text-align: center; font-size: 11px; padding: 8px 3px; }
  .sidebar-footer { margin-top: 14px; padding: 10px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }.sidebar-footer p { font-size: 11px; }.logout { min-height: 40px; padding: 7px 10px; font-size: 11px; }
  .workspace main { padding: 0 16px 24px; }.topbar { min-height: 68px; }.breadcrumb { font-size: 11px; }.breadcrumb span { margin: 0 3px; }.theme-toggle { min-height: 40px; padding: 8px 10px; font-size: 11px; }.page-header { margin-top: 20px; gap: 8px; align-items: flex-start; }h1 { font-size: 23px; }.page-description { font-size: 12px; }.badge { font-size: 10px; }.card-heading { padding: 15px; }th, td { padding: 12px 15px; }.card { border-radius: 14px; }.notice { font-size: 12px; }.search-field { width: 100%; }
  .login { padding: 86px 16px 24px; }.login-card { padding: 24px; }.login-theme { right: 16px; top: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
