/* Forest Ledger refines the active shell; amounts, routes and access remain source-owned. */
#shopRoot.workspace-shell,
[data-theme="dark"] #shopRoot.workspace-shell {
  --workspace-bg: var(--background);
  --workspace-card: var(--surface);
  --workspace-soft: var(--selected-background);
  --workspace-ink: var(--text-primary);
  --workspace-muted: var(--text-secondary);
  --workspace-line: var(--border);
  --workspace-accent: var(--primary);
  --workspace-side: #173d2d;
  --workspace-top: 64px;
  --bot: 68px;
  --workspace-radius: 14px;
  --control-border: #6d8373;
  font-family: var(--font-body, "Segoe UI", sans-serif);
  color: var(--text-primary);
  height: var(--workspace-visible-height, 100%);
}
[data-theme="dark"] #shopRoot.workspace-shell {
  --workspace-side: #121214;
  --control-border: #898990;
}
#shopRoot.workspace-shell .shell { font-family: inherit; }
#shopRoot.workspace-shell .topbar {
  display: grid;
  grid-template-columns: 44px 32px minmax(80px, 200px) 44px 44px minmax(100px, 1fr) auto;
  gap: 8px;
  padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
}
#shopRoot.workspace-shell #menuBtn { grid-column: 1; }
#shopRoot.workspace-shell .workspace-logo { grid-column: 2; width: 32px; height: 32px; }
#shopRoot.workspace-shell .workspace-business {
  grid-column: 3;
  width: 100%;
  max-width: 100%;
  padding-inline: 4px;
  font-size: 14px;
  font-weight: 650;
}
#shopRoot.workspace-shell #backBtn { grid-column: 4; display: flex; }
#shopRoot.workspace-shell #forwardBtn { grid-column: 5; display: flex; }
#shopRoot.workspace-shell .topbar .search {
  grid-column: 6;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 46px;
  margin: 0;
  border-color: var(--control-border) !important;
  border-radius: 11px;
}
#shopRoot.workspace-shell .topbar .search input { min-width: 0; min-height: 44px; height: 44px; padding: 0; border: 0; box-shadow: none; font-size: 16px; background: transparent !important; }
#shopRoot.workspace-shell .topbar .shop-search-clear { width: 44px; height: 44px; flex: 0 0 44px; padding: 0; }
#shopRoot.workspace-shell .topbar .tb-right { grid-column: 7; margin: 0; gap: 4px; }
#shopRoot.workspace-shell .topbar :is(.tb-btn, .avatar, .conn) {
  min-width: 44px;
  min-height: 44px;
  border-radius: 11px;
}
#shopRoot.workspace-shell .topbar .conn { display: flex; }
#shopRoot.workspace-shell .topbar .avatar {
  background: var(--primary-light);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
#shopRoot.workspace-shell .main {
  padding: 20px 24px calc(var(--bot) + var(--sab) + 88px);
  scroll-padding-block: 16px calc(var(--bot) + var(--sab) + 88px);
}
#shopRoot.workspace-shell .side {
  --nav-surface: var(--workspace-side);
  --nav-text: #edf4ef;
  --nav-selected: #315e44;
  width: 248px;
  padding: 12px 10px calc(var(--bot) + var(--sab) + 24px);
  scrollbar-color: #789886 transparent;
}
[data-theme="dark"] #shopRoot.workspace-shell .side { --nav-selected: #29292d; }
#shopRoot.workspace-shell .side .brand { padding: 8px 10px 16px; }
#shopRoot.workspace-shell .side .brand-name { color: #edf4ef; }
#shopRoot.workspace-shell .workspace-group { margin-block: 6px; }
#shopRoot.workspace-shell .workspace-group > summary {
  padding: 10px 8px;
  color: #d0e2d6;
  font-size: 12px;
  line-height: 1.5;
}
#shopRoot.workspace-shell .side .nav {
  border-radius: 9px;
  padding: 10px;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}
