/* Daily order workspace: local tokens keep the rest of the application intact. */
.dw-confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 24px; border: 1px solid #e9edf3; border-radius: 14px; color: #151b2b; background: white; box-shadow: 0 20px 70px #151b2b26; }
.dw-confirm-dialog::backdrop { background: #151b2b55; }
.dw-confirm-dialog h2 { margin: 0 0 14px; font-size: 20px; }
.dw-confirm-dialog p { white-space: pre-line; line-height: 1.8; font-size: 14px; color: #536079; }
.dw-confirm-dialog form > div { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.dw-confirm-dialog button { min-height: 40px; border: 1px solid #dce2eb; border-radius: 7px; padding: 9px 16px; background: white; color: #354158; font-size: 14px; }
.dw-confirm-dialog button[value="confirm"] { background: #ef1748; color: white; border-color: #ef1748; }
body.is-authenticated:has(#tab-dailyOrders.active) { background: #f5f6f8; }
body.is-authenticated:has(#tab-dailyOrders.active) .content { min-width: 0; max-width: 100%; }
#tab-dailyOrders {
  --dw-text: #151b2b; --dw-muted: #68758a; --dw-line: #e9edf3;
  --dw-accent: #ef1748; --dw-soft: #fff1f4; --dw-bg: #ffffff;
  color: var(--dw-text); min-width: 0; font-size: 14px;
}
#tab-dailyOrders .dw-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
#tab-dailyOrders .dw-head h2 { font-size: 26px; font-weight: 750; line-height: 1.35; margin: 0; }
#tab-dailyOrders .dw-head p { font-size: 13px; color: var(--dw-muted); margin: 8px 0 0; line-height: 1.6; }
#tab-dailyOrders .dw-button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 38px; padding: 8px 13px; border: 1px solid #dce2eb; border-radius: 7px; background: #fff; color: #354158; font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
#tab-dailyOrders .dw-button:hover { border-color: #aeb9ca; background: #f8f9fb; }
#tab-dailyOrders .dw-button:disabled { opacity: .45; cursor: not-allowed; }
#tab-dailyOrders .dw-button-primary { background: var(--dw-accent); border-color: var(--dw-accent); color: white; padding-inline: 20px; }
#tab-dailyOrders .dw-button-primary:hover { background: #d90d3c; border-color: #d90d3c; }
#tab-dailyOrders .dw-button-action { border-color: #f5a2b5; color: #d91340; }
#tab-dailyOrders .dw-button-action:hover { background: var(--dw-soft); border-color: var(--dw-accent); }
#tab-dailyOrders svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
#tab-dailyOrders .dw-datebar, #tab-dailyOrders .dw-date-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#tab-dailyOrders .dw-datebar { margin-bottom: 18px; }
#tab-dailyOrders .dw-date-switch { flex-wrap: nowrap; gap: 8px; }
#tab-dailyOrders .dw-arrow { width: 38px; padding: 8px; }
#tab-dailyOrders .dw-input { min-width: 0; height: 38px; border: 1px solid #dce2eb; border-radius: 7px; padding: 7px 11px; background: white; color: #354158; font-size: 13px; line-height: 1.4; max-width: 100%; }
#tab-dailyOrders input[type="date"] { width: 165px; }
#tab-dailyOrders .dw-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #4c5970; cursor: pointer; white-space: nowrap; min-height: 38px; }
#tab-dailyOrders .dw-check input { accent-color: var(--dw-accent); width: 16px; height: 16px; margin: 0; }
#tab-dailyOrders .dw-date-note { color: var(--dw-muted); font-size: 12px; }
#tab-dailyOrders .dw-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: white; border: 1px solid var(--dw-line); border-radius: 10px; margin-bottom: 18px; padding: 18px 0; }
#tab-dailyOrders .dw-metric { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; border: 0; border-right: 1px solid var(--dw-line); background: none; padding: 0 24px; color: #48536a; text-align: left; font-size: 13px; }
#tab-dailyOrders .dw-metric:last-child { border-right: 0; }
#tab-dailyOrders .dw-metric:hover { color: var(--dw-accent); }
#tab-dailyOrders .dw-metric strong { display: flex; align-items: center; gap: 16px; font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--dw-text); font-variant-numeric: tabular-nums; }
#tab-dailyOrders .dw-metric.is-risk, #tab-dailyOrders .dw-metric.is-risk strong { color: #d91340; }
#tab-dailyOrders .dw-workspace { background: white; border: 1px solid var(--dw-line); border-radius: 10px; min-width: 0; }
#tab-dailyOrders .dw-tabs { display: flex; overflow-x: auto; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--dw-line); scrollbar-width: thin; }
#tab-dailyOrders .dw-tab { position: relative; display: inline-flex; gap: 7px; align-items: center; padding: 18px 6px 15px; min-height: 52px; flex-shrink: 0; background: none; border: 0; border-bottom: 2px solid transparent; font-size: 13px; color: #4b576d; white-space: nowrap; }
#tab-dailyOrders .dw-tab[aria-selected="true"] { color: var(--dw-accent); border-bottom-color: var(--dw-accent); font-weight: 650; }
#tab-dailyOrders .dw-tab-count { font-size: 12px; font-variant-numeric: tabular-nums; }
#tab-dailyOrders .dw-tab[aria-selected="true"] .dw-tab-count { background: var(--dw-soft); border-radius: 4px; padding: 1px 4px; }
#tab-dailyOrders .dw-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 18px 20px 8px; }
#tab-dailyOrders .dw-search { position: relative; flex: 1 1 230px; max-width: 420px; }
#tab-dailyOrders .dw-search svg { position: absolute; top: 11px; left: 11px; color: var(--dw-muted); }
#tab-dailyOrders .dw-search input { width: 100%; padding-left: 35px; }
#tab-dailyOrders .dw-filters select { width: 140px; }
#tab-dailyOrders .dw-resultbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; color: #536079; font-size: 12px; }
#tab-dailyOrders .dw-resultbar select { height: 34px; width: 115px; }
#tab-dailyOrders .dw-columns, #tab-dailyOrders .dw-row-main { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(160px, 1.4fr) minmax(95px, .8fr) minmax(115px, .9fr) 188px; align-items: center; column-gap: 16px; }
#tab-dailyOrders .dw-columns { background: #fbfcfe; border-block: 1px solid var(--dw-line); padding: 11px 20px; color: #5c687e; font-size: 12px; }
#tab-dailyOrders .dw-row { border-bottom: 1px solid var(--dw-line); }
#tab-dailyOrders .dw-row:last-child { border-bottom: 0; }
#tab-dailyOrders .dw-row-main { padding: 17px 20px; min-height: 85px; }
#tab-dailyOrders .dw-row:hover { background: #fdfdfe; }
#tab-dailyOrders .dw-cell { min-width: 0; line-height: 1.5; overflow-wrap: anywhere; }
#tab-dailyOrders .dw-cell strong { display: block; font-size: 14px; font-weight: 600; }
#tab-dailyOrders .dw-cell small { display: block; font-size: 12px; color: var(--dw-muted); margin-top: 5px; line-height: 1.5; }
#tab-dailyOrders .dw-order-ref { overflow-wrap: anywhere; }
#tab-dailyOrders .dw-devices strong { font-size: 13px; font-weight: 500; }
#tab-dailyOrders .dw-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
#tab-dailyOrders .dw-status::before { content: ''; width: 6px; height: 6px; background: currentColor; border-radius: 50%; flex-shrink: 0; }
#tab-dailyOrders .dw-status-overdue, #tab-dailyOrders .dw-date-risk strong, #tab-dailyOrders .dw-date-risk small { color: #d91340; }
#tab-dailyOrders .dw-status-due { color: #9a6700; }
#tab-dailyOrders .dw-status-ship { color: #2563eb; }
#tab-dailyOrders .dw-status-returned { color: #16805c; }
#tab-dailyOrders .dw-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
#tab-dailyOrders .dw-row-actions .dw-button { min-height: 34px; font-size: 12px; padding: 7px 10px; }
#tab-dailyOrders .dw-row-actions .dw-detail-toggle { color: #5b6780; }
#tab-dailyOrders .dw-detail-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
#tab-dailyOrders .dw-detail { margin: 0 20px 16px; padding: 16px; background: #f8fafc; border: 1px solid var(--dw-line); border-radius: 8px; }
#tab-dailyOrders .dw-detail dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; }
#tab-dailyOrders .dw-detail dl > div { min-width: 0; }
#tab-dailyOrders .dw-detail dt { color: var(--dw-muted); font-size: 12px; margin-bottom: 4px; }
#tab-dailyOrders .dw-detail dd { margin: 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; }
#tab-dailyOrders .dw-detail .dw-wide { grid-column: 1 / -1; }
#tab-dailyOrders .dw-secondary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--dw-line); }
#tab-dailyOrders .dw-secondary-actions .dw-button { min-height: 34px; font-size: 12px; }
#tab-dailyOrders .dw-empty { padding: 54px 20px; text-align: center; color: var(--dw-muted); }
#tab-dailyOrders .dw-empty svg { width: 32px; height: 32px; color: #a3afbf; margin-bottom: 12px; }
#tab-dailyOrders .dw-empty strong { display: block; color: #354158; font-size: 16px; margin-bottom: 8px; }
#tab-dailyOrders .dw-empty p { font-size: 13px; line-height: 1.7; }
#tab-dailyOrders .dw-pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--dw-line); color: #637086; font-size: 12px; }
#tab-dailyOrders .dw-page-size, #tab-dailyOrders .dw-page-nav { display: flex; align-items: center; gap: 8px; }
#tab-dailyOrders .dw-page-size select { height: 34px; }
#tab-dailyOrders .dw-page-nav .dw-button { min-height: 34px; }
#tab-dailyOrders .dw-page-nav span { min-width: 48px; text-align: center; }
#tab-dailyOrders .dw-footnote { margin-top: 10px; color: var(--dw-muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 1200px) {
  #tab-dailyOrders .dw-columns, #tab-dailyOrders .dw-row-main { grid-template-columns: minmax(120px, 1fr) minmax(140px, 1.2fr) minmax(85px, .8fr) minmax(100px, .9fr) 100px; gap: 12px; }
  #tab-dailyOrders .dw-row-actions { flex-direction: column; align-items: stretch; }
  #tab-dailyOrders .dw-row-main { padding: 14px 16px; }
  #tab-dailyOrders .dw-columns { padding-inline: 16px; }
}
@media (max-width: 960px) {
  #tab-dailyOrders .dw-columns { display: none; }
  #tab-dailyOrders .dw-row-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  #tab-dailyOrders .dw-row-actions { flex-direction: row; grid-column: 1 / -1; justify-content: flex-end; }
  #tab-dailyOrders .dw-detail dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tab-dailyOrders .dw-list { border-top: 1px solid var(--dw-line); }
}
@media (max-width: 720px) {
  #tab-dailyOrders .dw-head { align-items: flex-start; gap: 10px; margin-bottom: 18px; }
  #tab-dailyOrders .dw-head h2 { font-size: 23px; }
  #tab-dailyOrders .dw-head p { font-size: 12px; max-width: 220px; }
  #tab-dailyOrders .dw-head .dw-button { padding-inline: 12px; flex-shrink: 0; }
  #tab-dailyOrders .dw-datebar { gap: 6px 10px; margin-bottom: 12px; }
  #tab-dailyOrders .dw-date-switch { gap: 6px; }
  #tab-dailyOrders input[type="date"] { width: 147px; }
  #tab-dailyOrders .dw-check { min-height: 40px; }
  #tab-dailyOrders .dw-date-note { flex: 1 1 155px; font-size: 11px; }
  #tab-dailyOrders .dw-metrics { padding: 14px 0; gap: 0; margin-bottom: 12px; }
  #tab-dailyOrders .dw-metric { padding: 0 10px; gap: 10px; font-size: 11px; }
  #tab-dailyOrders .dw-metric strong { font-size: 25px; }
  #tab-dailyOrders .dw-metric svg { display: none; }
  #tab-dailyOrders .dw-tabs { padding-inline: 10px; gap: 12px; }
  #tab-dailyOrders .dw-tab { font-size: 13px; padding-top: 15px; }
  #tab-dailyOrders .dw-filters { gap: 8px; padding: 14px 12px 2px; }
  #tab-dailyOrders .dw-search { flex-basis: 100%; max-width: none; }
  #tab-dailyOrders .dw-filters select { flex: 1 1 calc(50% - 8px); width: auto; }
  #tab-dailyOrders .dw-filters .dw-check { margin-right: auto; }
  #tab-dailyOrders .dw-input { font-size: 14px; height: 40px; }
  #tab-dailyOrders .dw-resultbar { padding: 12px; }
  #tab-dailyOrders .dw-row-main { gap: 14px 10px; padding: 16px 12px; }
  #tab-dailyOrders .dw-cell strong { font-size: 14px; }
  #tab-dailyOrders .dw-cell small { font-size: 12px; }
  #tab-dailyOrders .dw-row-actions .dw-button { min-height: 40px; font-size: 13px; padding-inline: 14px; }
  #tab-dailyOrders .dw-detail { margin: 0 10px 14px; padding: 12px; }
  #tab-dailyOrders .dw-detail dl { grid-template-columns: 1fr; }
  #tab-dailyOrders .dw-secondary-actions .dw-button { min-height: 40px; }
  #tab-dailyOrders .dw-pagination { padding: 12px; }
  #tab-dailyOrders .dw-page-nav { width: 100%; justify-content: flex-end; }
  #tab-dailyOrders .dw-page-nav .dw-button { min-height: 40px; }
}
@media (prefers-reduced-motion: no-preference) {
  #tab-dailyOrders .dw-button, #tab-dailyOrders .dw-tab { transition: background .15s, border-color .15s, color .15s; }
}
