    :root {
      --bg: #fff;
      --bg-elevated: #fff;
      --card: #fff;
      --card-hover: #fbfbfd;
      --border: rgba(0, 0, 0, 0.08);
      --border-strong: rgba(0, 0, 0, 0.16);
      --text: #1d1d1f;
      --text-secondary: #6e6e73;
      --muted: #86868b;
      --accent: #0071e3;
      --accent-hover: #0066cc;
      --success: #248a3d;
      --danger: #d70015;
      --warning: #b86e00;
      --radius: 10px;
      --radius-sm: 8px;
      --control-height: 36px;
      --control-radius: 8px;
      --control-padding-x: 12px;
      --control-font-size: 0.82rem;
      --button-width-md: 120px;
      --mobile-toolbar-height: 46px;
      --shadow: none;
      --table-page-pad-top: 12px;
      --table-page-pad-x: 12px;
      --table-page-pad-bottom: 0;
      --table-page-gap: 10px;
      --table-panel-radius: 8px;
      --table-panel-bg: #fff;
      --table-panel-border: var(--border);
      --table-toolbar-gap: 10px;
      --table-control-height: var(--control-height);
      --table-control-radius: 8px;
    }
    * { box-sizing: border-box; }
    html { -webkit-text-size-adjust: 100%; }
    body {
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
      background: var(--bg);
      color: var(--text);
      margin: 0;
      padding: 20px;
      padding-left: max(20px, env(safe-area-inset-left));
      padding-right: max(20px, env(safe-area-inset-right));
      padding-bottom: max(20px, env(safe-area-inset-bottom));
      min-height: 100vh;
      min-height: 100dvh;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }
    html.embed-workbench,
    html.embed-workbench body {
      height: 100%;
      overflow: hidden;
    }
    html.embed-workbench body {
      padding: 0 !important;
      min-height: 100vh;
      min-height: 100dvh;
      background: #fff;
    }
    html.embed-workbench .page {
      max-width: none;
      width: 100%;
      min-height: 100vh;
      min-height: 100dvh;
      margin: 0;
      padding: 0;
    }
    html.embed-workbench .header,
    html.embed-workbench .tab-bar {
      display: none !important;
    }
    html.embed-workbench #contentWrap {
      height: 100%;
      overflow-y: auto;
      overflow-x: hidden;
      background: #fff;
    }
    html.embed-workbench .tab-panel {
      height: auto;
      min-height: 100%;
      margin: 0;
      background: #fff;
    }
    html.embed-workbench #panelTax,
    html.embed-workbench #panelInvoice {
      padding: 0;
      background: #fff;
      box-sizing: border-box;
    }
    html.embed-workbench #panelFinance {
      padding: var(--table-page-pad-top) var(--table-page-pad-x) var(--table-page-pad-bottom);
      background: #fff;
      box-sizing: border-box;
    }
    html.embed-workbench #panelFinance.tab-panel.active {
      display: block;
      min-height: 100%;
      height: auto;
    }
    html.embed-workbench #panelTax.tab-panel.active {
      min-height: 100%;
      height: auto;
    }
    html.embed-workbench #panelInvoice.tab-panel.active {
      min-height: 100%;
      height: auto;
    }
    .table-page {
      display: grid;
      grid-template-rows: max-content minmax(0, 1fr);
      gap: var(--table-page-gap);
      padding: var(--table-page-pad-top) var(--table-page-pad-x) var(--table-page-pad-bottom);
      min-height: 0;
      max-width: 100%;
      overflow: hidden;
      font-variant-numeric: tabular-nums;
    }
    .table-page > * { min-width: 0; }
    .table-toolbar {
      display: grid;
      gap: var(--table-toolbar-gap);
      min-width: 0;
    }
    .table-toolbar-row {
      display: grid;
      align-items: end;
      gap: var(--table-toolbar-gap);
      min-width: 0;
    }
    .table-panel {
      min-height: 0;
      border: 1px solid var(--table-panel-border);
      border-radius: var(--table-panel-radius);
      background: var(--table-panel-bg);
      overflow: hidden;
    }
    .table-scroll {
      min-height: 360px;
      overflow-x: hidden;
      overflow-y: auto;
    }
    .table-control,
    .table-toolbar input,
    .table-toolbar select,
    .table-toolbar button {
      height: var(--table-control-height);
      min-width: 0;
      border-radius: var(--table-control-radius);
      box-sizing: border-box;
    }
    button,
    input,
    select,
    textarea {
      font: inherit;
    }
    input,
    select,
    textarea {
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.86);
      color: var(--text);
    }
    input::placeholder,
    textarea::placeholder {
      color: var(--muted);
    }
    .page { max-width: 1200px; margin: 0 auto; }
    .header { display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 10px; margin-bottom: 20px; min-width: 0; }
    .header .site-logo { flex-shrink: 0; }
    .header h1 { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .site-logo { height: 36px; width: auto; max-width: 140px; display: block; object-fit: contain; object-position: left center; clip-path: none; }
    h1 { font-size: 1.5rem; font-weight: 600; margin: 0; color: var(--text); letter-spacing: -0.02em; }
    .summary {
      display: flex;
      gap: 20px;
      margin-bottom: 20px;
      padding: 14px 18px;
      background: var(--card);
      border-radius: var(--radius);
      flex-wrap: wrap;
      border: 1px solid var(--border);
    }
    .summary-item { color: var(--text-secondary); font-size: 0.9rem; }
    .summary-item strong { color: var(--text); margin-left: 6px; font-variant-numeric: tabular-nums; }
    .content-card {
      background: var(--card);
      border-radius: var(--radius);
      overflow: hidden;
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
    }
    html.embed-workbench #panelFinance .content-card,
    html.embed-workbench #panelTax .content-card,
    html.embed-workbench #panelInvoice .content-card {
      box-shadow: none;
    }
    table { width: 100%; border-collapse: collapse; }
    th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
    th {
      background: #fbfbfd;
      color: var(--text-secondary);
      font-weight: 500;
      font-size: 0.8125rem;
      text-transform: none;
      letter-spacing: 0;
    }
    tbody tr { transition: background 0.1s; }
    tbody tr:hover td { background: var(--card-hover); }
    tbody tr:last-child td { border-bottom: none; }
    .num { text-align: right; font-variant-numeric: tabular-nums; }
    .category-支出 { color: var(--danger); font-weight: 500; }
    .category-收入 { color: var(--success); font-weight: 500; }
    .category-分红 { color: var(--warning); font-weight: 500; }
    .btn-sm {
      padding: 6px 12px;
      font-size: 0.8125rem;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
      cursor: pointer;
      background: rgba(255, 255, 255, 0.86);
      color: var(--text-secondary);
      font-weight: 500;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
    }
    .btn-sm:hover { background: #fff; border-color: var(--border-strong); color: var(--text); }
    .btn-sm + .btn-sm { margin-left: 6px; }
    .btn-sm.danger:hover { background: rgba(207,34,46,0.12); color: var(--danger); }
    .modal {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.35);
      backdrop-filter: blur(4px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 100;
      padding: 24px;
    }
    .modal.show { display: flex; }
    .modal-inner {
      background: var(--card);
      border-radius: 14px;
      padding: 24px;
      max-width: 440px;
      width: 100%;
      max-height: 90vh;
      overflow: auto;
      border: 1px solid var(--border);
      box-shadow: 0 18px 48px rgba(0,0,0,0.12);
    }
    .modal h2 { margin: 0 0 20px 0; font-size: 1.2rem; font-weight: 600; color: var(--text); }
    .form-row { margin-bottom: 14px; }
    .form-row label { display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; }
    .form-row input, .form-row select {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: rgba(255, 255, 255, 0.86);
      color: var(--text);
      font-size: 0.9375rem;
    }
    .form-row input:focus, .form-row select:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
    }
    input:focus,
    select:focus,
    textarea:focus,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
    }
    .form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
    .form-actions .secondary { background: var(--bg-elevated); color: var(--text); }
    .form-actions .secondary:hover { background: var(--border); }
    .loading { color: var(--text-secondary); padding: 32px 20px; text-align: center; font-size: 0.9375rem; }
    .error { color: var(--danger); padding: 8px 0; font-size: 0.875rem; }
    .dashboard-cards {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-bottom: 0;
    }
    .dashboard-row { margin-bottom: 12px; }
    .dashboard-row:last-child { margin-bottom: 0; }
    .dashboard-row .row-title { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 10px; font-weight: 600; }
    .dashboard-row.row-worldfirst { margin-top: 14px; }
    .dashboard-row.row-worldfirst .dashboard-cards { gap: 10px; }
    .dashboard-row .dashboard-cards { margin-bottom: 0; }
    .dashboard-row.row-top .dashboard-cards { display: flex; flex-direction: column; gap: 14px; }
    @media (min-width: 769px) {
      .dashboard-row.row-top .dashboard-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .row-top-cards .collapse-accounts-wrap { grid-column: 1 / -1; margin-top: 0; }
    }
    .sync-time { font-size: 0.8125rem; color: var(--muted); }
    .sync-time-multi { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
    .sync-line { display: block; }
    .sync-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
    .sync-row .sync-time { margin-bottom: 0; flex: 1 1 auto; }
    .sync-row.sync-row-one { justify-content: space-between; }
    .sync-row-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .sync-meta-right { margin-left: auto; text-align: right; align-items: flex-end; white-space: nowrap; }
    .sync-row-finance,
    .sync-row-inventory-sales { flex-wrap: nowrap; }
    .sync-row-finance .sync-time,
    .sync-row-inventory-sales .sync-time { flex: 0 1 auto; }
    .btn-refresh,
    .btn-query {
      padding: 0 12px;
      min-width: 104px;
      height: var(--control-height);
      min-height: var(--control-height);
      font-size: var(--control-font-size);
      font-weight: 500;
      border-radius: var(--control-radius);
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.86);
      color: var(--text);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      white-space: nowrap;
      flex-shrink: 0;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }
    .ui-control,
    .ui-select,
    .ui-input {
      height: var(--control-height);
      border: 1px solid var(--border);
      border-radius: var(--control-radius);
      background: rgba(255, 255, 255, 0.86);
      padding: 0 var(--control-padding-x);
      color: var(--text);
      min-width: 0;
      box-sizing: border-box;
      font-size: var(--control-font-size);
    }
    .ui-input,
    .ui-select {
      width: 100%;
    }
    .ui-button-fixed {
      width: var(--button-width-md);
      min-width: var(--button-width-md);
    }
    .ui-filter-grid {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr)) var(--button-width-md);
      gap: 8px;
      align-items: end;
    }
    .ui-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 28px;
      padding: 0 12px;
      border-radius: 999px;
      font-size: 0.76rem;
      font-weight: 500;
      line-height: 1;
      white-space: nowrap;
    }
    .btn-refresh:hover,
    .btn-query:hover { background: #fff; border-color: var(--border-strong); }
    .btn-refresh:disabled,
    .btn-query:disabled { opacity: 0.7; cursor: not-allowed; }
    .panel-flash { animation: panel-flash 0.35s ease; }
    @keyframes panel-flash {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }
    .empty-hint { color: var(--text-secondary); padding: 16px 0; font-size: 0.9375rem; }
    .dashboard-card {
      background: var(--card);
      border-radius: var(--radius);
      padding: 20px;
      border: 1px solid var(--border);
      transition: border-color 0.15s;
      min-height: 72px;
    }
    .dashboard-card:hover { border-color: var(--border); }
    .dashboard-card .label { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 6px; font-weight: 400; }
    .dashboard-card .value { font-size: 1.5rem; font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: 0; }
    .dashboard-card .value .value-side {
      font-size: 0.72rem;
      color: var(--muted);
      font-weight: 500;
      margin-left: 0.35rem;
      letter-spacing: 0;
      white-space: nowrap;
    }
    .dashboard-card .meta { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; }
    .dashboard-card.收入 .value { color: var(--success); }
    .dashboard-card.支出 .value { color: var(--danger); }
    .dashboard-card.分红 .value { color: var(--warning); }
    .dashboard-card.currency .value.positive { color: var(--success); }
    .dashboard-card.currency .value.negative { color: var(--danger); }
    .dashboard-card.currency .equiv { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 6px; }
    .dashboard-card.card-total-assets .label,
    .dashboard-card.card-total-assets .value { font-weight: 700; }
    .card-total-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .total-assets-collapse-btn {
      flex-shrink: 0;
      width: 36px;
      height: 36px;
      padding: 0;
      border: none;
      border-radius: 0;
      background: transparent;
      color: var(--text-secondary);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      -webkit-tap-highlight-color: transparent;
    }
    .total-assets-collapse-btn:hover { color: var(--text); }
    .total-assets-collapse-btn .collapse-arrow { font-size: 0.75rem; transition: transform 0.2s; }
    .total-assets-collapse-btn.is-expanded .collapse-arrow { transform: rotate(180deg); }
    .dashboard-card.card-account { min-height: 80px; display: flex; flex-direction: column; }
    .dashboard-card.card-account .value { flex: 1; display: flex; align-items: baseline; flex-wrap: wrap; }
    .dashboard-card .value .equiv-inline { font-size: 0.75rem; color: var(--text-secondary); font-weight: 400; margin-left: 0.35em; }
    .row-top-cards .collapse-accounts-wrap { grid-column: 1 / -1; margin-top: 0; padding-top: 0; }
    .collapse-accounts-wrap { margin-top: 0; }
    .collapse-accounts-body { display: block; }
    .collapse-accounts-wrap.collapsed .collapse-accounts-body { display: none; }
    .row-top-cards .collapse-accounts-wrap.collapsed { display: none; }
    .dashboard-card.card-jason .label,
    .dashboard-card.card-jason .value { color: #0969da; }
    .dashboard-card.card-tracy .label,
    .dashboard-card.card-tracy .value { color: var(--danger); }
    .dashboard-card.card-finance-overview {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 6px;
      min-height: 72px;
      padding: 12px 16px;
      position: relative;
      overflow: visible;
    }
    .finance-overview-card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .finance-overview-legend {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .finance-overview-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 0.7rem;
      color: var(--text-secondary);
      white-space: nowrap;
      font-weight: 600;
    }
    .finance-overview-legend-item::before {
      content: "";
      width: 10px;
      height: 2px;
      border-radius: 999px;
      background: currentColor;
      display: inline-block;
    }
    .finance-overview-chart-wrap {
      flex: 1 1 auto;
      min-height: 0;
      border-radius: 8px;
      background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
      overflow: visible;
      position: relative;
    }
    .finance-overview-trend-svg {
      width: 100%;
      height: 42px;
      display: block;
    }
    .finance-overview-trend-svg-expanded {
      height: 132px;
    }
    .finance-overview-trend-axis {
      stroke: rgba(148, 163, 184, 0.42);
      stroke-width: 1;
      stroke-dasharray: 4 4;
    }
    .finance-overview-trend-cursor {
      stroke: rgba(148, 163, 184, 0.32);
      stroke-width: 1;
      stroke-dasharray: 3 4;
    }
    .finance-overview-hit-zone {
      cursor: default;
    }
    .finance-overview-empty {
      flex: 1 1 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px dashed rgba(148, 163, 184, 0.24);
      border-radius: 10px;
      font-size: 0.72rem;
      color: var(--muted);
      background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
      min-height: 42px;
    }
    .finance-overview-hover-card {
      position: absolute;
      right: var(--finance-overview-hover-right, 0px);
      top: var(--finance-overview-hover-top, calc(100% + 8px));
      width: 340px;
      padding: 12px;
      border-radius: 12px;
      border: 1px solid rgba(203, 213, 225, 0.9);
      background: rgba(255, 255, 255, 0.98);
      box-shadow: none;
      opacity: 0;
      transform: translateY(4px);
      pointer-events: none;
      transition: opacity 0.16s ease, transform 0.16s ease;
      z-index: 20;
      backdrop-filter: blur(8px);
    }
    .card-finance-overview.is-open .finance-overview-hover-card,
    .card-finance-overview:focus-within .finance-overview-hover-card {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }
    .finance-overview-hover-title {
      font-size: 0.74rem;
      color: var(--text-secondary);
      margin-bottom: 8px;
      line-height: 1.35;
    }
    .finance-overview-hover-month {
      font-size: 0.92rem;
      line-height: 1.2;
      color: var(--text);
      font-weight: 700;
      margin-bottom: 2px;
    }
    .finance-overview-hover-body {
      display: grid;
      gap: 10px;
    }
    .finance-overview-detail-list {
      display: grid;
      gap: 6px;
    }
    .finance-overview-detail-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 0.78rem;
      font-variant-numeric: tabular-nums;
    }
    .finance-overview-detail-label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--text-secondary);
    }
    .finance-overview-detail-label i {
      width: 10px;
      height: 2px;
      border-radius: 999px;
      display: inline-block;
      flex: 0 0 auto;
    }
    .finance-transactions-card {
      display: flex;
      flex-direction: column;
      width: 100%;
      padding: 16px 18px;
      overflow: hidden;
      box-shadow: none;
    }
    html.embed-workbench #panelFinance .finance-transactions-card {
      padding: 0;
      overflow: visible;
      background: transparent;
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }
    html.embed-workbench #panelFinance .finance-transactions-table-wrap,
    html.embed-workbench #panelFinance .finance-audit-card {
      width: 100%;
      box-sizing: border-box;
    }
    .finance-transactions-mobile-list {
      display: none;
    }
    .finance-mobile-card {
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #fff;
      padding: 10px 11px;
      display: grid;
      gap: 7px;
    }
    .finance-mobile-card-line {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }
    .finance-mobile-card-line-top {
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      flex-wrap: nowrap;
    }
    .finance-mobile-card-date {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-secondary);
      line-height: 1.2;
      white-space: nowrap;
      flex: 0 0 auto;
    }
    .finance-mobile-card-pills {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 5px;
      row-gap: 6px;
      flex-wrap: wrap;
      min-width: 0;
      flex: 1 1 auto;
      overflow: hidden;
    }
    .finance-mobile-card-pills .finance-tx-pill,
    .finance-mobile-card-pills .finance-tx-badge {
      flex: 0 1 auto;
    }
    .finance-mobile-card-pills .finance-tx-pill-account {
      max-width: 72px;
    }
    .finance-mobile-card-empty {
      font-size: 0.78rem;
      color: var(--muted);
      white-space: nowrap;
    }
    .finance-mobile-card-amount {
      font-size: 0.84rem;
      font-weight: 700;
      color: var(--text);
      line-height: 1.2;
      margin-left: auto;
      white-space: nowrap;
    }
    .finance-mobile-card-original {
      font-size: 0.72rem;
      font-weight: 500;
      color: var(--text-secondary);
      white-space: nowrap;
    }
    .finance-mobile-card-line-bottom {
      align-items: flex-start;
      gap: 8px;
      flex-wrap: nowrap;
    }
    .finance-mobile-card-note {
      font-size: 0.74rem;
      color: var(--text-secondary);
      line-height: 1.4;
      word-break: break-word;
      flex: 1 1 auto;
      min-width: 0;
    }
    .finance-mobile-card-actions {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      justify-content: flex-end;
      flex-shrink: 0;
      margin-left: auto;
    }
    .finance-transactions-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
      flex-wrap: wrap;
    }
    .finance-transactions-head-main {
      display: flex;
      align-items: baseline;
      gap: 12px;
      min-width: 0;
      flex-wrap: wrap;
    }
    .finance-transactions-title {
      font-size: 0.98rem;
      font-weight: 700;
      color: var(--text);
      line-height: 1.2;
    }
    .finance-transactions-sum {
      font-size: 0.82rem;
      color: var(--text-secondary);
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .finance-transactions-head-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      justify-content: flex-end;
      margin-left: auto;
      flex-wrap: wrap;
    }
    .finance-transactions-head-actions .btn-query {
      width: var(--button-width-md);
      min-width: var(--button-width-md);
    }
    .finance-inline-rate {
      white-space: nowrap;
      flex: 0 0 auto;
      margin-right: 2px;
    }
    .finance-definition-card,
    .finance-audit-card {
      border: 1px solid var(--border);
      border-radius: 14px;
      background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
      padding: 12px 14px;
      margin-bottom: 12px;
    }
    .finance-audit-card {
      margin-top: 12px;
      margin-bottom: 0;
    }
    .finance-audit-card.is-collapsed .finance-audit-body {
      display: none;
    }
    .finance-definition-head,
    .finance-audit-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }
    .finance-audit-head {
      width: 100%;
      border: 0;
      padding: 0;
      background: transparent;
      cursor: pointer;
      text-align: left;
    }
    .finance-definition-title,
    .finance-audit-title {
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--text);
    }
    .finance-definition-subtitle,
    .finance-audit-subtitle {
      font-size: 0.72rem;
      color: var(--text-secondary);
    }
    .finance-audit-title,
    .finance-audit-subtitle {
      display: inline-block;
    }
    .finance-audit-subtitle {
      color: #2563eb;
      font-weight: 600;
    }
    .finance-audit-body {
      margin-top: 8px;
    }
    .finance-definition-list {
      display: grid;
      gap: 8px;
    }
    .finance-definition-item {
      position: relative;
      padding-left: 12px;
      font-size: 0.76rem;
      line-height: 1.5;
      color: var(--text-secondary);
    }
    .finance-definition-item::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0.58em;
      width: 5px;
      height: 5px;
      border-radius: 999px;
      background: #2563eb;
    }
    .finance-filter-summary-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 12px;
    }
    .finance-filter-chip {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 0 10px;
      border-radius: 999px;
      background: #f8fafc;
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-size: 0.72rem;
      font-weight: 600;
    }
    .finance-alert-stack {
      display: grid;
      gap: 8px;
      margin-bottom: 12px;
    }
    .finance-alert {
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 0.75rem;
      line-height: 1.45;
      border: 1px solid transparent;
    }
    .finance-alert.is-clickable {
      width: 100%;
      text-align: left;
      cursor: pointer;
      transition: transform 0.12s ease, box-shadow 0.12s ease;
    }
    .finance-alert.is-clickable:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    }
    .finance-alert.is-active {
      box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18) inset;
    }
    .finance-alert-warn {
      background: #fff7ed;
      border-color: #fed7aa;
      color: #9a3412;
    }
    .finance-alert-info {
      background: #eff6ff;
      border-color: #bfdbfe;
      color: #1d4ed8;
    }
    .finance-spotlight-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 12px;
    }
    .finance-spotlight-card {
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fff;
      padding: 12px 14px;
      box-shadow: var(--shadow-sm);
    }
    .finance-spotlight-card.tone-jason {
      border-color: rgba(37, 99, 235, 0.18);
      background: linear-gradient(180deg, rgba(239, 246, 255, 0.92) 0%, #ffffff 100%);
    }
    .finance-spotlight-card.tone-tracy {
      border-color: rgba(220, 38, 38, 0.18);
      background: linear-gradient(180deg, rgba(254, 242, 242, 0.92) 0%, #ffffff 100%);
    }
    .finance-spotlight-label {
      font-size: 0.75rem;
      color: var(--text-secondary);
      margin-bottom: 6px;
    }
    .finance-spotlight-value {
      font-size: 1.1rem;
      line-height: 1.2;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 4px;
      font-variant-numeric: tabular-nums;
    }
    .finance-spotlight-meta {
      font-size: 0.72rem;
      color: var(--text-secondary);
      font-variant-numeric: tabular-nums;
    }
    .finance-transactions-filters {
      display: grid;
      grid-template-columns: repeat(8, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 12px;
      align-items: end;
    }
    .finance-trend-empty {
      min-height: 148px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-secondary);
      background: #f8fafc;
      border-radius: 14px;
      border: 1px dashed rgba(148, 163, 184, 0.24);
    }
    .finance-transactions-filter-keyword {
      grid-column: span 1;
    }
    .finance-transactions-filter {
      display: flex;
      flex-direction: column;
      gap: 3px;
      font-size: 0.74rem;
      color: var(--text-secondary);
      min-width: 0;
    }
    .finance-transactions-filter > span {
      display: block;
      height: 18px;
      line-height: 18px;
    }
    .finance-transactions-filter-action {
      display: flex;
      flex-direction: column;
      gap: 3px;
      justify-content: flex-end;
    }
    .finance-transactions-filter-action span {
      visibility: hidden;
      height: 18px;
      line-height: 18px;
    }
    .finance-transactions-filter-action .btn-query {
      width: 100%;
      height: var(--control-height);
      padding: 0 var(--control-padding-x);
      margin-top: 0;
      align-self: stretch;
      min-width: 0;
    }
    .finance-transactions-filter select,
    .finance-transactions-filter input {
      height: var(--control-height);
      border: 1px solid var(--border);
      border-radius: var(--control-radius);
      background: var(--bg);
      padding: 0 var(--control-padding-x);
      color: var(--text);
      min-width: 0;
      box-sizing: border-box;
      font-size: var(--control-font-size);
    }
    .finance-transactions-filter select:focus,
    .finance-transactions-filter select:focus-visible,
    .finance-transactions-filter input:focus,
    .finance-transactions-filter input:focus-visible {
      outline: none;
      border-color: var(--border);
      box-shadow: none;
    }
    .finance-transactions-table-wrap {
      overflow-x: auto;
      overflow-y: auto;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: var(--bg);
      max-height: 320px;
      scrollbar-width: thin;
      scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
    }
    html.embed-workbench #panelFinance .finance-transactions-table-wrap {
      min-height: 120px;
      max-height: 360px;
    }
    .finance-transactions-table-wrap::-webkit-scrollbar,
    .finance-tx-note-scroll::-webkit-scrollbar {
      height: 6px;
      width: 6px;
    }
    .finance-transactions-table-wrap::-webkit-scrollbar-track,
    .finance-tx-note-scroll::-webkit-scrollbar-track {
      background: transparent;
    }
    .finance-transactions-table-wrap::-webkit-scrollbar-thumb,
    .finance-tx-note-scroll::-webkit-scrollbar-thumb {
      background: rgba(148, 163, 184, 0.22);
      border-radius: 999px;
    }
    .finance-transactions-table-wrap::-webkit-scrollbar-thumb:hover,
    .finance-tx-note-scroll::-webkit-scrollbar-thumb:hover {
      background: rgba(148, 163, 184, 0.34);
    }
    .finance-transactions-table {
      width: 100%;
      min-width: 1180px;
      border-collapse: collapse;
      font-size: 0.78rem;
      table-layout: fixed;
    }
    .finance-transactions-table .finance-col-date { width: 108px; }
    .finance-transactions-table .finance-col-category { width: 70px; }
    .finance-transactions-table .finance-col-biz-account { width: 84px; }
    .finance-transactions-table .finance-col-account { width: 126px; }
    .finance-transactions-table .finance-col-amount-cny { width: 118px; }
    .finance-transactions-table .finance-col-original { width: 108px; }
    .finance-transactions-table .finance-col-person-share { width: 118px; }
    .finance-transactions-table .finance-col-subcategory { width: 102px; }
    .finance-transactions-table .finance-col-note { width: 228px; }
    .finance-transactions-table th,
    .finance-transactions-table td {
      height: 44px;
      padding: 8px 10px;
      border-bottom: 1px solid var(--border);
      background: #fff;
      color: var(--text);
      text-align: left;
      vertical-align: middle;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .finance-transactions-table thead th {
      position: sticky;
      top: 0;
      z-index: 2;
      height: 36px;
      background: #fbfbfd;
      color: var(--text-secondary);
      font-size: 0.74rem;
      font-weight: 500;
    }
    .finance-transactions-table th.num,
    .finance-transactions-table td.num { text-align: right; }
    .finance-transactions-table td.num { font-variant-numeric: tabular-nums; }
    .finance-transactions-table tbody tr:last-child td { border-bottom: none; }
    .finance-transactions-table th:nth-child(5),
    .finance-transactions-table td:nth-child(5),
    .finance-transactions-table th:nth-child(6),
    .finance-transactions-table td:nth-child(6),
    .finance-transactions-table th:nth-child(7),
    .finance-transactions-table td:nth-child(7),
    .finance-transactions-table th:nth-child(8),
    .finance-transactions-table td:nth-child(8) {
      text-align: right;
    }
    .finance-transactions-table th:nth-child(9),
    .finance-transactions-table td:nth-child(9) {
      text-align: center;
      padding-left: 4px;
      padding-right: 4px;
    }
    .finance-transaction-row {
      cursor: pointer;
      transition: background-color 0.1s ease;
    }
    .finance-transaction-row:hover td,
    .finance-transaction-row:focus-visible td {
      background: #f8fafc;
      outline: none;
    }
    .finance-transactions-empty {
      text-align: center;
      color: var(--text-secondary);
      padding: 24px 12px;
    }
    .finance-audit-list {
      display: grid;
      gap: 8px;
      max-height: 220px;
      overflow-y: auto;
      padding-right: 4px;
      scrollbar-width: thin;
      scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
    }
    .finance-audit-list::-webkit-scrollbar {
      width: 6px;
    }
    .finance-audit-list::-webkit-scrollbar-track {
      background: transparent;
    }
    .finance-audit-list::-webkit-scrollbar-thumb {
      background: rgba(148, 163, 184, 0.22);
      border-radius: 999px;
    }
    .finance-audit-list::-webkit-scrollbar-thumb:hover {
      background: rgba(148, 163, 184, 0.34);
    }
    .finance-audit-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 0;
      border-top: 1px solid rgba(148, 163, 184, 0.16);
      min-width: 0;
    }
    .finance-audit-item:first-child {
      border-top: none;
      padding-top: 0;
    }
    .finance-audit-item-main {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
    }
    .finance-audit-action {
      display: inline-flex;
      align-items: center;
      min-height: 22px;
      padding: 0 8px;
      border-radius: 999px;
      background: #f8fafc;
      color: var(--text);
      font-size: 0.7rem;
      font-weight: 700;
    }
    .finance-audit-summary {
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 0.76rem;
      color: var(--text);
      line-height: 1.45;
    }
    .finance-audit-item-meta,
    .finance-audit-empty {
      font-size: 0.72rem;
      color: var(--text-secondary);
    }
    .finance-audit-item-meta {
      flex: 0 0 auto;
      white-space: nowrap;
    }
    .finance-tx-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 50px;
      height: 22px;
      padding: 0 8px;
      border-radius: 999px;
      font-size: 0.72rem;
      font-weight: 600;
      background: #eef2f7;
      color: var(--text-secondary);
    }
    .finance-tx-badge.income { background: #ecfdf3; color: #15803d; }
    .finance-tx-badge.expense { background: #fef2f2; color: #dc2626; }
    .finance-tx-badge.dividend { background: #eff6ff; color: #2563eb; }
    .finance-tx-badge.internal-transfer { background: #f3f4f6; color: #4b5563; }
    .finance-tx-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      max-width: 100%;
      min-height: 22px;
      padding: 0 8px;
      border-radius: 999px;
      background: #f3f6fa;
      color: var(--text);
      font-size: 0.72rem;
      font-weight: 600;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      box-sizing: border-box;
      border: 1px solid rgba(148, 163, 184, 0.18);
    }
    .finance-tx-pill-account {
      background: #eef4ff;
      color: #1d4ed8;
      border-color: rgba(59, 130, 246, 0.18);
      font-size: 0.7rem;
      max-width: 100%;
    }
    .finance-tx-pill-account.tone-1 {
      background: #eef4ff;
      color: #1d4ed8;
      border-color: rgba(59, 130, 246, 0.18);
    }
    .finance-tx-pill-account.tone-2 {
      background: #ecfeff;
      color: #0f766e;
      border-color: rgba(13, 148, 136, 0.18);
    }
    .finance-tx-pill-account.tone-3 {
      background: #ecfdf5;
      color: #15803d;
      border-color: rgba(34, 197, 94, 0.18);
    }
    .finance-tx-pill-account.tone-4 {
      background: #f8fafc;
      color: #475569;
      border-color: rgba(100, 116, 139, 0.18);
    }
    .finance-tx-pill-subcategory {
      background: #f7f7eb;
      color: #7c5f00;
      border-color: rgba(202, 138, 4, 0.18);
      font-weight: 500;
      max-width: 100%;
    }
    .finance-tx-pill-subcategory.tone-1 {
      background: #fff7ed;
      color: #c2410c;
      border-color: rgba(249, 115, 22, 0.18);
    }
    .finance-tx-pill-subcategory.tone-2 {
      background: #fefce8;
      color: #a16207;
      border-color: rgba(202, 138, 4, 0.18);
    }
    .finance-tx-pill-subcategory.tone-3 {
      background: #f7fee7;
      color: #4d7c0f;
      border-color: rgba(132, 204, 22, 0.18);
    }
    .finance-tx-pill-subcategory.tone-4 {
      background: #f8fafc;
      color: #6b7280;
      border-color: rgba(148, 163, 184, 0.2);
    }
    .finance-tx-empty-mark {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 26px;
      color: #94a3b8;
      font-size: 0.86rem;
      line-height: 1;
      vertical-align: middle;
    }
    .finance-tx-amount-main {
      font-variant-numeric: tabular-nums;
      font-weight: 600;
      line-height: 1.2;
    }
    .finance-tx-amount-sub {
      margin-top: 2px;
      font-size: 0.72rem;
      color: var(--text-secondary);
      font-variant-numeric: tabular-nums;
      line-height: 1.2;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
    }
    .finance-tx-amount-sub-standalone {
      margin-top: 0;
      display: inline-flex;
      color: var(--text);
      font-weight: 500;
    }
    .finance-transfer-inline {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.4;
      color: var(--text);
      font-weight: 500;
    }
    .finance-transfer-inline-num {
      font-variant-numeric: tabular-nums;
    }
    .finance-transfer-account-pair {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      max-width: 100%;
      white-space: nowrap;
    }
    .finance-transfer-account-pair .finance-tx-pill-account {
      flex: 0 1 auto;
      min-width: 0;
    }
    .finance-transfer-direction {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.26);
      background: #fff;
      color: #64748b;
      flex: 0 0 auto;
      box-sizing: border-box;
    }
    .finance-transfer-direction svg {
      width: 10px;
      height: 10px;
      stroke: currentColor;
      stroke-width: 1.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
    }
    .finance-mobile-transfer-values {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 6px;
      font-variant-numeric: tabular-nums;
      color: var(--text);
      font-weight: 600;
    }
    .finance-mobile-transfer-note {
      margin-top: 4px;
    }
    .finance-tx-fx-flag {
      display: inline-flex;
      align-items: center;
      height: 18px;
      padding: 0 6px;
      border-radius: 999px;
      background: rgba(244, 158, 36, 0.12);
      color: #ad6a00;
      font-size: 0.7rem;
      line-height: 1;
      white-space: nowrap;
    }
    .finance-tx-note {
      white-space: nowrap !important;
      word-break: normal;
      line-height: 1.45;
      vertical-align: middle;
      min-width: 0;
      max-width: none;
      overflow: hidden;
      text-overflow: clip;
      color: var(--text-secondary);
    }
    .finance-tx-note-scroll {
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: thin;
      white-space: nowrap;
      line-height: 1.45;
      text-overflow: ellipsis;
    }
    .finance-tx-badge.dividend { background: #fff7ed; color: #c2410c; }
    .finance-tx-badge.internal-transfer { background: #f3f4f6; color: #4b5563; }
    .finance-transaction-drawer { max-width: 520px; }
    .finance-transaction-form {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }
    .finance-transaction-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
      color: var(--text-secondary);
      font-size: 0.8rem;
      min-width: 0;
    }
    .finance-transaction-field .finance-settings-input {
      display: block;
      width: 100%;
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
    }
    .finance-transaction-field input[type="date"].finance-settings-input {
      -webkit-appearance: none;
      appearance: none;
      height: 34px;
      line-height: 34px;
      padding-top: 0;
      padding-bottom: 0;
      text-align: center;
    }
    .finance-transaction-field input[type="date"].finance-settings-input::-webkit-date-and-time-value {
      min-height: 34px;
      line-height: 34px;
      text-align: center;
    }
    .finance-transaction-field select,
    .finance-transaction-field textarea {
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--text);
      padding: 8px 10px;
      font-size: 0.9rem;
      box-sizing: border-box;
    }
    .finance-transaction-field-wide { grid-column: span 1; }
    .finance-transaction-field-full { grid-column: 1 / -1; }
    .finance-transaction-transfer-group {
      display: grid;
      gap: 10px;
      padding: 10px 12px 12px;
      border: 1px solid rgba(148, 163, 184, 0.18);
      border-radius: 12px;
      background: #f8fafc;
      min-width: 0;
    }
    .finance-transaction-transfer-title {
      color: var(--text);
      font-size: 0.85rem;
      font-weight: 700;
      line-height: 1.2;
    }
    .finance-transaction-textarea {
      min-height: 72px;
      resize: vertical;
    }
    .finance-transaction-actions {
      grid-column: 1 / -1;
      margin-top: 8px;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 10px;
    }
    .finance-transaction-actions .btn-query {
      min-width: 120px;
    }
    .finance-transaction-actions .btn-query.danger {
      color: var(--danger);
      border-color: rgba(220, 38, 38, 0.28);
      margin-right: auto;
    }
    .inventory-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 8px;
    }
    .inventory-section + .inventory-section { margin-top: 8px; }
    .inventory-section-head {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 6px;
      margin: 10px 0 4px 0;
    }
    .inventory-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 12px;
      transition: border-color 0.15s;
    }
    .inventory-card:hover { border-color: var(--accent); }
    .inventory-card-need-replenish {
      background: #fff1f0;
      border-color: var(--danger);
    }
    .inventory-card-need-replenish,
    .inventory-card-need-replenish * {
      color: var(--danger) !important;
      font-weight: 600 !important;
    }
    .inventory-card-warn {
      background: #fffbf0;
      border-color: var(--warning);
    }
    .inventory-card-warn,
    .inventory-card-warn * {
      color: var(--warning) !important;
      font-weight: 600 !important;
    }
    .inventory-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
    .inventory-card .card-head-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
    .inventory-card .marketplace-badge { font-size: 0.6875rem; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: var(--bg-elevated); color: var(--text-secondary); }
    .inventory-card .sku-main { font-size: 0.95rem; font-weight: 600; color: var(--text); line-height: 1.35; display: inline-flex; align-items: center; }
    .inventory-card .suggest-qty { font-size: 0.75rem; color: var(--muted); font-weight: 500; white-space: nowrap; margin-left: 14px; margin-right: 10px; line-height: 1.35; display: inline-flex; align-items: center; }
    .inventory-card .asin-line { font-size: 0.72rem; color: var(--muted); margin: 2px 0 6px 0; }
    .inventory-card .qty-row { display: flex; justify-content: space-between; font-size: 0.78rem; margin-bottom: 2px; }
    .inventory-card .qty-row.three-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 6px; }
    .inventory-card .qty-row .label { color: var(--text-secondary); }
    .inventory-card .qty-row .val { font-variant-numeric: tabular-nums; font-weight: 500; }
    .inventory-card .qty-row.fulfillable .val { color: var(--success); }
    .inventory-card .qty-row.reserved .val { color: var(--warning); }
    .inventory-card .qty-row.unfulfillable .val { color: var(--danger); }
    .sales-trend { font-size: 0.7rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
    .sales-trend.up { color: var(--success) !important; }
    .sales-trend.down { color: var(--danger) !important; }
    .sales-trend.flat { color: var(--muted) !important; }
    .inventory-sales-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; background: transparent; border: 0; border-radius: 0; padding: 0; overflow: visible; box-shadow: none; min-height: 0; }
    .market-summary-card { appearance: none; -webkit-appearance: none; background: rgba(255, 255, 255, 0.86); border: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 12px; padding: 6px 12px; width: 100%; text-align: center; cursor: pointer; min-height: 56px; height: 56px; line-height: 1; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); box-shadow: none; }
    .market-summary-card:last-child { border-right: 1px solid var(--border); }
    .market-summary-card.is-active { background: rgba(0, 113, 227, 0.08); color: var(--accent); border-color: rgba(0, 113, 227, 0.24); box-shadow: none; }
    .market-summary-card .summary-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 100%; }
    .market-summary-card .summary-market { min-width: 0; font-size: 1.08rem; font-weight: 600; color: inherit; letter-spacing: 0; }
    .market-summary-card .summary-content { display: none; }
    .market-summary-card .summary-line { font-size: 0.72rem; color: inherit; line-height: 1.15; }
    .inventory-sales-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
    .inventory-sales-filters .filter-field { display: flex; align-items: center; gap: 6px; }
    .filter-field-inline { display: flex; align-items: center; gap: 8px; }
    .filter-field-inline label { font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; }
    .filter-field-inline-button { align-items: stretch; }
    .filter-field-inline-button label { visibility: hidden; pointer-events: none; }
    .filter-field-inline-button .btn-refresh { width: 100%; }
    .inventory-sales-filters label { font-size: 0.78rem; color: var(--text-secondary); }
    .filter-field-inline select,
    .inventory-sales-filters input,
    .inventory-sales-filters select { font-size: var(--control-font-size); padding: 0 var(--control-padding-x); height: var(--control-height); min-height: var(--control-height); border: 1px solid var(--border); border-radius: var(--control-radius); background: rgba(255, 255, 255, 0.86); color: var(--text); box-sizing: border-box; }
    .inventory-sales-filters input { min-width: 180px; }
    .inventory-sales-table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
    .inventory-sales-table { width: 100%; min-width: 1280px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
    .inventory-sales-table th:nth-child(1), .inventory-sales-table td:nth-child(1) { width: 72px; min-width: 72px; max-width: 72px; }
    .inventory-sales-table th:nth-child(2), .inventory-sales-table td:nth-child(2) { width: 168px; min-width: 168px; max-width: 168px; }
    .inventory-sales-table th:nth-child(3), .inventory-sales-table td:nth-child(3) { width: 76px; min-width: 76px; max-width: 76px; }
    .inventory-sales-table th:nth-child(4), .inventory-sales-table td:nth-child(4),
    .inventory-sales-table th:nth-child(5), .inventory-sales-table td:nth-child(5),
    .inventory-sales-table th:nth-child(6), .inventory-sales-table td:nth-child(6),
    .inventory-sales-table th:nth-child(10), .inventory-sales-table td:nth-child(10),
    .inventory-sales-table th:nth-child(11), .inventory-sales-table td:nth-child(11) { width: 100px; min-width: 100px; max-width: 100px; }
    .inventory-sales-table th:nth-child(7), .inventory-sales-table td:nth-child(7),
    .inventory-sales-table th:nth-child(8), .inventory-sales-table td:nth-child(8),
    .inventory-sales-table th:nth-child(9), .inventory-sales-table td:nth-child(9) { width: 176px; min-width: 176px; max-width: 176px; }
    .inventory-sales-table th, .inventory-sales-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.82rem; }
    @media (min-width: 769px) {
      .inventory-sales-table {
        --inventory-sales-row-height: 52px;
      }
      .inventory-sales-table tr,
      .inventory-sales-table th,
      .inventory-sales-table td {
        height: var(--inventory-sales-row-height);
      }
      .inventory-sales-table th,
      .inventory-sales-table td {
        padding-top: 6px;
        padding-bottom: 6px;
        line-height: 18px;
        vertical-align: middle;
        box-sizing: border-box;
      }
      .inventory-sales-table thead th,
      .inventory-sales-table tr.summary-row td {
        height: var(--inventory-sales-row-height) !important;
        min-height: var(--inventory-sales-row-height);
        max-height: var(--inventory-sales-row-height);
        padding-top: 6px;
        padding-bottom: 6px;
        line-height: 18px;
      }
      .inventory-sales-table thead th {
        position: sticky;
        top: 0;
        z-index: 3;
      }
      .inventory-sales-table tbody tr.summary-row {
        height: var(--inventory-sales-row-height);
        position: sticky;
        top: var(--inventory-sales-row-height);
        z-index: 2;
      }
      .inventory-sales-table tbody tr.summary-row td {
        position: sticky;
        top: var(--inventory-sales-row-height);
        z-index: 2;
        background-clip: padding-box;
      }
      .inventory-sales-sku { line-height: 18px; }
      .inventory-sales-meta { line-height: 16px; }
    }
    .inventory-sales-table th { color: var(--text-secondary); background: #fbfbfd; white-space: nowrap; font-weight: 500; }
    .inventory-sales-table td.num, .inventory-sales-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
    .inventory-sales-compare { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 6px; width: 100%; white-space: nowrap; }
    .inventory-sales-compare strong { color: var(--text); font-weight: 400; }
    .inventory-sales-compare em { font-style: normal; font-size: 0.76rem; font-weight: 700; line-height: 1; }
    .inventory-sales-compare em.trend-up { color: #15803d; }
    .inventory-sales-compare em.trend-down { color: #b91c1c; }
    .inventory-sales-compare em.trend-flat { color: var(--muted); }
    .inventory-sales-table tr:hover td { background: #fbfbfd; }
    .inventory-sales-table tr.row-warn td { background: rgba(245, 158, 11, 0.08); }
    .inventory-sales-table tr.row-risk td { background: rgba(239, 68, 68, 0.08); }
    .inventory-sales-table tr.row-warn:hover td { background: rgba(245, 158, 11, 0.12); }
    .inventory-sales-table tr.row-risk:hover td { background: rgba(239, 68, 68, 0.12); }
    .inventory-sales-table tr.summary-row td { background: #fbfbfd; font-weight: 600; }
    .inventory-sales-sku { font-weight: 500; color: var(--text); }
    .inventory-sales-mobile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
    .inventory-sales-sku-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
    .inventory-sales-summary-mobile { display: none; }
    .inventory-sales-summary-block { display: flex; align-items: center; gap: 10px; }
    .inventory-sales-summary-label { color: var(--text-secondary); font-size: 0.76rem; font-weight: 600; }
    .inventory-sales-summary-value { color: var(--text); font-size: 0.8rem; font-weight: 600; }
    .inventory-sales-mobile-tags { display: none; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; flex-shrink: 0; }
    .inventory-sales-mobile-subline { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; margin-top: 2px; }
    .inventory-sales-status-inline { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; }
    .inventory-sales-table td.cell-status { text-align: left; }
    .inventory-sales-desktop-suggest { display: inline-flex; align-items: center; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: rgba(245, 158, 11, 0.12); color: #b45309; font-size: 0.74rem; font-weight: 700; }
    .inventory-sales-mobile-market { display: none; }
    .inventory-sales-mobile-suggest { display: none; align-items: center; font-size: 0.74rem; font-weight: 600; color: var(--warning); }
    .inventory-sales-mobile-sales { display: none; }
    .inventory-sales-mobile-stock { display: none; }
    .inventory-sales-mobile-kpis { display: none; }
    .inventory-sales-mobile-sku,
    .inventory-sales-mobile-stock-inline { display: none; }
    .inventory-sales-mobile-card { display: block; width: 100%; }
    .inventory-sales-meta { font-size: 0.72rem; color: var(--muted); margin-top: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .sales-page-table { min-width: 1170px; }
    .sales-page-table .sales-col-market { width: 72px; }
    .sales-page-table .sales-col-sku { width: 132px; }
    .sales-page-table .sales-col-trend { width: 86px; }
    .sales-page-table .sales-col-period { width: calc((100% - 290px) / 9); }
    .sales-page-table th:nth-child(1), .sales-page-table td:nth-child(1) { width: 72px; min-width: 72px; max-width: 72px; }
    .sales-page-table th:nth-child(2), .sales-page-table td:nth-child(2) { width: 132px; min-width: 132px; max-width: 132px; }
    .sales-page-table th:nth-child(3), .sales-page-table td:nth-child(3) { width: 86px !important; min-width: 86px; max-width: 86px; }
    .sales-page-table th:nth-child(n+4), .sales-page-table td:nth-child(n+4) { width: auto !important; min-width: 0; max-width: none; }
    .sales-page-table th:last-child, .sales-page-table td:last-child { padding-right: 12px; }
    .sales-page-table th:nth-child(1),
    .sales-page-table th:nth-child(2) { text-align: left; }
    .sales-page-table th:nth-child(1) .inventory-sales-th-sort,
    .sales-page-table th:nth-child(2) .inventory-sales-th-sort { justify-content: flex-start; width: 100%; }
    .sales-page-table th:nth-child(n+3),
    .sales-page-table td:nth-child(n+3) { text-align: center; }
    .sales-page-table th:nth-child(3) .inventory-sales-th-sort { justify-content: flex-start; width: 100%; }
    .sales-page-table th:nth-child(n+4) .inventory-sales-th-sort { justify-content: center; }
    .sales-page-table .sales-trend-head { color: var(--text-secondary); font-size: 0.76rem; font-weight: 600; }
    .sales-page-table .sales-trend-cell { padding-left: 0; padding-right: 0; text-align: left; }
    .sales-page-table .sales-sparkline { display: inline-flex; align-items: center; justify-content: flex-start; width: 80px; height: 14px; vertical-align: middle; }
    .sales-page-table .sales-sparkline svg { display: block; width: 80px; height: 14px; overflow: visible; }
    .sales-page-table .sales-sparkline polygon { fill: currentColor; opacity: 0.14; }
    .sales-page-table .sales-sparkline polyline { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.88; vector-effect: non-scaling-stroke; }
    .sales-page-table .sales-sparkline-up { color: #15803d; }
    .sales-page-table .sales-sparkline-down { color: #ef4444; }
    .sales-page-table .sales-sparkline-steady { color: #9ca3af; }
    .sales-page-table .sales-sparkline-empty::before { content: "-"; color: var(--muted); font-weight: 600; }
    .sales-page-table .sales-period-cell { display: inline-flex; align-items: baseline; justify-content: center; width: 100%; white-space: nowrap; }
    .sales-page-table .sales-period-cell strong { color: var(--text); font-weight: 600; }
    .sales-page-table tr.summary-row .sales-period-cell strong { font-weight: 700; }
    .sales-page-table .sales-period-current strong { font-weight: 700; }
    .status-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; padding: 4px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 500; }
    .status-pill.safe { background: rgba(34, 197, 94, 0.12); color: #15803d; }
    .status-pill.warn { background: rgba(245, 158, 11, 0.15); color: #b45309; }
    .status-pill.risk { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
    .inventory-sales-note { font-size: 0.78rem; color: var(--muted); margin: 8px 0 0; }
    .operations-subnav-wrap { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
    .operations-subnav { display: inline-flex; align-items: center; gap: 8px; padding: 5px; background: rgba(255, 255, 255, 0.72); border: 1px solid var(--border); border-radius: 12px; width: fit-content; max-width: 100%; }
    .operations-subnav-btn { border: 0; background: transparent; color: var(--text-secondary); padding: 9px 14px; border-radius: 8px; font-size: 0.82rem; font-weight: 500; cursor: pointer; }
    .operations-subnav-btn.active { background: #fff; color: var(--text); box-shadow: none; }
    .operations-subnav-meta { font-size: 0.78rem; color: var(--muted); }
    .sku-triage-panel { display: flex; flex-direction: column; gap: 14px; }
    .sku-triage-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
    .sku-triage-summary-card .value { font-size: 1.75rem; }
    .sku-triage-summary-card.card-adjust .value { color: #b91c1c; }
    .sku-triage-summary-card.card-watch .value { color: #b45309; }
    .sku-triage-summary-card.card-normal .value { color: #15803d; }
    .sku-triage-summary-card.card-pending .value { color: var(--text-secondary); }
    .sku-triage-group { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
    .sku-triage-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .sku-triage-group-note { margin: 4px 0 0; font-size: 0.8rem; color: var(--muted); }
    .sku-triage-group-count { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; }
    .sku-triage-table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: auto; }
    .sku-triage-table { width: 100%; min-width: 1080px; border-collapse: collapse; table-layout: fixed; }
    .sku-triage-table th,
    .sku-triage-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.82rem; vertical-align: top; }
    .sku-triage-table th { color: var(--text-secondary); background: #fbfbfd; white-space: nowrap; font-weight: 500; }
    .sku-triage-table td.num,
    .sku-triage-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
    .sku-triage-table tbody tr:hover td { background: #fbfbfd; }
    .sku-triage-table tbody tr:last-child td { border-bottom: none; }
    .sku-triage-sku-cell { display: flex; flex-direction: column; gap: 6px; }
    .sku-triage-sku-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .sku-triage-sku { font-weight: 500; color: var(--text); }
    .sku-triage-meta { font-size: 0.74rem; color: var(--muted); }
    .sku-triage-trend { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 4px 8px; border-radius: 999px; background: #f3f4f6; color: var(--text-secondary); font-size: 0.74rem; font-weight: 600; }
    .sku-triage-trend-up { background: rgba(34, 197, 94, 0.12); color: #15803d; }
    .sku-triage-trend-down { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
    .sku-triage-tags { display: flex; flex-wrap: wrap; gap: 6px; }
    .sku-triage-tag { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: #f3f4f6; color: var(--text-secondary); font-size: 0.72rem; font-weight: 600; }
    .sku-triage-tag.muted { background: #f8fafc; color: var(--muted); }
    .sku-triage-action { color: var(--text); line-height: 1.5; min-width: 180px; }
    .btn-secondary { background: #fff; color: var(--text-secondary); }
    .btn-secondary:hover { color: var(--text); }
    .success-hint { margin: 10px 0; font-size: 0.86rem; color: #15803d; }
    .finance-settings-drawer-backdrop { z-index: 35; }
    .finance-settings-drawer {
      --finance-settings-title-size: 0.92rem;
      --finance-settings-text-size: 0.82rem;
      --finance-settings-meta-size: 0.76rem;
      --finance-settings-button-height: 30px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .finance-settings-head { margin-bottom: 0; }
    .finance-settings-head h2 { font-size: 1rem; line-height: 1.3; }
    .finance-settings-section {
      padding: 0;
    }
    .finance-master-section {
      --finance-master-list-max-height: 188px;
    }
    .finance-settings-section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 8px;
    }
    .finance-settings-section-title {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }
    .finance-settings-section-head h3 { margin: 0; font-size: var(--finance-settings-title-size); line-height: 1.3; }
    .finance-settings-inline-status {
      font-size: var(--finance-settings-meta-size);
      line-height: 1;
      white-space: nowrap;
    }
    .finance-settings-inline-status.is-success { color: #15803d; }
    .finance-settings-inline-status.is-error { color: var(--danger); }
    .finance-settings-add,
    .finance-settings-delete,
    .finance-settings-link,
    .finance-master-link,
    .finance-master-remove {
      appearance: none;
      border: 1px solid var(--border);
      background: var(--bg);
      color: var(--text-secondary);
      border-radius: 8px;
      height: var(--finance-settings-button-height);
      padding: 0 12px;
      font-size: var(--finance-settings-meta-size);
      font-weight: 400;
      line-height: 1;
      cursor: pointer;
      white-space: nowrap;
    }
    .finance-settings-link,
    .finance-master-link,
    .finance-master-remove {
      border-color: transparent;
      background: transparent;
      padding: 0 6px;
    }
    .finance-settings-link:hover,
    .finance-master-link:hover { color: var(--accent); }
    .finance-settings-delete:hover,
    .finance-master-remove:hover { color: var(--danger); border-color: rgba(220, 38, 38, 0.24); }
    .finance-settings-list,
    .finance-master-list,
    .finance-master-list.finance-master-list-subcategories {
      border-top: 1px solid var(--border);
    }
    .finance-settings-list { display: block; }
    .finance-master-list,
    .finance-master-list.finance-master-list-subcategories {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      column-gap: 18px;
      row-gap: 0;
      max-height: var(--finance-master-list-max-height);
      overflow: auto;
      scrollbar-gutter: stable;
    }
    .finance-settings-rule-wrap { display: block; }
    .finance-settings-summary-row,
    .finance-master-row,
    .finance-settings-rule-wrap.is-editing {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 6px;
      align-items: start;
      padding: 8px 0;
      border-bottom: 1px solid var(--border);
      background: transparent;
    }
    .finance-master-row.is-editing,
    .finance-settings-rule-wrap.is-editing {
      padding-bottom: 10px;
    }
    .finance-master-row.is-editing {
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      column-gap: 10px;
    }
    .finance-settings-summary-row,
    .finance-settings-rule-summary {
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
    }
    .finance-settings-rule-summary {
      display: grid;
      gap: 10px;
      padding: 8px 0;
      border-bottom: 1px solid var(--border);
      background: transparent;
    }
    .finance-settings-summary-main,
    .finance-settings-rule-summary-main {
      display: grid;
      gap: 2px;
      min-width: 0;
    }
    .finance-settings-summary-main strong,
    .finance-settings-rule-summary-main strong {
      color: var(--text);
      font-size: var(--finance-settings-text-size);
      font-weight: 400;
      line-height: 1.25;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .finance-settings-summary-main span,
    .finance-settings-rule-summary-main span,
    .finance-master-count {
      color: var(--text-secondary);
      font-size: var(--finance-settings-meta-size);
      line-height: 1.25;
      white-space: nowrap;
    }
    .finance-master-main {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 78px;
      gap: 8px;
      align-items: center;
    }
    .finance-master-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-width: 0;
      min-height: 30px;
    }
    .finance-master-actions {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }
    .finance-master-section .finance-settings-input,
    .finance-master-fixed {
      height: 34px;
      padding: 0 10px;
      font-size: var(--finance-settings-text-size);
      font-weight: 400;
    }
    .finance-master-row-subcategory .finance-master-meta {
      justify-content: space-between;
    }
    .finance-master-row-subcategory .finance-master-main {
      grid-template-columns: minmax(0, 1fr);
    }
    .finance-master-row-biz-account .finance-master-main {
      grid-template-columns: minmax(0, 1fr);
    }
    .finance-master-row-biz-account .finance-settings-input {
      width: 100%;
      min-width: 0;
    }
    .finance-master-row-subcategory .finance-settings-input { text-overflow: clip; }
    .finance-master-fixed {
      border: 1px solid var(--border);
      background: var(--bg);
      color: var(--text-secondary);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
    }
    @media (max-width: 768px) {
      html.embed-workbench,
      html.embed-workbench body,
      html.embed-workbench .page,
      html.embed-workbench #contentWrap,
      html.embed-workbench #panelFinance {
        overflow-x: hidden;
        padding: 0;
      }
      .btn-finance-settings {
        display: none !important;
      }
      .finance-transaction-drawer {
        width: 100vw;
        max-width: 100vw;
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
        overflow-x: hidden;
      }
      .finance-transaction-form {
        grid-template-columns: 1fr;
        gap: 10px;
      }
      .finance-transaction-field-wide,
      .finance-transaction-field-full {
        grid-column: auto;
      }
      .finance-transaction-textarea {
        min-height: 64px;
      }
      .finance-transaction-actions {
        position: sticky;
        bottom: calc(-16px - env(safe-area-inset-bottom));
        background: #fff;
        padding: 12px 0 calc(4px + env(safe-area-inset-bottom));
        margin-top: 4px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        justify-content: stretch;
      }
      .finance-transaction-actions.has-delete {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
      .finance-transaction-actions .btn-query.danger {
        margin-right: 0;
      }
      .finance-transaction-actions .btn-query {
        width: 100%;
        min-width: 0;
      }
      .finance-transactions-mobile-list {
        display: grid;
        gap: 8px;
        margin-top: 2px;
      }
      .finance-spotlight-grid {
        grid-template-columns: 1fr;
      }
      .finance-audit-card {
        display: none;
      }
      .finance-transactions-filters,
      .finance-transactions-table-wrap {
        display: none;
      }
      .finance-transactions-head-actions {
        justify-content: stretch;
        width: 100%;
      }
      .finance-transactions-head-actions .btn-query {
        width: 100%;
      }
      html.embed-workbench #panelFinance .row-top-cards .collapse-accounts-wrap.collapsed {
        display: block;
      }
      html.embed-workbench #panelFinance .total-assets-collapse-btn,
      html.embed-workbench #panelFinance .card-finance-overview {
        display: none !important;
      }
      html.embed-workbench #panelFinance .row-top-cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }
      html.embed-workbench #panelFinance .card-total-assets,
      html.embed-workbench #panelFinance .collapse-accounts-wrap {
        grid-column: 1 / -1;
      }
      html.embed-workbench #panelFinance .card-jason,
      html.embed-workbench #panelFinance .card-tracy {
        display: block;
      }
      html.embed-workbench #panelFinance .card-jason .value-side,
      html.embed-workbench #panelFinance .card-tracy .value-side {
        display: none;
      }
      html.embed-workbench #panelFinance .collapse-accounts-body .dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }
      html.embed-workbench #panelFinance .dashboard-card {
        border-radius: 8px;
        box-shadow: none;
      }
      html.embed-workbench #panelFinance .dashboard-card.card-account {
        min-height: 66px;
        padding: 10px;
      }
      html.embed-workbench #panelFinance .dashboard-card.card-account .label {
        font-size: 0.7rem;
        line-height: 1.2;
      }
      html.embed-workbench #panelFinance .dashboard-card.card-account .value {
        display: block;
        font-size: 1rem;
        line-height: 1.25;
        word-break: break-word;
      }
      html.embed-workbench #panelFinance .dashboard-card .value .equiv-inline {
        display: block;
        margin-left: 0;
        margin-top: 2px;
        font-size: 0.66rem;
        line-height: 1.2;
      }
      .finance-master-main {
        grid-template-columns: minmax(0, 1fr) 78px;
      }
    }
    @media (max-width: 480px) {
      html.embed-workbench body {
        padding: 0 !important;
      }
      html.embed-workbench #panelFinance .dashboard-row.row-top {
        margin-bottom: 8px;
      }
      html.embed-workbench #panelFinance .dashboard-row.row-top .dashboard-cards {
        gap: 8px;
      }
      html.embed-workbench #panelFinance .dashboard-card.card-total-assets {
        min-height: 62px;
        padding: 12px;
      }
      html.embed-workbench #panelFinance .dashboard-card.card-jason,
      html.embed-workbench #panelFinance .dashboard-card.card-tracy {
        min-height: 62px;
        padding: 12px;
      }
      html.embed-workbench #panelFinance .dashboard-card.card-total-assets .value {
        font-size: 1.3rem;
      }
      html.embed-workbench #panelFinance .dashboard-card.card-jason .value,
      html.embed-workbench #panelFinance .dashboard-card.card-tracy .value {
        font-size: 1.15rem;
        line-height: 1.15;
      }
      html.embed-workbench #panelFinance .finance-transactions-head {
        gap: 8px;
        margin-bottom: 8px;
      }
      html.embed-workbench #panelFinance .finance-transactions-title {
        font-size: 0.92rem;
      }
      html.embed-workbench #panelFinance .finance-transactions-head-actions .btn-query {
        min-height: 40px;
        height: 40px;
      }
      .finance-transactions-filters {
        grid-template-columns: 1fr;
      }
      .finance-definition-card,
      .finance-audit-card,
      .finance-spotlight-card {
        padding: 12px;
      }
      .finance-transactions-filter-keyword {
        grid-column: auto;
      }
      .finance-master-meta {
        align-items: center;
      }
    }
    .finance-settings-buffer-row {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 34px;
    }
    .finance-settings-buffer-label,
    .finance-settings-buffer-unit {
      font-size: var(--finance-settings-text-size);
      color: var(--text-secondary);
      white-space: nowrap;
    }
    .finance-settings-buffer-input {
      width: 96px;
    }
    .finance-settings-buffer-percent {
      width: 96px;
      flex: 0 0 auto;
    }
    .finance-settings-buffer-preview {
      font-size: var(--finance-settings-text-size);
      color: var(--text);
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .finance-settings-rule {
      display: grid;
      grid-template-columns: 132px minmax(0, 1fr) minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
    }
    .finance-settings-input {
      width: 100%;
      height: var(--control-height);
      border: 1px solid var(--border);
      border-radius: var(--control-radius);
      background: var(--bg);
      color: var(--text);
      padding: 0 var(--control-padding-x);
      font-size: var(--finance-settings-text-size);
      font-weight: 400;
      box-sizing: border-box;
      appearance: textfield;
      -moz-appearance: textfield;
    }
    .finance-settings-input::-webkit-outer-spin-button,
    .finance-settings-input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    .finance-settings-input:disabled,
    .finance-settings-add:disabled,
    .finance-settings-delete:disabled {
      background: #eef2f7;
      color: #94a3b8;
      cursor: not-allowed;
      opacity: 1;
    }
    .finance-settings-input.is-invalid {
      border-color: #dc2626;
      background: #fef2f2;
    }
    .finance-settings-percent {
      position: relative;
      display: block;
    }
    .finance-settings-ratio-field {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .finance-settings-ratio-name {
      flex: 0 0 42px;
      color: var(--text-secondary);
      font-size: var(--finance-settings-meta-size);
      font-style: normal;
      font-weight: 400;
      line-height: 1;
      white-space: nowrap;
    }
    .finance-settings-ratio-field .finance-settings-input {
      min-width: 0;
      flex: 1;
    }
    .finance-settings-percent span {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-secondary);
      font-size: var(--finance-settings-meta-size);
      pointer-events: none;
    }
    .finance-settings-percent .finance-settings-input { padding-right: 28px; }
    .finance-settings-empty {
      color: var(--text-secondary);
      font-size: var(--finance-settings-text-size);
      padding: 6px 0;
    }
    .finance-settings-row-error,
    .finance-settings-row-warning {
      font-size: var(--finance-settings-meta-size);
      line-height: 1.4;
      padding-left: 2px;
    }
    .finance-settings-row-error { color: #dc2626; }
    .finance-settings-row-warning { color: #b45309; }
    .replenishment-drawer-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.42);
      display: flex;
      justify-content: flex-end;
      z-index: 30;
      padding: 0;
    }
    .replenishment-drawer {
      width: min(580px, 100vw);
      height: 100vh;
      background: #fff;
      box-shadow: -16px 0 32px rgba(15, 23, 42, 0.18);
      padding: 20px;
      overflow-y: auto;
      box-sizing: border-box;
    }
    .replenishment-drawer-head {
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
      gap: 12px;
      margin-bottom: 12px;
    }
    .replenishment-drawer-head h2 { margin: 0 0 4px; font-size: 1rem; line-height: 1.3; }
    .replenishment-drawer-head p { margin: 0; color: var(--text-secondary); font-size: 0.82rem; line-height: 1.45; }
    .replenishment-close {
      border: none;
      background: transparent;
      color: var(--text-secondary);
      cursor: pointer;
      font-size: 0.86rem;
      padding: 6px 0;
    }
    .replenishment-market-card,
    .replenishment-market-panel {
      padding: 0;
      background: transparent;
      border: none;
      box-shadow: none;
      border-radius: 0;
      margin-top: 8px;
      margin-bottom: 0;
    }
    .replenishment-market-select-wrap {
      min-width: 84px;
      flex: 0 0 auto;
    }
    .replenishment-market-select {
      width: 100%;
      min-width: 84px;
      box-sizing: border-box;
      font-size: 0.82rem;
      font-weight: 700;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 28px 6px 10px;
      background: #fff;
      color: var(--text);
    }
    .replenishment-market-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 6px;
    }
    .replenishment-market-head h3 { margin: 0 0 2px; font-size: 0.98rem; }
    .replenishment-market-meta { margin: 0; font-size: 0.75rem; color: var(--text-secondary); }
    .replenishment-market-status {
      font-size: 0.78rem;
      color: var(--text-secondary);
      max-width: 260px;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .replenishment-market-head-main {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
      flex-wrap: nowrap;
      width: 100%;
    }
    .replenishment-market-summary {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
      flex-wrap: wrap;
    }
    .replenishment-market-count {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
    }
    .replenishment-inline-row { display: flex; align-items: end; gap: 10px; margin-bottom: 8px; }
    .replenishment-name-row {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .replenishment-name-row .replenishment-preset-name {
      min-height: var(--control-height);
      padding: 0 var(--control-padding-x);
      font-size: var(--control-font-size);
    }
    .replenishment-name-label {
      font-size: 0.74rem;
      color: var(--text-secondary);
    }
    .replenishment-name-value {
      min-height: var(--control-height);
      display: flex;
      align-items: center;
      padding: 0 var(--control-padding-x);
      border: 1px solid var(--border);
      border-radius: var(--control-radius);
      background: #fff;
      font-size: 0.8rem;
      color: var(--text);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .replenishment-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
    .replenishment-field-compact { flex: 1 1 auto; margin-bottom: 0; }
    .replenishment-field span { font-size: 0.74rem; color: var(--text-secondary); }
    .replenishment-field input,
    .replenishment-item-input {
      font-size: 0.82rem;
      border: 1px solid var(--border);
      border-radius: 7px;
      padding: 6px 8px;
      height: 40px;
      min-height: 40px;
      line-height: 1.2;
      background: #fff;
      color: var(--text);
      width: 100%;
      box-sizing: border-box;
    }
    .replenishment-items-wrap,
    .replenishment-preview {
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      background: #fafbfc;
    }
    .replenishment-preview-head {
      padding: 8px 10px;
      font-size: 0.76rem;
      font-weight: 600;
      color: var(--text-secondary);
      border-bottom: 1px solid var(--border);
      background: #fff;
    }
    .replenishment-preview pre {
      margin: 0;
      padding: 10px;
      font-size: 0.72rem;
      line-height: 1.45;
      white-space: pre-wrap;
      word-break: break-word;
      max-height: 260px;
      overflow: auto;
    }
    .replenishment-items-table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
      background: #fff;
    }
    .replenishment-items-table th,
    .replenishment-items-table td {
      padding: 8px 10px;
      border-bottom: 1px solid var(--border);
      font-size: 0.82rem;
      text-align: left;
    }
    .replenishment-items-table th.num,
    .replenishment-items-table td.num { text-align: right; }
    .replenishment-item-qty { text-align: right; }
    .replenishment-items-table th:nth-child(1),
    .replenishment-items-table td:nth-child(1) { width: auto; }
    .replenishment-items-table th:nth-child(2),
    .replenishment-items-table td:nth-child(2) { width: 168px; }
    .replenishment-items-table th:nth-child(3),
    .replenishment-items-table td:nth-child(3) { width: 92px; }
    .replenishment-row-delete {
      border: none;
      background: transparent;
      color: #b45309;
      font-size: 0.76rem;
      cursor: pointer;
      padding: 0;
    }
    .replenishment-row-delete:hover { color: #92400e; }
    .replenishment-add-row {
      min-width: 128px;
      white-space: nowrap;
      min-height: var(--control-height);
      height: var(--control-height);
      align-self: flex-end;
    }
    .replenishment-inline-row .btn-refresh,
    .replenishment-market-card-actions .btn-refresh,
    .replenishment-market-card-actions .replenishment-download-btn,
    .replenishment-market-card-actions .replenishment-download-inline {
      font-size: 0.82rem;
      font-weight: 500;
      letter-spacing: 0;
    }
    .replenishment-recent-wrap {
      margin-top: 20px;
      padding-top: 18px;
      border-top: 1px solid var(--border);
    }
    .replenishment-recent-plan {
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }
    .replenishment-recent-title {
      font-size: 0.82rem;
      font-weight: 500;
      color: var(--text);
      margin-bottom: 6px;
      line-height: 1.45;
    }
    .replenishment-recent-summary {
      font-size: 0.82rem;
      color: var(--text);
      line-height: 1.45;
      text-align: left;
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
    }
    .replenishment-recent-items {
      margin-top: 6px;
      font-size: 0.82rem;
      line-height: 1.45;
      color: var(--text-secondary);
    }
    .replenishment-market-card-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 10px;
      align-items: center;
    }
    .replenishment-market-card-actions .btn-refresh,
    .replenishment-market-card-actions .replenishment-download-btn,
    .replenishment-market-card-actions .replenishment-download-inline {
      min-width: 128px;
      min-height: 38px;
      box-sizing: border-box;
    }
    .replenishment-plan-cancel {
      color: #dc2626 !important;
      border-color: rgba(220, 38, 38, 0.18) !important;
      background: #fff !important;
      font-size: 0.82rem !important;
      font-weight: 500 !important;
    }
    .replenishment-plan-cancel:hover {
      background: rgba(220, 38, 38, 0.06) !important;
    }
    .replenishment-progress {
      margin-top: 10px;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px;
      background: #fff;
    }
    .replenishment-progress.running { border-color: rgba(59, 130, 246, 0.22); }
    .replenishment-progress.done { border-color: rgba(34, 197, 94, 0.25); }
    .replenishment-progress.fail { border-color: rgba(239, 68, 68, 0.24); }
    .replenishment-progress-steps {
      display: flex;
      flex-wrap: wrap;
      gap: 0;
    }
    .replenishment-progress-step {
      display: inline;
      color: var(--text-secondary);
      font-size: 0.76rem;
      white-space: normal;
    }
    .replenishment-progress-sep {
      display: inline-block;
      margin: 0 6px 0 2px;
      color: var(--text-secondary);
    }
    .replenishment-progress-step.running {
      color: #1d4ed8;
    }
    .replenishment-progress-step.completed {
      color: #15803d;
    }
    .replenishment-progress-step.failed {
      color: #b91c1c;
    }
    .replenishment-progress-foot {
      margin-top: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .replenishment-progress-text {
      font-size: 0.78rem;
      color: var(--text-secondary);
    }
    .replenishment-download-btn,
    .replenishment-download-inline {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 32px;
      padding: 0 12px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: #fff;
      color: var(--text);
      text-decoration: none;
      font-size: 0.78rem;
      font-weight: 500;
      white-space: nowrap;
    }
    .replenishment-download-btn:hover,
    .replenishment-download-inline:hover { background: #f8fafc; }
    @media (max-width: 720px) {
      .replenishment-inline-row { flex-direction: column; align-items: stretch; }
      .replenishment-market-head { align-items: flex-start; }
      .replenishment-market-head-main { width: 100%; flex-wrap: wrap; }
      .replenishment-market-select-wrap { width: 100%; }
      .replenishment-market-card-actions { flex-direction: column; }
      .replenishment-market-card-actions .btn-refresh { width: 100%; }
      .replenishment-name-row .replenishment-preset-name,
      .replenishment-item-input,
      .replenishment-inline-row .btn-refresh,
      .replenishment-market-card-actions .btn-refresh,
      .replenishment-market-card-actions .replenishment-download-btn,
      .replenishment-market-card-actions .replenishment-download-inline {
        height: 40px;
        min-height: 40px;
        line-height: 1.2;
        box-sizing: border-box;
      }
    }
    .trend-arrow { font-size: 0.9rem; font-weight: 600; margin-left: 2px; }
    .trend-arrow.up { color: var(--success) !important; }
    .trend-arrow.down { color: var(--danger) !important; }
    .trend-arrow.flat { color: var(--muted) !important; }
    .tax-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
    .tax-toolbar label { font-size: 0.8rem; color: var(--text-secondary); }
    .tax-toolbar select,
    .tax-toolbar input[type="date"],
    .tax-toolbar input[type="month"] { height: var(--control-height); min-height: var(--control-height); padding: 0 var(--control-padding-x); font-size: var(--control-font-size); border-radius: var(--control-radius); border: 1px solid var(--border); background: var(--card); color: var(--text); box-sizing: border-box; }
    .tax-toolbar select:disabled,
    .tax-toolbar input:disabled {
      background: #eef2f7;
      color: #94a3b8;
      border-color: #d8dee7;
      cursor: not-allowed;
      opacity: 1;
    }
    .tax-date-select { min-width: 120px; font-size: 0.8rem; }
    .tax-mode-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .tax-mode-label { font-size: 0.8rem; color: var(--text-secondary); }
    .tax-mode-opt { font-size: 0.875rem; cursor: pointer; }
    .tax-mode-opt input { margin-right: 4px; }
    .tax-mode-block { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .tax-mode-block .tax-date-row span { font-size: 0.8rem; color: var(--text-secondary); }
    .tax-date-select[type="date"],
    .tax-date-select[type="month"] { height: var(--control-height); min-height: var(--control-height); padding: 0 var(--control-padding-x); border-radius: var(--control-radius); border: 1px solid var(--border); background: var(--card); color: var(--text); box-sizing: border-box; }
    .tax-date-row { display: flex; align-items: center; gap: 6px; }
    @media (max-width: 640px) {
      .tax-toolbar { align-items: center; flex-wrap: wrap; }
      .tax-toolbar select,
      .tax-toolbar input[type="date"],
      .tax-toolbar input[type="month"],
      .tax-toolbar .btn-fetch,
      .tax-month-wrap select.tax-date-select {
        height: var(--mobile-toolbar-height) !important;
        min-height: var(--mobile-toolbar-height) !important;
        max-height: var(--mobile-toolbar-height) !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
        line-height: var(--mobile-toolbar-height) !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        margin: 0 !important;
        vertical-align: top !important;
      }
      .tax-toolbar .btn-fetch {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.2 !important;
      }
      .tax-mode-block { gap: 6px; }
      .tax-mode-block .tax-date-row { width: auto; flex: 0 0 auto; }
      .tax-mode-block .tax-date-row label { font-size: 0.75rem; }
      .tax-mode-block .tax-date-row .tax-date-select { min-width: 3.5em; font-size: 0.75rem; padding: 4px 6px; }
      .tax-mode-block .tax-date-row:first-child .tax-date-select { min-width: 4em; }
      .tax-mode-block .tax-date-row span { font-size: 0.75rem; }
    }
    .tax-month-range { display: inline-flex; align-items: center; gap: 4px; font-size: 0.875rem; }
    .tax-month-range span { color: var(--text-secondary); }
    .tax-toolbar .btn-fetch { padding: 6px 14px; font-size: 0.875rem; border-radius: var(--radius-sm); border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
    .tax-toolbar .btn-fetch:hover { opacity: 0.9; }
    .tax-toolbar .btn-fetch:disabled { opacity: 0.6; cursor: not-allowed; }
    
    .tax-progress { font-size: 0.8125rem; color: var(--muted); min-height: 1.4em; }
    .tax-progress.busy { color: var(--accent); }
    .tax-progress.error { color: var(--danger); }
    .tax-ratio-toggle-btn {
      height: 36px;
      min-height: 36px;
      min-width: 96px;
      padding: 0 12px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      color: var(--text-secondary);
      font-size: 0.82rem;
      font-weight: 600;
      line-height: 1;
      cursor: pointer;
      white-space: nowrap;
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .tax-ratio-toggle-btn:hover {
      border-color: var(--border-strong, #B9C0CA);
      background: var(--surface-muted, #F1F3F5);
      color: var(--text-primary);
    }
    .tax-ratio-toggle-btn.is-active {
      border-color: var(--brand, #1769E0);
      color: var(--brand, #1769E0);
      background: rgba(23, 105, 224, 0.08);
    }
    #panelTaxContent { background: #fff; }
    .tax-section { background: #fff; padding: 14px 0; }
    .tax-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); -webkit-overflow-scrolling: touch; background: #fff; }
    .tax-table-wrap::after { content: ''; display: block; height: 0; }
    .tax-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; background: #fff; table-layout: fixed; }
    .tax-table th:nth-child(1), .tax-table td:nth-child(1) { width: 3.2em; min-width: 3.2em; max-width: 3.2em; }
    .tax-table th:nth-child(2), .tax-table td:nth-child(2) { width: 3.6em; min-width: 3.6em; max-width: 3.6em; }
    .tax-table th:nth-child(3), .tax-table td:nth-child(3) { width: 4.4em; min-width: 4.4em; max-width: 4.4em; }
    .tax-table th:nth-child(4), .tax-table td:nth-child(4) { width: 4.8em; min-width: 4.8em; max-width: 4.8em; }
    .tax-table .tax-col-amount,
    .tax-table .tax-col-sales-total,
    .tax-table .tax-col-expense-total,
    .tax-table .tax-col-net { width: 7.6em; min-width: 7.6em; max-width: 7.6em; }
    .tax-table .tax-col-fee { width: 6.4em; min-width: 6.4em; max-width: 6.4em; }
    .tax-updated-time { margin-left: auto; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
    @media (max-width: 640px) {
      .tax-updated-time { width: 100%; margin-left: 0; margin-top: 2px; text-align: left; }
    }
    .stl-period-wrap { position: relative; display: inline-block; }
    .stl-period-trigger { display: none; }
    .stl-period-list { display: none; }
    .tax-stl-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .tax-month-wrap { position: relative; display: inline-block; }
    .tax-month-wrap select.tax-date-select {
      display: inline-block !important;
      appearance: auto;
      -webkit-appearance: menulist;
      font-size: 0.82rem;
      padding: 6px 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--card);
      color: var(--text);
      height: 38px;
      line-height: 1.2;
      box-sizing: border-box;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .tax-year-wrap select.tax-date-select { width: 7.0em; min-width: 7.0em; }
    .tax-month-wrap:not(.tax-year-wrap):not(.tax-region-wrap):not(.tax-period-wrap) select.tax-date-select { width: 4.8em; min-width: 4.8em; }
    .tax-region-wrap select.tax-date-select { width: 5.2em; min-width: 5.2em; }
    .tax-period-wrap { min-width: 18.2em; }
    .tax-period-wrap select.tax-date-select { width: 18.2em; min-width: 18.2em; font-size: 0.8rem; letter-spacing: 0; text-overflow: clip; }
    .tax-month-trigger,
    .tax-month-list,
    .tax-region-wrap .tax-month-trigger,
    .tax-period-wrap .tax-month-trigger,
    .tax-region-wrap .tax-month-list,
    .tax-period-wrap .tax-month-list { display: none !important; }
    @media (max-width: 1024px) {
      .tax-year-wrap select.tax-date-select { width: 6.4em; min-width: 6.4em; }
      .tax-month-wrap:not(.tax-year-wrap):not(.tax-region-wrap):not(.tax-period-wrap) select.tax-date-select { width: 4.2em; min-width: 4.2em; }
      .tax-region-wrap select.tax-date-select { width: 4.8em; min-width: 4.8em; }
      .tax-period-wrap { min-width: min(18.2em, 100%); }
      .tax-period-wrap select.tax-date-select { width: 100%; min-width: 0; font-size: 0.8rem; letter-spacing: 0; text-overflow: clip; }
    }
@media (max-width: 640px) {
      .tax-stl-toolbar {
        display: grid;
        grid-template-columns: auto 5.4em auto minmax(0, 1fr);
        align-items: center;
        column-gap: 8px;
        row-gap: 8px;
      }
      .tax-region-wrap { width: 5.4em; min-width: 5.4em; }
      .tax-period-wrap { min-width: 0; width: 100%; }
      .tax-region-wrap select.tax-date-select { width: 100%; min-width: 0; }
      .tax-period-wrap select.tax-date-select { width: 100%; min-width: 0; font-size: 0.8rem; letter-spacing: 0; text-overflow: clip; }
    }
    .tax-month-list { display: none; position: fixed; z-index: 1000; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; max-height: 50vh; overflow-x: hidden; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
    .tax-month-list.is-open { display: block; }
    .tax-month-option { padding: 10px 12px; white-space: nowrap; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 0.8rem; }
    .tax-month-option:last-child { border-bottom: none; }
    .tax-month-option.disabled {
  color: #b4bcc8;
  background: transparent;
  cursor: not-allowed;
}

.tax-month-option.selected { background: rgba(var(--accent-rgb, 59, 130, 246), 0.12); }
    .tax-picker-sheet { display: none; position: fixed; inset: 0; z-index: 1200; }
    .tax-picker-sheet.is-open { display: block; }
    .tax-picker-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.22); }
    .tax-picker-panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.18); padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); max-height: min(60vh, 420px); display: flex; flex-direction: column; }
    .tax-picker-handle { width: 42px; height: 4px; border-radius: 999px; background: #cbd5e1; margin: 2px auto 10px; }
    .tax-picker-title { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); text-align: center; margin-bottom: 8px; }
    .tax-picker-options { overflow-y: auto; }
    .tax-picker-sheet .tax-month-option { font-size: 1rem; padding: 14px 16px; border-bottom: none; border-radius: 12px; margin-bottom: 4px; }
    .tax-picker-sheet .tax-month-option.selected { font-weight: 600; color: var(--accent); }
    .tax-picker-sheet.is-period-picker .tax-picker-panel { left: 10px; right: 10px; }
    .tax-picker-sheet.is-period-picker .tax-month-option { font-size: 0.84rem; white-space: nowrap; overflow-x: auto; text-overflow: clip; }
    @media (max-width: 1024px) {
      .tax-toolbar { margin-bottom: 4px; }
      .tax-section { padding: 6px 0; }
      .tax-section-label { margin-bottom: 4px; }
      .tax-section .tax-section-label + .tax-section-label { margin-top: 2px; }
      .tax-month-trigger { font-size: 0.75rem; padding: 4px 6px; width: 4.2em; min-width: 4.2em; }
      .tax-year-wrap .tax-month-trigger { width: 5.2em; min-width: 5.2em; }
      .tax-region-wrap .tax-month-trigger { width: 4.8em; min-width: 4.8em; }
      .tax-period-wrap .tax-month-trigger { width: 11.8em; min-width: 11.8em; }
      .tax-period-wrap .tax-month-list { min-width: 11.8em; }
    }
    /* 中间数值列平分剩余宽度 */
    .tax-table th, .tax-table td { padding: 8px 8px; border-bottom: 1px solid var(--border); background: #fff; }
    .tax-table th { color: var(--text-secondary); font-weight: 600; text-align: left; white-space: nowrap; font-size: 0.76rem; }
    .tax-table th.num { text-align: right; }
    .tax-table th.tax-th-dual { font-weight: 600; line-height: 1.15; text-align: right; }
    .tax-table .tax-col-group {
      background: linear-gradient(180deg, rgba(59, 130, 246, 0.03), rgba(59, 130, 246, 0.01));
    }
    .tax-table th.tax-col-group,
    .tax-table td.tax-col-group {
      box-shadow: inset 1px 0 0 rgba(148, 163, 184, 0.22), inset -1px 0 0 rgba(148, 163, 184, 0.14);
    }
    .tax-table th.tax-col-net,
    .tax-table td.tax-col-net {
      background: linear-gradient(180deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.02));
    }
    /* 屏幕变窄后（但尚未进入手机布局）：只保留站点/币种固定，其余列自动分配宽度，避免重叠 */
    @media (max-width: 900px) and (min-width: 769px) {
      .tax-table { table-layout: auto; }
      .tax-table th:nth-child(n+3), .tax-table td:nth-child(n+3) {
        width: auto;
        min-width: auto;
        max-width: none;
      }
    }
    @media (max-width: 768px) {
      .tax-table-wrap { margin-bottom: 4px; overflow-x: visible; }
      .tax-table-wrap::after { content: none; }
      .tax-table { min-width: 0; width: 100%; font-size: 0.75rem; table-layout: auto; }
      .tax-table th, .tax-table td { padding: 6px 8px; white-space: nowrap; }
      .tax-table th { font-size: 0.75rem; background: #fff; }
      .tax-table tr.tax-summary-row td:first-child { background: #fff; }
      .tax-table td.tax-cell-dual { padding: 4px 8px; }
      .tax-table td.tax-cell-dual .tax-cell-line { line-height: 1.3; }
      .tax-table td.tax-cell-dual .tax-cell-line:first-child { display: none; }
      .tax-table.tax-stl-table td.tax-cell-dual .tax-cell-line:first-child { display: block; }
      .tax-table.tax-order-table td.tax-cell-dual .tax-cell-line:first-child { display: block; }
      .tax-table.tax-order-table td { vertical-align: middle; }
      .tax-m-hide { display: none !important; }
      .tax-table .tax-col-group,
      .tax-table th.tax-col-net,
      .tax-table td.tax-col-net { background: #fff; box-shadow: none; }
    }
    .tax-table th.tax-th-dual .sub { font-size: 0.75em; font-weight: 500; color: var(--muted); display: none; }
    .tax-table td.num { text-align: right; font-variant-numeric: tabular-nums; vertical-align: middle; }
    .tax-table td.tax-cell-dual { padding: 4px 8px; vertical-align: middle; text-align: right; }
    .tax-table td.tax-cell-dual .tax-cell-line { display: block; line-height: 1.18; font-variant-numeric: tabular-nums; text-align: right; }
    .tax-table td.tax-cell-dual .tax-cell-line:first-child { color: var(--text-secondary); font-size: 0.82em; }
    .tax-table tr.tax-summary-row td.num,
    .tax-table tr.tax-summary-row td.tax-cell-dual { text-align: right; }
    .tax-table tr.tax-summary-row td.tax-col-group,
    .tax-table tr.tax-summary-row td.tax-col-net { background: rgba(15, 23, 42, 0.015); }
    .tax-table tbody tr:hover td { background: #f8f9fa; }
    .tax-table tbody tr.tax-summary-row:hover td { background: #fff; }
    .tax-table tr.tax-summary-row td { font-weight: 600; border-top: 2px solid var(--border); }
    .tax-table tr.tax-summary-row td:first-child { white-space: nowrap; writing-mode: horizontal-tb; }
    .tax-table tr.tax-ratio-row td {
      border-top: 1px solid var(--border);
      background: #fbfcfe;
      color: var(--text-secondary);
      font-size: 0.72rem;
      vertical-align: middle;
    }
    .tax-table tr.tax-ratio-row.is-hidden {
      display: none;
    }
    .tax-table tr.tax-ratio-row td:first-child {
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
    }
    .tax-table td.tax-ratio-cell .tax-ratio-inline {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 4px;
      width: 100%;
      line-height: 1.15;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .tax-table td.tax-ratio-cell .tax-ratio-inline-trend {
      gap: 0;
    }
    .tax-table td.tax-ratio-cell .tax-change-value {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      width: 100%;
      line-height: 1.15;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      color: var(--muted);
    }
    .tax-table td.tax-ratio-cell .tax-change-value.up { color: var(--danger); }
    .tax-table td.tax-ratio-cell .tax-change-value.down { color: var(--success); }
    .tax-table td.tax-ratio-cell small {
      color: var(--muted);
      font-size: 0.86em;
    }
    .tax-table td.tax-ratio-cell .tax-ratio-previous {
      color: var(--text-secondary);
    }
    .tax-table td.tax-ratio-cell small.up { color: var(--danger); }
    .tax-table td.tax-ratio-cell small.down { color: var(--success); }
    .tax-section .section-title { font-size: 0.9375rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
    .tax-section-label { font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
    .tax-recent-list { list-style: none; padding: 0; margin: 0; font-size: 0.875rem; }
    .tax-recent-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
    .tax-recent-list li:last-child { border-bottom: none; }
    .tax-recent-ym { font-weight: 600; margin-right: 8px; }
    .invoice-workspace {
      display: grid;
      gap: var(--table-page-gap);
      padding: var(--table-page-pad-top) var(--table-page-pad-x) var(--table-page-pad-bottom);
      font-variant-numeric: tabular-nums;
      max-width: 100%;
      overflow-x: hidden;
      min-height: calc(100vh - 96px);
      grid-template-rows: max-content minmax(0, 1fr);
    }
    .invoice-workspace > *,
    .invoice-table-panel,
    .invoice-table-wrap {
      min-width: 0;
    }
    .invoice-upload-trigger {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 36px;
      width: 100%;
      margin-left: 0;
      padding: 0 14px;
      border: 1px solid var(--accent);
      border-radius: 6px;
      background: var(--accent);
      color: #fff;
      font-size: 0.82rem;
      font-weight: 650;
      text-decoration: none;
      cursor: pointer;
      white-space: nowrap;
    }
    .invoice-table-panel {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      overflow: hidden;
      min-height: 0;
    }
    .invoice-toolbar {
      display: grid;
      --invoice-filter-width: 108px;
      gap: 8px;
      overflow-x: hidden;
      overflow-y: hidden;
    }
    .invoice-toolbar-row {
      display: grid;
      align-items: end;
      gap: 8px;
      min-width: 0;
    }
    .invoice-toolbar-main {
      grid-template-columns: repeat(3, var(--invoice-filter-width)) minmax(180px, 1fr) repeat(3, var(--invoice-filter-width));
    }
    .invoice-toolbar-secondary {
      grid-template-columns: var(--invoice-filter-width) minmax(0, 1fr) auto;
      justify-content: stretch;
    }
    .invoice-toolbar label {
      display: grid;
      gap: 4px;
      min-width: 0;
      color: var(--text-secondary);
      font-size: 0.75rem;
      font-weight: 500;
    }
    .invoice-toolbar input,
    .invoice-toolbar select {
      height: 36px;
      min-width: 0;
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 0 10px;
      color: var(--text);
      background: #fff;
      font-size: 0.82rem;
      box-sizing: border-box;
    }
    .invoice-toolbar input:focus,
    .invoice-toolbar select:focus,
    .invoice-toolbar input:focus-visible,
    .invoice-toolbar select:focus-visible {
      border-color: #b9c0ca;
      box-shadow: none;
      outline: none;
    }
    .invoice-toolbar select {
      cursor: pointer;
    }
    .invoice-filter-search input {
      min-width: 0;
    }
    .invoice-upload-trigger {
      align-self: end;
    }
    .invoice-toolbar-message {
      display: flex;
      align-items: flex-end;
      align-self: end;
      height: 36px;
      padding-bottom: 1px;
      min-width: 0;
      color: var(--danger);
      font-size: 0.68rem;
      font-weight: 500;
      line-height: 1.2;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .invoice-filter-reset {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      align-self: end;
      height: 36px;
      width: 100%;
      min-width: 0;
      padding: 0 14px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      color: var(--text-secondary);
      font-size: 0.82rem;
      font-weight: 650;
      cursor: pointer;
      white-space: nowrap;
      box-sizing: border-box;
    }
    .invoice-filter-reset:hover {
      color: var(--text);
      background: #f6f8fa;
    }
    .invoice-total-summary {
      grid-column: 5;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      justify-content: flex-end;
      gap: 3px;
      min-height: 36px;
      color: var(--text-secondary);
      font-size: 0.78rem;
      text-align: right;
      white-space: nowrap;
    }
    .invoice-total-summary span {
      line-height: 1.1;
    }
    .invoice-total-summary strong {
      color: var(--text);
      font-size: 0.96rem;
      font-weight: 700;
      line-height: 1.1;
      font-variant-numeric: tabular-nums;
    }
    .invoice-message {
      color: var(--text-secondary);
      font-size: 0.78rem;
      min-height: 18px;
    }
    .invoice-message.show {
      padding: 5px 10px;
      border-radius: 999px;
      background: #f6f8fa;
    }
    .invoice-table-wrap {
      overflow-y: auto;
      overflow-x: hidden;
      max-height: calc(100vh - 172px);
    }
    html.embed-workbench #panelInvoiceContent,
    html.embed-workbench .invoice-workspace {
      height: 100%;
      min-height: 0;
    }
    html.embed-workbench #panelInvoice.tab-panel.active,
    html.embed-workbench #panelInvoiceContent {
      display: grid;
      grid-template-rows: minmax(0, 1fr);
      height: 100%;
      min-height: 0;
    }
    html.embed-workbench .invoice-workspace {
      padding: var(--table-page-pad-top) var(--table-page-pad-x) var(--table-page-pad-bottom);
      align-content: start;
      overflow: hidden;
    }
    html.embed-workbench .invoice-table-panel {
      display: grid;
      align-self: stretch;
      min-height: 0;
    }
    html.embed-workbench .invoice-table-wrap {
      min-height: 0;
      max-height: calc(100vh - 172px);
    }
    .invoice-table {
      width: 100%;
      min-width: 0;
      border-collapse: collapse;
      table-layout: fixed;
      font-size: 0.78rem;
    }
    .invoice-table th:nth-child(1),
    .invoice-table td:nth-child(1) {
      width: 13.5%;
    }
    .invoice-table th:nth-child(2),
    .invoice-table td:nth-child(2) {
      width: 5.5%;
    }
    .invoice-table th:nth-child(3),
    .invoice-table td:nth-child(3) {
      width: 15.5%;
    }
    .invoice-table th:nth-child(4),
    .invoice-table td:nth-child(4) {
      width: 15.5%;
    }
    .invoice-table th:nth-child(5),
    .invoice-table td:nth-child(5) {
      width: 8.5%;
    }
    .invoice-table th:nth-child(6),
    .invoice-table td:nth-child(6) {
      width: 9.5%;
    }
    .invoice-table th:nth-child(7),
    .invoice-table td:nth-child(7) {
      width: 7.5%;
    }
    .invoice-table th:nth-child(8),
    .invoice-table td:nth-child(8) {
      width: 10%;
    }
    .invoice-table th:nth-child(9),
    .invoice-table td:nth-child(9) {
      width: 14.5%;
    }
    .invoice-table th:last-child,
    .invoice-table td:last-child {
      text-align: right;
    }
    .invoice-table th,
    .invoice-table td {
      height: 44px;
      padding: 8px 10px;
      border-bottom: 1px solid var(--border);
      background: #fff;
      color: var(--text);
      vertical-align: middle;
      overflow-x: auto;
      overflow-y: hidden;
      white-space: nowrap;
      scrollbar-width: none;
    }
    .invoice-table th::-webkit-scrollbar,
    .invoice-table td::-webkit-scrollbar {
      display: none;
    }
    .invoice-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      height: 36px;
      background: #f6f8fa;
      color: var(--text-secondary);
      font-size: 0.74rem;
      font-weight: 650;
      text-align: left;
    }
    .invoice-table th.num,
    .invoice-table td.num {
      text-align: right;
    }
    .invoice-th-sort {
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 4px;
      width: 100%;
      min-width: 0;
      padding: 0;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      font-weight: inherit;
      text-align: inherit;
      cursor: pointer;
      white-space: nowrap;
    }
    .invoice-table th.num .invoice-th-sort {
      justify-content: flex-end;
    }
    .invoice-th-sort-label {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .invoice-th-sort-indicator {
      flex: 0 0 auto;
      width: 12px;
      color: #94a3b8;
      font-size: 0.68rem;
      line-height: 1;
    }
    .invoice-th-sort.active {
      color: var(--accent);
    }
    .invoice-th-sort.active .invoice-th-sort-indicator {
      color: var(--accent);
    }
    .invoice-table .income { color: #168a4a; }
    .invoice-table .expense { color: #c7352b; }
    .table-pagination {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      height: 36px;
      padding: 0 10px;
      border-top: 1px solid var(--border);
      background: #fff;
      color: var(--text-secondary);
      font-size: 0.74rem;
      white-space: nowrap;
    }
    .table-pagination-actions {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .table-pagination button {
      height: 26px;
      min-width: 58px;
      padding: 0 9px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      color: var(--text-secondary);
      font-size: 0.72rem;
      font-weight: 650;
      cursor: pointer;
    }
    .table-pagination button:not(:disabled):hover {
      background: #f6f8fa;
      color: var(--text);
    }
    .table-pagination button:disabled {
      cursor: not-allowed;
      opacity: 0.45;
    }
    .invoice-direction {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      min-height: 24px;
      width: fit-content;
      max-width: 100%;
      padding: 2px 7px;
      border-radius: 999px;
      font-size: 0.7rem !important;
      font-weight: 700;
      line-height: 18px;
      white-space: nowrap;
    }
    .invoice-direction.income { color: #168a4a; background: #e9f7ef; }
    .invoice-direction.expense { color: #c7352b; background: #fff0ee; }
    .invoice-table tbody tr:nth-child(even) td {
      background: #fafbfc;
    }
    .invoice-row-main {
      display: grid;
      gap: 2px;
      width: 100%;
      border: 0;
      background: transparent;
      padding: 0;
      color: var(--text);
      text-align: left;
      cursor: pointer;
    }
    .invoice-row-main .invoice-number-text {
      display: block;
      font-size: 0.78rem;
      font-weight: 400;
      line-height: 1.25;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .invoice-table td span.invoice-party-name {
      color: var(--text);
      font-size: 0.78rem;
      font-weight: 400;
      line-height: 1.25;
    }
    .invoice-table td strong {
      display: block;
      font-size: 0.78rem;
      font-weight: 400;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .invoice-row-main span,
    .invoice-table td span,
    .invoice-table td small {
      display: block;
      color: var(--text-secondary);
      font-size: 0.72rem;
      line-height: 1.35;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .invoice-table td span.invoice-status {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 56px;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: 0.72rem;
      font-weight: 600;
      line-height: 1;
      box-sizing: border-box;
      vertical-align: middle;
    }
    .invoice-pill-select {
      appearance: none;
      -webkit-appearance: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      max-width: 100%;
      min-width: 58px;
      height: 26px;
      padding: 0 9px;
      border: 1px solid transparent;
      border-radius: 999px;
      background-color: #f1f3f5;
      background-image: none;
      color: var(--text-secondary);
      font-size: 0.72rem;
      font-weight: 600;
      line-height: 1;
      text-align: center;
      text-align-last: center;
      cursor: pointer;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .invoice-pill-select::-ms-expand {
      display: none;
    }
    .invoice-pill-invoice-status {
      min-width: 56px;
    }
    .invoice-pill-business-category {
      min-width: 72px;
    }
    .invoice-pill-accounting-status {
      min-width: 60px;
    }
    .invoice-pill-payment-status {
      min-width: 64px;
    }
    .invoice-pill-select:focus,
    .invoice-pill-select:focus-visible {
      border-color: #b9c0ca;
      outline: none;
      box-shadow: none;
    }
    .invoice-pill-select:disabled {
      cursor: wait;
      opacity: 0.7;
    }
    .invoice-pill-select.auto-set { background: rgba(9, 105, 218, 0.1); color: var(--accent); }
    .invoice-pill-select.user-set { background: #f1f3f5; color: var(--text-secondary); }
    .invoice-pill-select.success { background: rgba(26, 127, 55, 0.1); color: var(--success); }
    .invoice-pill-select.warn { background: rgba(154, 103, 0, 0.12); color: var(--warning); }
    .invoice-pill-select.danger { background: rgba(207, 34, 46, 0.1); color: var(--danger); }
    .invoice-pill-select.muted { background: #f1f3f5; color: var(--text-secondary); }
    .invoice-status.success { background: rgba(26, 127, 55, 0.1); color: var(--success); }
    .invoice-status.warn { background: rgba(154, 103, 0, 0.12); color: var(--warning); }
    .invoice-status.danger { background: rgba(207, 34, 46, 0.1); color: var(--danger); }
    .invoice-status.muted { background: #f1f3f5; color: var(--text-secondary); }
    .invoice-preview-link {
      border: 0;
      background: transparent;
      color: var(--accent);
      font-size: 0.78rem;
      font-weight: 650;
      cursor: pointer;
      padding: 0;
    }
    .invoice-preview-link + .invoice-preview-link {
      margin-left: 10px;
    }
    .invoice-preview-link.danger {
      color: var(--danger);
    }
    .invoice-empty,
    .invoice-detail-empty {
      color: var(--text-secondary);
      padding: 18px;
      font-size: 0.84rem;
      text-align: center;
    }
    .invoice-actions-cell {
      white-space: nowrap;
      padding-right: 16px;
      overflow-x: hidden;
      text-align: right;
    }
    .invoice-preview-overlay {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: grid;
      place-items: center;
      padding: 24px;
      background: rgba(23, 32, 42, 0.48);
    }
    .invoice-preview-dialog {
      width: min(980px, 100%);
      max-height: min(860px, calc(100vh - 48px));
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 18px 48px rgba(16, 24, 40, 0.18);
      overflow: hidden;
    }
    .invoice-preview-dialog-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border-bottom: 1px solid var(--border);
    }
    .invoice-preview-dialog-head strong,
    .invoice-preview-dialog-head span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .invoice-preview-dialog-head strong {
      color: var(--text);
      font-size: 0.94rem;
      line-height: 1.4;
      font-weight: 650;
    }
    .invoice-preview-dialog-head span {
      color: var(--text-secondary);
      font-size: 0.76rem;
    }
    .invoice-preview-dialog-actions {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }
    .invoice-preview-dialog-actions a,
    .invoice-preview-dialog-actions button {
      display: inline-grid;
      place-items: center;
      height: 32px;
      min-width: 52px;
      padding: 0 10px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      color: var(--text);
      font-size: 0.78rem;
      font-weight: 650;
      line-height: 1;
      text-decoration: none;
      cursor: pointer;
      box-sizing: border-box;
    }
    .invoice-preview-dialog-actions .primary {
      border-color: var(--accent);
      background: var(--accent);
      color: #fff;
    }
    .invoice-preview-dialog-body {
      min-height: 0;
      overflow: auto;
      background: #f6f8fa;
    }
    .invoice-preview-dialog-body img {
      width: 100%;
      height: auto;
      display: block;
      background: #fff;
    }
    .invoice-edit-dialog {
      width: min(820px, 100%);
      max-height: min(760px, calc(100vh - 48px));
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 18px 48px rgba(16, 24, 40, 0.18);
      overflow: hidden;
    }
    .invoice-edit-body {
      min-height: 0;
      overflow: auto;
      padding: 14px;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }
    .invoice-edit-body .invoice-edit-field-wide,
    .invoice-edit-body .invoice-edit-party-row {
      grid-column: 1 / -1;
    }
    .invoice-edit-party-row {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      min-width: 0;
    }
    .invoice-edit-body label {
      display: grid;
      gap: 4px;
      min-width: 0;
      color: var(--text-secondary);
      font-size: 0.75rem;
      font-weight: 500;
    }
    .invoice-edit-body input,
    .invoice-edit-body select,
    .invoice-edit-body textarea {
      width: 100%;
      min-width: 0;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      color: var(--text);
      font-size: 0.82rem;
    }
    .invoice-edit-body input,
    .invoice-edit-body select {
      height: 36px;
      padding: 0 10px;
    }
    .invoice-edit-locked input:disabled {
      border-color: #d8dee6;
      background: #f6f8fa;
      color: var(--text-secondary);
      opacity: 1;
      cursor: not-allowed;
    }
    .invoice-edit-body textarea {
      min-height: 72px;
      padding: 8px 10px;
      resize: vertical;
      line-height: 1.4;
    }
    .bank-workspace {
      display: grid;
      grid-template-rows: max-content minmax(0, 1fr);
      gap: var(--table-page-gap);
      min-height: calc(100vh - 96px);
      max-width: 100%;
      padding: var(--table-page-pad-top) var(--table-page-pad-x) var(--table-page-pad-bottom);
      overflow-x: hidden;
      font-variant-numeric: tabular-nums;
    }
    .bank-workspace > *,
    .bank-table-panel,
    .bank-table-wrap { min-width: 0; }
    .bank-toolbar { display: grid; gap: 8px; --bank-filter-width: 108px; }
    .bank-toolbar-row { display: grid; align-items: end; gap: 8px; min-width: 0; }
    .bank-toolbar-main { grid-template-columns: repeat(3, var(--bank-filter-width)) minmax(180px, 1fr) repeat(3, var(--bank-filter-width)); }
    .bank-toolbar-secondary { grid-template-columns: var(--bank-filter-width) var(--bank-filter-width) var(--bank-filter-width) minmax(180px, 1fr) auto; justify-content: stretch; }
    .bank-filter-field {
      display: grid;
      gap: 4px;
      min-width: 0;
      color: var(--text-secondary);
      font-size: 0.75rem;
      font-weight: 500;
    }
    .bank-filter-field input,
    .bank-filter-field select,
    .bank-edit-body select,
    .bank-edit-body textarea {
      width: 100%;
      min-width: 0;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      color: var(--text);
      font-size: 0.82rem;
      box-sizing: border-box;
    }
    .bank-filter-field input,
    .bank-filter-field select,
    .bank-edit-body select { height: 36px; padding: 0 10px; }
    .bank-filter-field input::-webkit-outer-spin-button,
    .bank-filter-field input::-webkit-inner-spin-button {
      margin: 0;
      -webkit-appearance: none;
    }
    .bank-edit-body textarea { min-height: 92px; padding: 8px 10px; resize: vertical; }
    .bank-upload-trigger,
    .bank-export-trigger,
    .bank-filter-reset {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 36px;
      width: 100%;
      min-width: 0;
      padding: 0 12px;
      border-radius: 6px;
      font-size: 0.82rem;
      font-weight: 650;
      cursor: pointer;
      white-space: nowrap;
      box-sizing: border-box;
    }
    .bank-upload-trigger { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
    .bank-export-trigger,
    .bank-filter-reset { border: 1px solid var(--border); background: #fff; color: var(--text-secondary); }
    .bank-export-trigger:hover,
    .bank-filter-reset:hover { background: #f6f8fa; color: var(--text); }
    .bank-table-panel {
      min-height: 0;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      overflow: hidden;
    }
    .bank-table-wrap {
      max-height: calc(100vh - 172px);
      overflow-x: hidden;
      overflow-y: auto;
    }
    html.embed-workbench #panelBankContent,
    html.embed-workbench .bank-workspace {
      height: 100%;
      min-height: 0;
    }
    html.embed-workbench #panelBank.tab-panel.active,
    html.embed-workbench #panelBankContent {
      display: grid;
      grid-template-rows: minmax(0, 1fr);
      height: 100%;
      min-height: 0;
    }
    html.embed-workbench .bank-workspace {
      padding: var(--table-page-pad-top) var(--table-page-pad-x) var(--table-page-pad-bottom);
      align-content: start;
      overflow: hidden;
    }
    html.embed-workbench .bank-table-panel {
      display: grid;
      align-self: start;
      height: auto;
      min-height: 0;
    }
    html.embed-workbench .bank-table-wrap {
      min-height: 0;
      max-height: calc(100vh - 172px);
    }
    .bank-table {
      width: 100%;
      min-width: 0;
      border-collapse: separate;
      border-spacing: 0;
      table-layout: fixed;
      font-size: 0.78rem;
    }
    .bank-table th:nth-child(1),
    .bank-table td:nth-child(1) { width: 90px; }
    .bank-table th:nth-child(2),
    .bank-table td:nth-child(2) { width: 54px; }
    .bank-table th:nth-child(3),
    .bank-table td:nth-child(3) { width: 116px; }
    .bank-table th:nth-child(3),
    .bank-table td:nth-child(3),
    .bank-table th:nth-child(4),
    .bank-table td:nth-child(4),
    .bank-table th.num,
    .bank-table td.num {
      text-align: right;
    }
    .bank-table th:nth-child(4),
    .bank-table td:nth-child(4) { width: 112px; }
    .bank-table th:nth-child(5),
    .bank-table td:nth-child(5) { width: 16%; }
    .bank-table th:nth-child(6),
    .bank-table td:nth-child(6) { width: 14%; }
    .bank-table th:nth-child(7),
    .bank-table td:nth-child(7) { width: 98px; }
    .bank-table th:nth-child(8),
    .bank-table td:nth-child(8) { width: 112px; }
    .bank-table th:nth-child(9),
    .bank-table td:nth-child(9) { width: 13%; }
    .bank-table th:nth-child(7),
    .bank-table td:nth-child(7),
    .bank-table th:nth-child(8),
    .bank-table td:nth-child(8) {
      text-align: center;
    }
    .bank-table th:nth-child(10),
    .bank-table td:nth-child(10) { width: 82px; }
    .bank-table th:nth-child(11),
    .bank-table td:nth-child(11) { width: 54px; }
    .bank-table th,
    .bank-table td {
      padding: 7px 6px;
      border-bottom: 1px solid var(--border);
      text-align: left;
      vertical-align: middle;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .bank-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      height: 36px;
      background: #f6f8fa;
      color: var(--text-secondary);
      font-size: 0.74rem;
      font-weight: 650;
    }
    .bank-table tbody tr:nth-child(even) td { background: #fbfcfd; }
    .bank-table td strong,
    .bank-table td span {
      display: block;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .bank-table td strong {
      font-size: 0.78rem;
      font-weight: 400;
    }
    .bank-table td span { color: var(--text-secondary); font-size: 0.7rem; }
    .bank-table .num {
      text-align: right;
      justify-content: flex-end;
    }
    .bank-table td.num {
      padding-left: 0;
      padding-right: 14px;
    }
    .bank-table .income { color: #168a4a; }
    .bank-table .expense { color: #c7352b; }
    .bank-table .bank-balance-cell {
      color: var(--text);
      font-weight: 400;
    }
    .bank-direction,
    .bank-status {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      min-height: 24px;
      width: fit-content;
      max-width: 100%;
      padding: 2px 7px;
      border-radius: 999px;
      font-size: 0.7rem !important;
      font-weight: 700;
      line-height: 18px;
    }
    .bank-direction.income,
    .bank-status.success { color: #168a4a; background: #e9f7ef; }
    .bank-direction.expense { color: #c7352b; background: #fff0ee; }
    .bank-status.warn { color: #b86b00; background: #fff6e5; }
    .bank-status.muted { color: #526070; background: #f2f4f7; }
    .bank-pill-select {
      appearance: none;
      -webkit-appearance: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 76px;
      max-width: 100%;
      height: 26px;
      min-width: 0;
      margin: 0 auto;
      border: 1px solid transparent;
      border-radius: 999px;
      padding: 0 6px;
      background-color: #f1f3f5;
      background-image: none;
      color: var(--text-secondary);
      font-size: 0.7rem;
      font-weight: 650;
      text-align: center;
      text-align-last: center;
      cursor: pointer;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .bank-pill-select::-ms-expand { display: none; }
    .bank-pill-select.success { color: #168a4a; background: #e9f7ef; }
    .bank-pill-select.danger { color: #c7352b; background: #fff0ee; }
    .bank-pill-select.warn { color: #b86b00; background: #fff6e5; }
    .bank-pill-select.info { color: #0969da; background: #eef5ff; }
    .bank-pill-select.muted { color: #526070; background: #f2f4f7; }
    .bank-empty-profit-category {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      width: 76px;
      max-width: 100%;
      height: 26px;
      margin: 0 auto;
      color: var(--text-secondary);
      font-size: 0.7rem !important;
      font-weight: 650;
      line-height: 26px;
    }
    .bank-readonly-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 76px;
      max-width: 100%;
      height: 26px;
      min-width: 0;
      margin: 0 auto;
      border: 1px solid transparent;
      border-radius: 999px;
      padding: 0 6px;
      background: #f2f4f7;
      color: #526070;
      font-size: 0.7rem;
      font-weight: 650;
      line-height: 26px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .bank-actions-cell {
      white-space: nowrap;
      text-align: right;
    }
    .bank-table td.bank-actions-cell {
      display: table-cell;
      overflow: hidden;
      text-overflow: clip;
      vertical-align: middle;
    }
    .bank-link {
      border: 0;
      background: transparent;
      color: var(--accent);
      font-size: 0.76rem;
      font-weight: 650;
      cursor: pointer;
      padding: 0;
    }
    .bank-link.danger { color: #c7352b; }
    .bank-empty { color: var(--text-secondary); font-size: 0.84rem; }
    .bank-empty { padding: 32px 12px !important; text-align: center !important; }
    .bank-toolbar-message {
      grid-column: 4;
      grid-row: 1;
      display: flex;
      align-items: flex-end;
      align-self: end;
      height: 36px;
      padding-bottom: 1px;
      min-width: 0;
      font-size: 0.68rem;
      font-weight: 500;
      line-height: 1.2;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .bank-toolbar-message.success { color: #168a4a; }
    .bank-toolbar-message.danger { color: #c7352b; }
    .bank-total-group {
      grid-column: 5;
      grid-row: 1;
      display: grid;
      grid-template-columns: repeat(2, max-content);
      align-items: flex-end;
      justify-content: end;
      gap: 20px;
      min-width: 0;
      justify-self: end;
    }
    .bank-total-summary {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      justify-content: flex-end;
      gap: 3px;
      min-height: 36px;
      min-width: 92px;
      color: var(--text-secondary);
      font-size: 0.78rem;
      text-align: right;
      white-space: nowrap;
    }
    .bank-total-summary span {
      line-height: 1.1;
    }
    .bank-total-summary strong {
      display: block;
      width: 100%;
      color: var(--text);
      font-size: 0.96rem;
      font-weight: 700;
      line-height: 1.1;
      font-variant-numeric: tabular-nums;
      text-align: right;
    }
    .payroll-workspace {
      grid-template-rows: max-content minmax(0, 1fr) 176px;
      font-variant-numeric: tabular-nums;
    }
    .payroll-toolbar { --payroll-filter-width: 108px; }
    .payroll-toolbar-row {
      grid-template-columns: var(--payroll-filter-width) var(--payroll-filter-width) minmax(180px, 1fr) repeat(3, var(--payroll-filter-width)) minmax(120px, auto) minmax(120px, auto);
    }
    .payroll-filter-field {
      display: grid;
      gap: 4px;
      min-width: 0;
      color: var(--text-secondary);
      font-size: 0.75rem;
      font-weight: 500;
    }
    .payroll-filter-field input,
    .payroll-filter-field select,
    .payroll-form-grid input,
    .payroll-form-grid select {
      width: 100%;
      min-width: 0;
      height: 36px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      color: var(--text);
      font-size: 0.82rem;
      padding: 0 10px;
      box-sizing: border-box;
    }
    .payroll-primary-btn,
    .payroll-secondary-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 36px;
      width: 100%;
      min-width: 0;
      padding: 0 12px;
      border-radius: 6px;
      font-size: 0.82rem;
      font-weight: 650;
      cursor: pointer;
      white-space: nowrap;
      box-sizing: border-box;
    }
    .payroll-primary-btn { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
    .payroll-secondary-btn { border: 1px solid var(--border); background: #fff; color: var(--text-secondary); }
    .payroll-secondary-btn:hover { background: #f6f8fa; color: var(--text); }
    .payroll-total-summary {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      justify-content: flex-end;
      gap: 3px;
      min-height: 36px;
      color: var(--text-secondary);
      font-size: 0.78rem;
      text-align: right;
      white-space: nowrap;
    }
    .payroll-total-summary strong {
      color: var(--text);
      font-size: 0.96rem;
      font-weight: 700;
      line-height: 1.1;
    }
    .payroll-toolbar-message {
      align-self: end;
      justify-self: end;
      min-height: 18px;
      color: var(--text-secondary);
      font-size: 0.78rem;
      line-height: 1.2;
      text-align: right;
      white-space: nowrap;
    }
    .payroll-toolbar-message.success { color: var(--success); }
    .payroll-toolbar-message.danger { color: var(--danger); }
    html.embed-workbench #panelPayrollContent,
    html.embed-workbench .payroll-workspace {
      height: 100%;
      min-height: 0;
    }
    html.embed-workbench .payroll-workspace {
      padding-top: 0;
    }
    html.embed-workbench #panelPayroll.tab-panel.active,
    html.embed-workbench #panelPayrollContent {
      display: grid;
      grid-template-rows: minmax(0, 1fr);
      height: 100%;
      min-height: 0;
    }
    .payroll-table-panel,
    .payroll-month-panel {
      display: grid;
      min-height: 0;
    }
    .payroll-table-wrap {
      height: 100%;
      min-height: 260px;
      overflow-x: hidden;
      overflow-y: auto;
    }
    .payroll-table,
    .payroll-month-table {
      width: 100%;
      table-layout: fixed;
      border-collapse: separate;
      border-spacing: 0;
      background: #fff;
    }
    .payroll-table th,
    .payroll-table td,
    .payroll-month-table th,
    .payroll-month-table td {
      height: 38px;
      padding: 6px 8px;
      border-bottom: 1px solid var(--border);
      color: var(--text);
      font-size: 0.8rem;
      font-weight: 400;
      line-height: 1.25;
      vertical-align: middle;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .payroll-table th,
    .payroll-month-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #fff;
      color: var(--text-secondary);
      font-size: 0.76rem;
      font-weight: 500;
    }
    .payroll-table .num,
    .payroll-month-table .num { text-align: right; font-variant-numeric: tabular-nums; }
    .payroll-table th:nth-child(1), .payroll-table td:nth-child(1) { width: 86px; }
    .payroll-table th:nth-child(2), .payroll-table td:nth-child(2) { width: 132px; }
    .payroll-table th:nth-child(3), .payroll-table td:nth-child(3) { width: 108px; }
    .payroll-table th:nth-child(4), .payroll-table td:nth-child(4) { width: 96px; }
    .payroll-table th:nth-child(5), .payroll-table td:nth-child(5) { width: 92px; text-align: center; }
    .payroll-table th:nth-child(7), .payroll-table td:nth-child(7) { width: 84px; text-align: center; }
    .payroll-empty { color: var(--muted); text-align: center; }
    .payroll-expense-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 68px;
      height: 24px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #f6f8fa;
      color: var(--text-secondary);
      font-size: 0.72rem;
      font-weight: 500;
    }
    .payroll-actions-cell {
      text-align: center;
      white-space: nowrap;
    }
    .payroll-link {
      border: 0;
      background: transparent;
      color: var(--accent);
      font-size: 0.78rem;
      cursor: pointer;
      padding: 0 3px;
    }
    .payroll-link.danger { color: var(--danger); }
    .payroll-month-wrap {
      height: 100%;
      overflow-x: hidden;
      overflow-y: auto;
    }
    .payroll-dialog {
      position: fixed;
      inset: 0;
      z-index: 1200;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: rgba(31, 35, 40, 0.22);
    }
    .payroll-dialog-inner {
      width: min(720px, 100%);
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 18px 48px rgba(31, 35, 40, 0.16);
      padding: 16px;
    }
    .payroll-dialog-inner.small { width: min(420px, 100%); }
    .payroll-dialog-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }
    .payroll-dialog-head h3 { margin: 0; font-size: 1rem; font-weight: 650; }
    .payroll-dialog-close {
      width: 28px;
      height: 28px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      color: var(--text-secondary);
      cursor: pointer;
    }
    .payroll-form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .payroll-form-grid.one { grid-template-columns: minmax(0, 1fr); }
    .payroll-form-grid label {
      display: grid;
      gap: 4px;
      color: var(--text-secondary);
      font-size: 0.76rem;
    }
    .payroll-form-grid .wide { grid-column: 1 / -1; }
    .payroll-dialog-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 16px;
    }
    .payroll-dialog-actions .payroll-primary-btn,
    .payroll-dialog-actions .payroll-secondary-btn {
      width: 96px;
    }
    .payroll-compact-layout {
      grid-template-rows: minmax(0, 1fr) minmax(0, 2fr);
      gap: 8px;
      height: 100%;
      min-height: 0;
    }
    .payroll-top-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 8px;
      min-height: 0;
    }
    .payroll-block {
      display: grid;
      grid-template-rows: max-content minmax(0, 1fr);
      min-height: 0;
      overflow: hidden;
    }
    .payroll-section-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 108px;
      align-items: end;
      gap: 12px;
      padding: 10px 12px 8px;
      border-bottom: 1px solid var(--border);
    }
    .payroll-section-head h3 {
      margin: 0;
      color: var(--text);
      font-size: 0.92rem;
      font-weight: 650;
      line-height: 1.2;
    }
    .payroll-section-head p {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 3px 0 0;
      color: var(--text-secondary);
      font-size: 0.76rem;
      line-height: 1.2;
      white-space: nowrap;
    }
    .payroll-section-head p strong {
      color: var(--text);
      font-size: 0.9rem;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
    }
    .payroll-compact-layout .payroll-table-wrap {
      min-height: 0;
      height: 100%;
    }
    .payroll-people-table th:nth-child(1),
    .payroll-people-table td:nth-child(1) { width: auto; }
    .payroll-people-table th:nth-child(2),
    .payroll-people-table td:nth-child(2) { width: 92px; text-align: center; }
    .payroll-people-table th:nth-child(3),
    .payroll-people-table td:nth-child(3),
    .payroll-people-table th:nth-child(4),
    .payroll-people-table td:nth-child(4) { width: 72px; text-align: center; }
    .payroll-sheet-table th:nth-child(1),
    .payroll-sheet-table td:nth-child(1) { width: 104px; }
    .payroll-sheet-table th:nth-child(2),
    .payroll-sheet-table td:nth-child(2) { width: 92px; }
    .payroll-sheet-table th:nth-child(3),
    .payroll-sheet-table td:nth-child(3) { width: 96px; }
    .payroll-sheet-table th:nth-child(4),
    .payroll-sheet-table td:nth-child(4) { width: 168px; }
    .payroll-sheet-table th:nth-child(5),
    .payroll-sheet-table td:nth-child(5) { width: 124px; text-align: center; }
    .payroll-template-table th:nth-child(2),
    .payroll-template-table td:nth-child(2) { width: 82px; text-align: center; }
    .payroll-template-table th:nth-child(3),
    .payroll-template-table td:nth-child(3) { width: 72px; }
    .payroll-template-table th:nth-child(4),
    .payroll-template-table td:nth-child(4) { width: 122px; }
    .payroll-template-table th:nth-child(5),
    .payroll-template-table td:nth-child(5) { width: 96px; }
    .payroll-template-table th:nth-child(6),
    .payroll-template-table td:nth-child(6) { width: 140px; text-align: center; }
    .payroll-status-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 54px;
      height: 24px;
      border-radius: 999px;
      font-size: 0.72rem;
      font-weight: 600;
    }
    .payroll-status-pill.active {
      color: #168a4a;
      background: #e9f7ef;
    }
    .payroll-status-pill.inactive {
      color: #526070;
      background: #f2f4f7;
    }
    .payroll-editor-actions {
      display: flex;
      justify-content: flex-start;
      margin: 10px 0;
    }
    .payroll-editor-actions .payroll-secondary-btn {
      width: 132px;
    }
    .payroll-editor-table {
      width: 100%;
      table-layout: fixed;
      border-collapse: separate;
      border-spacing: 0;
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
    }
    .payroll-editor-table th,
    .payroll-editor-table td {
      padding: 6px;
      border-bottom: 1px solid var(--border);
      font-size: 0.78rem;
      font-weight: 400;
    }
    .payroll-editor-table th {
      color: var(--text-secondary);
      background: #f6f8fa;
      font-weight: 500;
    }
    .payroll-editor-table th:nth-child(1),
    .payroll-editor-table td:nth-child(1) { width: 32%; }
    .payroll-editor-table th:nth-child(2),
    .payroll-editor-table td:nth-child(2) { width: 120px; }
    .payroll-editor-table th:nth-child(4),
    .payroll-editor-table td:nth-child(4) { width: 60px; text-align: center; }
    .payroll-editor-table input,
    .payroll-editor-table select {
      width: 100%;
      height: 32px;
      min-width: 0;
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 0 8px;
      font-size: 0.8rem;
      background: #fff;
      color: var(--text);
    }
    .bank-modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: grid;
      place-items: center;
      padding: 24px;
      background: rgba(15, 23, 42, 0.28);
    }
    .bank-edit-dialog {
      width: min(720px, 100%);
      max-height: min(680px, calc(100vh - 48px));
      overflow: hidden;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: #fff;
      box-shadow: 0 18px 48px rgba(16, 24, 40, 0.18);
    }
    .bank-dialog-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--border);
    }
    .bank-dialog-head strong,
    .bank-dialog-head span { display: block; }
    .bank-dialog-head span { color: var(--text-secondary); font-size: 0.78rem; }
    .bank-dialog-actions { display: flex; gap: 8px; }
    .bank-dialog-actions button {
      height: 32px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      padding: 0 12px;
      cursor: pointer;
    }
    .bank-dialog-actions button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
    .bank-edit-body {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      padding: 16px;
    }
    .bank-edit-body label {
      display: grid;
      gap: 5px;
      color: var(--text-secondary);
      font-size: 0.78rem;
      font-weight: 600;
    }
    .bank-edit-body .span-3 { grid-column: 1 / -1; }
    @media (max-width: 1180px) {
      .bank-table th:nth-child(8),
      .bank-table td:nth-child(8) {
        display: none;
      }
      .bank-table th:nth-child(4),
      .bank-table td:nth-child(4) {
        width: 20%;
      }
      .bank-table th:nth-child(5),
      .bank-table td:nth-child(5) {
        width: 14%;
      }
    }
    @media (max-width: 640px) {
      .invoice-workspace {
        padding: 10px;
        min-height: auto;
        grid-template-rows: auto auto;
      }
      .invoice-toolbar {
        display: grid;
        overflow: visible;
      }
      .invoice-toolbar-row {
        grid-template-columns: 1fr 1fr;
      }
      .invoice-filter-search {
        grid-column: 1 / -1;
      }
      .invoice-total-summary {
        grid-column: 1 / -1;
        justify-content: flex-start;
        align-items: flex-start;
        text-align: left;
      }
      .invoice-message {
        grid-column: 1 / -1;
      }
      .invoice-toolbar label,
      .invoice-toolbar input,
      .invoice-toolbar select,
      .invoice-filter-reset,
      .invoice-upload-trigger {
        width: 100%;
        min-width: 0;
      }
      .invoice-toolbar-message {
        grid-column: 1 / -1;
        min-height: 12px;
        text-align: right;
      }
      .invoice-table-wrap { max-height: calc(100vh - 260px); }
      .invoice-table {
        min-width: 0;
      }
      .invoice-preview-overlay {
        padding: 12px;
      }
      .invoice-preview-dialog {
        max-height: calc(100vh - 24px);
      }
      .invoice-edit-dialog {
        max-height: calc(100vh - 24px);
      }
      .invoice-edit-body {
        grid-template-columns: 1fr;
      }
      .bank-workspace {
        padding: 10px;
        min-height: auto;
      }
      .bank-toolbar-main,
      .bank-toolbar-secondary {
        grid-template-columns: 1fr 1fr;
      }
      .bank-filter-search {
        grid-column: 1 / -1;
      }
      .bank-table-wrap {
        max-height: calc(100vh - 300px);
      }
      .bank-table {
        width: 100%;
        min-width: 0;
      }
      .bank-table th:nth-child(7),
      .bank-table td:nth-child(7),
      .bank-table th:nth-child(8),
      .bank-table td:nth-child(8),
      .bank-table th:nth-child(9),
      .bank-table td:nth-child(9),
      .bank-table th:nth-child(10),
      .bank-table td:nth-child(10) {
        display: none;
      }
      .bank-table th:nth-child(1),
      .bank-table td:nth-child(1) { width: 82px; }
      .bank-table th:nth-child(2),
      .bank-table td:nth-child(2) { width: 50px; }
      .bank-table th:nth-child(3),
      .bank-table td:nth-child(3) { width: 82px; }
      .bank-table th:nth-child(4),
      .bank-table td:nth-child(4) { width: 84px; }
      .bank-table th:nth-child(11),
      .bank-table td:nth-child(11) { width: 56px; }
      .bank-total-group {
        grid-column: 1 / -1;
        justify-content: start;
      }
      .bank-total-summary {
        align-items: flex-start;
        text-align: left;
      }
      .bank-toolbar-message {
        grid-column: 1 / -1;
        padding-bottom: 0;
      }
      .bank-edit-body {
        grid-template-columns: 1fr;
      }
      .bank-edit-body .span-3 {
        grid-column: auto;
      }
    }
    .tax-workspace {
      display: grid;
      gap: var(--table-page-gap);
      padding: var(--table-page-pad-top) var(--table-page-pad-x) var(--table-page-pad-bottom);
      font-variant-numeric: tabular-nums;
    }
    .tax-page-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      padding-bottom: 4px;
    }
    .tax-page-head h2 {
      margin: 0;
      color: var(--text);
      font-size: 1.125rem;
      font-weight: 650;
      line-height: 1.45;
      letter-spacing: 0;
    }
    .tax-page-head p,
    .tax-section-head p {
      margin: 2px 0 0;
      color: var(--text-secondary);
      font-size: 0.78rem;
      line-height: 1.5;
    }
    .tax-status-badge {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 0 10px;
      border-radius: 999px;
      background: rgba(26, 127, 55, 0.1);
      color: var(--success);
      font-size: 0.75rem;
      font-weight: 600;
      white-space: nowrap;
    }
    .tax-toolbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: end;
      gap: 10px 16px;
      margin: 0;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
    }
    .tax-mode-block {
      display: flex;
      align-items: end;
      gap: 8px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .tax-date-row {
      display: grid;
      gap: 4px;
      align-items: end;
    }
    .tax-date-row label {
      color: var(--text-secondary);
      font-size: 0.75rem;
      line-height: 1.2;
      font-weight: 500;
    }
    .tax-month-wrap select.tax-date-select {
      height: 36px;
      border-radius: 6px;
      background: #fff;
      color: var(--text);
      font-size: 0.82rem;
      border-color: var(--border);
    }
    .tax-toolbar .btn-query {
      height: 36px;
      min-width: 96px;
      border-radius: 6px;
      font-size: 0.82rem;
      box-shadow: none;
    }
    .tax-toolbar .tax-primary-action {
      border-color: var(--accent);
      background: var(--accent);
      color: #fff;
    }
    .tax-toolbar .tax-primary-action:hover {
      border-color: var(--accent-hover);
      background: var(--accent-hover);
    }
    .tax-toolbar .tax-secondary-action {
      background: #fff;
      color: var(--text);
    }
    .tax-toolbar-meta {
      display: flex;
      align-items: center;
      align-self: end;
      justify-content: flex-end;
      gap: 10px;
      min-height: 36px;
      min-width: 0;
      color: var(--muted);
      font-size: 0.78rem;
    }
    .tax-progress {
      min-height: 18px;
      color: var(--muted);
    }
    .tax-progress.busy { color: var(--accent); }
    .tax-progress.error { color: var(--danger); }
    .tax-updated-time {
      margin-left: 0;
      color: var(--muted);
      font-size: 0.78rem;
      white-space: nowrap;
    }
    .tax-summary-strip {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .tax-summary-strip span {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 0 10px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: #fff;
      color: var(--text-secondary);
      font-size: 0.75rem;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
    }
    .tax-section {
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      overflow: visible;
    }
    .tax-section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 0 10px;
      border-bottom: 0;
      background: transparent;
    }
    .tax-section-head-inline {
      align-items: end;
      flex-wrap: wrap;
    }
    .tax-section-head h3 {
      margin: 0;
      color: var(--text);
      font-size: 0.94rem;
      font-weight: 650;
      line-height: 1.4;
      letter-spacing: 0;
    }
    .tax-stl-toolbar {
      display: flex;
      align-items: end;
      gap: 8px;
      flex-wrap: wrap;
      color: var(--text-secondary);
      font-size: 0.75rem;
      font-weight: 500;
    }
    .tax-table-wrap {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      overflow: auto;
    }
    .tax-table {
      font-size: 0.8125rem;
      min-width: 1180px;
    }
    .tax-table.tax-stl-table {
      min-width: 0;
    }
    .tax-table .tax-col-balance,
    .tax-table .tax-col-reserve {
      width: 7.2em;
      min-width: 7.2em;
      max-width: 7.2em;
    }
    .tax-table th,
    .tax-table td {
      height: 42px;
      padding: 8px 10px;
      border-bottom: 1px solid var(--border);
      background: #fff;
      color: var(--text);
      font-variant-numeric: tabular-nums;
    }
    .tax-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      height: 36px;
      background: #f6f8fa;
      color: var(--text-secondary);
      font-size: 0.76rem;
      font-weight: 650;
      letter-spacing: 0;
    }
    .tax-table tbody tr:hover td {
      background: #f6f8fa;
    }
    .tax-table .tax-col-group {
      background: #f8fbff;
    }
    .tax-table th.tax-col-group,
    .tax-table td.tax-col-group {
      box-shadow: none;
    }
    .tax-table th.tax-col-sales-total,
    .tax-table td.tax-col-sales-total,
    .tax-table th.tax-col-expense-total,
    .tax-table td.tax-col-expense-total {
      background: #f8fbff;
      box-shadow: inset -1px 0 0 rgba(185, 192, 202, 0.7);
    }
    .tax-table th.tax-col-net,
    .tax-table td.tax-col-net {
      background: #f3faf6;
      color: var(--success);
    }
    .tax-table td.tax-amount-positive {
      color: var(--success);
    }
    .tax-table td.tax-amount-negative {
      color: var(--danger);
    }
    .tax-table tr.tax-summary-row td {
      border-top: 1px solid var(--border);
      background: #f6f8fa;
      font-weight: 650;
    }
    .tax-table tr.tax-summary-row td.tax-col-sales-total,
    .tax-table tr.tax-summary-row td.tax-col-expense-total {
      background: #eef5ff;
    }
    .tax-table tbody tr:hover td.tax-col-sales-total,
    .tax-table tbody tr:hover td.tax-col-expense-total,
    .tax-table tbody tr.tax-summary-row:hover td.tax-col-sales-total,
    .tax-table tbody tr.tax-summary-row:hover td.tax-col-expense-total {
      background: #eef5ff;
    }
    .tax-table tbody tr:hover td.tax-col-net,
    .tax-table tbody tr.tax-summary-row:hover td.tax-col-net,
    .tax-table tr.tax-summary-row td.tax-col-net {
      background: #eaf6ef;
    }
    .tax-table tr.tax-summary-row td.tax-col-net {
      color: var(--success);
    }
    .tax-table tr.tax-ratio-row td {
      background: #fbfcfe;
      font-weight: 500;
    }
    .tax-table tbody tr.tax-ratio-row:hover td {
      background: #fbfcfe;
    }
    .tax-table tr.tax-ratio-row td.tax-col-sales-total,
    .tax-table tr.tax-ratio-row td.tax-col-expense-total {
      background: #f4f8ff;
    }
    .tax-table tr.tax-ratio-row td.tax-col-net {
      background: #f0f8f3;
      color: var(--success);
    }
    .tax-table td.tax-cell-dual .tax-cell-line {
      line-height: 1.22;
    }
    .tax-table td.tax-cell-dual .tax-cell-line:first-child {
      color: var(--text-secondary);
      font-size: 0.82em;
    }
    .profit-workspace {
      grid-template-rows: auto minmax(0, 1fr);
      height: 100%;
      min-height: 0;
      padding: var(--table-page-pad-top) var(--table-page-pad-x) var(--table-page-pad-bottom);
    }
    .profit-toolbar {
      margin-bottom: 8px;
    }
    .profit-toolbar .tax-date-select {
      min-width: 112px;
    }
    .profit-year-picker {
      position: relative;
    }
    .profit-year-trigger {
      appearance: none;
      -webkit-appearance: none;
      width: 112px;
      min-width: 112px;
      max-width: 112px;
      height: var(--control-height);
      min-height: var(--control-height);
      padding: 0 30px 0 var(--control-padding-x);
      border: 1px solid var(--border);
      border-radius: var(--control-radius);
      background-color: var(--card);
      background-image: url("data:image/svg+xml,%3Csvg width='12' height='20' viewBox='0 0 12 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8L6 5L9 8' fill='none' stroke='%231d1d1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M3 12L6 15L9 12' fill='none' stroke='%231d1d1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-position: calc(100% - 16px) center;
      background-size: 12px 20px;
      background-repeat: no-repeat;
      color: var(--text);
      font-size: var(--control-font-size);
      font-weight: 400;
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      text-align: left;
      line-height: 1.2;
      cursor: pointer;
      box-shadow: none;
      outline: none;
      vertical-align: middle;
    }
    .profit-toolbar #profitBizAccount {
      appearance: none;
      -webkit-appearance: none;
      padding-right: 30px;
      background-image: url("data:image/svg+xml,%3Csvg width='12' height='20' viewBox='0 0 12 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8L6 5L9 8' fill='none' stroke='%231d1d1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M3 12L6 15L9 12' fill='none' stroke='%231d1d1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-position: calc(100% - 16px) center;
      background-size: 12px 20px;
      background-repeat: no-repeat;
    }
    .profit-year-trigger:hover,
    .profit-year-trigger:focus {
      border-color: var(--border);
      background-color: var(--card);
    }
    .profit-year-trigger-text {
      min-width: 0;
      flex: 1 1 auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .profit-year-trigger-arrow {
      display: none;
    }
    .profit-year-menu {
      display: none;
      position: absolute;
      left: 42px;
      top: calc(100% + 4px);
      z-index: 20;
      width: 112px;
      padding: 6px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    }
    .profit-year-menu.is-open {
      display: grid;
      gap: 2px;
    }
    .profit-year-menu-option {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 30px;
      padding: 4px 6px;
      border-radius: 6px;
      color: var(--text);
      font-size: var(--control-font-size);
      font-weight: 400;
      cursor: pointer;
    }
    .profit-year-menu-option:hover {
      background: #f6f8fa;
    }
    .profit-year-apply {
      width: 100%;
      margin-top: 4px;
    }
    .profit-table-section {
      min-height: 0;
      padding-top: 0;
    }
    .profit-table-section .tax-table-wrap {
      max-height: 100%;
      overflow: auto;
    }
    .operating-profit-cashflow-section .profit-workspace {
      padding: 0;
    }
    .profit-table {
      min-width: 1120px;
      table-layout: fixed;
    }
    .profit-table th,
    .profit-table td {
      white-space: nowrap;
    }
    .profit-month-cell {
      display: grid;
      grid-template-columns: minmax(0, auto) minmax(0, 1fr);
      align-items: center;
      gap: 6px;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
    }
    .profit-issue-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 18px;
      min-width: 0;
      max-width: 100%;
      padding: 0 6px;
      border-radius: 999px;
      font-size: 0.68rem;
      font-weight: 500;
      line-height: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .profit-issue-badge.warn {
      background: #fff7ed;
      color: #b45309;
    }
    .profit-issue-badge.danger {
      background: #fef2f2;
      color: #dc2626;
    }
    .profit-drilldown-link {
      width: 100%;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      text-align: right;
      cursor: pointer;
      padding: 0;
    }
    .profit-drilldown-link:hover {
      color: var(--accent);
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    .profit-formula-cell span {
      cursor: help;
    }
    .profit-table thead th {
      position: sticky;
      top: 0;
      z-index: 3;
    }
    .profit-table tbody tr.tax-summary-row td {
      position: sticky;
      bottom: 0;
      z-index: 2;
      box-shadow: 0 -1px 0 var(--border);
    }
    .profit-table th:nth-child(1),
    .profit-table td:nth-child(1) {
      width: 9.4em;
      min-width: 9.4em;
      max-width: 9.4em;
    }
    .profit-table th.tax-col-sales-total,
    .profit-table td.tax-col-sales-total {
      width: 10.4em;
      min-width: 10.4em;
      max-width: 10.4em;
    }
    .profit-table th.tax-col-expense-total,
    .profit-table td.tax-col-expense-total,
    .profit-table th.tax-col-net,
    .profit-table td.tax-col-net {
      width: 9.2em;
      min-width: 9.2em;
      max-width: 9.2em;
    }
    .profit-table th:nth-child(n+3):nth-child(-n+7),
    .profit-table td:nth-child(n+3):nth-child(-n+7) {
      width: 8.2em;
      min-width: 8.2em;
      max-width: 8.2em;
    }
    .profit-table th:nth-last-child(1),
    .profit-table td:nth-last-child(1) {
      width: 7.2em;
      min-width: 7.2em;
      max-width: 7.2em;
    }
    .operating-profit-table {
      min-width: 0;
      width: 100%;
    }
    .operating-profit-monthly-wrap {
      overflow-x: hidden;
    }
    .operating-profit-table col.op-col-month { width: 6.6%; }
    .operating-profit-table col.op-col-count { width: 5%; }
    .operating-profit-table col.op-col-percent { width: 5.6%; }
    .operating-profit-table col.op-col-money { width: 9.44%; }
    .operating-profit-table th:nth-child(1),
    .operating-profit-table td:nth-child(1) {
      width: 6.6%;
      min-width: 0;
      max-width: none;
    }
    .operating-profit-table th:nth-child(n+2),
    .operating-profit-table td:nth-child(n+2) {
      min-width: 0;
      max-width: none;
      overflow: hidden;
      padding-left: 6px;
      padding-right: 6px;
      text-overflow: ellipsis;
    }
    .operating-profit-table th:nth-child(3),
    .operating-profit-table td:nth-child(3) {
      width: 5%;
      padding-left: 4px;
      padding-right: 4px;
    }
    .operating-profit-table th:nth-child(11),
    .operating-profit-table td:nth-child(11),
    .operating-profit-table th:nth-child(12),
    .operating-profit-table td:nth-child(12) {
      width: 5.6%;
      padding-left: 4px;
      padding-right: 4px;
    }
    .operating-profit-workspace {
      grid-template-rows: auto auto minmax(0, 1fr);
    }
    .operating-profit-tabs {
      display: inline-flex;
      align-items: center;
      justify-self: start;
      align-self: start;
      gap: 4px;
      margin: 0 0 8px;
      padding: 3px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fbfbfd;
    }
    .operating-profit-tab {
      height: 30px;
      padding: 0 12px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: var(--text-secondary);
      font-size: 0.8rem;
      font-weight: 500;
      cursor: pointer;
    }
    .operating-profit-tab.active {
      background: #fff;
      color: var(--accent);
      box-shadow: 0 0 0 1px var(--border);
    }
    .operating-profit-batch-section {
      padding-top: 0;
      width: 100%;
    }
    .operating-profit-batch-toolbar {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      margin: -2px 0 8px;
      flex-wrap: wrap;
    }
    .operating-profit-batch-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }
    .operating-profit-batch-list {
      overflow: auto;
    }
    .operating-profit-batch-list + .operating-profit-batch-list {
      margin-top: 16px;
    }
    .operating-profit-freight-section {
      display: flex;
      flex-direction: column;
      gap: 14px;
      max-height: 100%;
      min-height: 0;
      overflow: hidden;
    }
    .operating-profit-freight-section .operating-profit-batch-list + .operating-profit-batch-list {
      margin-top: 0;
    }
    .operating-profit-freight-cards {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }
    .operating-profit-freight-card {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      display: grid;
      grid-template-columns: 28px minmax(92px, 0.8fr) minmax(0, 1.6fr);
      align-items: center;
      gap: 14px;
      padding: 9px 12px;
    }
    .operating-profit-freight-card-head {
      display: flex;
      align-items: baseline;
      justify-content: flex-start;
      gap: 10px;
      margin-bottom: 0;
    }
    .operating-profit-freight-card-head span {
      color: var(--text-secondary);
      font-size: 0.82rem;
      font-weight: 700;
    }
    .operating-profit-freight-card-head strong {
      color: var(--accent);
      font-size: 1.04rem;
      font-weight: 750;
    }
    .operating-profit-freight-card-unit {
      min-width: 0;
      white-space: nowrap;
    }
    .operating-profit-freight-card-unit span {
      display: block;
      color: var(--text-muted);
      font-size: 0.68rem;
      margin-bottom: 1px;
    }
    .operating-profit-freight-card-unit strong {
      display: block;
      color: var(--accent);
      font-size: 1rem;
      font-weight: 750;
    }
    .operating-profit-freight-card-grid {
      display: grid;
      grid-template-columns: minmax(118px, 1.35fr) minmax(92px, 0.9fr);
      gap: 12px;
    }
    .operating-profit-freight-card-grid div {
      min-width: 0;
    }
    .operating-profit-freight-card-grid span {
      display: block;
      color: var(--text-muted);
      font-size: 0.7rem;
      margin-bottom: 2px;
      white-space: nowrap;
    }
    .operating-profit-freight-card-grid strong {
      display: block;
      color: var(--text-primary);
      font-size: 0.8rem;
      font-weight: 650;
      white-space: nowrap;
    }
    .operating-profit-freight-detail {
      flex: 0 1 auto;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
    }
    .operating-profit-freight-detail thead th {
      position: sticky;
      top: 0;
      z-index: 3;
    }
    .operating-profit-freight-detail-table {
      min-width: 0;
      table-layout: fixed;
      width: 100%;
    }
    .operating-profit-freight-detail-table th:nth-child(1),
    .operating-profit-freight-detail-table td:nth-child(1),
    .operating-profit-freight-detail-table th:nth-child(2),
    .operating-profit-freight-detail-table td:nth-child(2),
    .operating-profit-freight-detail-table th:nth-child(3),
    .operating-profit-freight-detail-table td:nth-child(3),
    .operating-profit-freight-detail-table th:nth-child(4),
    .operating-profit-freight-detail-table td:nth-child(4),
    .operating-profit-freight-detail-table th:nth-child(5),
    .operating-profit-freight-detail-table td:nth-child(5),
    .operating-profit-freight-detail-table th:nth-child(6),
    .operating-profit-freight-detail-table td:nth-child(6) {
      width: 16.6667%;
    }
    .operating-profit-freight-detail-table th,
    .operating-profit-freight-detail-table td {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    @media (max-width: 900px) {
      .operating-profit-freight-cards {
        grid-template-columns: 1fr;
      }
      .operating-profit-freight-card {
        grid-template-columns: 28px minmax(92px, 0.8fr) minmax(0, 2.8fr);
      }
    }
    .operating-profit-batch-table {
      width: 100%;
      min-width: 1080px;
    }
    .operating-profit-simple-table {
      table-layout: fixed;
      min-width: 980px;
    }
    .operating-profit-batch-table th,
    .operating-profit-batch-table td {
      padding-left: 6px;
      padding-right: 6px;
    }
    .operating-profit-batch-table th.num,
    .operating-profit-batch-table td.num {
      text-align: right;
    }
    .operating-profit-batch-table th:nth-child(1),
    .operating-profit-batch-table td:nth-child(1) { width: 190px; }
    .operating-profit-batch-table th:nth-child(2),
    .operating-profit-batch-table td:nth-child(2) { width: 96px; }
    .operating-profit-batch-table th:nth-child(3),
    .operating-profit-batch-table td:nth-child(3) { width: 96px; }
    .operating-profit-batch-table th:nth-child(4),
    .operating-profit-batch-table td:nth-child(4) { width: 112px; }
    .operating-profit-batch-table th:nth-child(5),
    .operating-profit-batch-table td:nth-child(5),
    .operating-profit-batch-table th:nth-child(6),
    .operating-profit-batch-table td:nth-child(6) { width: 68px; }
    .operating-profit-batch-table th:nth-child(7),
    .operating-profit-batch-table td:nth-child(7),
    .operating-profit-batch-table th:nth-child(8),
    .operating-profit-batch-table td:nth-child(8),
    .operating-profit-batch-table th:nth-child(9),
    .operating-profit-batch-table td:nth-child(9),
    .operating-profit-batch-table th:nth-child(10),
    .operating-profit-batch-table td:nth-child(10),
    .operating-profit-batch-table th:nth-child(11),
    .operating-profit-batch-table td:nth-child(11),
    .operating-profit-batch-table th:nth-child(12),
    .operating-profit-batch-table td:nth-child(12) { width: 94px; }
    .operating-profit-simple-table th:nth-child(1),
    .operating-profit-simple-table td:nth-child(1) {
      width: 140px;
      white-space: nowrap;
    }
    .operating-profit-simple-table th:nth-child(2),
    .operating-profit-simple-table td:nth-child(2) { width: 82px; }
    .operating-profit-simple-table th:nth-child(3),
    .operating-profit-simple-table td:nth-child(3) { width: 96px; }
    .operating-profit-simple-table th:nth-child(4),
    .operating-profit-simple-table td:nth-child(4) { width: 80px; }
    .operating-profit-simple-table th:nth-child(5),
    .operating-profit-simple-table td:nth-child(5),
    .operating-profit-simple-table th:nth-child(6),
    .operating-profit-simple-table td:nth-child(6),
    .operating-profit-simple-table th:nth-child(7),
    .operating-profit-simple-table td:nth-child(7),
    .operating-profit-simple-table th:nth-child(8),
    .operating-profit-simple-table td:nth-child(8),
    .operating-profit-simple-table th:nth-child(9),
    .operating-profit-simple-table td:nth-child(9) { width: 110px; }
    .operating-profit-freight-binding-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
      color: var(--text-secondary);
      font-size: 0.84rem;
      font-weight: 600;
    }
    .operating-profit-freight-binding-head strong {
      color: var(--danger);
      font-weight: 600;
    }
    .operating-profit-freight-binding-drawer {
      max-width: 980px;
    }
    .operating-profit-freight-binding-wrap {
      max-height: calc(100vh - 190px);
      overflow: auto;
    }
    .operating-profit-freight-binding-table {
      table-layout: fixed;
      min-width: 920px;
    }
    .operating-profit-freight-binding-table th:nth-child(1),
    .operating-profit-freight-binding-table td:nth-child(1) {
      width: 108px;
      white-space: nowrap;
    }
    .operating-profit-freight-binding-table th:nth-child(2),
    .operating-profit-freight-binding-table td:nth-child(2) {
      width: 92px;
      white-space: nowrap;
    }
    .operating-profit-freight-binding-table th:nth-child(3),
    .operating-profit-freight-binding-table td:nth-child(3) {
      width: 72px;
      white-space: nowrap;
    }
    .operating-profit-freight-binding-table th:nth-child(4),
    .operating-profit-freight-binding-table td:nth-child(4) {
      width: auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .operating-profit-freight-binding-table th:nth-child(5),
    .operating-profit-freight-binding-table td:nth-child(5) {
      width: 330px;
    }
    .operating-profit-freight-batch-select {
      width: 180px;
      height: 34px;
    }
    .operating-profit-freight-market-select {
      width: 72px;
      height: 34px;
    }
    .operating-profit-freight-bind-control {
      display: flex;
      align-items: center;
      gap: 8px;
      justify-content: flex-start;
    }
    .operating-profit-bind-freight-btn {
      min-width: 64px;
      height: 34px;
      padding-left: 14px;
      padding-right: 14px;
      white-space: nowrap;
    }
    .operating-profit-batch-drawer {
      max-width: 560px;
    }
    .operating-profit-cost-settings-drawer {
      max-width: 520px;
    }
    .operating-profit-cost-settings-total {
      grid-column: 1 / -1;
      padding: 10px 12px;
      border-radius: 8px;
      background: #f8fafc;
      color: var(--text-secondary);
      font-size: 0.82rem;
      font-weight: 600;
    }
    .operating-profit-batch-table tbody tr.operating-profit-batch-group-row:hover td {
      background: #f6f8fa;
    }
    .operating-profit-batch-group-row td {
      height: 34px;
      padding-top: 0;
      padding-bottom: 0;
      background: #f6f8fa;
      border-top: 1px solid var(--border);
    }
    .operating-profit-batch-toggle {
      width: 100%;
      min-height: 34px;
      display: flex;
      align-items: center;
      gap: 12px;
      border: 0;
      background: transparent;
      color: var(--text-secondary);
      font-size: 0.8rem;
      font-weight: 400;
      text-align: left;
      cursor: pointer;
      padding: 0;
    }
    .operating-profit-batch-toggle strong {
      color: var(--text);
      font-size: 0.82rem;
      font-weight: 500;
    }
    .operating-profit-batch-caret {
      width: 14px;
      color: var(--muted);
      font-size: 0.68rem;
      line-height: 1;
    }
    .operating-profit-batch-row .finance-settings-input {
      min-width: 0;
      width: 100%;
      height: 32px;
      min-height: 32px;
      padding: 0 9px;
      border: 1px solid var(--border);
      border-radius: 7px;
      background: #fff;
      font-size: 0.8125rem;
      line-height: 1.2;
      color: var(--text);
      box-sizing: border-box;
      font-weight: 400;
    }
    .operating-profit-batch-row .finance-settings-input:focus {
      outline: none;
      border-color: rgba(0, 113, 227, 0.55);
      box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
    }
    .operating-profit-batch-row input[type="number"].finance-settings-input {
      text-align: right;
    }
    .operating-profit-batch-row .operating-profit-compact-select {
      padding-right: 22px;
    }
    .operating-profit-batch-delete {
      border: none;
      background: transparent;
      color: #b45309;
      font-size: 0.82rem;
      line-height: 1.2;
      font-weight: 400;
      cursor: pointer;
      padding: 0;
    }
    .operating-profit-batch-delete:hover {
      color: #92400e;
    }
    .profit-drilldown-backdrop {
      z-index: 36;
    }
    .profit-drilldown-drawer {
      max-width: 620px;
    }
    .profit-drilldown-head {
      align-items: flex-start;
      gap: 12px;
    }
    .profit-drilldown-head p {
      margin: 4px 0 0;
      color: var(--text-secondary);
      font-size: 0.78rem;
      line-height: 1.4;
    }
    .profit-drilldown-list {
      display: grid;
      gap: 6px;
    }
    .profit-drilldown-row {
      display: grid;
      grid-template-columns: 84px 110px 96px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      width: 100%;
      min-height: 38px;
      padding: 7px 8px;
      border: 1px solid transparent;
      border-radius: 8px;
      background: transparent;
      color: var(--text);
      text-align: left;
      cursor: pointer;
    }
    .profit-drilldown-row:hover {
      border-color: var(--border);
      background: #fbfbfd;
    }
    .profit-drilldown-row strong {
      text-align: right;
      font-size: 0.84rem;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
    }
    .profit-drilldown-row span {
      min-width: 0;
      overflow: hidden;
      color: var(--text-secondary);
      font-size: 0.78rem;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .tax-month-list {
      border-radius: 8px;
      background: #fff;
      box-shadow: var(--shadow);
    }
    .tax-month-option.selected {
      color: var(--accent);
      background: rgba(9, 105, 218, 0.1);
      font-weight: 600;
    }
    @media (max-width: 1024px) {
      .tax-toolbar {
        grid-template-columns: 1fr;
      }
      .tax-toolbar-meta {
        justify-content: flex-start;
      }
      .tax-section-head-inline {
        align-items: stretch;
      }
      .tax-stl-toolbar {
        width: 100%;
      }
    }
    @media (max-width: 640px) {
      .tax-workspace {
        gap: 10px;
        padding: 10px;
      }
      .tax-page-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
      }
      .tax-toolbar {
        padding: 10px;
      }
      .tax-mode-block {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: end;
      }
      .tax-mode-block .tax-date-row:first-child {
        grid-column: 1 / -1;
      }
      .tax-toolbar .btn-query {
        width: 100%;
        min-width: 0;
      }
      .tax-toolbar-meta {
        display: grid;
        gap: 4px;
      }
      .tax-summary-strip span {
        width: 100%;
        justify-content: flex-start;
      }
      .tax-section-head {
        padding: 10px 12px;
      }
      .tax-stl-toolbar {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: end;
      }
      .tax-region-wrap,
      .tax-period-wrap {
        width: 100%;
        min-width: 0;
      }
      .tax-region-wrap select.tax-date-select,
      .tax-period-wrap select.tax-date-select,
      .tax-year-wrap select.tax-date-select,
      .tax-month-wrap:not(.tax-year-wrap):not(.tax-region-wrap):not(.tax-period-wrap) select.tax-date-select {
        width: 100%;
        min-width: 0;
      }
      .tax-table {
        min-width: 0;
      }
      .tax-table th:nth-child(1),
      .tax-table td:nth-child(1) {
        width: 3.2em;
        min-width: 3.2em;
        max-width: 3.2em;
      }
      .tax-table .tax-col-amount,
      .tax-table .tax-col-sales-total,
      .tax-table .tax-col-expense-total,
      .tax-table .tax-col-net {
        width: 5.6em;
        min-width: 5.6em;
        max-width: 5.6em;
      }
    }
    .account-balances { margin-bottom: 24px; }
    .account-balances .section-title { margin-bottom: 12px; }
    .balance-list { display: flex; flex-wrap: wrap; gap: 12px; }
    .balance-item {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px 18px;
      min-width: 160px;
    }
    .balance-item .name { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 4px; }
    .balance-item .value { font-size: 1.25rem; font-variant-numeric: tabular-nums; font-weight: 600; }
    .balance-item .value.positive { color: var(--success); }
    .balance-item .value.negative { color: var(--danger); }
    .dashboard-recent { margin-top: 0; }
    .dashboard-recent .content-card { margin-top: 0; }
    .section-title {
      font-size: 0.9375rem;
      font-weight: 600;
      color: var(--text-secondary);
      margin: 0;
      line-height: 1.6;
    }
    .inventory-toggle-btn {
      border: none;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      padding: 0;
      font-size: 0.75rem;
      -webkit-tap-highlight-color: transparent;
    }
    .inventory-toggle-btn .arrow { display: inline-block; transition: transform 0.2s; }
    .inventory-toggle-btn[aria-expanded="false"] .arrow { transform: rotate(-90deg); }
    .tab-bar {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 0;
      background: var(--card);
      border-radius: var(--radius);
      overflow: hidden;
      border: 1px solid var(--border);
      margin-bottom: 16px;
    }
    .tab-bar .tab {
      width: 100%;
      padding: 12px 16px;
      text-align: center;
      font-size: clamp(0.78rem, 1.8vw, 0.9375rem);
      font-weight: 500;
      color: var(--text-secondary);
      background: var(--bg-elevated);
      border: none;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: background 0.15s, color 0.15s;
      white-space: nowrap;
      word-break: keep-all;
      line-height: 1.2;
      min-width: 0;
    }
    .tab-bar .tab:hover { color: var(--text); background: var(--card-hover); }
    .tab-bar .tab.active { color: var(--accent); background: var(--card); font-weight: 600; }
    .tab-panel {
      display: none;
      padding: 0;
    }
    .tab-panel.active { display: block; }
    .catalog-panel {
      display: grid;
      gap: 10px;
    }
    .catalog-panel-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .catalog-panel-note {
      margin: 4px 0 0;
      font-size: 0.78rem;
      color: var(--text-secondary);
      line-height: 1.45;
    }
    .catalog-summary {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .catalog-summary-pill {
      display: inline-flex;
      align-items: baseline;
      gap: 6px;
      min-height: 32px;
      padding: 0 12px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--card);
      color: var(--text-secondary);
      font-size: 0.75rem;
      white-space: nowrap;
    }
    .catalog-summary-pill strong {
      color: var(--text);
      font-size: 0.95rem;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
    }
    .catalog-table-wrap {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }
    .catalog-review-shell {
      gap: 12px;
    }
    .catalog-review-subnav {
      margin-bottom: 0;
      align-items: center;
      flex-wrap: nowrap;
    }
    .catalog-review-subnav-left {
      min-width: 0;
      flex: 1 1 auto;
      flex-wrap: nowrap;
    }
    .catalog-review-title-wrap {
      min-width: 0;
    }
    .catalog-review-title-wrap .section-title {
      margin-bottom: 0;
    }
    .catalog-review-frame-wrap {
      border: none;
      border-radius: 0;
      background: transparent;
      overflow: hidden;
      min-height: calc(100vh - 210px);
    }
    .catalog-review-frame {
      display: block;
      width: 100%;
      height: calc(100vh - 210px);
      min-height: 720px;
      border: none;
      background: transparent;
    }
    .catalog-table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
    }
    .catalog-table th,
    .catalog-table td {
      padding: 10px 12px;
      border-bottom: 1px solid var(--border);
      text-align: left;
      vertical-align: top;
      font-size: 0.78rem;
      background: #fff;
    }
    .catalog-table th {
      color: var(--text-secondary);
      font-weight: 600;
      white-space: nowrap;
    }
    .catalog-table tbody tr:hover td { background: #fafbfc; }
    .catalog-table tbody tr:last-child td { border-bottom: none; }
    .catalog-table th:nth-child(1),
    .catalog-table td:nth-child(1) { width: 19%; }
    .catalog-table th:nth-child(2),
    .catalog-table td:nth-child(2) { width: 14%; }
    .catalog-table th:nth-child(3),
    .catalog-table td:nth-child(3) { width: 67%; }
    .catalog-table th:nth-child(3) { padding-right: 18px; }
    .catalog-table td:nth-child(3) { padding-right: 18px; }
    .catalog-identity {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      flex-wrap: nowrap;
    }
    .catalog-market-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 30px;
      height: 18px;
      padding: 0 6px;
      border-radius: 999px;
      background: #eef4ff;
      color: #1d4ed8;
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.02em;
      flex-shrink: 0;
    }
    .catalog-sku,
    .catalog-title-main {
      color: var(--text);
      font-weight: 600;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .catalog-asin-inline {
      color: var(--muted);
      font-size: 0.7rem;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }
    .catalog-title-link {
      color: var(--accent);
      font-weight: 600;
      text-decoration: none;
      display: inline-block;
      white-space: nowrap;
    }
    .catalog-title-link:hover { color: var(--accent-hover); text-decoration: underline; }
    .catalog-title-scroll {
      overflow-x: auto;
      overflow-y: hidden;
      white-space: nowrap;
      scrollbar-width: thin;
      -webkit-overflow-scrolling: touch;
      padding-right: 6px;
      box-sizing: border-box;
    }
    .catalog-submeta {
      color: var(--muted);
      font-size: 0.72rem;
      line-height: 1.4;
      word-break: break-word;
    }
    .catalog-bsr-cell {
      font-variant-numeric: tabular-nums;
      font-weight: 600;
      color: var(--text);
      padding-left: 8px !important;
      padding-right: 8px !important;
      white-space: nowrap;
      overflow: hidden;
      line-height: 1.2;
      text-align: left;
      vertical-align: middle;
    }
    .catalog-bsr-inline {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      max-width: 100%;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
    }
    .catalog-bsr-rank {
      flex: 0 0 auto;
      white-space: nowrap;
    }
    .catalog-bsr-sep {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 0.68rem;
    }
    .catalog-bsr-category {
      flex: 0 1 auto;
      min-width: 0;
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 500;
      line-height: 1.2;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .catalog-source-list {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .catalog-source-badge {
      display: inline-flex;
      align-items: center;
      min-height: 22px;
      padding: 0 8px;
      border-radius: 999px;
      background: #f3f6fa;
      border: 1px solid rgba(148, 163, 184, 0.18);
      color: var(--text-secondary);
      font-size: 0.7rem;
      font-weight: 600;
      white-space: nowrap;
    }
    .catalog-source-badge.muted {
      color: var(--muted);
      background: #f8fafc;
    }
    .sku-performance-topbar { margin-bottom: 12px; }
    .sku-performance-toolbar-left {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .sku-performance-toolbar-right {
      display: flex;
      align-items: flex-end;
      justify-content: flex-end;
      gap: 8px;
      margin-left: auto;
      min-width: 0;
    }
    .sku-performance-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 104px;
      height: 38px;
      padding: 6px 16px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--card);
      color: var(--text);
      font-size: 0.875rem;
      font-weight: 600;
      text-decoration: none;
      white-space: nowrap;
      box-sizing: border-box;
    }
    .sku-performance-link:hover {
      background: var(--bg);
      color: var(--accent);
      border-color: rgba(9,105,218,0.35);
    }
    .sku-performance-inline-note {
      font-size: 0.78rem;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 180px;
      max-width: 460px;
      align-self: flex-end;
      padding-bottom: 8px;
    }
    .sku-performance-inline-note.busy { color: var(--accent); }
    .sku-performance-inline-note.error { color: var(--danger); }
    .sku-performance-date,
    .sku-performance-select,
    .sku-performance-keyword {
      font-size: 0.82rem;
      padding: 6px 10px;
      height: 38px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--card);
      color: var(--text);
      box-sizing: border-box;
    }
    .sku-performance-date { min-width: 132px; }
    .sku-performance-select { min-width: 92px; }
    .sku-performance-keyword { min-width: 180px; }
    .sku-performance-summary {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 12px;
    }
    .sku-performance-table-wrap {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      position: relative;
      overflow-x: auto;
      overflow-y: visible;
      -webkit-overflow-scrolling: touch;
    }
    .sku-performance-table {
      --sku-perf-date-w: 168px;
      --sku-perf-market-w: 64px;
      --sku-perf-sku-w: 132px;
      width: 100%;
      min-width: 1420px;
      border-collapse: collapse;
      table-layout: fixed;
    }
    .sku-performance-table-core {
      min-width: 0;
    }
    .sku-performance-table-full { min-width: 1420px; }
    .sku-performance-table col.col-date { width: var(--sku-perf-date-w); }
    .sku-performance-table col.col-market { width: var(--sku-perf-market-w); }
    .sku-performance-table col.col-sku { width: var(--sku-perf-sku-w); }
    .sku-performance-table col.col-metric { width: 6.8%; }
    .sku-performance-table col.col-metric-wide { width: 8%; }
    .sku-performance-table-core col.col-metric,
    .sku-performance-table-core col.col-metric-wide {
      width: calc((100% - var(--sku-perf-date-w) - var(--sku-perf-market-w) - var(--sku-perf-sku-w)) / 7);
    }
    .sku-performance-table th,
    .sku-performance-table td {
      padding: 10px 8px;
      border-bottom: 1px solid var(--border);
      text-align: left;
      font-size: 0.82rem;
      background: #fff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .sku-performance-table th {
      color: var(--text-secondary);
      white-space: nowrap;
      position: sticky;
      top: 0;
      z-index: 4;
      background: #fbfcfe;
      font-weight: 500;
    }
    .sku-performance-table th:nth-child(1),
    .sku-performance-table td:nth-child(1),
    .sku-performance-table th:nth-child(2),
    .sku-performance-table td:nth-child(2),
    .sku-performance-table th:nth-child(3),
    .sku-performance-table td:nth-child(3) {
      position: sticky;
      z-index: 2;
      background: #fff;
    }
    .sku-performance-table th:nth-child(1),
    .sku-performance-table td:nth-child(1) {
      left: 0;
      width: var(--sku-perf-date-w);
      min-width: var(--sku-perf-date-w);
      max-width: var(--sku-perf-date-w);
    }
    .sku-performance-table th:nth-child(2),
    .sku-performance-table td:nth-child(2) {
      left: var(--sku-perf-date-w);
      width: var(--sku-perf-market-w);
      min-width: var(--sku-perf-market-w);
      max-width: var(--sku-perf-market-w);
    }
    .sku-performance-table th:nth-child(3),
    .sku-performance-table td:nth-child(3) {
      left: calc(var(--sku-perf-date-w) + var(--sku-perf-market-w));
      width: var(--sku-perf-sku-w);
      min-width: var(--sku-perf-sku-w);
      max-width: var(--sku-perf-sku-w);
    }
    .sku-performance-table thead th:nth-child(1),
    .sku-performance-table thead th:nth-child(2),
    .sku-performance-table thead th:nth-child(3) {
      z-index: 6;
      background: #fbfcfe;
    }
    .sku-performance-table th.num,
    .sku-performance-table td.num {
      text-align: right;
      font-variant-numeric: tabular-nums;
    }
    .period-cell {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
      line-height: 1.15;
    }
    .period-main {
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .perf-trend-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 12px;
    }
    .perf-trend-card {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 12px 14px 10px;
      box-shadow: var(--shadow-sm);
    }
    .perf-trend-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 8px;
    }
    .perf-trend-head-right {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 6px;
    }
    .perf-trend-toolbar {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .perf-trend-title {
      font-size: 0.84rem;
      font-weight: 700;
      color: var(--text);
    }
    .perf-trend-subtitle {
      margin-top: 3px;
      font-size: 0.72rem;
      color: var(--text-secondary);
    }
    .perf-trend-stats {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 3px;
      font-size: 0.72rem;
      color: var(--text-secondary);
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    .perf-trend-metric-select-wrap {
      position: relative;
      display: inline-flex;
      align-items: center;
    }
    .perf-trend-metric-select-wrap::after {
      content: "▾";
      position: absolute;
      right: 11px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-secondary);
      font-size: 0.7rem;
      pointer-events: none;
    }
    .perf-trend-metric-select {
      min-width: 108px;
      height: 32px;
      padding: 0 28px 0 12px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #fff;
      color: var(--text);
      font-size: 0.72rem;
      font-weight: 600;
      appearance: none;
      -webkit-appearance: none;
      cursor: pointer;
    }
    .perf-trend-sku-dropdown {
      position: relative;
    }
    .perf-trend-sku-dropdown summary {
      list-style: none;
    }
    .perf-trend-sku-dropdown summary::-webkit-details-marker {
      display: none;
    }
    .perf-trend-sku-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 999px;
      background: #f4f7fb;
      border: 1px solid var(--border);
      color: var(--text);
      font-size: 0.72rem;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
    }
    .perf-trend-sku-pill::after {
      content: '▾';
      font-size: 0.68rem;
      color: var(--text-secondary);
    }
    .perf-trend-sku-dropdown[open] .perf-trend-sku-pill::after {
      content: '▴';
    }
    .perf-trend-sku-menu {
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      z-index: 4;
      width: 240px;
      max-height: 220px;
      overflow: auto;
      padding: 8px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    }
    .perf-trend-sku-option {
      display: block;
      width: 100%;
      padding: 8px 10px;
      border: none;
      border-radius: 10px;
      background: transparent;
      color: var(--text);
      text-align: left;
      font-size: 0.76rem;
      cursor: pointer;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .perf-trend-sku-option:hover {
      background: #f8fafc;
    }
    .perf-trend-sku-option.active {
      background: #eef4ff;
      color: #1d4ed8;
    }
    .perf-trend-filter-summary {
      margin-bottom: 8px;
      font-size: 0.72rem;
      color: var(--text-secondary);
      font-variant-numeric: tabular-nums;
    }
    .perf-trend-svg {
      display: block;
      width: 100%;
      height: 148px;
    }
    .perf-trend-chart-wrap {
      position: relative;
    }
    .perf-trend-tooltip {
      position: absolute;
      left: 0;
      top: 0;
      transform: translate(-50%, calc(-100% - 8px));
      padding: 6px 8px;
      border-radius: 8px;
      background: rgba(15, 23, 42, 0.92);
      color: #fff;
      font-size: 0.7rem;
      line-height: 1.35;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.12s ease;
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
      z-index: 2;
    }
    .perf-trend-tooltip.visible {
      opacity: 1;
    }
    .perf-trend-tooltip .chart-tooltip-date {
      font-size: 0.7rem;
      font-weight: 700;
      color: rgba(248, 250, 252, 0.96);
    }
    .perf-trend-tooltip .chart-tooltip-list {
      margin-top: 6px;
      display: grid;
      gap: 3px;
    }
    .perf-trend-tooltip .chart-tooltip-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: rgba(226, 232, 240, 0.96);
      white-space: nowrap;
    }
    .perf-trend-tooltip .chart-tooltip-row strong {
      color: #fff;
      font-weight: 700;
    }
    .perf-trend-axis {
      stroke: rgba(148, 163, 184, 0.45);
      stroke-width: 1;
    }
    .perf-trend-avg-line {
      stroke: rgba(148, 163, 184, 0.65);
      stroke-width: 1.5;
      stroke-dasharray: 4 4;
    }
    .metric-inline {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 4px;
      width: 100%;
    }
    .metric-value {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .sku-performance-table tbody tr:hover td { background: #fafbfc; }
    .sku-performance-table tr.summary-row td {
      background: #fafbfc;
      font-weight: 600;
      border-top: 1px solid var(--border);
    }
    .sku-performance-sku {
      font-weight: 600;
      color: var(--text);
    }
    .sku-performance-view-switch {
      display: inline-flex;
      align-items: center;
      padding: 2px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: #fff;
      gap: 2px;
    }
    .sku-performance-view-btn {
      min-width: 54px;
      height: 30px;
      padding: 0 12px;
      border: none;
      border-radius: 999px;
      background: transparent;
      color: var(--text-secondary);
      font-size: 0.74rem;
      font-weight: 700;
      cursor: pointer;
    }
    .sku-performance-view-btn.active {
      background: #eaf2ff;
      color: #1d4ed8;
    }
    .sku-performance-sort-btn {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 3px;
      width: 100%;
      min-width: 0;
      padding: 0;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      font-weight: inherit;
      line-height: 1.2;
      cursor: pointer;
      white-space: nowrap;
    }
    .sku-performance-table th:not(.num) .sku-performance-sort-btn {
      justify-content: flex-start;
    }
    .sku-performance-sort-label {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .sku-performance-sort-indicator {
      flex: 0 0 auto;
      color: currentColor;
      font-size: 0.72rem;
    }
    .sku-performance-sort-btn.active {
      color: var(--accent);
    }
    @media (max-width: 768px) {
      .dashboard-row.row-top .dashboard-cards { display: flex; flex-direction: column; gap: 8px; }
      .row-top-cards .collapse-accounts-wrap { margin-top: 0; }
      .row-top-cards .collapse-accounts-wrap.collapsed { display: none; }
      .row-top-cards .card-order-1 { order: 1; }
      .row-top-cards .card-order-2 { order: 2; }
      .row-top-cards .card-order-3 { order: 3; }
      .row-top-cards .card-order-4 { order: 4; }
      .row-top-cards .card-order-5 { order: 5; }
      .collapse-accounts-body .dashboard-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
      .dashboard-card .value { font-size: 1.35rem; }
      .inventory-card .suggest-qty { display: none !important; }
      .catalog-panel { gap: 8px; }
      .catalog-panel-head { gap: 8px; }
      .catalog-summary { justify-content: flex-start; }
      .catalog-review-frame-wrap { min-height: calc(100vh - 190px); }
      .catalog-review-frame { height: calc(100vh - 190px); }
    }
    @media (max-width: 480px) {
      body { padding: 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
      .header { gap: 8px; }
      .header h1 { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .site-logo { height: 28px; width: auto; max-width: 100px; display: block; object-fit: contain; object-position: left center; clip-path: none; }
      .dashboard-row.row-top .dashboard-cards { gap: 8px; }
      .collapse-accounts-body .dashboard-cards { grid-template-columns: 1fr; gap: 12px; }
      .dashboard-row { margin-bottom: 14px; }
      .dashboard-card { padding: 16px; min-height: 64px; }
      .dashboard-card .value { font-size: 1.25rem; }
      .dashboard-card .label { font-size: 0.75rem; }
    }
    @media (max-width: 1024px) {
      .tab-bar .tab { padding: 11px 10px; }
    }
    @media (max-width: 768px) {
      .tab-bar { margin-bottom: 12px; }
      .tab-bar .tab { padding: 11px 6px; font-size: 0.76rem; }
      .sync-row { margin-bottom: 10px; gap: 8px; }
      .sync-row .sync-time { font-size: 0.82rem; }
      .sync-row .btn-refresh,
      .sync-row .btn-query { padding: 6px 11px; font-size: 0.86rem; }
      .catalog-filter-row,
      .inventory-sales-filter-row,
      .sku-performance-topbar,
      .sku-triage-topbar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        align-items: end;
      }
      .catalog-toolbar-left,
      .inventory-sales-toolbar-left,
      .sku-performance-toolbar-left,
      .sku-triage-toolbar-left { width: 100%; display: contents; }
      .catalog-filter-row .filter-field-inline,
      .inventory-sales-filter-row .filter-field-inline,
      .sku-performance-topbar .filter-field-inline,
      .sku-triage-topbar .filter-field-inline {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        min-width: 0;
      }
      .catalog-filter-row .filter-field-inline label,
      .inventory-sales-filter-row .filter-field-inline label,
      .sku-performance-topbar .filter-field-inline label,
      .sku-triage-topbar .filter-field-inline label { font-size: 0.74rem; }
      .catalog-filter-row .filter-field-inline:nth-child(1) { grid-column: 1; grid-row: 1; }
      .catalog-filter-row .filter-field-inline:nth-child(2) { grid-column: 2; grid-row: 1; }
      .catalog-filter-row .btn-query { grid-column: 3; grid-row: 1; width: 100%; height: 44px; }
      .inventory-sales-filter-row .filter-field-inline:nth-child(1) { grid-column: 1; grid-row: 1; }
      .inventory-sales-filter-row .filter-field-inline:nth-child(2) { grid-column: 2; grid-row: 1; }
      .inventory-sales-filter-row .btn-refresh { grid-column: 3; grid-row: 1; width: 100%; height: 44px; }
      .catalog-filter-row .sku-performance-select,
      .catalog-filter-row .sku-performance-keyword,
      .inventory-sales-filter-row .sku-performance-select,
      .inventory-sales-filter-row .sku-performance-keyword {
        height: 44px;
        min-height: 44px;
        box-sizing: border-box;
      }
      .catalog-filter-row .sync-time,
      .inventory-sales-filter-row .sync-time,
      .sku-performance-topbar .sync-time,
      .sku-triage-topbar .sync-time { display: none; }
      .operations-subnav { width: 100%; }
      .operations-subnav-btn { flex: 1 1 0; text-align: center; }
      .sku-triage-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
      .sku-triage-group { padding: 12px; }
      .sku-triage-group-head { flex-direction: column; align-items: flex-start; }
      .sku-triage-table-wrap { overflow: visible; border: none; background: transparent; }
      .sku-triage-table { min-width: 0; }
      .sku-triage-table thead { display: none; }
      .sku-triage-table tbody { display: grid; gap: 8px; }
      .sku-triage-table tr { display: grid; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; padding: 10px; }
      .sku-triage-table td { display: flex; flex-direction: column; gap: 4px; padding: 0; border-bottom: none; background: transparent; font-size: 0.82rem; }
      .sku-triage-table td::before { content: attr(data-label); font-size: 0.72rem; color: var(--text-secondary); }
      .sku-triage-table td.num { text-align: left; }
      .sku-triage-action { min-width: 0; }
      .inventory-sales-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
      .market-summary-card { padding: 7px 10px; min-height: 54px; height: 54px; border-radius: 14px; }
      .market-summary-card .summary-market { font-size: 1rem; font-weight: 700; }
      .inventory-sales-filters { display: grid; grid-template-columns: 1.6fr 1fr; gap: 6px; margin-bottom: 10px; align-items: end; }
      .inventory-sales-filters .filter-field { width: 100%; flex-direction: column; align-items: stretch; gap: 3px; }
      .inventory-sales-filters label { font-size: 0.76rem; }
      .inventory-sales-filters input, .inventory-sales-filters select { width: 100%; min-width: 0; font-size: 0.86rem; padding: 6px 10px; height: 44px; }
      .inventory-sales-table-wrap { border: none; background: transparent; overflow: visible; }
      .inventory-sales-table { min-width: 0; }
      .inventory-sales-table th,
      .inventory-sales-table td {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
      }
      .inventory-sales-table thead { display: none; }
      .inventory-sales-table tbody { display: grid; gap: 8px; }
      .inventory-sales-table tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 8px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
      .inventory-sales-table td { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-bottom: none; background: transparent; font-size: 0.84rem; }
      .inventory-sales-table td::before { content: attr(data-label); font-size: 0.72rem; color: var(--text-secondary); }
      .inventory-sales-table td.num { text-align: left; }
      .inventory-sales-table td.cell-market, .inventory-sales-table td.cell-sku { grid-column: 1 / -1; }
      .inventory-sales-table td.cell-market { display: none; }
      .inventory-sales-table td.cell-market::before { display: none; }
      .inventory-sales-table td.cell-sku { padding-top: 8px; padding-bottom: 4px; gap: 4px; }
      .inventory-sales-table td.cell-sku::before { display: none; }
      .inventory-sales-table td.cell-status, .inventory-sales-table td.cell-suggest, .inventory-sales-table td.cell-sales-1d, .inventory-sales-table td.cell-sales-7d, .inventory-sales-table td.cell-sales-30d { display: none; }
      .inventory-sales-mobile-card { display: grid; grid-template-columns: minmax(0, 1fr) max-content; grid-template-rows: auto auto; column-gap: 12px; row-gap: 6px; width: 100%; align-items: center; }
      .inventory-sales-sku-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
      .inventory-sales-sku { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .inventory-sales-sku-button { display: none; }
      .inventory-sales-mobile-sku { display: inline; }
      .inventory-sales-desktop-suggest { display: none; }
      .inventory-sales-mobile-market { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 22px; border-radius: 999px; background: #f1f3f5; color: var(--text-secondary); font-size: 0.72rem; font-weight: 650; }
      .inventory-sales-mobile-suggest { display: inline-flex; align-items: center; justify-content: center; min-width: 0; padding: 3px 8px; border-radius: 999px; background: rgba(239, 68, 68, 0.12); color: #b91c1c; font-size: 0.66rem; font-weight: 700; line-height: 1.15; white-space: nowrap; }
      .inventory-sales-mobile-head,
      .inventory-sales-mobile-subline,
      .inventory-sales-mobile-tags { display: none; }
      .inventory-sales-mobile-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; grid-column: 1 / -1; grid-row: 3; }
      .inventory-sales-mobile-kpis span { min-width: 0; display: grid; gap: 2px; padding: 0 2px; border-radius: 0; background: transparent; }
      .inventory-sales-mobile-kpis em { font-style: normal; color: var(--text-secondary); font-size: 0.66rem; line-height: 1.1; }
      .inventory-sales-mobile-kpis strong { color: var(--text); font-size: 0.78rem; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
      .inventory-sales-mobile-stock-inline { display: inline-flex; align-items: baseline; white-space: nowrap; color: var(--text-secondary); font-size: 0.76rem; }
      .inventory-sales-mobile-sales { display: flex; align-items: center; gap: 14px; font-size: 0.82rem; color: var(--text-secondary); white-space: nowrap; flex-wrap: nowrap; justify-content: flex-end; width: max-content; min-width: 0; text-align: right; grid-column: 2; grid-row: 1; justify-self: end; }
      .inventory-sales-mobile-stock { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: 0.78rem; white-space: nowrap; flex-wrap: nowrap; justify-content: flex-end; width: max-content; min-width: 0; text-align: right; grid-column: 2; grid-row: 2; justify-self: end; }
      .inventory-sales-meta { grid-column: 1; grid-row: 2; align-self: center; }
      .inventory-sales-table tr:not(.summary-row) td:nth-child(3),
      .inventory-sales-table tr:not(.summary-row) td:nth-child(4),
      .inventory-sales-table tr:not(.summary-row) td:nth-child(5),
      .inventory-sales-table tr:not(.summary-row) td:nth-child(6),
      .inventory-sales-table tr:not(.summary-row) td:nth-child(10) { display: none; }
      .inventory-sales-table tr.summary-row td:nth-child(3),
      .inventory-sales-table tr.summary-row td:nth-child(4),
      .inventory-sales-table tr.summary-row td:nth-child(5),
      .inventory-sales-table tr.summary-row td:nth-child(6),
      .inventory-sales-table tr.summary-row td:nth-child(7),
      .inventory-sales-table tr.summary-row td:nth-child(8),
      .inventory-sales-table tr.summary-row td:nth-child(9),
      .inventory-sales-table tr.summary-row td:nth-child(10),
      .inventory-sales-table tr.summary-row td:nth-child(11) { display: none; }
      .inventory-sales-summary-mobile { display: grid; gap: 6px; margin-top: 0; }
      .inventory-sales-summary-card { align-items: center; }
      .inventory-sales-summary-title { grid-column: 1; grid-row: 1; }
      .inventory-sales-summary-sales { grid-column: 2; grid-row: 1; }
      .inventory-sales-summary-label { grid-column: 1; grid-row: 2; flex: 0 0 auto; }
      .inventory-sales-summary-stock { display: flex; align-items: center; gap: 12px; justify-content: flex-end; width: max-content; min-width: 0; text-align: right; grid-column: 2; grid-row: 2; justify-self: end; }
      .inventory-sales-sku { font-size: 0.98rem; }
      .inventory-sales-meta { font-size: 0.76rem; margin-top: 0; }
      .status-pill { min-width: 0; padding: 4px 9px; font-size: 0.74rem; }
      .inventory-sales-table tr.row-warn { border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.05); }
      .inventory-sales-table tr.row-risk { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.06); }
      .inventory-sales-table tr.summary-row { border-color: var(--border); background: #fafbfc; }
      .inventory-sales-table tr.row-warn td, .inventory-sales-table tr.row-risk td { background: transparent; }
      .inventory-sales-table tr.summary-row td { background: transparent; }
      .replenishment-drawer { padding: 16px; }
      .finance-settings-rule { grid-template-columns: 1fr 1fr; }
      .finance-settings-date { grid-column: 1 / -1; }
      .finance-settings-row-actions { grid-column: 1 / -1; justify-self: end; }
      .finance-master-list,
      .finance-master-list.finance-master-list-subcategories {
        grid-template-columns: minmax(0, 1fr);
        max-height: 220px;
      }
      .finance-master-row.is-editing {
        grid-template-columns: minmax(0, 1fr);
      }
      .finance-settings-section-head { align-items: flex-start; flex-direction: column; }
      .finance-settings-section-head .finance-settings-add { width: 100%; }
      .sku-performance-topbar .filter-field-inline:nth-child(1) { grid-column: 1; grid-row: 1; }
      .sku-performance-topbar .filter-field-inline:nth-child(2) { grid-column: 2; grid-row: 1; }
      .sku-performance-topbar .filter-field-inline:nth-child(3) { grid-column: 1; grid-row: 2; }
      .sku-performance-topbar .filter-field-inline:nth-child(4) { grid-column: 2 / 4; grid-row: 2; }
      .sku-performance-topbar .btn-refresh { grid-column: 3; grid-row: 1; width: 100%; height: 38px; }
      .sku-performance-inline-note { grid-column: 1 / -1; grid-row: 3; max-width: none; padding-bottom: 0; }
      .sku-performance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
      .sku-performance-keyword,
      .sku-performance-date,
      .sku-performance-select { min-width: 0; width: 100%; }
      .sku-performance-table-wrap { overflow: auto; }
      .sku-performance-table-core { min-width: 0; }
      .sku-performance-table-full { min-width: 1260px; }
      .perf-trend-grid { grid-template-columns: 1fr; }
      .perf-trend-toolbar {
        width: 100%;
        justify-content: flex-start;
      }
      .perf-trend-sku-menu {
        left: 0;
        right: auto;
        width: min(260px, calc(100vw - 64px));
      }
      .sku-performance-table {
        --sku-perf-date-w: 156px;
        --sku-perf-market-w: 60px;
        --sku-perf-sku-w: 120px;
      }
    }
    @media (max-width: 640px) {
      th, td { padding: 10px 12px; font-size: 0.875rem; }
      .content-card { overflow-x: auto; }
      table { min-width: 700px; }
      .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
      .catalog-table-wrap { overflow: visible; }
      .catalog-table { min-width: 0; table-layout: auto; }
      .catalog-table thead { display: none; }
      .catalog-table tbody { display: grid; gap: 8px; padding: 8px; }
      .catalog-table tr {
        display: grid;
        gap: 8px;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #fff;
      }
      .catalog-table td {
        width: auto !important;
        padding: 0;
        border-bottom: none;
        background: transparent;
      }
      .catalog-identity {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr);
        row-gap: 4px;
        column-gap: 8px;
      }
      .catalog-market-badge { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
      .catalog-sku { grid-column: 2; grid-row: 1; }
      .catalog-asin-inline { grid-column: 2; grid-row: 2; }
      .catalog-table tbody tr:hover td { background: transparent; }
    }
    @media (max-width: 480px) {
      .sync-row.catalog-filter-row .filter-field-inline > select,
      .sync-row.catalog-filter-row .filter-field-inline > input,
      .sync-row.catalog-filter-row .filter-field-inline > button,
      .sync-row.inventory-sales-filter-row .filter-field-inline > select,
      .sync-row.inventory-sales-filter-row .filter-field-inline > input,
      .sync-row.inventory-sales-filter-row .filter-field-inline > button,
      .sync-row.sku-performance-topbar .filter-field-inline > select,
      .sync-row.sku-performance-topbar .filter-field-inline > input,
      .sync-row.sku-performance-topbar .filter-field-inline > button,
      .tax-toolbar select,
      .tax-toolbar input[type="date"],
      .tax-toolbar .btn-fetch {
        height: var(--mobile-toolbar-height) !important;
        min-height: var(--mobile-toolbar-height) !important;
        max-height: var(--mobile-toolbar-height) !important;
        line-height: var(--mobile-toolbar-height) !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        margin: 0 !important;
        vertical-align: top !important;
      }
      .sync-row.catalog-filter-row .filter-field-inline > button,
      .sync-row.inventory-sales-filter-row .filter-field-inline > button,
      .sync-row.sku-performance-topbar .filter-field-inline > button,
      .tax-toolbar .btn-fetch {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.2 !important;
      }
      .sync-row { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 6px 10px; }
      .sync-row .btn-refresh,
      .sync-row .btn-query { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
      .sync-row .sync-time { grid-column: 1; grid-row: 1; text-align: left; align-self: start; }
      .sync-row-actions { gap: 8px; }
      .sync-row-finance,
      .sync-row-inventory-sales { display: grid; grid-template-columns: 1fr auto; }
      .sync-row-finance .sync-row-actions,
      .sync-row-inventory-sales .sync-row-actions { grid-column: 1; grid-row: 1; }
      .sync-row-finance .sync-time,
      .sync-row-inventory-sales .sync-time { grid-column: 1 / -1; grid-row: 2; text-align: left; margin-left: 0; align-items: flex-start; font-size: 0.76rem; }
      .sync-row-finance .sync-meta-right,
      .sync-row-inventory-sales .sync-meta-right { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
      .sync-row.sync-row-one .sync-rates { grid-column: 1 / -1; grid-row: 2; margin-left: 0; width: auto; text-align: left; }
      .inventory-sales-summary { gap: 6px; }
      .market-summary-card { padding: 7px 10px; min-height: 52px; height: 52px; }
      .market-summary-card .summary-market { font-size: 0.98rem; font-weight: 700; }
      .inventory-sales-filters { grid-template-columns: 1.2fr 0.8fr; gap: 4px; }
      .inventory-sales-table tr { gap: 3px 6px; }
      .inventory-sales-table td { padding: 6px 7px; font-size: 0.8rem; }
      .inventory-sales-table td::before { font-size: 0.68rem; }
      .inventory-sales-mobile-card { column-gap: 8px; row-gap: 6px; }
      .inventory-sales-mobile-sales { gap: 8px; font-size: 0.76rem; white-space: nowrap; flex-wrap: nowrap; }
      .inventory-sales-mobile-stock { gap: 8px; font-size: 0.72rem; white-space: nowrap; flex-wrap: nowrap; }
      .inventory-sales-mobile-suggest { display: inline-flex; }
      .inventory-sales-summary-card { column-gap: 6px; row-gap: 6px; }
      .inventory-sales-summary-stock { gap: 8px; font-size: 0.72rem; }
      .inventory-sales-sku { font-size: 0.96rem; }
      .inventory-sales-meta { font-size: 0.72rem; }
      .status-pill { font-size: 0.7rem; padding: 4px 8px; }
      .inventory-sales-mobile-suggest { font-size: 0.7rem; }
      .tab-bar .tab { padding: 10px 4px; font-size: 0.72rem; }
      .sync-row.catalog-filter-row,
      .sync-row.inventory-sales-filter-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        align-items: end;
      }
      .sync-row.sku-performance-topbar,
      .sync-row.sku-triage-topbar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        align-items: end;
      }
      .sync-row.catalog-filter-row .sync-time,
      .sync-row.inventory-sales-filter-row .sync-time,
      .sync-row.sku-performance-topbar .sync-time,
      .sync-row.sku-triage-topbar .sync-time { display: none; }
      .sync-row.catalog-filter-row .filter-field-inline,
      .sync-row.inventory-sales-filter-row .filter-field-inline,
      .sync-row.sku-performance-topbar .filter-field-inline,
      .sync-row.sku-triage-topbar .filter-field-inline {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        min-width: 0;
      }
      .sync-row.catalog-filter-row .filter-field-inline label,
      .sync-row.inventory-sales-filter-row .filter-field-inline label,
      .sync-row.sku-performance-topbar .filter-field-inline label,
      .sync-row.sku-triage-topbar .filter-field-inline label { font-size: 0.74rem; }
      .sync-row.catalog-filter-row .filter-field-inline:nth-child(1) { grid-column: 1; grid-row: 1; }
      .sync-row.catalog-filter-row .filter-field-inline:nth-child(2) { grid-column: 2; grid-row: 1; }
      .sync-row.catalog-filter-row .filter-field-inline:nth-child(3) { grid-column: 3; grid-row: 1; }
      .sync-row.catalog-filter-row .filter-field-inline:nth-child(4) { grid-column: 1 / 4; grid-row: 2; }
      .sync-row.catalog-filter-row .btn-query {
        width: 100%;
        height: var(--mobile-toolbar-height) !important;
        min-height: var(--mobile-toolbar-height) !important;
        max-height: var(--mobile-toolbar-height) !important;
        min-width: 0;
        padding: 0 8px;
        white-space: nowrap;
        justify-self: stretch;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .catalog-review-subnav {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
        align-items: start;
      }
      .catalog-review-subnav-left {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        min-width: 0;
      }
      .catalog-review-frame-wrap { min-height: calc(100vh - 164px); }
      .catalog-review-frame { height: calc(100vh - 164px); min-height: 620px; }
      .sync-row.inventory-sales-filter-row .filter-field-inline:nth-child(1) { grid-column: 1; grid-row: 1; }
      .sync-row.inventory-sales-filter-row .filter-field-inline:nth-child(2) { grid-column: 2; grid-row: 1; }
      .sync-row.inventory-sales-filter-row .filter-field-inline-button {
        grid-column: 3;
        grid-row: 1;
      }
      .sync-row.inventory-sales-filter-row .inventory-sales-replenish-entry {
        display: none;
      }
      .sync-row.inventory-sales-filter-row .btn-refresh {
        width: 100%;
        height: var(--mobile-toolbar-height) !important;
        min-height: var(--mobile-toolbar-height) !important;
        max-height: var(--mobile-toolbar-height) !important;
        min-width: 0;
        padding: 0 8px;
        white-space: nowrap;
        justify-self: stretch;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .sync-row.sku-performance-topbar .filter-field-inline:nth-child(1) { grid-column: 1; grid-row: 1; }
      .sync-row.sku-performance-topbar .filter-field-inline:nth-child(2) { grid-column: 2; grid-row: 1; }
      .sync-row.sku-performance-topbar .filter-field-inline:nth-child(3) { grid-column: 1; grid-row: 2; }
      .sync-row.sku-performance-topbar .filter-field-inline:nth-child(4) { grid-column: 2 / 4; grid-row: 2; }
      .sync-row.sku-performance-topbar .filter-field-inline-button {
        grid-column: 3;
        grid-row: 1;
      }
      .sync-row.sku-performance-topbar .sku-performance-toolbar-right {
        grid-column: 1 / -1;
        grid-row: 4;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        justify-content: flex-end;
        margin-left: 0;
      }
      .sync-row.sku-performance-topbar .sku-performance-view-switch {
        width: 100%;
        justify-content: center;
      }
      .sync-row.sku-performance-topbar .sku-performance-view-btn {
        flex: 1 1 0;
      }
      .sync-row.sku-performance-topbar .sku-performance-inline-note {
        grid-column: 1 / -1;
        grid-row: 3;
        min-width: 0;
        max-width: none;
        padding-bottom: 0;
      }
      .sync-row.sku-performance-topbar .btn-refresh {
        width: 100%;
        height: var(--mobile-toolbar-height) !important;
        min-height: var(--mobile-toolbar-height) !important;
        max-height: var(--mobile-toolbar-height) !important;
        min-width: 0;
        padding: 0 8px;
        white-space: nowrap;
        justify-self: stretch;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .sync-row.sku-performance-topbar .sku-performance-link {
        width: 100%;
        min-width: 0;
        height: var(--mobile-toolbar-height) !important;
        min-height: var(--mobile-toolbar-height) !important;
        max-height: var(--mobile-toolbar-height) !important;
        padding: 0 8px;
      }
      .sync-row.inventory-sales-filter-row .sku-performance-keyword,
      .sync-row.sku-performance-topbar .sku-performance-keyword,
      .sync-row.sku-performance-topbar .sku-performance-date,
      .sync-row.inventory-sales-filter-row .sku-performance-select,
      .sync-row.sku-performance-topbar .sku-performance-select {
        min-width: 0;
        width: 100%;
        font-size: 0.8rem;
        height: var(--mobile-toolbar-height) !important;
        min-height: var(--mobile-toolbar-height) !important;
        max-height: var(--mobile-toolbar-height) !important;
        padding: 0 8px !important;
        box-sizing: border-box;
      }
      #inventorySalesMarket,
      #inventorySalesKeyword,
      #inventorySalesRefreshBtn,
      #skuPerfStartDate,
      #skuPerfEndDate,
      #skuPerfMarket,
      #skuPerfKeyword,
      #skuPerfQueryBtn {
        height: var(--mobile-toolbar-height) !important;
        min-height: var(--mobile-toolbar-height) !important;
        max-height: var(--mobile-toolbar-height) !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
        margin: 0 !important;
        vertical-align: top !important;
      }
      #inventorySalesMarket,
      #inventorySalesKeyword,
      #skuPerfStartDate,
      #skuPerfEndDate,
      #skuPerfMarket,
      #skuPerfKeyword {
        padding: 0 8px !important;
        line-height: var(--mobile-toolbar-height) !important;
        -webkit-appearance: none !important;
        appearance: none !important;
      }
      #inventorySalesRefreshBtn,
      #skuPerfQueryBtn {
        padding: 0 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.2 !important;
        font-size: 0.8rem !important;
        -webkit-appearance: none !important;
        appearance: none !important;
      }
      .sync-row.sku-performance-topbar .sku-performance-date,
      .sync-row.inventory-sales-filter-row .sku-performance-select,
      .sync-row.sku-performance-topbar .sku-performance-select,
      .sync-row.inventory-sales-filter-row .sku-performance-keyword,
      .sync-row.sku-performance-topbar .sku-performance-keyword {
        -webkit-appearance: none;
        appearance: none;
        line-height: 1.2;
      }
      #inventorySalesMarket::-webkit-date-and-time-value,
      #inventorySalesKeyword::-webkit-date-and-time-value,
      #skuPerfStartDate::-webkit-date-and-time-value,
      #skuPerfEndDate::-webkit-date-and-time-value,
      #skuPerfMarket::-webkit-date-and-time-value,
      #skuPerfKeyword::-webkit-date-and-time-value {
        line-height: var(--mobile-toolbar-height) !important;
      }
      #skuPerfStartDate::-webkit-datetime-edit,
      #skuPerfEndDate::-webkit-datetime-edit,
      .tax-toolbar input[type="date"]::-webkit-datetime-edit {
        min-height: var(--mobile-toolbar-height) !important;
        line-height: var(--mobile-toolbar-height) !important;
        padding: 0 !important;
      }
      .sync-row.sku-performance-topbar .sku-performance-date::-webkit-date-and-time-value {
        text-align: left;
      }
      .sync-row.inventory-sales-filter-row #inventorySalesKeyword { grid-column: 2; grid-row: 1; }
      .sku-performance-summary { grid-template-columns: 1fr; }
      .sku-performance-table-wrap { overflow: auto; }
      .sku-performance-table-core { min-width: 0; }
      .sku-performance-table-full { min-width: 1180px; }
      .perf-trend-card { padding: 10px 12px 8px; }
      .perf-trend-head { gap: 8px; }
      .perf-trend-head-right { width: 100%; align-items: stretch; }
      .perf-trend-stats { font-size: 0.68rem; }
      .perf-trend-svg { height: 132px; }
      .sku-performance-table {
        --sku-perf-date-w: 150px;
        --sku-perf-market-w: 58px;
        --sku-perf-sku-w: 112px;
      }
    }
