:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --sidebar: #f1f3f5;
  --panel: #fff;
  --hover: #eceff2;
  --border: #e0e4e8;
  --border-strong: #bdc5ce;
  --text: #202831;
  --secondary: #526171;
  --muted: #647382;
  --accent: #24664e;
  --accent-hover: #184c39;
  --accent-tint: #edf6f1;
  --ok: #24664e;
  --warn: #89550d;
  --danger: #a52e36;
  --radius: 6px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea, summary { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: not-allowed; }
input, select, textarea { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--panel); color: var(--text); max-width: 100%; }
input, select { min-height: 34px; padding: 5px 9px; }
textarea { resize: vertical; padding: 9px 10px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; min-height: 16px; height: 16px; flex: 0 0 auto; }
a { color: var(--accent); text-decoration: none; }
button svg, a svg { flex-shrink: 0; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 20px; line-height: 1.4; font-weight: 650; margin-bottom: 6px; letter-spacing: -.3px; }
h2 { font-size: 15px; line-height: 1.5; font-weight: 650; margin-bottom: 10px; }
h3 { font-size: 14px; line-height: 1.5; font-weight: 650; margin-bottom: 8px; }
p { margin-bottom: 12px; }
small { font-size: 12px; }
code, .mono { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
time, progress, .usage, .profile-time { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.secondary { color: var(--secondary); }
.grow { flex: 1; }
.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: -50px; left: 12px; z-index: 200; background: var(--panel); padding: 8px 12px; }
.skip-link:focus { top: 6px; }
.button, .primary, .text-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; border-radius: var(--radius); white-space: nowrap; transition: background 120ms ease; }
.button { border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); padding: 5px 11px; }
.button:hover:not(:disabled) { background: var(--hover); }
.primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 6px 14px; font-weight: 600; }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.text-button { background: none; border: 0; color: var(--accent); padding: 4px 0; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-button { border: 0; color: var(--secondary); background: transparent; width: 34px; padding: 6px; }
.icon-button:hover { background: var(--hover); }
.danger-button { color: var(--danger); }
.full-width { width: 100%; }
.brand-mark { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.startup { min-height: 80vh; display: flex; align-items: center; justify-content: center; gap: 12px; }
.startup p { margin: 0; color: var(--secondary); }
.login-page { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.login-panel { width: 380px; max-width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 30px; }
.login-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 28px; font-weight: 600; color: var(--secondary); }
.login-panel h1 { font-size: 22px; margin-bottom: 10px; }
.login-panel label { display: block; margin: 22px 0 7px; font-weight: 600; }
.login-panel input { width: 100%; height: 38px; }
.login-note { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 20px 0 0; }
.login-footer { margin-top: 16px; color: var(--muted); font-size: 12px; }
.setup-command { display: grid; gap: 8px; padding: 12px; background: var(--bg); border-radius: var(--radius); margin: 20px 0; overflow-wrap: anywhere; }
.setup-command span { color: var(--secondary); font-size: 12px; }
.form-error { color: var(--danger); font-size: 12px; margin: 8px 0; white-space: pre-wrap; }
.form-error:empty { margin: 10px 0; }
.shell { height: 100dvh; display: grid; grid-template-rows: 48px minmax(0, 1fr) 28px; }
.topbar { background: var(--panel); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 0 16px; font-size: 12px; color: var(--secondary); white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; font-size: 13px; }
.topbar-divider { height: 17px; width: 1px; background: var(--border); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.private-note { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.private-note svg { width: 13px; height: 13px; }
.workspace { display: flex; min-height: 0; }
.sidebar { width: 200px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--border); padding: 20px 10px 12px; display: flex; flex-direction: column; }
.sidebar-label { font-size: 11px; color: var(--muted); font-weight: 500; margin: 0 10px 8px; }
.nav-item { display: flex; align-items: center; gap: 9px; min-height: 37px; padding: 7px 10px; margin-bottom: 3px; border-radius: var(--radius); color: var(--secondary); }
.nav-item:hover { background: var(--hover); }
.nav-item.selected { background: var(--panel); color: var(--accent); font-weight: 650; box-shadow: 0 0 0 1px var(--border); }
.nav-count { margin-left: auto; font-size: 11px; color: var(--warn); }
.nav-count:empty { display: none; }
.sidebar-bottom { margin-top: auto; padding: 24px 10px 0; }
.sidebar-bottom .sidebar-label { margin-left: 0; }
.sidebar-bottom p { font-size: 11px; color: var(--muted); line-height: 1.8; margin: 16px 0 0; }
#sidebar-runtime > .secondary { font-size: 11px; display: block; margin-top: 5px; }
.usage { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12px; }
.usage strong span { font-weight: 400; color: var(--secondary); }
progress { width: 100%; height: 4px; border: none; border-radius: 3px; overflow: hidden; background: var(--border); color: var(--accent); }
progress::-webkit-progress-bar { background: var(--border); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.main { min-width: 0; flex: 1; overflow: auto; padding: 25px 28px 40px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-heading p { margin: 0; color: var(--secondary); font-size: 12px; }
.page-heading .button { flex-shrink: 0; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.periods { display: flex; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--panel); padding: 2px; }
.period { min-height: 28px; padding: 3px 11px; border: 0; border-radius: 4px; background: transparent; color: var(--secondary); }
.period.active { background: var(--accent-tint); color: var(--accent); font-weight: 650; }
.period:hover { background: var(--hover); }
.search-field { flex: 1; min-width: 210px; max-width: 360px; display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--panel); gap: 7px; padding: 0 8px; }
.search-field:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-field svg { color: var(--muted); width: 16px; flex: 0 0 auto; }
.search-field input { border: 0; width: 100%; min-width: 0; padding-left: 0; outline: 0; }
.search-submit { padding: 3px 4px; color: var(--accent); background: none; border: 0; white-space: nowrap; font-size: 12px; }
.filter-bar select { min-width: 124px; }
.custom-dates { width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.custom-dates label { display: flex; align-items: center; gap: 8px; color: var(--secondary); }
.custom-dates > span { font-size: 12px; color: var(--muted); }
.window-label { font-size: 11px; color: var(--muted); margin: 10px 0 18px; font-variant-numeric: tabular-nums; }
.window-label:empty { display: none; }
.notice { display: flex; align-items: flex-start; gap: 8px; border: 1px solid #e5d6b9; background: #fcf8ef; color: #76521b; border-radius: var(--radius); padding: 10px 12px; font-size: 12px; margin-bottom: 16px; line-height: 1.75; }
.notice svg { flex: 0 0 auto; margin-top: 2px; width: 16px; height: 16px; }
.danger-notice { border-color: #ebcbd0; background: #fcf3f4; color: #922c35; }
.subtle-notice { border-color: var(--border); background: var(--panel); color: var(--secondary); }
.overview-summary { margin: 0 0 20px; padding: 2px 0 16px; border-bottom: 1px solid var(--border); }
.section-kicker { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.overview-summary > p { font-size: 14px; line-height: 1.9; max-width: 1000px; margin-bottom: 10px; white-space: pre-wrap; }
.summary-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.panel { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--panel); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px; gap: 12px; }
.panel-heading h2 { margin: 0; font-size: 14px; }
.panel-heading > span { font-size: 11px; }
.profile-table-head, .profile-row { display: grid; grid-template-columns: minmax(140px, 1.1fr) minmax(240px, 2.4fr) minmax(110px, .8fr) minmax(110px, .8fr) 16px; column-gap: 18px; width: 100%; align-items: center; text-align: left; padding: 13px 16px; }
.profile-table-head { font-size: 11px; color: var(--muted); background: #fafbfc; border-top: 1px solid var(--border); padding-top: 8px; padding-bottom: 8px; }
.profile-row { border: 0; border-top: 1px solid var(--border); background: none; color: var(--text); min-height: 100px; }
.profile-row:hover, .profile-row:focus-visible { background: #f7faf8; }
.identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.identity > span:last-child { min-width: 0; }
.identity strong, .identity small { display: block; overflow-wrap: anywhere; }
.identity small { color: var(--muted); font-family: var(--mono); font-size: 11px; margin-top: 3px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; background: #edf0f3; color: #4b5a68; border: 1px solid var(--border); border-radius: 7px; font-weight: 600; }
.profile-work { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.profile-work > strong { font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.profile-work > span:not(.badge) { color: var(--secondary); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.profile-time { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--secondary); }
.profile-time small { font-size: 11px; color: var(--muted); }
.profile-changes { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.change-warn { color: var(--warn); }
.row-chevron { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; font-size: 11px; line-height: 1.8; color: var(--secondary); white-space: nowrap; }
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.danger { color: var(--danger); }
.empty { padding: 42px 20px; text-align: center; color: var(--secondary); }
.empty svg { width: 24px; height: 24px; margin-bottom: 12px; color: var(--muted); }
.empty h2 { font-size: 14px; color: var(--text); margin-bottom: 7px; }
.empty p { font-size: 12px; max-width: 460px; margin: 0 auto; }
.loading-state { padding: 42px 20px; color: var(--secondary); display: flex; align-items: center; justify-content: center; gap: 10px; }
.loader { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; color: var(--secondary); font-size: 12px; }
.pagination > span { margin-right: auto; }
.group-heading { margin: 22px 0 12px; }
.group-heading h2 { margin-bottom: 3px; }
.group-heading h2 span { font-size: 12px; color: var(--secondary); font-weight: 400; padding-left: 6px; }
.group-heading p { margin: 0; font-size: 12px; color: var(--secondary); }
.record-group { max-width: 1000px; }
.record-card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; padding: 16px 18px 10px; }
.record-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 11px; margin-bottom: 10px; }
.record-meta .mono { font-size: 11px; }
.record-meta time { margin-left: auto; }
.record-description { font-size: 13px; color: var(--secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.record-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-top: 7px; border-top: 1px solid var(--border); font-size: 12px; }
.record-actions .button { font-size: 12px; min-height: 30px; padding-top: 3px; padding-bottom: 3px; }
.record-actions .text-button svg { width: 14px; height: 14px; }
.record-actions > .secondary { font-size: 11px; }
.resolution-note { background: var(--bg); padding: 8px 10px; border-radius: 4px; color: var(--secondary); font-size: 12px; margin-bottom: 12px; white-space: pre-wrap; }
.plain-diff { margin: 12px 0; }
.plain-diff > div { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid #edf0f2; }
.plain-diff dt { color: var(--muted); font-size: 12px; }
.plain-diff dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.plain-diff > .benefit { border-bottom: 0; }
.benefit dt { color: var(--accent); }
.conditions { color: var(--secondary); font-size: 12px; line-height: 1.8; }
.diff-details { margin: 8px 0 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
summary { cursor: pointer; padding: 9px 11px; color: var(--secondary); font-size: 12px; }
summary > span { color: var(--muted); margin-left: 8px; font-size: 11px; }
.diff { background: #fafbfc; border-top: 1px solid var(--border); padding: 8px 0; margin: 0; overflow-x: auto; font-size: 12px; line-height: 1.8; font-family: var(--mono); max-height: 380px; }
.diff-line { display: block; min-width: fit-content; padding: 0 12px; white-space: pre; }
.diff-line.added { background: #e9f4ed; color: #245934; }
.diff-line.removed { background: #f9e9e9; color: #8c343a; }
.diff-line.heading { color: #536478; background: #eef1f5; }
.batch-history { max-width: 1000px; margin-top: 24px; }
.batch-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12px; }
.batch-row > div { flex: 1; }
.batch-row p { color: var(--secondary); margin: 4px 0 0; }
.batch-row > span { color: var(--muted); }
.statusbar { display: flex; align-items: center; gap: 20px; padding: 0 14px; background: var(--panel); border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; white-space: nowrap; }
.statusbar-right { margin-left: auto; }
dialog { width: 590px; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--border); background: var(--panel); color: var(--text); box-shadow: -8px 0 30px rgb(20 30 40 / 9%); }
dialog::backdrop { background: rgb(25 35 45 / 20%); }
.detail-header { position: sticky; top: 0; z-index: 2; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--panel); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-header h2 { font-size: 16px; margin: 0; }
.detail-header p { color: var(--muted); font-family: var(--mono); font-size: 11px; margin: 4px 0 0; }
.detail-body { padding: 20px; }
.dialog-notice { margin: 12px 20px 0; }
.detail-body > section { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 22px; }
.detail-body > section > h3 { font-size: 14px; margin-bottom: 12px; }
.detail-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; margin-bottom: 14px; }
.detail-summary { line-height: 1.9; white-space: pre-wrap; }
#detail-update { display: block; }
#detail-update button { display: block; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--border); }
.timeline li { position: relative; padding: 0 0 18px 3px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -18px; top: 5px; width: 7px; height: 7px; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 50%; }
.timeline p { color: var(--secondary); font-size: 12px; margin: 6px 0 3px; white-space: pre-wrap; }
.evidence-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.evidence-row > div:first-child { flex: 1; }
.evidence-row strong { font-size: 12px; font-weight: 550; }
.evidence-row p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.evidence-row button { font-size: 12px; }
.evidence-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 12px; font-size: 11px; }
.evidence-links svg { width: 13px; height: 13px; }
.evidence-content { width: 100%; flex-basis: 100%; min-width: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 12px; margin: 6px 0; }
.evidence-content pre { font-family: var(--font); font-size: 12px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 400px; overflow: auto; margin: 0; }
.history-list { border: 1px solid var(--border); border-radius: var(--radius); }
.history-list details + details { border-top: 1px solid var(--border); }
.history-list p { padding: 0 12px 12px; margin: 0; color: var(--secondary); white-space: pre-wrap; font-size: 12px; }
.detail-footer { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.detail-footer > span, .detail-footer small { font-size: 11px; color: var(--muted); }
.compact-form { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.compact-form > button { align-self: flex-start; }
.compact-form label { font-size: 12px; font-weight: 550; }
.compact-form p { color: var(--secondary); margin: 0 0 6px; }
.compact-form fieldset { border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: 8px; padding: 14px; }
.preview-targets { list-style: none; margin: 16px 0; padding: 0; }
.preview-targets li { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid var(--border); gap: 4px; }
.settings-layout { max-width: 780px; }
.settings-section { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.settings-section h2 { font-size: 15px; margin-bottom: 12px; }
.section-help { font-size: 12px; color: var(--secondary); margin: -4px 0 16px; }
.section-footnote { font-size: 12px; color: var(--muted); margin: 12px 0 0; line-height: 1.8; }
.service-list { border: 1px solid var(--border); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.service-row { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 12px 14px; }
.service-row + .service-row { border-top: 1px solid var(--border); }
.service-row strong { font-size: 12px; }
.service-row p { color: var(--secondary); font-size: 12px; margin: 3px 0 0; white-space: pre-wrap; }
.service-row small { color: var(--muted); font-size: 11px; }
.settings-section > .notice { margin-top: 12px; }
.queue-status { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; color: var(--secondary); font-size: 12px; }
.inline-help { margin-left: 10px; font-size: 12px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 16px; min-height: 48px; padding: 9px 0; align-items: start; border-bottom: 1px solid var(--border); }
.field-row > label, .field-row > span { padding-top: 7px; color: var(--secondary); font-size: 12px; }
.field-row input:not([type="checkbox"]) { width: 100%; }
.field-row input.short-input { width: 130px; }
.field-row small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.check-label { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; font-size: 12px; cursor: pointer; }
.field-row .check-label { padding-top: 0; }
.settings-save { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 24px; margin-top: -8px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.settings-save .form-error:not(:empty) { flex-basis: 100%; margin-bottom: 0; }
.settings-save .form-error:empty { display: none; }
#settings-saved { color: var(--ok); font-size: 12px; }
#password-form > button { margin-top: 8px; }
.notification-list > div { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.notification-list > div > span:nth-child(2), .notification-list time { color: var(--secondary); font-size: 11px; }
#toast { display: none; position: fixed; z-index: 300; left: 50%; bottom: 40px; transform: translateX(-50%); max-width: min(600px, calc(100vw - 32px)); padding: 12px 16px; background: #243b31; color: #fff; border-radius: var(--radius); box-shadow: 0 6px 22px rgb(0 0 0 / 12%); font-size: 13px; }
#toast.visible { display: block; }
#toast.error-toast { background: #6a3035; }
@media (min-width: 1600px) {
  .main { padding-left: 40px; padding-right: 40px; }
  .profile-table-head, .profile-row { grid-template-columns: minmax(180px, 1fr) minmax(350px, 2.5fr) minmax(140px, 1fr) minmax(130px, .8fr) 16px; }
}
@media (max-width: 1180px) {
  .sidebar { width: 176px; }
  .main { padding: 22px 20px 32px; }
  .profile-table-head, .profile-row { column-gap: 12px; grid-template-columns: minmax(125px, 1fr) minmax(190px, 2fr) 102px 90px 12px; padding-left: 12px; padding-right: 12px; }
  .identity { gap: 7px; }
  .avatar { width: 28px; height: 28px; }
  .profile-time, .profile-changes { font-size: 11px; }
}
@media (max-width: 980px) {
  .sidebar { width: 166px; }
  .main { padding: 20px 16px 32px; }
  .profile-table-head { display: none; }
  .profile-row { grid-template-columns: 1fr auto 16px; gap: 10px; padding: 14px; }
  .identity { grid-column: 1; grid-row: 1; }
  .profile-work { grid-column: 1 / 3; grid-row: 2; padding-left: 38px; }
  .profile-time { grid-column: 2; grid-row: 1; text-align: right; }
  .profile-time small { display: none; }
  .profile-changes { grid-column: 1 / 3; grid-row: 3; padding-left: 38px; flex-direction: row; gap: 12px; }
  .row-chevron { grid-column: 3; grid-row: 1 / 4; }
}
@media (max-width: 700px) {
  :root { font-size: 14px; }
  .shell { grid-template-rows: 48px minmax(0, 1fr) 26px; }
  .topbar { padding: 0 12px; }
  .private-note { display: none; }
  .topbar-divider, #breadcrumb { display: none; }
  .workspace { flex-direction: column; }
  .sidebar { width: 100%; padding: 5px 8px; background: var(--panel); border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar > .sidebar-label, .sidebar-bottom { display: none; }
  .sidebar nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .nav-item { justify-content: center; gap: 5px; padding: 9px 3px; font-size: 12px; margin: 0; min-height: 40px; }
  .nav-item.selected { box-shadow: none; background: var(--accent-tint); }
  .nav-item svg { width: 16px; height: 16px; }
  .nav-count { display: none; }
  .main { padding: 20px 12px 28px; }
  h1 { font-size: 19px; }
  .page-heading { align-items: flex-start; margin-bottom: 16px; gap: 10px; }
  .page-heading p { line-height: 1.8; max-width: 240px; }
  .page-heading .button { font-size: 12px; min-height: 36px; }
  .page-heading .button svg { display: none; }
  .filter-bar { gap: 8px; }
  .periods { flex: 1 0 100%; }
  .period { flex: 1; min-height: 34px; }
  .search-field { min-width: 150px; max-width: none; }
  .search-field input { min-height: 38px; }
  .filter-bar select { min-width: 110px; max-width: 145px; height: 40px; }
  .custom-dates { align-items: stretch; }
  .custom-dates label { width: 100%; }
  .custom-dates label input { flex: 1; min-width: 0; }
  .window-label { font-size: 10px; line-height: 1.8; margin: 10px 0 14px; }
  .overview-summary > p { font-size: 13px; }
  .summary-meta { gap: 5px 14px; font-size: 10px; }
  .panel-heading { padding: 12px; }
  .panel-heading > span { font-size: 10px; }
  .profile-row { padding: 14px 12px; }
  .profile-work { padding-left: 0; }
  .profile-changes { padding-left: 0; }
  .record-card { padding: 14px 12px 8px; }
  .record-meta { gap: 5px 8px; }
  .record-meta .mono { display: none; }
  .record-actions { gap: 6px 8px; }
  .record-actions .button { min-height: 36px; }
  .plain-diff > div { grid-template-columns: 30px 1fr; gap: 9px; }
  .statusbar { font-size: 9px; padding: 0 8px; gap: 8px; }
  .statusbar-right { display: none; }
  dialog { width: 100%; border-left: 0; box-shadow: none; }
  .detail-body { padding: 16px; }
  .detail-header { padding: 14px 16px; }
  .detail-header .icon-button { width: 40px; height: 40px; }
  .field-row { grid-template-columns: 100px minmax(0, 1fr); gap: 10px; }
  .field-row input { min-height: 38px; }
  .field-row input.short-input { max-width: 130px; }
  .service-row { padding: 12px; gap: 10px; }
  .service-row > .badge { margin-top: 2px; }
  .inline-help { display: block; margin: 8px 0 0; font-size: 11px; }
  .notification-list > div { grid-template-columns: 1fr auto; gap: 4px 8px; }
  .notification-list time { grid-column: 1 / 3; }
  .batch-row { flex-wrap: wrap; gap: 8px; }
  .batch-row > div { flex-basis: 100%; }
  .button, .primary { min-height: 38px; }
  .compact-form textarea { font-size: 16px; }
  .login-panel { padding: 26px; }
  .login-panel input { font-size: 16px; }
}
@media (max-width: 370px) {
  .nav-item { font-size: 11px; }
  .nav-item svg { display: none; }
  .field-row { grid-template-columns: 1fr; gap: 5px; }
  .field-row > label { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
