/*
 * 後台外框與導覽（深綠外框）：左側品牌綠導覽欄、頂部細列、手機底部導覽、工作台首頁。
 * 共用元件（按鈕、表格、表單、標籤、flash）在 app/assets/tailwind/application.css；
 * 色彩一律取自 furniture_tokens.css。
 */

/* ---------- 外框 ---------- */
.erp-frame { min-height: 100vh; }
.erp-workspace { min-width: 0; display: flex; flex-direction: column; }
.erp-frame.has-sidebar { background: var(--emerald-deep); }
.erp-frame.has-sidebar .app-shell { flex: 1; width: auto; max-width: none; margin: 0 12px 12px 0; background: var(--cream); border-radius: var(--radius-slide); min-height: calc(100dvh - var(--topbar-h) - 12px); }
.erp-sidebar { display: none; }

.erp-brand { display: flex; align-items: center; gap: .625rem; color: inherit; text-decoration: none; }
.erp-brand-logo { height: 25px; width: 32px; flex-shrink: 0; }
.erp-brand-name { font-size: 15px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.erp-brand-name small { display: block; margin-top: 2px; font-size: var(--text-caption); font-weight: 700; color: var(--on-emerald); }

/* 頂部細列：品牌（手機）、目前位置（桌機）、使用者／警示／前台／登出 */
.erp-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: var(--space-5); min-height: var(--topbar-h); padding: 0 var(--space-5); background: var(--emerald-deep); color: var(--on-emerald); border-bottom: 1px solid var(--sidebar-rule); }
.erp-topbar-brand { color: var(--on-emerald); margin-right: auto; }
.erp-trail { display: none; margin: 0 auto 0 0; font-size: var(--text-caption); color: var(--on-emerald-2); }
.erp-trail span:last-child { color: var(--on-emerald); font-weight: 700; }
.erp-trail-sep { margin: 0 var(--space-3); opacity: .8; }
.erp-nav-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.erp-logout-form { display: contents; }
.erp-nav-action { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3); height: 32px; min-width: 32px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-control); background: transparent; color: var(--on-emerald); font-size: var(--text-caption); font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; }
.erp-nav-action:hover { background: var(--emerald-deep); }
.erp-nav-action:focus-visible, .erp-topbar a:focus-visible, .erp-topbar button:focus-visible { outline-color: var(--on-emerald); }
.erp-nav-action-icon { width: 32px; padding: 0; position: relative; }
.erp-storefront-label { display: none; }
.erp-nav-user { display: inline-flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-3); font-size: var(--text-caption); }
.erp-nav-avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--on-emerald-2); border-radius: var(--radius-control); font-size: var(--text-caption); font-weight: 700; }
.erp-user-details { display: none; line-height: 1.2; text-align: left; }
.erp-user-name { display: block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.erp-user-role { display: block; color: var(--on-emerald-2); font-size: var(--text-caption); }
.erp-drawer-host { position: relative; }
.erp-drawer-host .unread-dot { position: absolute; top: 5px; right: 5px; box-shadow: 0 0 0 2px var(--emerald-deep); }

/* 警示抽屜 */
.erp-drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(27 36 51 / .45); }
.erp-drawer { position: fixed; top: 0; right: 0; z-index: 50; display: flex; flex-direction: column; width: min(24rem, calc(100vw - 1rem)); height: 100%; background: var(--paper); color: var(--ink); border-left: 1px solid var(--ink); box-shadow: var(--shadow-overlay); transition: translate 200ms cubic-bezier(.16, 1, .3, 1); }
.erp-drawer-head, .erp-drawer-foot { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; padding: var(--space-5) var(--space-6); }
.erp-drawer-head { border-bottom: 1px solid var(--ink); }
.erp-drawer-foot { border-top: 1px solid var(--border-hairline); }
.erp-drawer-title { font-size: var(--text-section-title); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .erp-drawer { transition: none; } }

