.daily-closing-head .head-actions { align-items: flex-end; }
.daily-date-control { display: grid; position: relative; gap: 5px; min-width: 148px; color: var(--muted); font-size: 11px; font-weight: 600; }
.daily-date-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; color: var(--ink); background: #fff; font: 600 13px inherit; cursor: pointer; text-align: left; }
.daily-date-trigger:hover, .daily-date-trigger[aria-expanded="true"] { border-color: #9fc9af; box-shadow: 0 0 0 3px #dff1e6; }
.daily-date-trigger svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--green); stroke-width: 1.8; }
.daily-date-popover { position: absolute; z-index: 20; top: calc(100% + 9px); right: 0; width: 286px; padding: 14px; border: 1px solid #dfe9e2; border-radius: 15px; background: #fff; box-shadow: 0 18px 40px #173e2d22; }
.daily-date-popover-head { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 6px; margin-bottom: 11px; }
.daily-date-popover-head strong { color: var(--ink); font-size: 14px; text-align: center; }
.daily-date-popover-head button, .daily-date-popover-footer button { border: 0; background: transparent; color: var(--green); font: 700 22px/1 inherit; cursor: pointer; }
.daily-date-popover-head button { width: 32px; height: 32px; border-radius: 9px; }
.daily-date-popover-head button:hover, .daily-date-popover-footer button:hover { background: var(--green-light); }
.daily-date-weekdays, .daily-date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.daily-date-weekdays { margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.daily-date-cell { min-width: 0; aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 600 12px inherit; cursor: pointer; }
.daily-date-cell:hover { background: var(--green-light); color: var(--green); }
.daily-date-cell.outside { color: #b4c0b9; font-weight: 500; }
.daily-date-cell.today { box-shadow: inset 0 0 0 1px #a8d5b8; color: var(--green); }
.daily-date-cell.selected { background: var(--green); color: #fff; box-shadow: none; }
.daily-date-popover-footer { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eff2ef; }
.daily-date-popover-footer button { padding: 6px 9px; border-radius: 8px; font-size: 12px; }
.daily-close-button { width: auto; min-height: 40px; padding: 0 16px; }
.daily-close-button:disabled { opacity: .65; cursor: wait; }
.daily-closing-note { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; padding: 12px 14px; border: 1px solid #d1ead9; border-radius: 11px; background: #e9f5ed; color: #407658; }
.daily-closing-note span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #ccefd7; color: var(--green); font-weight: 800; }
.daily-closing-note p { margin: 0; font-size: 12px; }
.daily-closing-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.daily-closing-kpi { min-height: 128px; padding: 17px; border: 1px solid #edf0ed; border-radius: 15px; background: #fff; }
.daily-closing-kpi span { color: var(--muted); font-size: 12px; }
.daily-closing-kpi strong { display: block; margin-top: 13px; font-size: 25px; letter-spacing: -.7px; }
.daily-closing-kpi small { display: block; margin-top: 5px; color: #77a78a; font-size: 11px; }
.daily-closing-kpi.sales strong { color: var(--green); }
.daily-closing-kpi.closing { background: #f1f8f2; border-color: #d3e9d9; }
.daily-closing-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(290px, .7fr); gap: 16px; }
.daily-closing-card { min-width: 0; padding: 19px; border: 1px solid #edf0ed; border-radius: 15px; background: #fff; }
.daily-closing-card .card-header { margin-bottom: 17px; }
.daily-net-change { color: var(--muted); font-size: 11px; white-space: nowrap; }
.daily-product-list, .daily-history-list { display: grid; gap: 8px; }
.daily-product-row, .daily-history-row { display: grid; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #f0f2f0; }
.daily-product-row { grid-template-columns: 1fr auto auto; }
.daily-product-row strong, .daily-history-row strong { display: block; font-size: 12px; }
.daily-product-row small, .daily-history-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.daily-product-row b { color: var(--green); font-size: 13px; }
.daily-product-row .daily-revenue { color: var(--ink); font-weight: 600; }
.daily-history-row { grid-template-columns: 1fr auto; }
.daily-history-row .closed { color: var(--green); font-size: 11px; font-weight: 700; }
.daily-empty { padding: 36px 12px; color: var(--muted); text-align: center; font-size: 12px; }
@media (max-width: 900px) {
  .daily-closing-kpis { grid-template-columns: repeat(2, 1fr); }
  .daily-closing-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .daily-closing-head .head-actions { align-items: stretch; }
  .daily-date-control { flex: 1 1 140px; }
  .daily-date-popover { right: auto; left: 0; width: min(286px, calc(100vw - 32px)); }
  .daily-close-button { flex: 1 1 140px; }
  .daily-closing-kpis { gap: 9px; }
  .daily-closing-kpi { min-height: 112px; padding: 13px; }
  .daily-closing-kpi strong { font-size: 20px; }
  .daily-closing-card { padding: 14px; }
  .daily-net-change { white-space: normal; text-align: right; }
}
