/* Daily closure list: dark theme, high contrast, larger type (readability fix 2026-11-11) */
#dailyClosureCard,
#review-overview {
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.5;
}
#dailyClosureCard h2,
#review-overview .daily-ov-title {
  margin: 0;
  font-size: 20px;
  color: #ffffff;
}
#dailyClosureCard .hint,
#review-overview .hint,
#dailyCloseHint {
  font-size: 14px !important;
  line-height: 1.65;
  color: #e5edf6 !important;
}
#dailySource {
  font-size: 14px;
  color: #e5edf6 !important;
}

#dailyClosureCard table.dense,
#review-overview table.dense,
#dailyTable,
#dailyDetailTable {
  font-size: 15px !important;
  color: #f8fafc;
  width: 100%;
  border-collapse: collapse;
}
#dailyClosureCard table.dense th,
#review-overview table.dense th,
#dailyTable th,
#dailyDetailTable th {
  font-size: 14px !important;
  color: #ffffff !important;
  background: #111827 !important;
  font-weight: 700;
  padding: 9px 10px !important;
  white-space: nowrap;
  text-align: left;
  border: 1px solid #526072;
}
#dailyClosureCard table.dense td,
#review-overview table.dense td,
#dailyTable td,
#dailyDetailTable td {
  color: #f8fafc !important;
  padding: 9px 10px !important;
  line-height: 1.45;
  border: 1px solid #526072;
  vertical-align: middle;
}
#dailyTable td.muted,
#dailyDetailTable td.muted,
#dailyClosureCard .muted,
#review-overview .muted {
  color: #e2e8f0 !important;
}

/* Override light row backgrounds from app.css (those made light text unreadable). */
#dailyTable tbody tr.daily-ok td { background: #163527 !important; color: #f0fdf4 !important; }
#dailyTable tbody tr.daily-open td { background: #3a2218 !important; color: #fff7ed !important; }
#dailyTable tbody tr.daily-hist td { background: #2c3344 !important; color: #f8fafc !important; }
#dailyTable tbody tr.daily-selected td { background: #1e3a5f !important; color: #ffffff !important; }
#dailyTable tbody tr:hover td { filter: brightness(1.08); }
#dailyTable tbody tr { cursor: pointer; }

#dailyTable tbody tr.daily-ok td:first-child::after {
  content: " \00b7 \5df2\65e5\6e05";
  color: #86efac;
  font-size: 13px;
  font-weight: 700;
}
#dailyTable tbody tr.daily-open td:first-child::after {
  content: " \00b7 \672a\65e5\6e05";
  color: #fda4af;
  font-size: 13px;
  font-weight: 700;
}
#dailyTable tbody tr.daily-hist td:first-child::after {
  content: " \00b7 \5386\53f2\672a\5b8c\6210";
  color: #fde68a;
  font-size: 13px;
  font-weight: 700;
}

