/* 润凌云 · 日常工作区 2026-10-14。仅屏幕界面；打印模板由原生成器管理。 */
@media screen {
  :root { --bg:#f3f5f8; --line:#e4e8ef; --radius:10px; }
  .sidebar { width:208px; padding:18px 10px 12px; background:#17243f; }
  .brand { padding:0 10px 17px; }
  .brand-mark { border-radius:9px; }
  .ws-card { padding:9px 10px; border-radius:8px; margin-bottom:8px; }
  #tb-ws { display:grid; grid-template-columns:1fr 1fr; background:#0f1d34; border-radius:8px; margin:0 2px 13px; gap:3px; padding:4px; }
  #tb-ws button { color:#aebad0; font-size:12px; min-height:30px; padding:0 6px; border-radius:5px; }
  #tb-ws button.active { color:#f5e2b8; background:#ffffff18; box-shadow:none; }
  #nav a { min-height:34px; margin-bottom:2px; border-radius:6px; font-size:13px; gap:10px; }
  #nav a.active { background:#ffffff12; box-shadow:inset 3px 0 #cfad72; color:#fff0d4; }
  #nav a:hover { transform:none; background:#ffffff12; }
  #nav .nav-sec { padding:10px 12px 5px; font-size:10px; color:#93a1bb; letter-spacing:.1em; }
  #acct-bar .btn { font-size:11px; border-color:#ffffff25; background:transparent; color:#bac7dd; border-radius:6px; }
  .logout { font-size:11px; border:0; margin-top:2px; padding:6px; }
  #topbar { min-height:64px; padding:10px 24px; background:#fff; backdrop-filter:none; gap:10px; flex-wrap:wrap; }
  #topbar .tb-co { background:#f2f4f7; border:0; padding:3px; border-radius:8px; }
  #topbar .tb-co button { border-radius:6px; padding:0 15px; min-height:32px; }
  #topbar .tb-co button.active { background:#17243f; color:#fff; }
  .global-search { max-width:340px; min-width:155px; }
  .global-search input { background:#f6f7fa; border-radius:7px; border-color:#edf0f5; height:37px; }
  .btn { border-radius:7px; box-shadow:none; }
  .btn-gold { background:#bd9653; color:#fff; border-color:#bd9653; }
  .btn-gold:hover { background:#a98447; }
  .workspace-find { white-space:nowrap; font-size:12px; }
  .workspace-find kbd { color:#8892a3; border:1px solid #e1e5eb; padding:1px 3px; border-radius:3px; font-size:10px; margin-left:8px; font-family:inherit; }
  .workspace-context { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 24px 0; color:#6d788b; font-size:11px; }
  .workspace-location { display:flex; align-items:center; gap:10px; }
  .workspace-location span { color:#bac2cf; }
  .workspace-scope { color:#65758c; }
  #main { max-width:none; padding:16px 24px 50px; }
  .page-head { margin-bottom:18px; }
  .page-head h2 { font-size:23px; font-weight:650; letter-spacing:.01em; }
  .page-sub { line-height:1.7; font-size:12px; margin-top:5px; }
  .eyebrow { font-size:10px; letter-spacing:.15em; margin-bottom:7px; }
  .card,.kpi { border-radius:10px; box-shadow:0 2px 5px #1c2c4703; border:1px solid var(--line); }
  .card h3 { font-size:14px; }
  .kpi-grid { gap:12px; }
  .kpi { padding:17px 18px; }
  .kpi .k-value { font-size:25px; font-variant-numeric:tabular-nums; }
  .kpi .k-label { font-size:12px; }
  .kpi .k-sub { font-size:11px; line-height:1.65; }
  .workspace-hub { border:1px solid var(--line); border-radius:10px; background:#fff; padding:17px 18px; margin-bottom:18px; }
  .workspace-section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:13px; }
  .workspace-section-head h3 { font-size:14px; display:inline; font-weight:650; }
  .workspace-section-head div>span { color:#8a94a5; margin-left:12px; font-size:11px; }
  .workspace-company-note { color:#78613b; background:#f7f2e9; border-radius:5px; padding:5px 8px; font-size:11px; white-space:nowrap; }
  .workspace-action-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px 14px; }
  .workspace-action { border:1px solid transparent; background:transparent; padding:10px 7px; display:flex; align-items:center; gap:10px; text-align:left; border-radius:7px; cursor:pointer; min-width:0; color:var(--text); }
  .workspace-action:hover { background:#f7f8fa; border-color:#e9edf3; }
  .workspace-action-icon { display:grid; place-items:center; width:35px; height:35px; border-radius:8px; background:#edf2f9; color:#466288; flex-shrink:0; }
  .workspace-action:first-child .workspace-action-icon { background:#f4ead9; color:#9b7232; }
  .workspace-action svg { width:18px; height:18px; stroke-width:1.7; }
  .workspace-action b { display:block; font-size:13px; font-weight:600; }
  .workspace-action small { display:block; color:#8791a1; font-size:10px; margin-top:4px; }
  .workspace-chevron { margin-left:auto; color:#b3bbc7; font-size:21px; }
  .order-status-tabs { display:flex; flex-wrap:wrap; gap:24px; border-bottom:1px solid #dfe5ee; margin-bottom:16px; }
  .order-status-tabs button { border:0; border-bottom:2px solid transparent; background:transparent; padding:10px 2px 12px; font-size:13px; color:#758096; cursor:pointer; }
  .order-status-tabs button.active { color:#17243f; border-bottom-color:#bd9653; font-weight:650; }
  .order-status-tabs button:hover { color:#17243f; }
  .order-toolbar { padding:13px 14px; background:#fff; border:1px solid var(--line); border-radius:8px; }
  .order-toolbar .co-switch { background:#f3f5f8!important; border-radius:6px; }
  .order-toolbar .co-switch button { min-height:28px; padding:0 10px; font-size:12px; border-radius:4px; }
  .order-toolbar input { border-radius:6px; font-size:12px; }
  .order-filters { background:white; border:1px solid var(--line); padding:10px 14px; border-radius:8px; }
  .order-filters[open] { padding-bottom:13px; }
  .order-filter-context { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:9px 0 12px; }
  #o-context { color:#63748b; font-size:11px; line-height:1.65; overflow-wrap:anywhere; }
  #o-reset { font-size:11px; white-space:nowrap; }
  #o-reset:disabled { opacity:.38; cursor:default; }
  .order-actions { gap:10px; }
  #o-sum { padding:12px 16px; border:1px solid #e3dccd; background:#fcfaf6; border-radius:8px; line-height:1.7; font-size:12px; }
  .sale-summary-item { margin-right:22px; padding:4px 0; }
  .sale-summary-item:nth-child(-n+3) b { display:inline-block; font-size:17px; font-variant-numeric:tabular-nums; }
  .sale-summary-item:nth-child(3) b { color:#92703b; }
  .sale-summary-detail { border-top:1px solid #ece6da; margin-top:6px; padding-top:7px; }
  .table-wrap { border-radius:8px; background:#fff; border:1px solid var(--line); }
  .table-wrap table { border-collapse:separate; border-spacing:0; width:100%; }
  .table-wrap table th { background:#edf1f6; color:#617088; font-size:11px; font-weight:600; padding-top:12px; padding-bottom:12px; border-bottom:1px solid #dfe5ee; }
  .table-wrap table td { border-bottom:1px solid #edf0f5; padding-top:11px; padding-bottom:11px; font-size:12px; }
  .table-wrap tbody tr:hover td { background:#f7f9fc; }
  .table-wrap tbody tr:last-child td { border-bottom:0; }
  #rz-sales-compact th:last-child,#rz-sales-compact td:last-child { position:sticky; right:0; background:#fff; box-shadow:-8px 0 10px -8px #1f2c4228; z-index:1; }
  #rz-sales-compact th:last-child { background:#edf1f6; }
  #rz-sales-compact td.empty { position:static; }
  #rz-sales-compact tbody tr:hover td:last-child { background:#f7f9fc; }
  .tag { border-radius:4px; }
  .modal { border-radius:12px; }
  .modal-head { background:#fafbfd; border-radius:12px 12px 0 0; }
  .workspace-finder { border:1px solid #dfe4ed; border-radius:14px; width:min(660px,calc(100vw - 32px)); max-height:80vh; padding:22px; margin:auto; color:var(--text); box-shadow:0 24px 90px #17243f35; }
  .workspace-finder::backdrop { background:#14233b77; backdrop-filter:blur(3px); }
  .workspace-finder-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:15px; }
  .workspace-finder h3 { font-size:18px; }
  #workspace-finder-input { width:100%; padding:12px; background:#f7f8fa; border:1px solid #dfe4ed; border-radius:7px; }
  .workspace-finder-results { display:grid; grid-template-columns:1fr 1fr; gap:6px; max-height:49vh; overflow:auto; margin-top:13px; }
  .workspace-finder-results button { display:flex; gap:11px; align-items:center; text-align:left; background:white; border:1px solid transparent; border-radius:6px; padding:11px; cursor:pointer; min-width:0; }
  .workspace-finder-results button:hover { background:#f3f6fa; }
  .workspace-finder-results svg { width:20px; height:20px; stroke-width:1.7; color:#6b7e98; }
  .workspace-finder-results b { display:block; color:var(--text); font-size:13px; font-weight:600; }
  .workspace-finder-results small { display:block; color:#8a94a5; font-size:10px; margin-top:3px; }
  .workspace-finder-results i { margin-left:auto; color:#acb5c3; }
  .workspace-finder>p { font-size:11px; margin-top:16px; color:#8993a3; }
}
@media screen and (max-width:1150px) and (min-width:761px) {
  .sidebar { width:188px; }
  #topbar { padding:9px 16px; gap:8px; }
  #main { padding:15px 16px 45px; }
  #topbar .tb-co button { padding:0 10px; }
  .workspace-find kbd { display:none; }
  .workspace-action-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media screen and (max-width:760px) {
  .sidebar { width:100%; height:auto; position:static; padding:12px 10px 0; }
  .brand { padding:0 7px 10px; }
  #tb-ws { display:flex; margin:0 0 8px; gap:4px; }
  #tb-ws button { flex:1; }
  #nav { padding-bottom:9px; }
  #nav a { min-height:34px; margin-right:3px; }
  #topbar { position:static; padding:10px 12px; gap:8px; }
  #topbar .tb-co button { padding:0 12px; }
  #topbar .global-search { order:3; width:100%; max-width:none; flex-basis:100%; margin:0; }
  #tb-new { font-size:11px; }
  .workspace-find kbd { display:none; }
  .workspace-context { padding:12px 14px 0; font-size:10px; flex-wrap:wrap; gap:5px; }
  #main { padding:14px 12px 95px; }
  .page-head h2 { font-size:20px; }
  .workspace-hub { padding:13px 10px; }
  .workspace-section-head { align-items:flex-start; }
  .workspace-section-head div>span { display:block; margin:4px 0 0; font-size:10px; }
  .workspace-action-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
  .workspace-action { padding:9px 3px; gap:7px; }
  .workspace-action-icon { width:29px; height:29px; }
  .workspace-action b { font-size:12px; }
  .workspace-action small { font-size:9px; }
  .workspace-chevron { display:none; }
  .order-status-tabs { gap:15px; }
  .order-status-tabs button { font-size:12px; padding:7px 0 10px; }
  .order-toolbar { padding:10px; }
  #o-range { flex-wrap:wrap; }
  .order-filter-context { align-items:flex-start; }
  .sale-summary-item { margin-right:15px; }
  .sale-summary-item:nth-child(-n+3) b { font-size:16px; }
  .kpi { padding:13px; }
  .kpi .k-value { font-size:21px; }
  .workspace-finder-results { grid-template-columns:1fr; }
}
@media screen {
  #main[data-view="sales"],#main[data-view="purchases"],#main[data-view="sreturn"],#main[data-view="preturn"] { padding-top:10px; }
  #main:has(.order-status-tabs) .page-head { margin-bottom:9px; }
  #main:has(.order-status-tabs) .page-head h2 { font-size:21px; }
  .order-status-tabs { margin-bottom:10px; }
  .order-status-tabs button { padding:6px 2px 9px; }
  .order-toolbar { padding:8px 11px; }
  .order-filters { padding:7px 11px; margin-bottom:8px; }
  .order-workbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 15px; margin:8px 0 10px; }
  .order-workbar .order-actions { order:0; margin:0; }
  .order-workbar .order-filter-context { order:1; margin:0; margin-left:auto; gap:12px; }
  #o-sum { padding:9px 13px; }
  .sale-summary-detail { padding-top:4px; margin-top:4px; }
  .sale-summary-item { padding:2px 0; }
}
@media screen and (max-width:760px) {
  .order-workbar .order-filter-context { width:100%; margin-left:0; }
}

/* 2026-10-28: compact order entry, inspired by the user's JDY sales sheet. */
.order-entry.modal { max-width:1180px; width:calc(100vw - 40px); max-height:92vh; border-radius:10px; }
.order-entry .modal-head { padding:16px 24px; background:#fff; }
.order-entry .modal-head h3 { font-size:20px; }
.order-entry .modal-body { padding:16px 24px 20px; }
.order-entry .entry-topline { display:flex; justify-content:space-between; gap:12px; color:#87909d; font-size:12px; margin-bottom:18px; }
.order-entry .entry-topline > :first-child { color:#435570; font-weight:600; }
.order-entry .entry-basics { grid-template-columns:minmax(240px,2fr) minmax(160px,1fr); max-width:780px; gap:24px; margin-bottom:24px; }
.order-entry .entry-receiving { grid-template-columns:2fr 1fr 1fr; margin-bottom:20px; }
.order-entry input,.order-entry select { min-width:0; font-size:14px; }
.order-entry .field label { color:#647084; font-weight:500; }
.order-entry .entry-section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; gap:12px; }
.order-entry .entry-section-head b { font-size:14px; }
.order-entry .entry-section-head label { display:flex; align-items:center; gap:5px; font-size:12px; color:#788396; cursor:pointer; }
.order-entry .entry-columns,.order-entry .item-row { display:grid; grid-template-columns:minmax(210px,1fr) 120px 120px 128px 32px; gap:10px; align-items:center; }
.order-entry .entry-columns.with-alias,.order-entry .item-row.with-alias { grid-template-columns:minmax(220px,1fr) 156px 120px 120px 128px 32px; }
.order-entry.show-batches .entry-columns,.order-entry.show-batches .item-row { grid-template-columns:minmax(180px,1fr) 100px 110px 130px 120px 32px; }
.order-entry.show-batches .entry-columns.with-alias,.order-entry.show-batches .item-row.with-alias { grid-template-columns:minmax(180px,1fr) 130px 100px 110px 130px 120px 32px; }
.order-entry .entry-columns { background:#f4f6f9; color:#657287; font-size:12px; padding:12px 10px; border-top:1px solid #e4e9ef; border-bottom:1px solid #e4e9ef; }
.order-entry .entry-amount-title { text-align:right; }
.order-entry .item-rows { margin:0; }
.order-entry .item-row { padding:12px 10px; margin:0; border-bottom:1px solid #e9edf2; }
.order-entry .item-row > label { min-width:0; margin:0; }
.order-entry .item-row > label > span { display:none; }
.order-entry .item-row input { width:100%; padding:10px 8px; border-radius:5px; }
.order-entry .item-row .row-amt { font-size:15px; font-weight:600; }
.order-entry .row-del { background:transparent; color:#9ba5b3; font-size:22px; }
.order-entry .row-del:hover { background:#fff1f0; color:#c44444; }
.order-entry:not(.show-batches) .entry-batch { display:none; }
.order-entry .entry-addline { display:flex; gap:14px; align-items:center; padding:12px 0; }
.order-entry .entry-addline > span { font-size:12px; color:#8a94a3; }
.order-entry #f-stockhint { font-size:12px; line-height:1.8; }
.order-entry #f-stockhint:empty { display:none; }
.order-entry .entry-note { margin:18px 0; }
.order-entry .entry-extra { border-top:1px solid #e9edf2; }
.order-entry .entry-extra summary { padding:13px 0; cursor:pointer; font-size:13px; color:#46546a; }
.order-entry .entry-extra summary span { margin-left:14px; color:#8a94a3; font-size:12px; }
.order-entry .entry-extra .form-grid { padding:2px 0 18px; grid-template-columns:repeat(4,minmax(0,1fr)); }
.order-entry .entry-check { grid-column:1 / -1; display:flex; align-items:center; gap:7px; font-size:13px; }
.order-entry .entry-check input { width:auto; }
.order-entry .modal-foot { align-items:center; padding:14px 24px; flex-wrap:wrap; background:#fafbfc; border-radius:0 0 10px 10px; gap:8px; }
.order-entry .entry-total { margin-right:auto; display:flex; gap:12px; align-items:baseline; padding:0; order:-1; }
.order-entry .entry-total > span { font-size:12px; font-weight:400; color:#69768a; }
.order-entry .entry-total strong { font-size:24px; color:#17243f; font-variant-numeric:tabular-nums; }
.order-entry .btn-primary { min-width:96px; background:#2879d6; border-color:#2879d6; color:#fff; }
.order-entry input:focus,.order-entry select:focus { border-color:#6a9fdf; box-shadow:0 0 0 2px #2879d618; }
@media(max-width:1000px) {
 .order-entry.modal { width:calc(100vw - 24px); }
 .order-entry .entry-columns,.order-entry .entry-columns.with-alias { display:none; }
 .order-entry .item-row,.order-entry .item-row.with-alias,.order-entry.show-batches .item-row,.order-entry.show-batches .item-row.with-alias { grid-template-columns:2fr 1fr 1fr 32px; gap:12px; padding:14px 0; }
 .order-entry .item-row > label > span { display:block; font-size:11px; color:#748094; margin-bottom:5px; }
 .order-entry .entry-product { grid-column:1 / 3; }
 .order-entry .entry-alias { grid-column:3; }
 .order-entry .row-del { grid-column:4; grid-row:1; align-self:end; }
 .order-entry .entry-qty { grid-column:1; }
 .order-entry .entry-price { grid-column:2; }
 .order-entry .row-amt { grid-column:3; }
 .order-entry .entry-batch { grid-column:1 / 3; }
 .order-entry .entry-extra .form-grid { grid-template-columns:1fr 1fr; }
}
@media(max-width:600px) {
 .order-entry.modal { width:100%; max-height:96dvh; border-radius:8px; }
 .order-entry .modal-head,.order-entry .modal-body,.order-entry .modal-foot { padding:14px; }
 .order-entry .entry-basics { grid-template-columns:1fr; gap:12px; margin-bottom:20px; }
 .order-entry .entry-receiving { grid-template-columns:1fr; }
 .order-entry .item-row,.order-entry .item-row.with-alias,.order-entry.show-batches .item-row,.order-entry.show-batches .item-row.with-alias { grid-template-columns:1fr 1fr 30px; gap:10px; }
 .order-entry .entry-product { grid-column:1 / 3; }
 .order-entry .row-del { grid-column:3; }
 .order-entry .entry-alias { grid-column:1 / 3; }
 .order-entry .entry-qty { grid-column:1; }
 .order-entry .entry-price { grid-column:2; }
 .order-entry .row-amt { grid-column:1 / 3; }
 .order-entry .row-amt::before { content:'金额　'; color:#8a94a3; font-size:12px; font-weight:400; }
 .order-entry .entry-extra summary span { display:block; margin:6px 0 0 16px; }
 .order-entry .entry-addline { flex-wrap:wrap; gap:8px; }
 .order-entry .entry-total { flex-basis:100%; justify-content:space-between; }
 .order-entry .modal-foot .btn { padding:8px 10px; font-size:12px; flex:1 0 auto; }
 .order-entry .modal-foot .btn-primary { min-width:70px; }
}

/* 2026-10-29: order entry is a workspace tab, with no modal or backdrop. */
.order-page-tabs { display:flex; gap:4px; border-bottom:1px solid #dce3ed; margin:0 0 16px; }
.order-page-tabs button { border:1px solid transparent; border-bottom:0; background:transparent; color:#748095; font-size:14px; padding:12px 22px; cursor:pointer; border-radius:6px 6px 0 0; }
.order-page-tabs button.active { color:#2472c8; font-weight:600; background:#fff; border-color:#dce3ed; box-shadow:inset 0 3px #2879d6; margin-bottom:-1px; padding-bottom:13px; }
.order-page-tabs button:focus-visible { outline:2px solid #2879d6; outline-offset:-4px; }
#order-list-panel[hidden],#order-entry-panel[hidden] { display:none; }
.order-entry-page { width:100%; min-width:0; min-height:calc(100dvh - 188px); display:flex; flex-direction:column; background:white; border:1px solid #e0e6ee; border-radius:6px; }
.order-entry-page .entry-page-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px 0; }
.order-entry-page .entry-page-head h2 { font-size:21px; font-weight:600; color:#253750; }
.order-entry-page .entry-page-head > span { font-size:12px; color:#8b96a5; }
.order-entry-page .entry-page-body { flex:1; min-width:0; padding:12px 22px 20px; }
.order-entry-page .entry-topline { margin-bottom:16px; }
.order-entry-page .entry-basics { grid-template-columns:minmax(270px,1.6fr) minmax(230px,1fr); max-width:850px; gap:24px; margin-bottom:24px; }
.order-entry-page .entry-basics .field { display:flex; flex-direction:row; align-items:center; gap:12px; }
.order-entry-page .entry-basics .field > label { margin:0; flex:none; white-space:nowrap; font-size:13px; }
.order-entry-page .entry-basics .field > input,.order-entry-page .entry-basics .field > .sel-ac { flex:1; min-width:0; }
.order-entry-page .entry-products { min-height:210px; }
.order-entry-page .entry-note { margin:18px 0 12px; }
.order-entry-page .entry-page-foot { position:sticky; bottom:0; z-index:20; display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:8px; padding:14px 22px; background:#fafbfc; border-top:1px solid #e4e9ef; border-radius:0 0 6px 6px; }
.order-entry-page .entry-page-foot .btn { white-space:nowrap; }
@media(min-width:1001px) and (max-width:1250px) {
 .order-entry-page .entry-columns.with-alias,.order-entry-page .item-row.with-alias { grid-template-columns:minmax(180px,1fr) 110px 90px 90px 100px 26px; gap:8px; }
 .order-entry-page.show-batches .entry-columns.with-alias,.order-entry-page.show-batches .item-row.with-alias { grid-template-columns:minmax(140px,1fr) 90px 70px 80px 100px 90px 26px; }
}
@media(max-width:760px) {
 .order-page-tabs { margin-bottom:12px; }
 .order-page-tabs button { padding:11px 18px; }
 .order-entry-page { min-height:calc(100dvh - 300px); }
 .order-entry-page .entry-page-head { padding:15px 14px 0; }
 .order-entry-page .entry-page-body { padding:12px 14px 16px; }
 .order-entry-page .entry-basics { grid-template-columns:1fr; gap:12px; }
 .order-entry-page .entry-basics .field > label { width:58px; }
 .order-entry-page .entry-page-foot { bottom:62px; padding:12px 14px; }
 .order-entry-page .entry-products { min-height:0; }
}
@media(max-width:600px) {
 .order-entry-page .entry-page-foot .btn { padding:8px 10px; font-size:12px; flex:1 0 auto; }
 .order-entry-page .entry-page-foot .btn-primary { min-width:70px; }
}

/* 2026-10-29: keep the sheet focused on entry and its two main save actions. */
.order-entry-page { min-height:0; border-radius:5px; }
.order-entry-page .entry-page-body { padding:20px; }
.order-entry-page .entry-basics { max-width:none; grid-template-columns:minmax(260px,1fr) 280px; margin-bottom:20px; gap:28px; }
.order-entry-page .entry-products { min-height:0; }
.order-entry-page .entry-section-head { margin-bottom:8px; }
.order-entry-page .entry-section-head b { font-size:13px; font-weight:500; color:#637187; }
.order-entry-page .entry-row-tools { display:flex; align-items:center; gap:18px; }
.order-entry-page #f-addrow { border:0; background:transparent; color:#2879d6; padding:4px 0; font-size:12px; }
.order-entry-page .entry-columns { padding:10px; }
.order-entry-page .item-row { padding:10px; }
.order-entry-page .item-row input { padding:8px; font-size:13px; }
.order-entry-page #f-stockhint:not(:empty) { margin-top:8px; }
.order-entry-page .entry-note { margin:18px 0 12px; }
.order-entry-page .entry-note .field { display:flex; flex-direction:row; align-items:center; gap:12px; }
.order-entry-page .entry-note .field > label { flex:none; margin:0; font-size:13px; }
.order-entry-page .entry-note input { flex:1; min-width:0; }
.order-entry-page .entry-more { border-top:1px solid #edf0f4; }
.order-entry-page .entry-more > summary { cursor:pointer; padding:12px 0 0; color:#647187; font-size:12px; }
.order-entry-page .entry-more > summary > span { margin-left:12px; color:#95a0b0; font-size:11px; }
.order-entry-page .entry-more-body { padding-top:16px; }
.order-entry-page .entry-extra { border:0; }
.order-entry-page .entry-extra h3 { font-size:12px; font-weight:500; color:#617085; margin-bottom:12px; }
.order-entry-page .entry-extra h3 > span { font-size:11px; color:#8a95a4; margin-left:12px; font-weight:400; }
.order-entry-page .entry-extra .form-grid { padding-bottom:12px; }
.order-entry-page .entry-page-foot { padding:12px 20px; }
.order-entry-page .entry-total strong { font-size:21px; }
.order-entry-page .entry-action-menu { position:relative; }
.order-entry-page .entry-action-menu > summary { cursor:pointer; list-style:none; color:#708095; font-size:12px; padding:9px 12px; border-radius:5px; }
.order-entry-page .entry-action-menu > summary::-webkit-details-marker { display:none; }
.order-entry-page .entry-action-menu > summary::after { content:'⌄'; margin-left:8px; }
.order-entry-page .entry-action-menu[open] > summary,.order-entry-page .entry-action-menu > summary:hover { background:#edf2f7; }
.order-entry-page .entry-action-list { position:absolute; right:0; bottom:calc(100% + 8px); min-width:145px; padding:5px; border:1px solid #e0e6ee; border-radius:6px; box-shadow:0 5px 20px #17243f14; background:#fff; }
.order-entry-page .entry-action-list .btn { display:block; width:100%; border:0; border-radius:4px; text-align:left; background:#fff; color:#43536b; padding:9px 12px; }
.order-entry-page .entry-action-list .btn:hover { background:#f1f5fa; }
@media(max-width:760px) {
 .order-entry-page .entry-page-body { padding:14px; }
 .order-entry-page .entry-basics { grid-template-columns:1fr; gap:10px; margin-bottom:16px; }
 .order-entry-page .item-row { padding:12px 0; }
 .order-entry-page .entry-page-foot { padding:10px 14px; }
 .order-entry-page .entry-more > summary > span { margin-left:8px; }
 .order-entry-page .entry-extra h3 > span { display:none; }
 .order-entry-page .entry-action-list { right:auto; left:0; }
}

/* Tax is always visible alongside customer and date. */
.order-entry-page .entry-basics { grid-template-columns:minmax(240px,1fr) 260px 140px; gap:20px; }
.order-entry-page #f-more[hidden] { display:none; }
@media(max-width:1000px) {
 .order-entry-page .entry-basics { grid-template-columns:minmax(220px,1fr) 140px; gap:12px 20px; }
 .order-entry-page .entry-basics .field:first-child { grid-column:1 / -1; }
}
@media(max-width:480px) {
 .order-entry-page .entry-basics { grid-template-columns:1fr; gap:10px; }
 .order-entry-page .entry-basics .field:first-child { grid-column:auto; }
}

/* Tax belongs to the item row, immediately after its unit price. */
.order-entry-page .entry-basics { grid-template-columns:minmax(260px,1fr) 280px; gap:28px; }
@media(min-width:1001px) {
 .order-entry-page .entry-columns,.order-entry-page .item-row { grid-template-columns:minmax(200px,1fr) 110px 110px 70px 120px 28px; gap:10px; }
 .order-entry-page .entry-columns.with-alias,.order-entry-page .item-row.with-alias { grid-template-columns:minmax(200px,1fr) 140px 110px 110px 70px 120px 28px; }
 .order-entry-page.show-batches .entry-columns,.order-entry-page.show-batches .item-row { grid-template-columns:minmax(180px,1fr) 100px 100px 65px 120px 110px 28px; }
 .order-entry-page.show-batches .entry-columns.with-alias,.order-entry-page.show-batches .item-row.with-alias { grid-template-columns:minmax(180px,1fr) 120px 100px 100px 65px 120px 110px 28px; }
}
@media(min-width:1001px) and (max-width:1250px) {
 .order-entry-page .entry-columns,.order-entry-page .item-row { grid-template-columns:minmax(150px,1fr) 80px 90px 60px 90px 26px; gap:8px; }
 .order-entry-page .entry-columns.with-alias,.order-entry-page .item-row.with-alias { grid-template-columns:minmax(150px,1fr) 100px 80px 90px 60px 90px 26px; gap:8px; }
 .order-entry-page.show-batches .entry-columns,.order-entry-page.show-batches .item-row { grid-template-columns:minmax(140px,1fr) 70px 75px 55px 90px 80px 26px; gap:7px; }
 .order-entry-page.show-batches .entry-columns.with-alias,.order-entry-page.show-batches .item-row.with-alias { grid-template-columns:minmax(140px,1fr) 85px 70px 75px 55px 90px 80px 26px; gap:7px; }
}
@media(max-width:1000px) {
 .order-entry-page .entry-basics { grid-template-columns:1fr 1fr; gap:12px 20px; }
 .order-entry-page .entry-basics .field:first-child { grid-column:auto; }
 .order-entry-page .entry-tax { grid-column:3; }
 .order-entry-page .row-amt { grid-column:1 / 4; }
}
@media(max-width:760px) {
 .order-entry-page .entry-basics { grid-template-columns:1fr; gap:10px; }
}
@media(max-width:600px) {
 .order-entry-page .entry-tax { grid-column:1; }
 .order-entry-page .row-amt { grid-column:2; align-self:end; padding-bottom:8px; }
}

/* Keep the existing order note alongside the first item's amount. */
.order-entry-page .entry-note-cell { min-width:0; }
.order-entry-page .entry-note-cell .entry-note { margin:0; }
.order-entry-page .entry-note-cell .field { display:block; margin:0; }
.order-entry-page .entry-note-cell .field > label { display:none; }
@media(min-width:1001px) {
 .order-entry-page .entry-columns,.order-entry-page .item-row { grid-template-columns:minmax(160px,1fr) 90px 90px 60px 100px minmax(140px,.6fr) 28px; gap:10px; }
 .order-entry-page .entry-columns.with-alias,.order-entry-page .item-row.with-alias { grid-template-columns:minmax(160px,1fr) 110px 80px 90px 60px 90px minmax(130px,.6fr) 28px; }
 .order-entry-page.show-batches .entry-columns,.order-entry-page.show-batches .item-row { grid-template-columns:minmax(160px,1fr) 75px 80px 55px 100px 85px minmax(120px,.6fr) 26px; gap:8px; }
 .order-entry-page.show-batches .entry-columns.with-alias,.order-entry-page.show-batches .item-row.with-alias { grid-template-columns:minmax(140px,1fr) 90px 70px 75px 52px 85px 80px minmax(110px,.6fr) 26px; }
}
@media(min-width:1001px) and (max-width:1250px) {
 .order-entry-page .entry-columns,.order-entry-page .item-row { grid-template-columns:minmax(130px,1fr) 70px 80px 55px 85px minmax(110px,.6fr) 26px; gap:7px; }
 .order-entry-page .entry-columns.with-alias,.order-entry-page .item-row.with-alias { grid-template-columns:minmax(130px,1fr) 88px 66px 76px 52px 78px minmax(100px,.65fr) 26px; }
 .order-entry-page.show-batches .entry-columns,.order-entry-page.show-batches .item-row { grid-template-columns:minmax(130px,1fr) 66px 76px 52px 80px 78px minmax(100px,.65fr) 26px; gap:6px; }
 .order-entry-page.show-batches .entry-columns.with-alias,.order-entry-page.show-batches .item-row.with-alias { grid-template-columns:minmax(118px,1fr) 75px 60px 70px 50px 75px 72px minmax(88px,.65fr) 24px; }
}
@media(max-width:1000px) {
 .order-entry-page .entry-note-cell { grid-column:1 / 4; }
 .order-entry-page .entry-note-cell:empty { display:none; }
 .order-entry-page .entry-note-cell .field > label { display:block; font-size:11px; color:#748094; margin-bottom:5px; }
}
@media(max-width:600px) {
 .order-entry-page .entry-note-cell { grid-column:1 / 3; }
}

/* Logistics and costs stay directly visible beneath the item table. */
.order-entry-page .entry-bottom-fields { margin-top:18px; }
.order-entry-page .entry-bottom-fields .form-grid { grid-template-columns:minmax(120px,1fr) minmax(140px,1.3fr) 60px 80px 80px auto; gap:12px; align-items:end; }
.order-entry-page .entry-bottom-fields .field { min-width:0; }
.order-entry-page .entry-bottom-fields .field > label { font-size:12px; font-weight:400; color:#748094; margin-bottom:6px; }
.order-entry-page .entry-bottom-fields input,.order-entry-page .entry-bottom-fields select { padding:8px; font-size:13px; border-radius:5px; }
.order-entry-page .entry-bottom-fields .entry-check { grid-column:auto; white-space:nowrap; margin:0 0 9px; font-size:12px; color:#647187; }
.order-entry-page .entry-bottom-fields.is-return .form-grid { grid-template-columns:minmax(100px,180px); }
@media(max-width:1000px) {
 .order-entry-page .entry-bottom-fields .form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:600px) {
 .order-entry-page .entry-bottom-fields .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .order-entry-page .entry-bottom-fields .entry-check { grid-column:1 / -1; margin:0; padding:4px 0; }
}

/* 2026-11-01: JDY-style entry sheet. Screen-only and scoped to entry tabs.
   Never change delivery-template.js, its fonts or print styles for this layout. */
@media screen {
  #order-entry-panel .order-entry-page { position:relative; border-radius:4px; box-shadow:none; }
  #order-entry-panel .entry-page-body { padding:18px; }
  #order-entry-panel .entry-basics { margin-bottom:18px; }
  #order-entry-panel .entry-basics input { height:36px; border-radius:4px; }
  #order-entry-panel .entry-basics .field > label { font-weight:400; color:#43536b; }
  #order-entry-panel .entry-section-head { margin-bottom:8px; }
  #order-entry-panel .entry-section-head b { display:none; }
  #order-entry-panel .entry-row-tools { margin-left:auto; gap:16px; }
  #order-entry-panel #f-addrow { border:1px solid #d8e1ed; border-radius:4px; padding:6px 12px; background:#fff; }
  #order-entry-panel #f-addrow:hover { background:#f2f7fe; border-color:#7aa9df; }
  #order-entry-panel .entry-columns { background:#f5f6f8; color:#43536b; border-color:#dce1e8; }
  #order-entry-panel .entry-bottom-fields { margin-top:16px; }
  #order-entry-panel .entry-bottom-fields .field > label { color:#536175; }
  #order-entry-panel .entry-bottom-fields input,
  #order-entry-panel .entry-bottom-fields select { height:34px; border-radius:4px; }
  #order-entry-panel .entry-page-foot { padding:10px 18px; background:#fffaf0; border-color:#e9e0cc; border-radius:0 0 4px 4px; }
  #order-entry-panel .entry-total { gap:10px; }
  #order-entry-panel .entry-total > span { color:#576174; }
  #order-entry-panel .entry-total strong { font-size:20px; }
  #order-entry-panel .entry-page-foot .btn { border-radius:4px; }
}
@media screen and (min-width:1001px) {
  #order-entry-panel .entry-basics { max-width:calc(100% - 190px); grid-template-columns:minmax(240px,420px) 245px; gap:20px; }
  #order-entry-panel .entry-section-head { position:absolute; top:18px; right:18px; height:36px; margin:0; }
  #order-entry-panel .entry-columns,
  #order-entry-panel .item-row { gap:0; padding:0; align-items:stretch; }
  #order-entry-panel .entry-columns { border:1px solid #dce1e8; }
  #order-entry-panel .entry-columns > span { display:flex; align-items:center; padding:10px 7px; border-right:1px solid #dce1e8; white-space:nowrap; }
  #order-entry-panel .entry-columns > span:last-child { border-right:0; }
  #order-entry-panel .entry-columns > .entry-amount-title { justify-content:flex-end; }
  #order-entry-panel .item-rows { border-left:1px solid #dce1e8; border-right:1px solid #dce1e8; }
  #order-entry-panel .item-row { min-height:48px; border-bottom:1px solid #dce1e8; }
  #order-entry-panel .item-row > label,
  #order-entry-panel .item-row > .entry-note-cell,
  #order-entry-panel .item-row > .row-amt { border-right:1px solid #dce1e8; min-width:0; display:flex; align-items:center; padding:0; }
  #order-entry-panel .item-row > label > span { display:none; }
  #order-entry-panel .item-row .sel-ac,
  #order-entry-panel .item-row .entry-note,
  #order-entry-panel .item-row .entry-note .field { width:100%; min-width:0; }
  #order-entry-panel .item-row input { height:46px; border:1px solid transparent; border-radius:0; box-shadow:none; background:transparent; padding:8px 7px; }
  #order-entry-panel .item-row input::placeholder { color:#8d97a5; }
  #order-entry-panel .item-row input:hover { background:#f7faff; }
  #order-entry-panel .item-row input:focus { background:#fff; border-color:#5597e0; box-shadow:inset 0 0 0 1px #5597e0; outline:0; }
  #order-entry-panel .item-row .r-qty,
  #order-entry-panel .item-row .r-price,
  #order-entry-panel .item-row .r-tax { text-align:right; font-variant-numeric:tabular-nums; }
  #order-entry-panel .item-row input[type=number] { appearance:textfield; -moz-appearance:textfield; }
  #order-entry-panel .item-row input[type=number]::-webkit-inner-spin-button,
  #order-entry-panel .item-row input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
  #order-entry-panel .item-row > .row-amt { justify-content:flex-end; padding:8px 7px; font-size:14px; font-weight:500; white-space:nowrap; }
  #order-entry-panel .row-del { margin:0; width:100%; height:100%; border-radius:0; font-size:20px; }
  #order-entry-panel .order-entry:not(.show-batches) .entry-batch { display:none; }
  #order-entry-panel .entry-note .field > label { display:none; }
  #order-entry-panel .sel-ac-list { min-width:260px; max-width:min(520px,70vw); border-radius:4px; }
  #order-entry-panel .entry-bottom-fields .form-grid { grid-template-columns:minmax(120px,1fr) minmax(140px,1.2fr) 65px 85px 85px auto; gap:12px; }
}
@media screen and (min-width:1001px) and (max-width:1199px) {
  #order-entry-panel .entry-basics { max-width:calc(100% - 170px); grid-template-columns:minmax(210px,1fr) 220px; gap:12px; }
  #order-entry-panel .entry-row-tools { gap:10px; }
  #order-entry-panel #f-addrow { padding:6px 8px; }
  #order-entry-panel .entry-bottom-fields .form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media screen and (max-width:1000px) {
  #order-entry-panel .entry-page-body { padding:14px; }
  #order-entry-panel .entry-products { border-top:1px solid #e4e8ef; padding-top:10px; }
  #order-entry-panel .item-row { border:1px solid #e4e8ef; border-radius:4px; padding:12px; margin-bottom:10px; }
  #order-entry-panel .entry-page-foot { padding:10px 14px; }
}

/* Screen-only: slightly narrow the product/packaging column. */
@media screen and (min-width:1001px) {
 .order-entry-page .entry-columns,.order-entry-page .item-row { grid-template-columns:minmax(160px,.8fr) 90px 90px 60px 100px minmax(140px,.8fr) 28px; }
 .order-entry-page .entry-columns.with-alias,.order-entry-page .item-row.with-alias { grid-template-columns:minmax(160px,.8fr) 110px 80px 90px 60px 90px minmax(130px,.8fr) 28px; }
 .order-entry-page.show-batches .entry-columns,.order-entry-page.show-batches .item-row { grid-template-columns:minmax(160px,.8fr) 75px 80px 55px 100px 85px minmax(120px,.8fr) 26px; }
 .order-entry-page.show-batches .entry-columns.with-alias,.order-entry-page.show-batches .item-row.with-alias { grid-template-columns:minmax(140px,.8fr) 90px 70px 75px 52px 85px 80px minmax(110px,.8fr) 26px; }
}
@media screen and (min-width:1001px) and (max-width:1250px) {
 .order-entry-page .entry-columns,.order-entry-page .item-row { grid-template-columns:minmax(130px,.8fr) 70px 80px 55px 85px minmax(110px,.8fr) 26px; }
 .order-entry-page .entry-columns.with-alias,.order-entry-page .item-row.with-alias { grid-template-columns:minmax(130px,.8fr) 88px 66px 76px 52px 78px minmax(100px,.85fr) 26px; }
 .order-entry-page.show-batches .entry-columns,.order-entry-page.show-batches .item-row { grid-template-columns:minmax(130px,.8fr) 66px 76px 52px 80px 78px minmax(100px,.85fr) 26px; }
 .order-entry-page.show-batches .entry-columns.with-alias,.order-entry-page.show-batches .item-row.with-alias { grid-template-columns:minmax(118px,.8fr) 75px 60px 70px 50px 75px 72px minmax(88px,.85fr) 24px; }
}

/* Dashboard month selector and independent, scrollable previews. */
@media screen {
  #main[data-view="dashboard"] .dash-period-bar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; background:#fff; border:1px solid var(--line); padding:12px 16px; border-radius:12px; margin-bottom:14px; }
  #main[data-view="dashboard"] .dash-period-bar label { font-weight:600; }
  #main[data-view="dashboard"] .dash-period-bar select { width:116px; }
  #main[data-view="dashboard"] .dash-period-bar input { width:160px; }
  #main[data-view="dashboard"] .dash-period-bar .muted { font-size:12px; }
  #main[data-view="dashboard"] .dash-cols { align-items:start; }
  #main[data-view="dashboard"] .dash-preview.is-expanded { max-height:520px; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
  #main[data-view="dashboard"] .dash-preview [hidden], #main[data-view="dashboard"] .dash-preview[hidden] { display:none !important; }
  #main[data-view="dashboard"] .dash-preview-controls { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:10px; margin-top:12px; font-size:12px; }
  #main[data-view="dashboard"] .dash-preview-note { font-size:12px; margin-top:12px; line-height:1.7; }
  #main[data-view="dashboard"] .dash-preview-note a { color:var(--navy); }
  #main[data-view="dashboard"] .dash-preview:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
}

.customer-sales-card { padding:16px; }
.customer-sales-tools, .customer-sales-summary { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; }
.customer-sales-tools label { display:flex; align-items:center; gap:8px; }
.customer-sales-tools input, .customer-sales-tools select { width:auto; max-width:100%; }
.customer-sales-tools input[type=search] { margin-left:auto; }
.customer-sales-summary { margin:18px 0 12px; color:var(--muted); font-size:13px; }
.customer-sales-summary strong { margin-left:6px; color:var(--navy); font-size:23px; font-variant-numeric:tabular-nums; }
.customer-sales-list { max-height:66vh; overflow:auto; }
.customer-sales-list table { min-width:0; }
.customer-sales-list thead th { position:sticky; top:0; z-index:1; }
.customer-sales-list td { white-space:normal; }
.customer-sales-list td small { display:block; margin-top:3px; color:var(--muted); }
.customer-sales-list .cs-place { width:4em; color:var(--muted); }
.customer-sales-list .num { white-space:nowrap; text-align:right; font-variant-numeric:tabular-nums; }
.customer-sales-list .cs-value { width:22%; font-weight:600; }
.customer-sales-list .cs-value i { display:block; margin:3px 0 0 auto; height:3px; background:#549586; border-radius:3px; }
@media(max-width:600px) {
  .customer-sales-card { padding:10px; }
  .customer-sales-tools input[type=search] { width:100%; margin-left:0; }
  .customer-sales-list th, .customer-sales-list td { padding-left:6px; padding-right:6px; }
}