/* ---------- 左側導覽欄（≥1024px） ---------- */
.erp-primary-navigation { display: flex; flex-direction: column; gap: 2px; padding: var(--space-4) var(--space-4) var(--space-8); }
.erp-sidebar-brand { padding: var(--space-6) var(--space-6) var(--space-5); color: var(--on-emerald); border-bottom: 1px solid var(--sidebar-rule); }
.erp-sidebar-brand { gap: .625rem; }
.erp-sidebar-brand .erp-brand-name { font-size: 15px; }
.erp-navigation-item { position: relative; min-width: 0; }
.erp-navigation-link { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem .625rem; border: 0; border-radius: var(--radius-control); background: transparent; color: inherit; font-size: 14px; line-height: 1.25rem; text-align: left; white-space: nowrap; text-decoration: none; cursor: pointer; }
.erp-navigation-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.erp-navigation-chevron { width: .875rem; height: .875rem; flex-shrink: 0; opacity: .85; transition: transform 150ms ease; }
@media (prefers-reduced-motion: reduce) { .erp-navigation-chevron { transition: none; } }
.erp-navigation-link[aria-expanded="true"] .erp-navigation-chevron { transform: rotate(180deg); }

.erp-sidebar { position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--surface-sidebar); color: var(--on-emerald); scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .38) transparent; }
.erp-sidebar::-webkit-scrollbar { width: 8px; }
.erp-sidebar::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.erp-sidebar::-webkit-scrollbar-thumb { background: rgb(255 255 255 / .38); }
.erp-sidebar::-webkit-scrollbar-track { background: transparent; }
.erp-sidebar .erp-navigation-link { color: var(--on-emerald); }
/* 滑過亮紙底；目前頁面另有橘色選取標記與粗體。 */
.erp-sidebar .erp-navigation-link:hover, .erp-sidebar .erp-navigation-menu-link:hover { background: var(--paper); color: var(--ink); }
.erp-sidebar .erp-navigation-link:hover .erp-module-number { color: var(--on-emerald); }
.erp-sidebar a:focus-visible, .erp-sidebar button:focus-visible { outline: 2px solid var(--on-emerald); outline-offset: -2px; }
/* 目前頁面為帳紙色底：白色外框在此不可見，改用墨色 */
.erp-sidebar a[aria-current="page"]:focus-visible { outline-color: var(--ink); }
/* 目前頁面：米白底、深綠字與橘色選取標記。 */
.erp-sidebar a[aria-current="page"] { position: relative; background: var(--cream); color: var(--emerald-deep); font-weight: 700; box-shadow: none; }
.erp-sidebar a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--coral); border-radius: 0 3px 3px 0; }
.erp-sidebar .erp-navigation-link.is-active { font-weight: 700; }
.erp-module-mark { width: 14px; height: 14px; flex-shrink: 0; background: var(--erp-module-color); outline: 2px solid var(--on-emerald); outline-offset: 0; }
/* 模組編號恢復各模組色碼，滑過時仍保留色底與白字。 */
.erp-sidebar .erp-module-mark { display: none; }
.erp-sidebar .erp-module-number { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 var(--space-3); background: var(--erp-module-color); color: var(--on-emerald); border-radius: 4px; font-weight: 700; }
.erp-sidebar .erp-navigation-link:hover .erp-module-number { color: var(--on-emerald); }

.erp-module-number { flex-shrink: 0; min-width: 1.25em; font-size: var(--text-caption); font-variant-numeric: tabular-nums; color: var(--on-emerald-2); }
.erp-navigation-menu { padding: 2px 0 var(--space-3) 0; }
.erp-navigation-menu-link { display: block; padding: .4375rem .625rem .4375rem 3.4rem; border-radius: var(--radius-control); color: var(--on-emerald); font-size: 13.5px; line-height: 1.25rem; text-decoration: none; }

.erp-navigation-heading { display: flex; align-items: center; gap: .5rem; padding: .5rem .625rem .25rem; font-size: var(--text-caption); font-weight: 700; color: var(--on-emerald); }
.erp-navigation-section + .erp-navigation-section { margin-top: var(--space-3); }

