:root {
  color-scheme: light;
  --bg: #f4f6f5; --surface: #fff; --border: #e2e8e4; --text: #24332b;
  --muted: #65746a; --accent: #168650; --accent-hover: #116c40;
  --accent-soft: #eaf5ef; --danger: #a53535; --danger-soft: #fff1f1;
  --warning: #79571b; --warning-soft: #fff7e6;
  --radius: 12px; --shadow: 0 2px 8px rgb(24 50 34 / 3%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid #7bcca3; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--accent); text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.svg-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 18px; font-weight: 600; }
h2 { font-size: 24px; font-weight: 600; letter-spacing: -.3px; }
h3 { font-size: 16px; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 12px; padding: 12px; background: var(--surface); z-index: 20; }
.skip-link:focus { top: 8px; }
.workspace-shell { height: 100vh; height: 100dvh; display: grid; grid-template-columns: 184px minmax(0, 1fr); grid-template-rows: 64px minmax(0, 1fr); }
.workspace-sidebar { grid-row: 1 / -1; display: flex; flex-direction: column; padding: 24px 14px; background: #f0f3f1; border-right: 1px solid var(--border); }
.workspace-brand { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 0 7px; font-size: 17px; font-weight: 600; }
.workspace-brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: 3px; font-weight: 400; margin-top: 3px; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; background: var(--accent); color: white; }
.brand-mark svg { width: 24px; height: 24px; }
.main-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 36px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 11px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; transition: background-color 150ms, color 150ms; }
.nav-item:hover { background: #e6ece8; color: var(--text); }
.nav-item.is-active { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--shadow); }
.workspace-topbar { display: flex; align-items: center; gap: 20px; min-width: 0; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--border); }
.page-title { flex-shrink: 0; }
.device-switcher { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 360px; padding: 0 0 0 20px; border-left: 1px solid var(--border); color: var(--muted); }
.device-switcher svg { width: 18px; height: 18px; }
.device-switcher select { min-width: 0; max-width: 100%; min-height: 36px; padding: 6px 30px 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 500; text-overflow: ellipsis; }
.device-switcher strong { min-width: 0; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 1.2px; color: var(--muted); }
.account-menu { position: relative; margin-left: auto; }
.account-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary > svg { width: 15px; height: 15px; color: var(--muted); }
.account-avatar { display: inline-flex; justify-content: center; align-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e8eee9; color: #476b53; font-size: 12px; font-weight: 600; }
.account-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.account-dropdown { position: absolute; right: 0; top: 48px; width: 170px; z-index: 10; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgb(24 50 34 / 10%); }
.account-dropdown a, .account-dropdown button, .account-caption { display: block; width: 100%; padding: 10px; font-size: 13px; text-align: left; }
.account-caption { color: var(--muted); border-bottom: 1px solid var(--border); word-break: break-all; }
.account-dropdown button { border: 0; border-radius: 6px; color: var(--text); background: transparent; }
.account-dropdown button:hover, .account-dropdown a:hover { background: var(--bg); }
.workspace-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.view-panel { flex: 1; min-width: 0; min-height: 0; }
.workspace-error { flex-shrink: 0; margin: 14px 24px 0; box-shadow: var(--shadow); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin-top: 7px; }
.section-heading p:not(.eyebrow) { color: var(--muted); line-height: 1.7; margin-top: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 500; white-space: nowrap; transition: background-color 150ms, border-color 150ms; }
.button:hover:not(:disabled) { background: var(--bg); border-color: #bccdc2; }
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--accent); border-color: var(--accent); color: white; }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-quiet { background: transparent; }
.button-small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.button-danger { color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field label { font-size: 13px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; min-height: 42px; border: 1px solid #dce4df; border-radius: 8px; background: var(--surface); color: var(--text); }
.field textarea { resize: vertical; line-height: 1.7; }
.field input:read-only, .field textarea:read-only { background: #f6f8f7; color: var(--muted); }
.field input::placeholder, .field textarea::placeholder { color: #87948b; }
.helper-text { color: var(--muted); font-size: 12px; line-height: 1.7; }
.status-message { padding: 10px 13px; border-radius: 7px; font-size: 13px; line-height: 1.7; color: var(--accent-hover); background: var(--accent-soft); overflow-wrap: anywhere; }
.status-message.is-error { color: var(--danger); background: var(--danger-soft); }
.status-message.is-warning { color: var(--warning); background: var(--warning-soft); }
.empty-state { display: flex; min-height: 240px; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px; text-align: center; }
.empty-state > svg { width: 42px; height: 42px; color: #92a79a; }
.empty-state h2, .empty-state h3 { font-size: 17px; font-weight: 500; }
.empty-state p { color: var(--muted); line-height: 1.8; max-width: 360px; }
.loading-message { padding: 30px 0; color: var(--muted); text-align: center; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 18px; }
@media (max-width: 1100px) {
  .workspace-shell { grid-template-columns: 160px minmax(0, 1fr); }
  .workspace-topbar { padding: 16px 20px; gap: 16px; }
  .account-name { display: none; }
}
@media (max-width: 760px) {
  :root { font-size: 14px; }
  .workspace-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 60px 56px minmax(0, 1fr); }
  .workspace-sidebar { grid-row: 2; padding: 6px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .workspace-brand { display: none; }
  .main-nav { flex-direction: row; margin: 0; gap: 6px; }
  .nav-item { min-height: 44px; justify-content: center; padding: 10px 8px; gap: 7px; font-size: 12px; }
  .nav-item svg { width: 17px; height: 17px; }
  .workspace-topbar { grid-row: 1; padding: 12px 14px; gap: 10px; }
  .page-title { font-size: 16px; }
  .device-switcher { padding-left: 10px; flex: 1; }
  .device-switcher svg { display: none; }
  .device-switcher select { font-size: 16px; width: 100%; }
  .account-menu summary { gap: 0; }
  .account-menu summary > svg { display: none; }
  .workspace-main { grid-row: 3; }
  .section-heading { margin-bottom: 20px; gap: 12px; }
  h2 { font-size: 21px; }
  .button { min-height: 44px; }
  .field input, .field select, .field textarea { font-size: 16px; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
