/* ============================================================================
   exec.css — the management dashboard (/exec) and the monthly report (/exec/print)
   ========================================================================== */

/* ---- Headline tiles against targets ---------------------------------------- */
.execkpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-3); }
.exectile { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-xs); color: inherit; text-decoration: none; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
a.exectile:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.exectile__top { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.exectile__label { font-size: var(--fs-sm); color: var(--muted); font-weight: var(--fw-medium); line-height: 1.25; }
.exectile__value { font-size: var(--fs-2xl); font-weight: var(--fw-semi); letter-spacing: -.025em; line-height: 1.05; color: var(--ink); }
.exectile__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--fs-xs); color: var(--muted); }
.exectile__target { display: inline-flex; align-items: center; gap: 4px; }
.exectile__target::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--border-strong); }
.exectile__target[data-state="success"]::before { background: var(--success); }
.exectile__target[data-state="warning"]::before { background: var(--warning); }
.exectile__target[data-state="danger"]::before { background: var(--danger); }
.exectile__bullet { display: grid; gap: 3px; }
.exectile__bulletnote { font-size: var(--fs-2xs); color: var(--muted); }
.exectile__spark { margin-top: auto; height: 34px; }
.exectile__spark--none { display: flex; align-items: end; font-size: var(--fs-2xs); color: var(--faint); line-height: 1.2; }
.chart--bullet { display: block; }

/* Small status tiles (work orders by status) */
.execminis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.exectile--mini { padding: var(--s-3); gap: 2px; align-items: flex-start; border-left: 3px solid var(--border); }
.exectile--mini .exectile__value { font-size: var(--fs-xl); }
.exectile--mini[data-state="info"] { border-left-color: var(--info); }
.exectile--mini[data-state="accent"] { border-left-color: var(--accent); }
.exectile--mini[data-state="warning"] { border-left-color: var(--warning); }
.exectile--mini[data-state="purple"] { border-left-color: var(--purple); }
.exectile--mini[data-state="success"] { border-left-color: var(--success); }

/* ---- Insight line ----------------------------------------------------------- */
.execinsight { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0 0 var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--accent-soft); color: var(--ink-2); font-size: var(--fs-md); line-height: 1.45; }
.execinsight svg { flex: 0 0 auto; margin-top: 3px; color: var(--accent); }
.execkpis + .execinsight { margin-bottom: var(--s-4); }

/* ---- Heat strip (shop load) -------------------------------------------------- */
.heatstrip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; margin-bottom: var(--s-4); }
.heatstrip__cell { display: grid; gap: 3px; justify-items: center; min-width: 0; padding: 4px 2px; border-radius: var(--r-sm); text-align: center; cursor: default; }
.heatstrip__cell:hover { background: var(--surface-2); }
.heatstrip__cell.is-today .heatstrip__l { color: var(--ink); font-weight: var(--fw-semi); }
.heatstrip__l { font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.heatstrip__box { display: block; width: 100%; height: 34px; border-radius: 4px; border: 1px solid var(--border-subtle); }
.heatstrip__cell.is-closed .heatstrip__box { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--surface) 4px 8px); }
.heatstrip__cell[data-tone="danger"] .heatstrip__box { box-shadow: inset 0 0 0 2px var(--danger); }
.heatstrip__v { font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--ink); font-variant-numeric: tabular-nums; }
.heatstrip__s { font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---- Cash row ----------------------------------------------------------------- */
.execcash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.execcash__i { display: flex; align-items: flex-start; gap: var(--s-3); min-width: 0; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.execcash__i > div { min-width: 0; }
.execcash__v { font-size: var(--fs-xl); font-weight: var(--fw-semi); letter-spacing: -.02em; color: var(--ink); }

/* ---- Responsive ---------------------------------------------------------------- */
.execgrid { align-items: start; }
@media (max-width: 1400px) { .execkpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .execcash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heatstrip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .execkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
  .exectile { padding: var(--s-3); }
  .exectile__value { font-size: var(--fs-xl); }
  .execminis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .execcash { grid-template-columns: minmax(0, 1fr); }
  .heatstrip__s { display: none; }
}

/* ---- The monthly report (letter, greys, no hover) ---------------------------- */
.execdoc { --doc-ink: #111; --doc-muted: #555; --doc-line: #ccc; }
.execdoc .printdoc__meta { min-width: 60mm; }
.execdoc__title { font-size: 12pt; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 7mm 0 2mm; padding-bottom: 1.5mm; border-bottom: 1px solid #000; break-after: avoid; }
.execdoc__say { font-size: 9.5pt; color: #333; margin: 0 0 3mm; font-style: italic; }
.execdoc__kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3mm; margin-bottom: 2mm; }
.execdoc__kpi { border: 1px solid var(--doc-line); border-radius: 2mm; padding: 2mm 2.5mm; min-width: 0; }
.execdoc__kpi b { display: block; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .05em; color: var(--doc-muted); font-weight: 700; }
.execdoc__kpi .v { font-size: 14pt; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.execdoc__kpi .s { font-size: 8pt; color: var(--doc-muted); }
.execdoc__two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6mm; align-items: start; }
.execdoc__sub { font-size: 9pt; font-weight: 700; color: #222; margin: 0 0 1.5mm; }
.execdoc table { width: 100%; border-collapse: collapse; font-size: 8.5pt; margin-bottom: 3mm; }
.execdoc td:first-child { white-space: nowrap; }
.execdoc__wide { font-size: 7.5pt !important; } .execdoc__wide th { font-size: 6.8pt; }
.execdoc__two table { font-size: 8pt; }
.execdoc th { font-size: 7.5pt; text-transform: uppercase; letter-spacing: .03em; }
.execdoc th { text-align: left; background: #f3f4f6; color: #111; font-weight: 700; }
.execdoc td, .execdoc th { border-bottom: 1px solid #e5e7eb; padding: 1.4mm 2mm; vertical-align: top; }
.execdoc .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.execdoc tfoot td { font-weight: 700; border-top: 1.5px solid #000; }
.execdoc .chart text { fill: #444; }
.execdoc .chart .grid line { stroke: #e3e3e3; }
.execdoc .legend__i { color: #333; }
.execdoc .heatstrip__l, .execdoc .heatstrip__s { color: #555; } .execdoc .heatstrip__v { color: #111; }
.execdoc .heatstrip__box { border-color: #ddd; }
.execdoc .heatstrip__cell:hover { background: transparent; }
.execdoc__sign { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; margin-top: 12mm; }
.execdoc__signline { border-top: 1px solid #000; padding-top: 1.5mm; font-size: 8.5pt; }
.execdoc__foot { margin-top: 6mm; border-top: 1px solid #ccc; padding-top: 2mm; font-size: 8pt; color: #555; display: flex; justify-content: space-between; gap: 6mm; flex-wrap: wrap; }
.execdoc__defs { font-size: 7.5pt; color: #555; line-height: 1.4; margin-top: 3mm; }
@media screen and (max-width: 760px) {
  .execdoc__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .execdoc__two { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .execdoc { box-shadow: none !important; border-radius: 0 !important; max-width: none !important; padding: 0 !important; margin: 0 !important; overflow: visible !important; }
  .execdoc__kpis { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .execdoc__two { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .execdoc__block { break-inside: avoid; }
  .execdoc .heatstrip { display: grid !important; grid-template-columns: repeat(14, minmax(0, 1fr)) !important; }
  .execdoc .heatstrip__box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .execdoc th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .execbar { display: none !important; }
}