#shopRoot.workspace-shell .side .nav[aria-current="page"] {
  box-shadow: inset 3px 0 0 #a9d1b6;
}
#shopRoot.workspace-shell[dir="rtl"] .side .nav[aria-current="page"] { box-shadow: inset -3px 0 0 #a9d1b6; }
#shopRoot.workspace-shell .workspace-menu-search { background: var(--workspace-side); padding-block: 10px; }
#shopRoot.workspace-shell .workspace-menu-search input { border-color: #789886; font-size: 16px; }
#shopRoot.workspace-shell .workspace-nav-close { color: #edf4ef; }
#shopRoot.workspace-shell .workspace-plan { line-height: 1.5; }
#shopRoot.workspace-shell .workspace-popover { box-shadow: var(--elevation); border-radius: var(--workspace-radius); }
#shopRoot.workspace-shell .botnav {
  /* The source order stays Home, Sales, +, Khata, Stock, More. Unequal groups keep + centered. */
  grid-template-columns: repeat(2, minmax(44px, 1.5fr)) 56px repeat(3, minmax(44px, 1fr));
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
  bottom: var(--workspace-keyboard-inset, 0px);
  box-shadow: 0 -4px 18px -14px var(--text-secondary);
}
#shopRoot.workspace-shell .botnav > #bnStock { display: flex; }
#shopRoot.workspace-shell .botnav:has(> #bnStock[hidden]),
#shopRoot.workspace-shell .botnav:has(> #bnStock.hide),
#shopRoot.workspace-shell .botnav:has(> #bnStock[style*="display: none"]) {
  grid-template-columns: minmax(44px, 1fr) minmax(44px, 1fr) 56px minmax(44px, 1fr) minmax(44px, 1fr);
}
#shopRoot.workspace-shell .botnav > .bn {
  width: 100%;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  padding: 7px 1px;
  font-size: 11px;
  line-height: 1.3;
}
#shopRoot.workspace-shell .botnav > .bn span { white-space: normal; }
#shopRoot.workspace-shell .botnav > .fab-slot { width: 56px; }
#shopRoot.workspace-shell .botnav #shopFab { width: 48px; height: 48px; border-radius: 50%; }
#shopRoot.workspace-shell .botnav #shopMic {
  width: 44px;
  height: 44px;
  bottom: calc(var(--bot) + var(--sab) + var(--workspace-keyboard-inset, 0px) + 16px);
  border-width: 1px;
  box-shadow: var(--elevation);
}
#shopRoot.workspace-shell #p-dashboard .phead h1 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.035em; }
#shopRoot.workspace-shell #p-dashboard .phead p { line-height: 1.5; }
#shopRoot.workspace-shell #p-dashboard .dash-workspace {
  padding: 12px 16px;
  border-radius: var(--workspace-radius);
  box-shadow: none;
}
#shopRoot.workspace-shell .dash-action.primary { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
#shopRoot.workspace-shell #p-dashboard .kpis { gap: 12px; }
#shopRoot.workspace-shell #p-dashboard .kpi {
  min-width: 0;
  min-height: 112px;
  padding: 14px;
  border-radius: var(--workspace-radius);
  box-shadow: none;
  background: var(--surface) !important;
}
#shopRoot.workspace-shell #p-dashboard .kpi::before { display: none; }
#shopRoot.workspace-shell #p-dashboard .kpi-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
#shopRoot.workspace-shell #p-dashboard .kpi-l { font-size: 12px; font-weight: 600; line-height: 1.4; text-transform: none; letter-spacing: normal; }
#shopRoot.workspace-shell #p-dashboard .forest-metric-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
}
#shopRoot.workspace-shell #p-dashboard .forest-metric-icon svg { width: 18px; height: 18px; }
#shopRoot.workspace-shell #p-dashboard .kpi-v {
  font-size: clamp(20px, 1.8vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  margin-block: 8px 4px;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#shopRoot.workspace-shell #p-dashboard .kpi-d { font-size: 11px; line-height: 1.5; }
#shopRoot.workspace-shell #p-dashboard :is(.card, .briefing, .dcard, .workspace-operations, .workspace-trends) { border-radius: var(--workspace-radius); }
#shopRoot.workspace-shell :is(.card-h, .set-h) { padding: 14px 16px; }
#shopRoot.workspace-shell :is(.daily-row, .txn) { line-height: 1.5; }
#shopRoot.workspace-shell .daily-actions button { border-radius: 11px; padding: 11px 12px; border-style: solid; }
#shopRoot.workspace-shell :is(.qgrid .q, .qv-note, .qv-preview) { border-radius: 12px; }
#shopRoot.workspace-shell :is(.sheet, .qv-note, .qv-preview) { color: var(--text-primary); }
#shopRoot.workspace-shell .sheetwrap { bottom: var(--workspace-keyboard-inset, 0px); }
#shopRoot.workspace-shell .sheet {
  max-height: calc(var(--workspace-visible-height, 100dvh) - 20px - env(safe-area-inset-top, 0px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  scroll-padding-block: 16px 80px;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  box-shadow: var(--elevation);
}
#shopRoot.workspace-shell .sheet :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 16px; }
#shopRoot.workspace-shell .sheet :is(button, .qv-chip) { min-height: 44px; }
#shopRoot.workspace-shell .sheet :is(.qv-mic, [data-close]) { min-width: 44px; }
#shopRoot.workspace-shell :is(.btn, .daily-tab, .sheet button) { line-height: 1.4; }
#shopRoot.workspace-shell .btn { border-style: solid; }
#shopRoot.workspace-shell .card-h h3 { font-size: 14px; }
#shopRoot.workspace-shell :is(.money, .num, .kpi-v) { font-variant-numeric: tabular-nums; }
#shopRoot.workspace-shell .workspace-dashboard-grid :is(th, td) { padding: 10px 12px; }
.overlay { padding-bottom: calc(18px + var(--workspace-keyboard-inset, 0px)); }
.overlay__panel { max-height: calc(var(--workspace-visible-height, 100dvh) - 36px); box-shadow: var(--elevation); }
.overlay__panel :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { min-height: 44px; }
.overlay__panel .modal-foot { gap: 8px; }
dialog[open] { max-height: calc(var(--workspace-visible-height, 100dvh) - 32px) !important; inset-block-end: var(--workspace-keyboard-inset, 0px); overflow-y: auto; scroll-padding-block: 16px; }
#shopRoot #p-settings .settings-administration { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px; }
#shopRoot #p-settings .settings-administration[hidden] { display: none; }
#shopRoot #p-settings .settings-administration .btn { width: auto; min-width: 44px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--input-border); border-radius: 11px; background: var(--surface); color: var(--text-primary); font: inherit; font-size: 13px; line-height: 1.4; white-space: normal; }
@media (min-width: 901px) {
  #shopRoot.workspace-shell .botnav { inset-inline-start: 248px; }
  #shopRoot.workspace-shell.workspace-collapsed .botnav { inset-inline-start: 0; }
}
@media (max-width: 1100px) and (min-width: 601px) {
  #shopRoot.workspace-shell .topbar { grid-template-columns: 44px 28px minmax(70px, 120px) 44px 44px minmax(90px, 1fr) auto; gap: 4px; padding-inline: 8px; }
  #shopRoot.workspace-shell .topbar .conn { flex-direction: column; justify-content: center; gap: 3px; padding-inline: 0; }
  #shopRoot.workspace-shell .topbar .conn b { display: block; font-size: 10px; line-height: 1.2; }
}
@media (max-width: 900px) {
  #shopRoot.workspace-shell .side { width: min(88vw, 312px); padding-bottom: calc(var(--bot) + var(--sab) + 24px); }
  #shopRoot.workspace-shell .main { padding: 16px 12px calc(var(--bot) + var(--sab) + 84px); }
}
@media (max-width: 600px) {
  #shopRoot.workspace-shell, [data-theme="dark"] #shopRoot.workspace-shell { --workspace-top: 104px; }
  #shopRoot.workspace-shell .topbar {
    grid-template-columns: 44px 44px minmax(0, 1fr) 132px;
    grid-template-rows: 44px 44px;
    gap: 4px;
    padding: calc(var(--sat, env(safe-area-inset-top, 0px)) + 4px) 8px 8px;
  }
  #shopRoot.workspace-shell :is(#menuBtn, .workspace-logo, .workspace-business, .topbar .tb-right) { grid-row: 1; }
  #shopRoot.workspace-shell .workspace-logo { width: 28px; height: 28px; justify-self: center; }
  #shopRoot.workspace-shell .workspace-business { max-width: 100%; font-size: 13px; }
  #shopRoot.workspace-shell .topbar .tb-right { grid-column: 4; gap: 0; }
  #shopRoot.workspace-shell .topbar .conn { padding-inline: 0; justify-content: center; flex-direction: column; gap: 3px; }
  #shopRoot.workspace-shell .topbar .conn b { display: block; font-size: 10px; line-height: 1.2; }
  #shopRoot.workspace-shell #backBtn { grid-row: 2; grid-column: 1; }
  #shopRoot.workspace-shell #forwardBtn { grid-row: 2; grid-column: 2; margin-inline-start: 0; }
  #shopRoot.workspace-shell .topbar .search { grid-row: 2; grid-column: 3 / 5; margin-inline-start: 0; width: 100%; padding-inline: 6px; gap: 4px; }
  #shopRoot.workspace-shell .topbar .search > svg { display: none; }
  #shopRoot.workspace-shell #p-dashboard .dash-workspace { gap: 10px; padding: 12px; }
  #shopRoot.workspace-shell #p-dashboard .kpis { gap: 8px; }
  #shopRoot.workspace-shell #p-dashboard .kpi { min-height: 108px; padding: 12px; }
  #shopRoot.workspace-shell #p-dashboard .kpi-v { font-size: 22px; margin-block: 6px 3px; }
  #shopRoot.workspace-shell #p-dashboard .kpi-l { font-size: 12px; }
  #shopRoot.workspace-shell #p-dashboard .kpi-h { min-height: 28px; }
  #shopRoot.workspace-shell #p-dashboard .forest-metric-icon { width: 28px; height: 28px; border-radius: 9px; }
  .overlay { padding: 10px 10px calc(10px + var(--workspace-keyboard-inset, 0px)); }
  .overlay__panel { max-height: calc(var(--workspace-visible-height, 100dvh) - 20px); }
}
@media (max-width: 359px) {
  #shopRoot.workspace-shell .topbar { padding-inline: 4px; }
  #shopRoot.workspace-shell .main { padding-inline: 8px; }
  #shopRoot.workspace-shell #p-dashboard .kpi-h { gap: 4px; }
  #shopRoot.workspace-shell #p-dashboard .kpi-v { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #shopRoot.workspace-shell :is(.side, .sheet, button, .card), .overlay, .overlay__panel { animation: none; transition: none; }
}


/* Premium accounting surfaces: information-first, without changing shell routes. */
#shopRoot.workspace-shell #p-dashboard .dash-workspace {
  background: linear-gradient(118deg, #194931 0%, #246649 68%, #327c58 100%);
  border: 1px solid #286f4c;
  box-shadow: 0 16px 30px -23px #113e2e;
  color: #f5fff8;
}
#shopRoot.workspace-shell #p-dashboard .dash-workspace__copy b {font-size:15px;letter-spacing:-.015em;color:#fff}
#shopRoot.workspace-shell #p-dashboard .dash-workspace__copy span {color:#e2f5e9;max-width:420px}
#shopRoot.workspace-shell #p-dashboard .dash-workspace .dash-action {background:#f8fff9;color:#174731;border:1px solid #d4eadb}
#shopRoot.workspace-shell #p-dashboard .dash-workspace .dash-action:not(.primary) {background:transparent;color:#fff;border-color:#b4d9c3}
#shopRoot.workspace-shell #p-dashboard .dash-workspace .dash-action:focus-visible {outline-color:#fff}
#shopRoot.workspace-shell #p-dashboard .kpi {
  border:1px solid var(--workspace-line);
  box-shadow:0 10px 24px -22px rgba(7,43,24,.55);
  transition:transform .16s ease, box-shadow .16s ease;
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
 #shopRoot.workspace-shell #p-dashboard .kpi:hover {transform:translateY(-2px);box-shadow:0 14px 24px -20px rgba(7,43,24,.55)}
}
#shopRoot.workspace-shell #p-dashboard .kpi:first-child {
  background:linear-gradient(145deg,#e2f3e7 0%,#fbfefa 90%) !important;
  border-color:#b3d7c2;
}
#shopRoot.workspace-shell #p-dashboard .kpi-v {letter-spacing:-.045em}
#shopRoot.workspace-shell #p-dashboard .finviz {
  margin:0 0 18px;padding:18px;
  border:1px solid var(--workspace-line);border-radius:18px;
  background:var(--workspace-card);box-shadow:0 12px 27px -24px #183a2a;
  min-width:0;
}
#shopRoot #p-dashboard .finviz-head {display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:16px;flex-wrap:wrap}
#shopRoot #p-dashboard .finviz-head h2 {font:700 clamp(17px,2vw,21px)/1.25 var(--font-display,system-ui);margin:4px 0 0;letter-spacing:-.025em}
#shopRoot #p-dashboard .finviz-eyebrow {font-size:10px;letter-spacing:.14em;font-weight:800;color:var(--workspace-accent)}
#shopRoot #p-dashboard .finviz-source {font-size:11px;color:var(--workspace-muted);max-width:230px;line-height:1.4}
#shopRoot #p-dashboard .finviz-layout {display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:20px;align-items:center}
#shopRoot #p-dashboard .finviz-ratio {min-width:0}
#shopRoot #p-dashboard .finviz-values {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#shopRoot #p-dashboard .finviz-values div {min-width:0;display:grid;align-content:start;gap:5px}
#shopRoot #p-dashboard .finviz-values span {font-size:11px;color:var(--workspace-muted);line-height:1.35}
#shopRoot #p-dashboard .finviz-values strong {font-size:clamp(16px,2vw,23px);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;line-height:1.2}
#shopRoot #p-dashboard .finviz-track {background:var(--workspace-soft);height:14px;border-radius:999px;overflow:hidden;margin-top:18px}
#shopRoot #p-dashboard .finviz-track span {display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#54b88b,#207653);transition:width .35s ease}
#shopRoot #p-dashboard .finviz-note {margin:8px 0 0;color:var(--workspace-muted);font-size:11px;line-height:1.45}
#shopRoot #p-dashboard .finviz-mix {display:flex;align-items:center;gap:18px;min-width:0;padding-inline-start:18px;border-inline-start:1px solid var(--workspace-line)}
#shopRoot #p-dashboard .finviz-ring {--finviz-slice:0%;height:112px;width:112px;flex:0 0 112px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#247953 0 var(--finviz-slice),#a9b9df var(--finviz-slice) 100%);position:relative}
#shopRoot #p-dashboard .finviz-ring::before {content:"";position:absolute;inset:17px;border-radius:50%;background:var(--workspace-card)}
#shopRoot #p-dashboard .finviz-ring span {position:relative;z-index:1;font-weight:800;font-variant-numeric:tabular-nums;font-size:20px}
#shopRoot #p-dashboard .finviz-ring--empty {background:var(--workspace-soft)}
#shopRoot #p-dashboard .finviz-legend {display:flex;flex-direction:column;gap:10px;min-width:0;font-size:11px}
#shopRoot #p-dashboard .finviz-legend>b {font-size:12px;margin-bottom:2px}
#shopRoot #p-dashboard .finviz-legend>span {display:grid;grid-template-columns:8px minmax(0,1fr);gap:5px 7px;align-items:center;color:var(--workspace-muted)}
#shopRoot #p-dashboard .finviz-legend strong {grid-column:2;color:var(--workspace-ink);font-size:12px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#shopRoot #p-dashboard .finviz-dot {display:inline-block;width:8px;height:8px;border-radius:50%;background:#247953}
#shopRoot #p-dashboard .finviz-dot--other {background:#a9b9df}
[data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .dash-workspace {background:linear-gradient(120deg,#1c3d30,#1e4436 75%,#23523d);border-color:#3c6753}
[data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .kpi:first-child {background:linear-gradient(145deg,#20342b,#1c1c1f) !important;border-color:#365441}
[data-theme="dark"] #shopRoot #p-dashboard .finviz-ring {background:conic-gradient(#79ca9c 0 var(--finviz-slice),#7c8ab3 var(--finviz-slice) 100%)}
[data-theme="dark"] #shopRoot #p-dashboard .finviz-ring--empty {background:var(--workspace-soft)}
[data-theme="dark"] #shopRoot #p-dashboard .finviz-dot--cogs {background:#79ca9c}
[data-theme="dark"] #shopRoot #p-dashboard .finviz-dot--other {background:#7c8ab3}
[data-theme="dark"] #shopRoot #p-dashboard .finviz-track span {background:linear-gradient(90deg,#79ca9c,#42966e)}

/* Reviewed AI entry. The displayed direction is provisional; posting controls
   and permission checks remain owned by the existing accounting form. */
#shopRoot #aiEntryHost .ai-entry-intro {display:flex;align-items:center;gap:13px;padding:14px 16px;margin-bottom:14px;background:var(--workspace-soft);border:1px solid var(--workspace-line);border-radius:15px}
#shopRoot #aiEntryHost .ai-entry-mark {display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:13px;background:var(--primary);color:var(--primary-foreground);font-size:14px;font-weight:800;letter-spacing:.04em}
#shopRoot #aiEntryHost .ai-entry-intro strong {display:block;font-size:15px;letter-spacing:-.02em}
#shopRoot #aiEntryHost .ai-entry-intro small {display:block;margin-top:5px;color:var(--workspace-muted);font-size:12px;line-height:1.45}
#shopRoot #aiEntryHost #aiMessage {min-height:132px;border:1px solid var(--control-border);border-radius:13px;background:var(--workspace-card);padding:14px;line-height:1.6;font-size:16px}
#shopRoot #aiEntryHost #aiStatus {display:inline-block;padding:7px 12px;border-radius:999px;background:var(--workspace-soft);border:1px solid var(--workspace-line);font-size:12px;font-weight:700;min-height:32px}
#shopRoot #aiEntryHost[data-ai-stage="recording"] #aiStatus {background:#fce8e8;border-color:#ce6868;color:#7d2020}
#shopRoot #aiEntryHost .ai-direction-card {margin:16px 0;padding:16px;border-radius:16px;background:var(--workspace-soft);border:1px solid var(--workspace-line)}
#shopRoot #aiEntryHost .ai-direction-card h4 {font-size:15px;margin:0 0 6px}
#shopRoot #aiEntryHost .ai-direction-card p {font-size:12px;line-height:1.5;color:var(--workspace-muted);margin:0 0 12px}
#shopRoot #aiEntryHost .ai-direction-lines {display:grid;gap:8px}
#shopRoot #aiEntryHost .ai-direction-line {display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--workspace-line);background:var(--workspace-card);border-radius:10px}
#shopRoot #aiEntryHost .ai-direction-line span {font-size:11px;font-weight:800;color:var(--workspace-accent);text-transform:uppercase}
#shopRoot #aiEntryHost .ai-direction-line strong {font-size:12px;font-weight:600;line-height:1.35;overflow-wrap:anywhere}
#shopRoot #aiEntryHost .ai-direction-line b {font-size:12px;font-variant-numeric:tabular-nums;text-align:end}
@media(max-width:700px){
 #shopRoot #p-dashboard .finviz-layout {grid-template-columns:minmax(0,1fr);gap:18px}
 #shopRoot #p-dashboard .finviz-mix {border-inline-start:0;border-top:1px solid var(--workspace-line);padding:16px 0 0}
 #shopRoot #p-dashboard .finviz {padding:14px}
 #shopRoot #p-dashboard .finviz-ring {height:98px;width:98px;flex-basis:98px}
 #shopRoot #p-dashboard .finviz-ring::before {inset:15px}
 #shopRoot #aiEntryHost .ai-direction-line {grid-template-columns:44px minmax(0,1fr);gap:5px 9px}
 #shopRoot #aiEntryHost .ai-direction-line b {grid-column:2;text-align:start}
}
@media(prefers-reduced-motion:reduce){#shopRoot #p-dashboard .finviz-track span,#shopRoot.workspace-shell #p-dashboard .kpi {transition:none!important}}


/* Live Quick Voice sheet: readable proposed heads, not an authoritative journal. */
#shopRoot #qvGuess:has(.qv-suggest-title) {display:grid;gap:8px;border:1px solid var(--workspace-line);border-radius:13px;background:var(--workspace-soft);padding:12px}
#shopRoot .qv-suggest-title {font-size:13px;line-height:1.45;color:var(--workspace-ink)}
#shopRoot .qv-suggest-row {display:grid;grid-template-columns:56px minmax(0,1fr);align-items:start;gap:9px;border:1px solid var(--workspace-line);border-radius:9px;padding:10px;background:var(--workspace-card)}
#shopRoot .qv-suggest-row b {color:var(--workspace-accent);font-size:11px}
#shopRoot .qv-suggest-row span {color:var(--workspace-ink);font-size:12px;overflow-wrap:anywhere}
#shopRoot .qv-suggest-note,#shopRoot .qv-suggest-offline {font-size:11px;line-height:1.5;color:var(--workspace-muted)}
#shopRoot .qv-suggest-offline {color:var(--warn, #975800);font-weight:650}

/* The production command review, including the actual server-resolved
   debit/credit grid and party allocation, gets the same premium treatment. */
.accounting-command-dialog {width:min(920px,100%);max-height:calc(100dvh - 28px);overflow-y:auto;scroll-padding-block:18px}
.accounting-command-dialog .modal-head {display:flex;align-items:center;justify-content:space-between;gap:12px}
.accounting-command-dialog [data-command-text] {font-size:16px;line-height:1.6;border-radius:12px;min-height:108px}
.accounting-command-dialog [data-command-status] {border-inline-start:3px solid var(--primary);background:var(--surface2);padding:10px 12px;border-radius:8px;font-size:12px}
.accounting-command-dialog [data-suggested-entry] {border:1px solid var(--border);border-radius:16px;padding:16px;margin:16px 0;background:var(--surface);box-shadow:0 12px 22px -25px #0009;min-width:0}
.accounting-command-dialog [data-suggested-entry] h4 {font-size:17px;margin:0 0 6px;letter-spacing:-.025em}
.accounting-command-dialog [data-suggested-entry]>p {font-size:12px;line-height:1.5;color:var(--text-secondary)}
.accounting-command-dialog [data-suggested-entry] [role="region"] {border:1px solid var(--border);border-radius:11px;margin:12px 0;overflow:auto;max-width:100%}
.accounting-command-dialog [data-suggested-entry] table {width:100%;min-width:520px;border-collapse:collapse}
.accounting-command-dialog [data-suggested-entry] :is(th,td) {padding:11px 12px;font-size:12px;border-bottom:1px solid var(--border);text-align:start}
.accounting-command-dialog [data-suggested-entry] th {font-size:11px;text-transform:uppercase;letter-spacing:.06em;background:var(--surface2)}
.accounting-command-dialog [data-suggested-entry] :is(td:nth-child(3),td:nth-child(4)) {font-variant-numeric:tabular-nums;text-align:end}
.accounting-command-dialog [data-suggested-entry] [data-account-state="unresolved"] {background:var(--warning-light, #fff5df)}
.accounting-command-dialog [data-suggested-entry] tfoot td {font-weight:750;background:var(--surface2)}
@media(max-width:540px){.accounting-command-dialog [data-suggested-entry]{padding:12px}.accounting-command-dialog [data-suggested-entry] table{min-width:450px}}

/* Mobile layout owns spacing; unequal panels must not stretch into shared rows. */
@media (max-width: 900px) {
  #shopRoot.workspace-shell {
    --mobile-page-padding: 12px;
    --mobile-card-padding: 12px;
    --mobile-card-gap: 10px;
    --mobile-section-gap: 12px;
    --mobile-voice-offset: 16px;
  }
  #shopRoot.workspace-shell .main {
    padding: var(--mobile-page-padding);
    padding-inline: max(var(--mobile-page-padding), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    padding-bottom: calc(var(--bot) + var(--sab) + var(--mobile-voice-offset) + 52px + var(--mobile-section-gap));
    scroll-padding-block: var(--mobile-page-padding) calc(var(--bot) + var(--sab) + var(--mobile-voice-offset) + 52px + var(--mobile-section-gap));
    scrollbar-gutter: auto;
  }
  #shopRoot.workspace-shell #p-dashboard.on {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--mobile-section-gap);
    align-content: start;
  }
  #shopRoot.workspace-shell #p-dashboard.on > * { min-width: 0; margin-block: 0; }
  #shopRoot.workspace-shell #p-dashboard .workspace-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: var(--mobile-section-gap);
  }
  #shopRoot.workspace-shell #p-dashboard .workspace-dashboard-grid > * {
    grid-column: 1 / -1;
    min-width: 0;
    margin-block: 0;
    align-self: start;
  }
  #shopRoot.workspace-shell #p-dashboard :is(.workspace-cash, .workspace-aging) > .card { margin-bottom: 0; }
  #shopRoot.workspace-shell #p-dashboard .brief-head { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--mobile-card-gap); }
  #shopRoot.workspace-shell #p-dashboard .brief-head > .rsec { margin: 0; }
  #shopRoot.workspace-shell #p-dashboard .brief-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); align-items: end; gap: var(--mobile-card-gap); min-width: 0; }
  #shopRoot.workspace-shell #p-dashboard .brief-tools > * { min-width: 0; }
  #shopRoot.workspace-shell #p-dashboard .brief-tools :is(input, select, button) { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; }
  #shopRoot.workspace-shell #p-dashboard :is(.workspace-operations, .workspace-trends) { padding: var(--mobile-card-padding); }
  #shopRoot.workspace-shell #p-dashboard #dashCharts { min-width: 0; }
  #shopRoot.workspace-shell #p-dashboard #dashCharts svg { max-width: 100%; }
}

/* Mobile reference style: phone-only surfaces; existing controls and figures remain source-owned. */
@media (max-width: 600px) {
  #shopRoot.workspace-shell { --workspace-radius: 20px; --mobile-card-shadow: 0 3px 16px -12px #17251d40; --mobile-voice-offset: 26px; }
  #shopRoot.workspace-shell .main { padding-inline: max(var(--mobile-page-padding), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); padding-top: var(--mobile-page-padding); scrollbar-gutter: auto; }
  #shopRoot.workspace-shell .topbar { background: var(--workspace-bg); border-bottom: 1px solid var(--workspace-line); box-shadow: none; }
  #shopRoot.workspace-shell .topbar :is(.tb-btn, .avatar, .conn) { background: var(--workspace-card); color: var(--workspace-ink); border: 1px solid var(--workspace-line); border-radius: 14px; }
  #shopRoot.workspace-shell .topbar .workspace-business { color: var(--workspace-ink); }
  #shopRoot.workspace-shell .topbar .conn b { color: var(--workspace-muted); }
  #shopRoot.workspace-shell .topbar .search { border-radius: 14px; }
  #shopRoot.workspace-shell .page .phead { align-items: center; gap: 12px; margin-bottom: 18px; }
  #shopRoot.workspace-shell .page .phead h1 { font-size: 25px; font-weight: 750; line-height: 1.2; letter-spacing: -.04em; }
  #shopRoot.workspace-shell .page .phead p { font-size: 12px; line-height: 1.5; color: var(--workspace-muted); margin-top: 5px; }
  #shopRoot.workspace-shell .page :is(.card, .dcard, .briefing) { border-radius: 20px; border: 1px solid var(--workspace-line); box-shadow: var(--mobile-card-shadow); }
  #shopRoot.workspace-shell .page :is(.card-h, .set-h) { padding: 16px; }
  #shopRoot.workspace-shell .page :is(.addbtn, .btn) { min-height: 44px; border-radius: 14px; }
  #shopRoot.workspace-shell #p-dashboard .dash-workspace {
    display: grid !important; grid-template-columns: minmax(0, 1fr); gap: var(--mobile-card-gap);
    padding: var(--mobile-card-padding); margin-bottom: 0; border-radius: 20px;
    background: var(--workspace-card); color: var(--workspace-ink); border-color: var(--workspace-line); box-shadow: none;
  }
  #shopRoot.workspace-shell #p-dashboard .dash-workspace__copy b { color: var(--workspace-ink); font-size: 14px; }
  #shopRoot.workspace-shell #p-dashboard .dash-workspace__copy span { color: var(--workspace-muted); font-size: 12px; }
  #shopRoot.workspace-shell #p-dashboard .dash-workspace__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #shopRoot.workspace-shell #p-dashboard .dash-workspace .dash-action { min-width: 0; min-height: 44px; padding: 8px; border-radius: 14px; font-size: 12px; line-height: 1.4; white-space: normal; }
  #shopRoot.workspace-shell #p-dashboard .dash-workspace .dash-action.primary { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
  #shopRoot.workspace-shell #p-dashboard .dash-workspace .dash-action:not(.primary) { background: var(--workspace-soft); color: var(--workspace-ink); border-color: var(--workspace-line); }
  #shopRoot.workspace-shell #p-dashboard .dash-workspace .dash-action:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
  #shopRoot.workspace-shell #p-dashboard .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.75rem), 1fr)); gap: var(--mobile-card-gap); margin-bottom: 0; }
  #shopRoot.workspace-shell #p-dashboard .kpi { min-height: 0; padding: var(--mobile-card-padding); border-radius: 20px; background: var(--workspace-card) !important; border-color: var(--workspace-line); box-shadow: var(--mobile-card-shadow); }
  #shopRoot.workspace-shell #p-dashboard .kpi-h { align-items: flex-start; gap: 8px; min-height: 0; }
  #shopRoot.workspace-shell #p-dashboard .kpi-l { font-size: 12px; line-height: 1.4; }
  #shopRoot.workspace-shell #p-dashboard .kpi-v { margin-block: 6px 4px; font-size: clamp(20px, 5.5vw, 27px); line-height: 1.25; letter-spacing: -.04em; text-align: start; }
  #shopRoot.workspace-shell #p-dashboard .kpi-d { font-size: 11px; line-height: 1.5; }
  #shopRoot.workspace-shell #p-dashboard .forest-metric-icon { width: 30px; height: 30px; border-radius: 50%; }
  #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiMtd) {
    grid-column: 1 / -1; order: -1; min-height: 0; padding: var(--mobile-card-padding);
    background: #245c43 !important; color: #fff; border-color: #245c43;
    box-shadow: 0 12px 24px -20px #173d2d;
  }
  #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiMtd) :is(.kpi-l, .kpi-v, .kpi-d) { color: #fff !important; }
  #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiMtd) .kpi-l { font-size: 13px; }
  #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiMtd) .kpi-v { font-size: clamp(28px, 8vw, 36px); margin-block: 6px 4px; }
  #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiMtd) .forest-metric-icon { background: #ffffff20; color: #fff; }
  #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiExp) { background: #f0ecf7 !important; border-color: #ddd3ed; }
  #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiGp) { grid-column: 1 / -1; min-height: 0; }
  :root:not([data-theme="dark"]) #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiExp) :is(.kpi-l, .kpi-d) { color: #56675b; }
  #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiExp) .forest-metric-icon { background: #e3d9f2; color: #5b3f7b; }
  #shopRoot.workspace-shell #p-dashboard .finviz { padding: var(--mobile-card-padding); border-radius: 22px; margin-bottom: 0; box-shadow: var(--mobile-card-shadow); }
  #shopRoot.workspace-shell #p-dashboard .finviz-head { gap: 8px; }
  #shopRoot.workspace-shell #p-dashboard .finviz-head h2 { font-size: 20px; letter-spacing: -.035em; }
  #shopRoot.workspace-shell #p-dashboard .finviz-source { max-width: none; width: 100%; font-size: 11px; }
  #shopRoot.workspace-shell #p-dashboard .finviz-values { gap: var(--mobile-card-gap); }
  #shopRoot.workspace-shell #p-dashboard .finviz-values strong { font-size: clamp(18px, 4.8vw, 23px); }
  #shopRoot.workspace-shell #p-dashboard .finviz-track { height: 8px; margin-top: var(--mobile-card-gap); }
  #shopRoot.workspace-shell #p-dashboard .finviz-mix { display: grid; grid-template-columns: minmax(96px, .9fr) minmax(0, 1.1fr); align-items: center; gap: var(--mobile-card-gap); padding-top: var(--mobile-card-padding); }
  #shopRoot.workspace-shell #p-dashboard .finviz-ring { width: min(100%, 128px); height: auto; aspect-ratio: 1; flex: none; justify-self: center; align-self: center; }
  #shopRoot.workspace-shell #p-dashboard .finviz-ring::before { inset: 16px; }
  #shopRoot.workspace-shell #p-dashboard .finviz-ring span { font-size: 30px; letter-spacing: -.04em; }
  #shopRoot.workspace-shell #p-dashboard .finviz-legend { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--mobile-card-gap); min-width: 0; overflow-wrap: anywhere; }
  #shopRoot.workspace-shell #p-dashboard .finviz-legend > b { grid-column: 1 / -1; text-align: start; font-size: 13px; margin-bottom: 2px; }
  #shopRoot.workspace-shell #p-dashboard .finviz-legend > span { align-items: start; font-size: 11px; line-height: 1.5; }
  #shopRoot.workspace-shell #p-dashboard .finviz-legend strong { font-size: 13px; }
  #shopRoot.workspace-shell #p-dashboard .finviz-dot { margin-top: 4px; }
  #shopRoot.workspace-shell .daily-actions { gap: 10px; }
  #shopRoot.workspace-shell .daily-actions button { min-height: 48px; min-width: 0; border-radius: 14px; padding: 12px; white-space: normal; }
  #shopRoot.workspace-shell .workspace-dashboard-grid { gap: var(--mobile-section-gap); }
  #shopRoot.workspace-shell :is(.workspace-operations, .workspace-trends) { border-radius: 20px; padding: var(--mobile-card-padding); }
  #shopRoot.workspace-shell :is(.workspace-operations, .workspace-trends) > summary { min-height: 44px; align-content: center; font-size: 13px; }
  #shopRoot.workspace-shell .sheet { border-radius: 24px 24px 0 0; border-color: var(--workspace-line); background: var(--workspace-card); }
  .overlay__panel { border-radius: 24px; background: var(--surface); }
  .accounting-command-dialog { border-radius: 24px; max-width: calc(100vw - 20px); }
  #shopRoot.workspace-shell .sheet :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { border-radius: 14px; border-color: var(--control-border); }
  #shopRoot.workspace-shell #aiEntryHost .ai-entry-intro { border-radius: 18px; padding: 16px; }
  #shopRoot.workspace-shell #qvGuess:has(.qv-suggest-title) { border-radius: 18px; padding: 16px; }
  #shopRoot.workspace-shell .qv-suggest-row { border-radius: 12px; padding: 12px; }
  #shopRoot.workspace-shell .botnav {
    inset-inline: 10px; width: auto;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px) + var(--workspace-keyboard-inset, 0px));
    border: 1px solid var(--workspace-line); border-radius: 24px;
    background: var(--workspace-card); box-shadow: 0 8px 30px -14px #17251d50;
  }
  #shopRoot.workspace-shell .botnav > .bn { border-radius: 16px; }
  #shopRoot.workspace-shell .botnav #shopFab { border-radius: 17px; }
  #shopRoot.workspace-shell .botnav #shopMic { bottom: calc(var(--bot) + var(--sab) + var(--workspace-keyboard-inset, 0px) + var(--mobile-voice-offset)); }
  [data-theme="dark"] #shopRoot.workspace-shell { --mobile-card-shadow: none; }
  [data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .dash-workspace { background: var(--workspace-card); border-color: var(--workspace-line); }
  [data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiMtd) { background: #dce8b7 !important; border-color: #dce8b7; box-shadow: none; }
  [data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiMtd) :is(.kpi-l, .kpi-v, .kpi-d) { color: #182116 !important; }
  [data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiMtd) .forest-metric-icon { color: #182116; background: #18211612; }
  [data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiExp) { background: #28232f !important; border-color: #453c51; }
  [data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiExp) .forest-metric-icon { color: #dbc6f6; background: #453651; }
  [data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .finviz-ring { background: conic-gradient(#c9e78b 0 var(--finviz-slice), #b89ae7 var(--finviz-slice) 100%); }
  [data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .finviz-dot--cogs { background: #c9e78b; }
  [data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .finviz-dot--other { background: #b89ae7; }
  [data-theme="dark"] #shopRoot.workspace-shell #p-dashboard .finviz-ring--empty { background: var(--workspace-soft); }
}
@media (max-width: 359px) {
  #shopRoot.workspace-shell .main { padding-inline: max(var(--mobile-page-padding), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }
  #shopRoot.workspace-shell #p-dashboard .kpi { padding: 12px; }
  #shopRoot.workspace-shell #p-dashboard .kpi:has(#kpiMtd) { padding: 18px; }
  #shopRoot.workspace-shell #p-dashboard .finviz { padding: 16px; }
}

@media (max-width: 600px) and (prefers-reduced-motion: no-preference) {
  #shopRoot[data-mobile-motion-ready] .main { overflow-x: hidden; }
  #shopRoot[data-mobile-motion-ready] .sheet { transition: none; }
  #shopRoot[data-mobile-motion-ready] .sheetwrap[data-mobile-closing] { display: block; pointer-events: none; }
}

@media (max-width:600px) {
  .overlay { align-items:end; }
  .overlay__panel { max-width:calc(100vw - 20px); min-width:0; border-radius:24px; font-size:14px; }
  .overlay__panel .modal-head { position:sticky; top:-16px; z-index:3; padding-block:12px; background:var(--surface); gap:12px; }
  .overlay__panel .modal-head :is(button,.btn,.icon-btn) { min-width:44px; min-height:44px; flex-shrink:0; }
  .overlay__panel :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { min-width:0; max-width:100%; font-size:16px; border-radius:14px; }
  .overlay__panel :is(.btn,.icon-btn) { min-height:44px; border-radius:14px; white-space:normal; }
  .accounting-command-dialog [data-suggested-entry] table { min-width:0; table-layout:fixed; }
  .accounting-command-dialog [data-suggested-entry] :is(th,td) { padding:9px 4px; font-size:11px; overflow-wrap:anywhere; white-space:normal; }
  .accounting-command-dialog [data-suggested-entry] th:nth-child(1) { width:17%; }
  .accounting-command-dialog [data-suggested-entry] th:nth-child(2) { width:29%; }
  .accounting-command-dialog [data-suggested-entry] :is(th:nth-child(3),th:nth-child(4)) { width:27%; }
  .accounting-command-dialog [data-suggested-entry] tfoot td { padding-inline:2px; font-size:10px; letter-spacing:-.02em; }
  .accounting-command-dialog [data-command-preview] { display:grid; gap:12px; min-width:0; }
  .accounting-command-dialog [data-command-preview]>label { min-width:0; }
  .accounting-command-dialog [data-command-status] { margin-block:12px; line-height:1.5; }
  .accounting-command-dialog [data-command-error]:not(:empty) { margin-block:12px; padding:12px; border:1px solid var(--danger); border-radius:12px; line-height:1.5; }
}
@media (max-width:600px) and (prefers-reduced-motion:no-preference) {
  .overlay:not([data-dialog-closed]) .overlay__panel { animation:mobile-dialog-enter 220ms cubic-bezier(.2,.7,.2,1); }
  .overlay[data-dialog-closed] .overlay__panel { animation:mobile-dialog-leave 180ms ease-in forwards; }
}
@keyframes mobile-dialog-enter { from { transform:translateY(24px); opacity:.65; } to { transform:translateY(0); opacity:1; } }
@keyframes mobile-dialog-leave { from { transform:translateY(0); } to { transform:translateY(24px); } }

/* At 320px all six navigation targets still fit at 44px with a centered Add. */
@media (max-width: 340px) {
  #shopRoot.workspace-shell .botnav {
    inset-inline: 0;
    grid-template-columns: repeat(2, minmax(44px, 1.5fr)) 52px repeat(3, minmax(44px, 1fr));
  }
  #shopRoot.workspace-shell .botnav > .fab-slot { width: 52px; justify-self: center; }
}

#shopRoot .recovery-label-compact { display: none; }
@media (max-width: 600px) {
  #shopRoot.workspace-shell .topbar { grid-template-columns: 44px 44px minmax(0, 1fr) auto; }
  #shopRoot.workspace-shell .topbar #pendingSubmissions { width: 44px; height: 44px; min-width: 44px; padding: 2px; }
  #shopRoot #pendingSubmissions .recovery-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #shopRoot #pendingSubmissions .recovery-label-compact { display: inline; font-size: 11px; }
}

/* Use the measured content composition when zoom narrows a desktop workspace. */
#shopRoot #p-dashboard[data-composition="mobile"] .dash-workspace { flex-wrap: wrap; }
#shopRoot #p-dashboard[data-composition="mobile"] .dash-workspace__copy { min-width: 0; overflow-wrap: anywhere; }
#shopRoot #p-dashboard[data-composition="mobile"] .dash-workspace__actions { flex-wrap: wrap; max-width: 100%; }
#shopRoot #p-dashboard[data-composition="mobile"] .finviz-layout { grid-template-columns: minmax(0, 1fr); }
#shopRoot #p-dashboard[data-composition="mobile"] .finviz-mix { border-inline-start: 0; border-top: 1px solid var(--workspace-line); padding: 16px 0 0; }
:root:not([data-theme="dark"]) #shopRoot :is(.qv-suggest-note,.qv-suggest-offline) { color: #56675b; }
/* A visible recovery action uses the decorative logo's spare space, while
   business selection and both history controls retain 44px touch targets. */
@media (max-width: 600px) {
  #shopRoot.workspace-shell .topbar:has(#pendingSubmissions:not([hidden])) {
    grid-template-columns: 44px 36px minmax(44px, 1fr) auto;
  }
  #shopRoot.workspace-shell .topbar:has(#pendingSubmissions:not([hidden])) .search {
    margin-inline-start: 8px; width: calc(100% - 8px);
  }
}

/* Phone financial surfaces reflow without changing the desktop table or input model. */
@media screen and (max-width:600px){
 #shopRoot.workspace-shell #shopMic[data-compact-voice]:not([hidden]){position:static;inset:auto;transform:none;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;border-radius:12px;margin:0;display:grid;place-items:center;background:var(--primary);color:var(--primary-foreground);border:1px solid var(--workspace-line);box-shadow:none}
 #shopRoot.workspace-shell.workspace-keyboard-open .botnav{display:none}
 #shopRoot.workspace-shell .main{scroll-padding-block-end:calc(var(--bot) + var(--sab) + 24px)}
 #shopRoot#shopRoot [data-financial-full-value]:not([hidden]){display:block;flex-basis:100%;min-width:0;max-width:100%;padding-block:4px;color:var(--text-primary,var(--tx));font-size:16px;line-height:1.5;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;white-space:normal;direction:ltr;text-align:end}
 #shopRoot .financial-scroll-hint{font-size:12px;line-height:1.5;color:var(--text-secondary,var(--tx3));margin-block:6px}
 #shopRoot :is(.scroll,.table-wrap,.table-responsive,.financial-table-scroll)[data-financial-region]{overflow-x:auto;max-width:100%;overscroll-behavior-x:contain}
 #shopRoot :is(.scroll,.table-wrap,.table-responsive,.financial-table-scroll)[data-financial-region]:focus-visible{outline:2px solid var(--workspace-primary);outline-offset:2px}
 #shopRoot.workspace-shell #coaTable{display:block;width:100%;min-width:0;max-width:100%}
 #shopRoot.workspace-shell #coaTable thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #shopRoot.workspace-shell #coaTable tbody{display:block;width:100%}
 #shopRoot.workspace-shell #coaTable tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:10px 12px;border-bottom:1px solid var(--workspace-line)}
 #shopRoot.workspace-shell #coaTable td{display:block;min-width:0;max-width:100%;width:auto;padding:0;white-space:normal;overflow-wrap:anywhere;border:0;font-size:14px;line-height:1.5}
 #shopRoot.workspace-shell #coaTable td:nth-child(1){grid-column:1;grid-row:1;font-size:12px}
 #shopRoot.workspace-shell #coaTable td:nth-child(2){grid-column:1/-1;grid-row:2}
 #shopRoot.workspace-shell #coaTable td:nth-child(3){grid-column:2;grid-row:1;font-size:12px;text-align:end}
 #shopRoot.workspace-shell #coaTable td:nth-child(4){grid-column:1/-1;grid-row:3;font-size:16px;text-align:end;font-variant-numeric:tabular-nums}
 #shopRoot.workspace-shell #coaTable td:nth-child(4)::before{content:attr(data-balance-label);float:inline-start;font-size:12px;font-weight:400;color:var(--text-secondary,var(--tx3))}
 #shopRoot.workspace-shell #coaTable td[colspan]{grid-column:1/-1;grid-row:auto;font-size:12px;font-weight:700}
 #shopRoot.workspace-shell #coaTabs{overflow-x:auto;overscroll-behavior-x:contain}
}
@media screen and (min-width:601px){[data-financial-full-value],.financial-scroll-hint{display:none!important}}

@media screen and (max-width:600px){#shopRoot #shopMic[data-compact-voice] svg{stroke:currentColor}#shopRoot #shopMic[data-compact-voice]:focus-visible{outline:2px solid var(--primary);outline-offset:2px}}

@media screen and (max-width:600px){#shopRoot.workspace-shell.workspace-keyboard-open .main{padding-block-end:16px;scroll-padding-block-end:16px}}

@media print{.financial-table-scroll{display:contents}}
@media screen and (max-width:600px){
 #shopRoot#shopRoot :is(input[inputmode="decimal"],input[type="number"]){direction:ltr;text-align:end;font-variant-numeric:tabular-nums}
 #shopRoot.workspace-shell #coaTable td:nth-child(4){direction:ltr}
}

@media print{[data-financial-full-value],.financial-scroll-hint{display:none!important}}
