.workspace-content { min-width: 0; }
.approved-category { display: grid; grid-template-columns: minmax(160px, .55fr) minmax(0, 1fr); align-items: end; gap: 8px 12px; }
.approved-category .field-label { min-width: 0; }
.approved-category select { width: 100%; text-overflow: ellipsis; }
.approved-category-status { grid-column: 1 / -1; margin: 0; }
.approved-category .btn { justify-self: start; }
.workspace-shell .nav { overflow: auto; }
.nav-group small { display: block; color: var(--color-nav-muted); padding: 8px 12px 2px; }
.nav-group a { min-height: 36px; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-links { margin-top: 16px; }
.password-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.token-control { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.agent-key-form { max-width: 680px; }
.agent-scopes { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0; padding: 8px 12px; min-width: 0; border: 1px solid var(--color-line); border-radius: 8px; }
.agent-scope { min-height: 44px; }
.agent-key-card { margin-top: 10px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.dashboard-tasks { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-link { display: block; min-width: 0; }
.metric-link:hover { border-color: var(--color-green); }
.dashboard-sync { margin-bottom: 12px; }
.dashboard-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; }
.trend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.trend li { min-width: 0; display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.trend small { overflow-wrap: anywhere; }
.trend-legend { display: flex; gap: 12px; margin-bottom: 8px; }
.trend-count { color: var(--color-green); }
.trend-amount { color: var(--color-blue); }
.trend-bars { display: flex; height: 120px; align-items: flex-end; justify-content: center; gap: 4px; border-bottom: 1px solid var(--color-line); }
.trend-bars span { height: var(--bar); width: min(30%, 16px); border-radius: 4px 4px 0 0; }
.bar-count { background-color: var(--color-green); }
.bar-amount { background-color: var(--color-blue); }
.dashboard-orders { list-style: none; margin: 0; padding: 0; }
.dashboard-order { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; border-bottom: 1px solid var(--color-line); padding: 12px 0; }
.dashboard-order > div { overflow-wrap: anywhere; }
.dashboard-order small { display: block; }
.mobile-tabs { display: none; }
.touch-cards { padding: 12px; }
.touch-card { border: 1px solid var(--color-line); border-radius: var(--radius); padding: 12px; overflow-wrap: anywhere; }
.touch-card + .touch-card { margin-top: 10px; }
.touch-summary { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.touch-card .row-actions { margin-top: 8px; }
.touch-card .text-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-line); border-radius: 6px; padding: 0 8px; }
.stepper { display: inline-grid; max-width: 100%; grid-template-columns: 44px minmax(65px, 112px) 44px; align-items: center; gap: 4px; }
.stepper input { min-width: 0; text-align: center; }
.stock-control { display: flex; flex-wrap: wrap; margin-top: 8px; align-items: center; gap: 8px; }
.price-control { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.touch-card .product, .touch-card .product > div { min-width: 0; }
.order-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 12px 0; }
.order-filter .field-label { min-width: 0; }
.order-filter .field { width: 100%; }
.orders-tabs [aria-current=page] { background: var(--color-green-soft); color: var(--color-green); }
.orders-tabs a, .catalog-shell .tabs a { display: inline-flex; align-items: center; white-space: nowrap; }
.break-word, .order-meta dd, .order-line { overflow-wrap: anywhere; }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 12px; margin-bottom: 0; }
.order-meta dd { margin: 3px 0 0; font-weight: 600; }
.order-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--color-line); }
.order-line > div { flex: 1 0 min(100%, 170px); min-width: 0; }
.order-line small { display: block; }
.order-package { margin-top: 10px; }
.product-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(90px, 100%), 1fr)); gap: 8px; margin: 8px 0 16px; }
.product-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--color-paper-2); border-radius: 6px; }
.detail-tile { min-width: 0; display: grid; gap: 4px; }
.media-row [aria-pressed=true] { outline: 2px solid var(--color-green); outline-offset: 2px; }
.product-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.raw-json { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; padding: 12px; background: var(--color-paper-2); }
.stock-field { width: 110px; }
dialog.stock-flow { margin: 0 0 0 auto; min-height: 100%; max-height: 100%; border-radius: 0; }
@media (max-width: 920px) {
  .dashboard-bottom { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
  .approved-category { grid-template-columns: minmax(0, 1fr); }
  .token-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .token-control .field { grid-column: 1 / -1; }
  .has-mobile-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .has-mobile-nav .sidebar, .has-mobile-nav .menu-toggle { display: none !important; }
  .has-mobile-nav .topbar { min-height: 56px; padding-inline: 12px; }
  .has-mobile-nav .crumb > a, .has-mobile-nav .crumb > span { display: none; }
  .has-mobile-nav .crumb { min-width: 0; white-space: normal; }
  .has-mobile-nav .topbar-session { display: none; }
  .mobile-tabs { position: fixed; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    inset: auto 0 0; z-index: 20; min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: var(--color-paper); border-top: 1px solid var(--color-line); }
  .mobile-tabs a { min-width: 0; min-height: 64px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; color: var(--color-muted); font-size: 12px; }
  .mobile-tabs a[aria-current=page] { color: var(--color-green); font-weight: 700; background: var(--color-green-soft); }
  .mobile-tabs svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .has-mobile-nav .btn, .has-mobile-nav .field, .has-mobile-nav .tab, .has-mobile-nav .text-button,
  .login .field, .login .btn { min-height: 44px; }
  .has-mobile-nav .field, .login .field { font-size: 16px; }
  .has-mobile-nav .check { width: 44px; height: 44px; margin: 0; }
  .has-mobile-nav .switch { position: relative; width: 44px; height: 44px; background: transparent; }
  .has-mobile-nav .switch::before { inset: 12px auto auto 0; width: 44px; height: 20px; border-radius: 20px; background: var(--color-field); transform: none; }
  .has-mobile-nav .switch::after { content: ''; position: absolute; top: 15px; left: 3px; height: 14px; width: 14px; border-radius: 50%; background: var(--color-paper); }
  .has-mobile-nav .switch:checked::before { background: var(--color-green); }
  .has-mobile-nav .switch:checked::after { transform: translateX(24px); }
  .catalog-shell .tabs, .orders-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .catalog-shell .toolbar > .filter-group:first-child { width: 100%; }
  .catalog-shell .publish-grid, .catalog-shell .fields { grid-template-columns: minmax(0, 1fr); }
  .catalog-shell .matrix { display: block; min-width: 0; }
  .catalog-shell .matrix thead { display: none; }
  .catalog-shell .matrix tbody { display: block; }
  .catalog-shell .matrix tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--color-line); }
  .catalog-shell .matrix td { display: block; min-width: 0; padding: 0; border: 0; }
  .catalog-shell .matrix td[data-label]::before { display: block; content: attr(data-label); }
  .catalog-shell .matrix input { min-width: 0; width: 100%; }
  .account-grid { grid-template-columns: minmax(0, 1fr); }
  .account-grid .field, .account-grid .btn, .account-links .btn { min-height: 44px; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-bottom { grid-template-columns: minmax(0, 1fr); }
  .dashboard-order { grid-template-columns: auto minmax(0, 1fr) auto; }
  .dashboard-order > .btn { grid-column: 2 / -1; min-height: 44px; }
  .order-filter .field-label { flex: 1 0 100%; }
}
