:root {
  --brand: #f5a623;
  --brand-hover: #e69717;
  --brand-ink: #39280e;
  --brand-text: #8b5206;
  --sidebar: #202b38;
  --ground: #f6f7f9;
  --panel: #fff;
  --ink: #202b38;
  --muted: #596675;
  --line: #dfe4ea;
  --success: #24734f;
  --red: #b5323c;
  --warning: #80500b;
  --focus: #98600c;
  --header-height: 56px;
  --nav-height: 48px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--ground);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
a { color: var(--brand-text); text-underline-offset: 3px; }
button, a, input, select, textarea, summary { outline-offset: 3px; }
:is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--focus); }
::selection { background: #ffe0a6; color: var(--brand-ink); }
input, textarea { caret-color: var(--brand-text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #b5bdc8; border: 2px solid var(--ground); border-radius: 6px; }
::-webkit-scrollbar-track { background: var(--ground); }
[hidden] { display: none !important; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: 0 1px 2px #202b380c;
  cursor: pointer;
}
button:hover, .button:hover { background: #f1f3f6; border-color: #aab5c2; }
button:active, .button:active { background: #e6eaf0; }
button:disabled { background: #f1f3f6; color: #687482; border-color: var(--line); cursor: not-allowed; }
.primary { background: var(--brand); color: var(--brand-ink); border-color: #e29a23; font-weight: 600; }
.primary:hover { background: var(--brand-hover); border-color: #cc8311; }
.primary:active { background: #d98c0f; }
.quiet { color: var(--brand-text); }
.dark-button { color: var(--muted); background: #fff; border-color: var(--line); }
.dark-button:hover { color: var(--ink); background: #f1f3f6; }

.brandbar { display: flex; align-items: center; gap: 18px; height: var(--header-height); padding: 0 max(20px, calc((100vw - 1200px) / 2)); border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 7px; border-radius: 4px; background: #fff0d3; color: #80500b; font-size: 13px; font-weight: 700; }
.brandbar #logout { min-height: 32px; margin-left: auto; padding: 5px 10px; font-size: 12px; }
.nav-toggle { display: none; width: 36px; height: 36px; padding: 7px; }
.nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.layout { min-height: calc(100vh - var(--header-height)); }
.sidebar { display: flex; align-items: stretch; gap: 4px; height: var(--nav-height); padding: 0 max(20px, calc((100vw - 1200px) / 2)); border-bottom: 1px solid var(--line); background: var(--panel); }
.sidebar a { display: flex; align-items: center; gap: 8px; padding: 0 13px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; white-space: nowrap; }
.sidebar a:hover { color: var(--ink); background: #f6f7f9; }
.sidebar a[aria-current=page] { border-bottom-color: var(--brand); color: var(--ink); font-weight: 600; }
.nav-icon { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sidebar p { display: none; }
main { width: min(100%, 1240px); min-width: 0; margin: 0 auto; padding: 24px 20px 48px; }
.connection { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
h1 { margin: 0 0 4px; color: var(--ink); font-size: 21px; font-weight: 650; line-height: 1.35; }
h2 { margin: 22px 0 10px; font-size: 16px; font-weight: 650; line-height: 1.5; }
h3 { margin: 20px 0 10px; font-size: 14px; font-weight: 650; }
p { line-height: 1.75; }
.muted, .hint { color: var(--muted); }
.hint { margin: 7px 0 0; font-size: 12px; line-height: 1.75; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-head > div:first-child { min-width: 0; }
.page-head p { margin: 0; max-width: 76ch; color: var(--muted); font-size: 13px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-head > .actions { flex-shrink: 0; padding-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 16px; margin-bottom: 20px; color: var(--muted); font-size: 12px; }
.stats > span { min-width: 0; padding: 14px 17px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); overflow-wrap: anywhere; }
.stats strong { display: block; margin-top: 5px; color: var(--ink); font-size: 20px; font-weight: 600; line-height: 1.35; }
.badge { display: inline-block; padding: 2px 7px; border-radius: 4px; background: #edf0f4; color: #4d5b6a; font-size: 12px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.badge.success { color: var(--success); background: #e9f5ee; }
.badge.warning { color: var(--warning); background: #fff1d7; }
.badge.error { color: var(--red); background: #fcecef; }
.notice, #message { margin-bottom: 16px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 5px; background: #fff; line-height: 1.75; overflow-wrap: anywhere; }
.notice p:last-child { margin-bottom: 0; }
.notice h2:first-child { margin-top: 0; }
.notice.warning { border-color: #ead4a6; background: #fff9ed; color: var(--warning); }
.notice.error, #message.error { border-color: #eac1c8; background: #fff4f5; color: var(--red); }
.notice.success, #message.success { border-color: #bcdcc9; background: #eff9f3; color: var(--success); }
#preview-banner { margin: 0; border-radius: 0; font-size: 12px; }

label { display: block; margin: 16px 0 6px; color: #344253; font-size: 13px; font-weight: 600; line-height: 1.5; }
input, select, textarea { width: 100%; max-width: 100%; min-width: 0; min-height: 36px; padding: 7px 10px; border: 1px solid #cdd4dd; border-radius: 4px; background: #fff; color: var(--ink); font-weight: 400; line-height: 1.5; box-shadow: 0 1px 2px #202b3808; }
input:hover, select:hover, textarea:hover { border-color: #95a3b5; }
input::placeholder, textarea::placeholder { color: #637182; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: #a16a18; }
textarea { min-height: 84px; resize: vertical; }
input:disabled, textarea:disabled, select:disabled { background: #eef1f5; color: var(--muted); }
input[type=file] { padding: 6px 8px; font-size: 12px; }
input::file-selector-button { margin-right: 10px; padding: 4px 8px; border: 0; border-right: 1px solid var(--line); background: #f1f3f6; color: var(--ink); font: inherit; cursor: pointer; }
.filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.filters label { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.filters .search-label { flex: 1; min-width: 220px; }
.filters select { min-width: 132px; }
.filters button { white-space: nowrap; }
.table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.table-heading { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; color: var(--ink); text-align: left; font-size: 13px; }
th { background: #f7f8fa; color: #596675; font-size: 11px; font-weight: 600; white-space: nowrap; }
th, td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.5; }
thead th { padding-top: 10px; padding-bottom: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7f9fc; }
.numeric { text-align: right; white-space: nowrap; }
.order-link { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 2px; background: none; color: #7f4e09; font-weight: 600; line-height: 1.6; text-align: left; word-break: break-all; }
.order-link:hover { background: transparent; color: #583500; text-decoration: underline; text-underline-offset: 3px; }
.subline { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.balance { color: var(--success); font-size: 16px; font-weight: 650; }
.bad-number { color: var(--red); }
td > .quiet { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.pager button { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.empty { padding: 40px 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--muted); text-align: center; }
.empty h2 { margin: 0 0 10px; color: var(--ink); }
.empty p { margin: 8px 0 0; }
.loading { padding: 30px 20px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); }
.form-panel { max-width: 580px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.form-panel h2:first-child { margin-top: 0; }
.form-panel .actions { margin-top: 20px; }
.split-section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.split-section:first-child { padding-top: 0; }
.split-section h2 { margin-top: 0; }
.split-section > p { max-width: 76ch; }
.definition { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 18px; margin: 16px 0; line-height: 1.7; }
.definition dt { color: var(--muted); }
.definition dd { margin: 0; overflow-wrap: anywhere; }
.audit-list { display: flex; flex-direction: column; gap: 16px; }
.audit-entry { padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.audit-entry h3 { margin: 0 0 10px; }
.code { padding: 12px; border-radius: 4px; background: #f0f3f7; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }

.detail { position: fixed; z-index: 5; inset: 0 0 0 auto; width: min(720px, 100vw); padding: 24px; overflow: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); background: var(--panel); box-shadow: -14px 0 34px #202b3826; animation: detail-arrive .18s cubic-bezier(.16, 1, .3, 1); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.detail-head > div { min-width: 0; }
.detail-head h2 { margin: 0; font-size: 19px; line-height: 1.5; overflow-wrap: anywhere; }
.detail-head .subline { font-size: 13px; }
.detail-head > button { flex-shrink: 0; min-height: 34px; padding: 5px 11px; font-size: 12px; }
.detail-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 14px 0; padding: 17px 18px; border: 1px solid var(--line); border-radius: 6px; background: #f9fafb; }
.detail-summary > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.detail-summary span { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.detail-summary strong { display: block; margin-top: 6px; font-size: 20px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.detail-summary .balance { font-size: 24px; }
.detail-section { margin-top: 26px; }
.detail-section > h2 { margin: 0 0 10px; }
.detail-section > .hint { margin-bottom: 12px; }
details { border-bottom: 1px solid var(--line); }
summary { padding: 14px 0; color: var(--ink); font-weight: 600; cursor: pointer; }
summary:hover { color: var(--brand-text); }
details[open] > summary { margin-bottom: 8px; }
details table { table-layout: fixed; }
details th, details td { padding: 11px 10px; overflow-wrap: anywhere; }
details th:first-child { width: 29%; }
.cell-meta { margin-top: 5px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.formula { font-family: ui-monospace, SFMono-Regular, monospace; line-height: 1.7; overflow-wrap: anywhere; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.edit-grid .full { grid-column: 1 / -1; }
.comparison { margin: 12px 0; }
.comparison td { overflow-wrap: anywhere; }
.native-tools { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.native-tools > button { width: 100%; }
.candidate-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.candidate-list:empty { display: none; }
.compact-list { display: flex; flex-direction: column; gap: 10px; }
.order-card { display: block; width: 100%; padding: 15px 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); text-align: left; }
.order-card:hover { border-color: #b6c2d0; background: #f9fafc; }
.order-card strong { display: block; color: #7f4e09; font-size: 14px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.order-card .card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; }
.checkbox-label input { width: auto; min-height: 0; accent-color: #9d6510; }
.sheet-grid { max-height: 65vh; }
.sheet-grid td { min-width: 110px; max-width: 260px; overflow-wrap: anywhere; }
.sheet-grid th { position: sticky; top: 0; }
.sheet-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.analytics-coverage { max-width: 100ch; margin: -6px 0 18px; }
.analytics-filters label { flex: 1 1 130px; min-width: 0; }
.analytics-filters .search-label { flex: 2 1 220px; }
.analytics-filters select { min-width: 0; }
.analytics-filters input[type=date], .analytics-sync input[type=date] { min-width: 140px; }
.analytics-definition, .analytics-sync { margin-top: 24px; }
.analytics-definition p { max-width: 76ch; }
.analytics-sync > summary { padding: 18px 0 14px; font-size: 17px; }
.analytics-sync-form { margin-top: 16px; }
.analytics-settings { align-items: flex-end; margin: 20px 0 16px; }
.analytics-settings label { min-width: 190px; margin: 0; }
.analytics-settings select { margin-top: 6px; }
.mobile-products { display: none; }
.product-table .order-link { word-break: normal; overflow-wrap: anywhere; }
.product-table td:first-child { min-width: 190px; max-width: 340px; }
.product-table .badge { margin-top: 8px; }
.product-table .quantity-cell { min-width: 100px; max-width: 220px; white-space: normal; }
.product-card-metrics { display: grid; grid-template-columns: minmax(88px, 1fr) minmax(0, 1.4fr); gap: 8px; margin: 14px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.product-card-metrics dt { color: var(--muted); }
.product-card-metrics dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.product-card .badge { margin-top: 2px; }
.trend-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.trend-row { display: grid; grid-template-columns: 84px minmax(20px, 1fr) minmax(0, 160px); align-items: center; gap: 10px; font-size: 12px; }
.trend-track { height: 8px; overflow: hidden; border-radius: 2px; background: #edf0f4; }
.trend-bar { display: block; min-height: 8px; border-radius: 2px; background: #b37c28; }
.trend-values { color: var(--muted); font-size: 11px; line-height: 1.65; text-align: right; overflow-wrap: anywhere; }
.trend-values span { display: block; }
.variant-row { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.variant-row:last-child { border: 0; }
.distribution { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.distribution > div { display: flex; flex-direction: column; gap: 6px; }
.distribution strong { font-size: 13px; }
.distribution span { color: var(--muted); font-size: 12px; }
.evidence-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.evidence-row:first-child { padding-top: 8px; }
.evidence-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.evidence-head strong { font-size: 13px; overflow-wrap: anywhere; }
.evidence-row > .hint { overflow-wrap: anywhere; }
.evidence-reason { margin: 8px 0; font-size: 13px; overflow-wrap: anywhere; }
.evidence-times { grid-template-columns: 40px minmax(0, 1fr); gap: 5px 12px; font-size: 12px; }
.local-product-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
.local-product-links button { max-width: 100%; text-align: left; overflow-wrap: anywhere; }

@keyframes detail-arrive { from { clip-path: inset(0 0 0 8%); } to { clip-path: inset(0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 1100px) {
  .brandbar, .sidebar { padding-right: 18px; padding-left: 18px; }
  .product-table th, .product-table td { padding-right: 12px; padding-left: 12px; }
}
@media (max-width: 900px) {
  main { padding: 22px 18px 36px; }
  .sidebar a { gap: 6px; padding-right: 10px; padding-left: 10px; font-size: 13px; }
  .optional-col { display: none; }
  .filters .search-label { flex-basis: 100%; }
}
@media (max-width: 700px) {
  .brandbar #logout { margin-left: auto; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .brandbar #logout:not([hidden]) + .nav-toggle { margin-left: 0; }
  .sidebar { display: none; position: absolute; z-index: 4; top: var(--header-height); right: 0; left: 0; height: auto; padding: 8px 14px; border-bottom: 1px solid var(--line); box-shadow: 0 10px 20px #202b381a; }
  .sidebar.is-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar a { min-height: 42px; padding: 8px 10px; border: 0; border-radius: 4px; white-space: normal; }
  .sidebar a[aria-current=page] { background: #fff4e1; color: var(--brand-text); }
  .desktop-products { display: none; }
  .mobile-products { display: flex; }
  .analytics-filters label { flex: 1 1 125px; }
  .analytics-filters .search-label { flex-basis: 100%; }
  .analytics-filters label:nth-child(3) { flex-basis: 100%; }
  .analytics-filters input[type=date], .analytics-sync input[type=date] { min-width: 0; }
  .analytics-sync-form label { flex: 1; min-width: 120px; }
  .analytics-sync-form button { flex: 1; }
  .trend-row { grid-template-columns: 76px minmax(12px, 1fr) minmax(0, 126px); gap: 7px; }
  .evidence-head { flex-wrap: wrap; }
  .analytics-sync > summary { font-size: 15px; }
}
@media (max-width: 600px) {
  .brandbar { gap: 8px; padding: 0 16px; }
  .brand { gap: 9px; font-size: 14px; }
  .brand-mark { height: 28px; padding: 0 6px; font-size: 12px; }
  .brandbar #logout { padding: 5px 8px; }
  .nav-icon { width: 16px; height: 16px; flex-basis: 16px; }
  main { padding: 18px 14px 28px; }
  .connection { gap: 6px 10px; margin-bottom: 18px; }
  .page-head { display: block; margin-bottom: 18px; }
  .page-head > .actions { margin-top: 12px; padding: 0; }
  h1 { font-size: 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats > span { padding: 12px 13px; }
  .stats > span:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stats strong { font-size: 17px; }
  .filters { gap: 12px 10px; padding: 14px; }
  .filters label { flex: 1; min-width: 100px; }
  .filters .search-label { min-width: 100%; flex-basis: 100%; }
  .filters select { min-width: 0; }
  .filters button { flex: 1 1 calc(50% - 5px); }
  .detail { width: 100%; padding: 18px 16px; }
  .detail-head h2 { font-size: 17px; }
  .detail-summary { gap: 10px; padding: 14px; }
  .detail-summary > div + div { padding-left: 10px; }
  .detail-summary strong { font-size: 17px; }
  .detail-summary .balance { font-size: 22px; }
  .form-panel { padding: 18px; }
  .definition { grid-template-columns: 95px minmax(0, 1fr); gap: 8px 12px; }
  .edit-grid { grid-template-columns: 1fr; }
  .edit-grid .full { grid-column: auto; }
  th, td { padding: 12px 10px; }
  .table-wrap:not(.sheet-grid) table { min-width: 560px; }
  .detail .table-wrap table { min-width: 0; }
  .evidence-times { grid-template-columns: 40px minmax(0, 1fr); }
  .pager { gap: 10px; }
  .audit-entry { padding: 16px; }
}

body.extension .brandbar { gap: 8px; padding: 0 14px; }
body.extension .brand { gap: 9px; font-size: 14px; }
body.extension .brand-mark { height: 28px; padding: 0 6px; font-size: 12px; }
body.extension .brandbar #logout { margin-left: auto; padding: 5px 8px; }
body.extension .sidebar { display: flex; position: static; justify-content: space-around; gap: 0; height: 46px; padding: 0 7px; box-shadow: none; }
body.extension .sidebar a { justify-content: center; gap: 6px; min-width: 0; padding: 0 7px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); white-space: nowrap; font-size: 12px; }
body.extension .sidebar a[aria-current=page] { border-bottom-color: var(--brand); color: var(--ink); }
body.extension .nav-icon { width: 16px; height: 16px; flex-basis: 16px; }
body.extension .sidebar p, body.extension .sidebar [data-view=sheets], body.extension .sidebar [data-view=audit], body.extension .sidebar [data-view=sync] { display: none; }
body.extension main { padding: 18px 14px 28px; }
body.extension .detail { width: 100%; padding: 18px 16px; }
body.extension .connection { gap: 7px 10px; font-size: 12px; }
body.extension .filters .search-label { min-width: 100%; flex-basis: 100%; }
body.extension .filters label { flex: 1; min-width: 100px; }
body.extension .filters select { min-width: 0; }
body.extension .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: 12px; }
body.extension .stats > span { padding: 12px; }
body.extension .stats > span:last-child:nth-child(odd) { grid-column: 1 / -1; }
body.extension .stats strong { font-size: 17px; }
body.extension .page-head { display: block; }
body.extension .page-head .actions { margin-top: 12px; }
body.extension .filters button { flex: 1 1 calc(50% - 5px); }
body.extension .form-panel { padding: 18px; }
body.extension .edit-grid { grid-template-columns: 1fr; }
body.extension .edit-grid .full { grid-column: auto; }
body.extension .analytics-filters label { flex-basis: calc(50% - 10px); }
body.extension .analytics-filters .search-label { flex-basis: 100%; }
@media (max-width: 359px) {
  body.extension .sidebar a { gap: 4px; padding-right: 5px; padding-left: 5px; }
  .filters, body.extension .filters { padding: 12px; }
  .detail-head h2 { font-size: 16px; }
  .detail-summary strong { font-size: 16px; }
  .detail-summary .balance { font-size: 21px; }
  .trend-row { grid-template-columns: 72px minmax(12px, 1fr) minmax(0, 106px); gap: 6px; }
}