@media (min-width: 1024px) {
  .erp-frame.has-sidebar { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .erp-sidebar { display: block; }
  .erp-topbar { padding-inline: var(--space-8); }
  .erp-topbar-brand { display: none; }
  .erp-trail { display: block; color: var(--on-emerald-2); }
  .erp-trail span:last-child { color: var(--on-emerald); }
  .erp-nav-action, .erp-nav-user { color: var(--on-emerald); }
  .erp-nav-action:hover { background: var(--emerald); }
  .erp-nav-avatar { border-color: var(--sidebar-rule); background: var(--emerald); color: var(--on-emerald); }
  .erp-nav-user { margin-left: var(--space-4); padding-left: var(--space-5); border-left: 1px solid var(--sidebar-rule); }
  .erp-user-role { color: var(--on-emerald-2); }
  .erp-user-details { display: block; }
  .erp-storefront-label { display: inline; }
  .erp-nav-action:focus-visible, .erp-topbar a:focus-visible, .erp-topbar button:focus-visible { outline-color: var(--on-emerald); }
  .erp-drawer-host .unread-dot { box-shadow: 0 0 0 2px var(--emerald-deep); }
}

/* ---------- 手機底部導覽（<1024px）：沿用 dropdown 選單 ---------- */
.erp-bottom-navigation { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: stretch; padding: .25rem .125rem calc(.25rem + env(safe-area-inset-bottom, 0px)); background: var(--paper); border: 0; border-top: 1px solid var(--border-hairline); border-radius: 0; box-shadow: none; }
.erp-bottom-navigation > .erp-navigation-item { min-width: 0; }
.erp-bottom-navigation .erp-navigation-link { flex-direction: column; justify-content: center; gap: .125rem; width: 100%; min-height: var(--comfy-control-h); white-space: normal; padding: .25rem .125rem; color: var(--ink); font-size: var(--text-caption); line-height: 1rem; text-align: center; }
.erp-bottom-navigation .erp-navigation-link.is-active { background: var(--sand); color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--emerald); }
.erp-bottom-navigation .erp-navigation-chevron { display: none; }
.erp-bottom-navigation .erp-navigation-menu { position: fixed; top: auto; bottom: calc(4rem + env(safe-area-inset-bottom, 0px)); left: .5rem; right: .5rem; width: auto; max-height: min(65dvh, 36rem); overflow-y: auto; overscroll-behavior: contain; padding: .5rem; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); box-shadow: var(--shadow-overlay); z-index: 50; }
.erp-bottom-navigation .erp-navigation-menu-link { display: flex; align-items: center; gap: .625rem; padding: .625rem; color: var(--ink); font-size: .8125rem; }
.erp-bottom-navigation .erp-navigation-menu-link:hover, .erp-bottom-navigation .erp-navigation-menu-link.is-active { background: var(--sand); font-weight: 700; }
.erp-bottom-navigation .erp-navigation-heading { display: flex; align-items: center; gap: .5rem; padding: .625rem; font-size: var(--text-caption); font-weight: 700; color: var(--ink); }
.erp-bottom-navigation .erp-navigation-module-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; color: var(--emerald-deep); border: 1px solid var(--border-hairline); flex-shrink: 0; }
.erp-bottom-navigation .erp-navigation-sections { display: grid; gap: .5rem; }
@media (min-width: 1024px) { .erp-bottom-navigation { display: none; } }
@media (min-width: 640px) and (max-width: 1023px) {
  .erp-bottom-navigation .erp-navigation-menu-more .erp-navigation-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .app-shell { padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
  /* 觸控目標至少 44px：頂列按鈕、底部導覽選單連結、工作台連結 */
  .erp-topbar { min-height: 52px; }
  .erp-nav-action { height: 44px; min-width: 44px; }
  .erp-nav-action-icon { width: 44px; }
  .erp-topbar-brand { min-height: 44px; }
  .erp-bottom-navigation .erp-navigation-menu-link { min-height: 44px; }
  .ledger-list a.doc-link { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- 模組識別保留；後台視覺統一深綠 ---------- */
.app-shell { --erp-page-accent: var(--emerald); }
.app-shell[data-erp-module]:not([data-erp-module=""]) { --erp-page-accent: var(--emerald); }
.app-shell[data-page-resource="product_skus"] { --erp-page-accent: var(--emerald); }
.erp-module-dot { display: inline-block; width: .625rem; height: .625rem; margin-right: .5rem; background: var(--emerald); flex-shrink: 0; }
.erp-module-card { border-top: 1px solid var(--border-hairline); }
.app-shell .page-shell { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.app-shell .page-shell > *, .erp-form { min-width: 0; }
.app-shell .data-table-wrap { max-width: 100%; min-width: 0; }
.app-shell .page-shell table { width: 100%; }
.app-shell .page-shell table th { font-size: var(--text-caption); }
.app-shell .page-shell table th, .app-shell .page-shell table td { padding: 8px 12px; }
.app-shell .page-shell .card.page-header { background: transparent; border: 0; border-radius: 0; }
@media (max-width: 639px) {
  .erp-topbar { flex-wrap: wrap; gap: var(--space-2); padding: var(--space-2) var(--space-4); }
  .erp-nav-actions { margin-left: auto; }
  .app-shell { padding: 16px 12px calc(6rem + env(safe-area-inset-bottom, 0px)); }
  .erp-section, .sku-form-section { padding: 16px; }
  .erp-form-actions { padding: 12px; }
}

/* ---------- 工作台首頁：當日帳列、待辦單據、庫存警示 ---------- */
.dashboard .page-title { font-size: var(--text-page-title); }
.day-ledger-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.day-ledger-grid > li { min-width: 0; background: var(--paper); border: 1px solid var(--border-hairline); border-radius: var(--radius-card); }
.day-ledger-grid > li.day-ledger-receivables { background: var(--coral-tint); border-color: var(--coral-tint); }
.day-ledger-cell { display: flex; flex-direction: column; gap: var(--space-3); height: 100%; padding: 14px 16px; color: var(--ink); border-radius: inherit; text-decoration: none; }
.day-ledger-cell:hover { background: var(--sand); }
.day-ledger-cell .label { font-size: var(--text-caption); font-weight: 500; color: var(--text-secondary); }
.day-ledger-cell .figure { display: block; font-size: var(--text-figure); font-weight: 700; line-height: 1.2; text-align: left; }
.day-ledger-cell .figure small { margin-left: var(--space-2); font-size: var(--text-caption); font-weight: 400; color: var(--text-secondary); }
.day-ledger-cell .figure .currency { margin: 0 var(--space-3) 0 0; }
.day-ledger-cell .note { font-size: var(--text-caption); color: var(--text-secondary); }
.day-ledger-cell .note.is-short { color: var(--vermilion); font-weight: 700; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.dashboard-side { display: grid; gap: var(--space-6); min-width: 0; }
.dashboard .ledger-block { background: var(--paper); border: 1px solid var(--border-hairline); border-radius: var(--radius-card); }
.dashboard .ledger-block > .block-title { margin: 0; padding: var(--space-5) var(--space-6); border-bottom: 0; }
.dashboard .ledger-block .data-table-wrap { margin-top: 0; border: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); }
.dashboard .ledger-block .empty-state { margin: 0 var(--space-6) var(--space-6); }
.dashboard .ledger-list > li { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border-hairline); border-bottom: 0; }
.dashboard .ledger-list time { font-size: var(--text-caption); white-space: nowrap; }
.dashboard .block-foot { margin: 0; padding: var(--space-5) var(--space-6); }
@media (max-width: 639px) {
  .dashboard .ledger-list > li { align-items: flex-start; flex-wrap: wrap; }
  .dashboard .ledger-list time { margin-left: auto; }
  .app-shell .data-table--stack td.todo-action-cell { padding-top: var(--space-3); }
}
@media (min-width: 640px) { .day-ledger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) {
  .day-ledger-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dashboard-columns { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-6); }
}

.po-receiving { min-width: 190px; max-width: 260px; padding: 4px 0; }
.po-receiving-heading, .po-receiving-quantities { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.po-receiving-percent { font-size: var(--text-caption); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.po-receiving-quantities { color: var(--text-secondary); font-size: var(--text-caption); white-space: nowrap; }
.po-receiving-quantities strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.po-receiving-quantities .note-vermilion, .po-receiving-quantities strong.note-vermilion { color: var(--vermilion); }
.po-receiving-exceptions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- 倉庫作業（手機／掃碼）頁面：單欄、大按鈕、大輸入欄位；實線＝完成、虛線＝待處理、朱紅雙線＝短缺 ---------- */
.wms-page { max-width: 40rem; margin-inline: auto; width: 100%; }
.wms-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
@media (min-width: 768px) { .wms-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wms-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); min-height: 96px; padding: var(--space-6) var(--space-4); text-align: center; font-size: 18px; font-weight: 700; color: var(--ink); text-decoration: none; background: var(--paper); border: 1px solid var(--rule-line); border-radius: var(--radius-card); }
.wms-tile:hover { background: var(--sand); }
.wms-tile:focus-visible { outline-offset: 0; }
.wms-tile .wms-badge { position: absolute; top: 8px; right: 8px; min-width: 28px; padding: 0 var(--space-4); background: var(--ink); color: var(--paper); font-size: 14px; line-height: 28px; font-variant-numeric: tabular-nums; }
.wms-scan-input { width: 100%; min-height: 56px; font-size: 20px; font-variant-numeric: tabular-nums; }
input.wms-scan-input { border: 2px solid var(--ink); }
input.wms-scan-input:focus { border-color: var(--focus-ring); box-shadow: var(--shadow-focus); }
.wms-scan-form { counter-reset: wms-step; display: grid; gap: var(--space-5); padding: var(--space-5) 0 var(--space-6); }
.wms-scan-form label { display: flex; align-items: center; gap: var(--space-4); font-size: 15px; font-weight: 700; }
.wms-scan-form label::before { counter-increment: wms-step; content: counter(wms-step); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.wms-scan-form .btn-primary, .wms-scan-form .btn-secondary { min-height: 56px; font-size: 18px; width: 100%; }
.wms-list { display: block; border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); background: var(--paper); }
.wms-list > .block-title { padding: var(--space-5) var(--space-5) var(--space-3); border-bottom: 1px solid var(--border-hairline); }
.wms-list > * + * { border-top: 1px solid var(--border-hairline); }
.wms-empty { margin: 0; padding: var(--space-6); color: var(--text-secondary); }
.wms-line { display: grid; gap: var(--space-2); min-height: 64px; padding: var(--space-5) var(--space-6); color: var(--ink); text-decoration: none; }
a.wms-line:hover { background: var(--sand); }
.wms-line-title { font-size: 16px; font-weight: 700; }
.wms-line .wms-location { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 22px; font-weight: 700; }
.wms-qty { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wms-state { font-size: var(--text-caption); font-weight: 700; }
.wms-line.is-pending { color: var(--ink); }
.wms-line.is-pending .wms-state { color: var(--text-secondary); }
.wms-line.is-done .wms-location, .wms-line.is-done .wms-line-title { color: var(--text-secondary); }
.wms-line.is-short { border-bottom: 3px double var(--vermilion); }
.wms-line.is-short .wms-state, .wms-line.is-short .wms-qty { color: var(--vermilion); }
.wms-shortage summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--vermilion); font-weight: 700; cursor: pointer; }
.wms-shortage-form { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-3); align-items: end; padding-top: var(--space-2); }
.wms-shortage-form .field-label { grid-column: 1 / -1; }
.wms-shortage-form .input, .wms-shortage-form .btn-secondary { min-height: 48px; }
.wms-progress { padding: var(--space-4) 0; }
.wms-progress-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 15px; font-weight: 700; }
.wms-progress-head strong { font-size: 24px; }
.wms-result { padding: var(--space-6) 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--border-hairline); }
.wms-result .wms-location { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 24px; font-weight: 700; }
.wms-candidate { display: flex; align-items: center; min-height: 48px; }
.wms-complete { display: block; }
.wms-complete .btn-primary:disabled { border-style: dashed; }
.wms-camera { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; gap: 12px; padding: 16px; background: rgba(0, 0, 0, .85); }
.wms-camera[hidden] { display: none; }
.wms-camera video { width: 100%; max-width: 480px; }

/* 進貨明細：常用欄位在主列，驗收與儲位按需展開。 */
.receipt-line-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.receipt-line-fields > :first-child { grid-column: 1 / -1; }
.receipt-line-more .hint { white-space: normal; }

.receipt-allocations .alloc-row { grid-template-columns: minmax(0, 1fr); }
.receipt-allocations .alloc-row[hidden] { display: none; }

/* 手機工作面保留呼吸空間，底部導覽不覆蓋內容。 */
@media (max-width: 1023px) {
  .erp-frame.has-sidebar .app-shell { margin: 0 8px 8px; min-height: calc(100dvh - 60px); }
}
@media print {
  .erp-frame.has-sidebar { background: var(--white); }
  .erp-frame.has-sidebar .app-shell { margin: 0; padding: 0; border-radius: 0; min-height: 0; }
}