.daily-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 12px; }
.daily-chip {
  border: 0; border-radius: 4px; padding: 8px 18px;
  font-size: 15px; font-weight: 700; cursor: pointer; color: #ffffff;
}
.daily-chip.done { background: #15803d; }
.daily-chip.done:hover, .daily-chip.done:focus { background: #16a34a; }
.daily-chip.open { background: #b91c1c; }
.daily-chip.open:hover, .daily-chip.open:focus { background: #dc2626; }
.daily-chip.units { background: #3f4a1f; color: #fff3bf; cursor: default; font-weight: 700; }
.daily-chip.is-on { outline: 2px solid #93c5fd; outline-offset: 1px; }
#dailyClearStatus { font-size: 15px !important; font-weight: 700; }
#dailyClearStatus.is-clear { color: #86efac !important; }
#dailyClearStatus.is-open { color: #fda4af !important; }

.daily-stage-head { margin: 16px 0 10px; color: #bfdbfe; font-size: 16px; font-weight: 700; }
.daily-stage-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .daily-stage-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); } }
@media (max-width: 800px) { .daily-stage-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); } }

.daily-stage-card {
  background: #29313d; border: 1px solid #64748b; border-radius: 8px;
  padding: 12px 14px; color: #ffffff; cursor: pointer;
  min-height: 148px; display: flex; flex-direction: column; gap: 6px;
}
.daily-stage-card .st-title { font-size: 14px; font-weight: 700; color: #ffffff; letter-spacing: 0.02em; }
.daily-stage-card .st-count { font-size: 24px; font-weight: 700; line-height: 1.2; color: #ffffff; }
.daily-stage-card .st-help { font-size: 13px; line-height: 1.5; color: #f1f5f9; flex: 1; }
.daily-stage-card .st-btn {
  margin-top: 8px;
  padding: 8px 12px; font-size: 14px; font-weight: 800; cursor: pointer;
  background: #1d4ed8; color: #ffffff; border: 1px solid #93c5fd; border-radius: 4px;
}
.daily-stage-card .st-btn:hover { background: #2563eb; }
.daily-stage-card.stage-work-op .st-btn { background: #9f1239; border-color: #fb7185; }
.daily-stage-card.stage-empty .st-btn { background: #334155; border-color: #94a3b8; }
.daily-stage-card.stage-empty { background: #0f2d22; border-color: #4ade80; color: #ecfdf5; }
.daily-stage-card.stage-empty .st-title,
.daily-stage-card.stage-empty .st-count { color: #ecfdf5; }
.daily-stage-card.stage-empty .st-help { color: #d1fae5; }
.daily-stage-card.stage-work-op { background: #3f151b; border-color: #fb7185; color: #fff1f2; }
.daily-stage-card.stage-work-op .st-title,
.daily-stage-card.stage-work-op .st-count { color: #fff1f2; }
.daily-stage-card.stage-work-op .st-help { color: #ffe4e6; }
.daily-stage-card.stage-work-sys { background: #32260d; border-color: #facc15; color: #fffbeb; }
.daily-stage-card.stage-work-sys .st-title,
.daily-stage-card.stage-work-sys .st-count { color: #fffbeb; }
.daily-stage-card.stage-work-sys .st-help { color: #fef3c7; }
.daily-stage-card.stage-selected { box-shadow: 0 0 0 3px #93c5fd; }

.daily-file-line { margin: 10px 0 0; font-size: 14px; color: #e5edf6; line-height: 1.65; }
.daily-detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 16px 0 8px; }
.daily-detail-head h3 { margin: 0; font-size: 16px; color: #ffffff; }
#dailyDetailMeta { font-size: 14px; color: #e2e8f0 !important; }
.daily-footer { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; align-items: center; }
.daily-footer .is-on { outline: 2px solid #93c5fd; outline-offset: 1px; }
#dailyFooter button,
#dailyFileDetailBtn,
#dailyViewApproved,
#dailyDetailPrev,
#dailyDetailNext,
#dailyProdBtn,
#dailyDeliveryBtn {
  font-size: 14px !important;
  color: #ffffff !important;
  background: #334155 !important;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  padding: 7px 12px !important;
  font-weight: 600;
}
#review-overview { padding: 10px 16px 18px; }

#dailyDetailTable tbody tr[data-job-id]{cursor:pointer}


.daily-stage-card .st-count { font-size: 13px; line-height: 1.45; font-weight: 700; margin: 6px 0 4px; }
#shopAlertsBanner.shop-alerts,
.shop-alerts {
  display: block;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #f59e0b;
  background: #422006;
  color: #fffbeb;
  border-radius: 6px;
}
#shopAlertsBanner[hidden] { display: none !important; }
.shop-alerts-title { font-size: 16px; font-weight: 800; margin: 0 0 6px; color: #fde68a; }
.shop-alerts-lead, .shop-alerts-note { margin: 0 0 8px; font-size: 13px; line-height: 1.55; color: #fef3c7; }
.shop-alerts ul { margin: 0; padding-left: 1.2em; }
.shop-alerts li { margin: 0 0 4px; font-size: 14px; line-height: 1.5; }
.shop-alert-reason { font-weight: 800; color: #fbbf24; }

/* 日清 / 每日结果图闭环：由 daily_closure_flag.js 的 SHOW_DAILY_CLOSURE 控制显示 */
html[data-show-daily-closure="0"] #dailyClosureCard,
html[data-show-daily-closure="0"] #review-overview,
html[data-show-daily-closure="0"] #home-overview-button {
  display: none !important;
}

/* 「新店铺提示」：由 daily_closure_flag.js 的 SHOW_SHOP_ALERTS 控制显示；不影响下方日清说明 */
html[data-show-shop-alerts="0"] #shopAlertsBanner {
  display: none !important;
}

html[data-show-image-flow="0"] #flowStatsCard,
html[data-show-image-flow="0"] .nav-item[data-scroll="flowStatsCard"] {
  display: none !important;
}


/* daily shop-stats modal (click 订单日期) */
td.daily-day-link{
  cursor:pointer;
  color:#93c5fd;
  text-decoration:underline;
  text-underline-offset:2px;
  white-space:nowrap;
}
td.daily-day-link:hover{color:#dbeafe;background:#4b5563}
.dss-modal{position:fixed;inset:0;z-index:170;display:none}
.dss-modal.is-open{display:block}
.dss-modal[hidden]{display:none!important}
.dss-mask{position:absolute;inset:0;background:rgba(0,0,0,.62)}
.dss-panel{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(1180px,calc(100vw - 24px));max-height:calc(100vh - 36px);
  display:flex;flex-direction:column;
  background:var(--panel,#2f3440);border:1px solid var(--line,#3f4654);border-radius:10px;
  box-shadow:0 18px 48px rgba(0,0,0,.55);
}
.dss-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:12px 14px;border-bottom:1px solid var(--line,#3f4654);background:#23272e;
  flex:0 0 auto;
}
.dss-head h3{margin:0;font-size:15px;color:var(--text,#e5e7eb)}
.dss-note{margin:0;padding:8px 14px 6px;font-size:12px;line-height:1.5}
.dss-status{margin:0 14px 8px;padding:8px 10px;border-radius:6px;font-size:13px}
.dss-status[hidden]{display:none!important}
.dss-status.dss-loading{background:#1f2937;color:#93c5fd}
.dss-status.dss-error{background:#4c1d1d;color:#fecaca}
.dss-table-wrap{overflow:auto;padding:0 14px 8px;flex:1 1 auto;min-height:160px;max-height:calc(100vh - 260px)}
.dss-table tr.dss-total td{position:sticky;top:29px;background:#1f2937;z-index:1}
.dss-table{width:100%;min-width:980px;border-collapse:collapse;font-size:13px}
.dss-table th,.dss-table td{padding:7px 8px;border-bottom:1px solid var(--line,#3f4654);vertical-align:top}
.dss-table th{position:sticky;top:0;background:#23272e;z-index:1;white-space:nowrap;text-align:left}
.dss-table th.num,.dss-table td.num{text-align:right;white-space:nowrap}
.dss-table .dss-shop{min-width:140px;max-width:220px}
.dss-shop-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dss-shop-code{display:block;color:var(--muted,#9ca3af);font-size:12px}
.dss-table tr.dss-total{background:#1f2937;font-weight:600}
.dss-table tr.dss-total .dss-shop-name{white-space:normal}
.dss-table tr.dss-empty td{text-align:center;color:var(--muted,#9ca3af);padding:20px 8px}
.dss-cost{max-width:220px;white-space:normal!important;line-height:1.35;font-size:12px}
.dss-foot{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:8px 14px 12px;border-top:1px solid var(--line,#3f4654);background:#23272e;
}
.dss-foot select{background:#111827;color:#e5e7eb;border:1px solid var(--line,#3f4654);border-radius:4px;padding:2px 6px}
body.dss-modal-open{overflow:hidden}
.dss-foot .btn[disabled]{opacity:.55;cursor:not-allowed}
#dailyShopStatsAllLoaded{margin-left:4px}
