/* Escala 5x2 · grade da escala no padrão visual da empresa (laranja Movida, cinza nos fins de semana).
   A grade tem cores próprias e fixas: fica igual nos temas claro e escuro e igual ao que é impresso. */
.blocks { display: flex; flex-direction: column; gap: 22px; }

.block {
  --g-orange: #ff7a29;
  --g-orange-dark: #d95300;
  --g-border: #9ca3af;
  --g-head: #e5e7eb;
  --g-weekend-head: #6b7280;
  --g-weekend-cell: #e5e7eb;
  --g-name-bg: #f3f4f6;
  --g-ink: #111827;
  --g-ink-soft: #6b7280;
  --g-red: #dc2626;
  --g-bh: #facc15;
  background: #fff; color: var(--g-ink);
  border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden;
}

.block-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-bottom: 1px solid #fed7aa;
}
.block-head h3 { margin: 0; font-family: var(--font-ui); font-size: 0.95rem; font-weight: 700; letter-spacing: 0; color: var(--g-orange-dark); }
.block-head small { display: block; font-size: 0.78rem; font-weight: 700; color: #9a3412; }
.block-head .btn-pdf {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; cursor: pointer;
  background: #2563eb; color: #fff; border: 0; border-radius: 6px; font-size: 0.75rem; font-weight: 700;
}
.block-head .btn-pdf:hover { background: #1d4ed8; }
.block-head .btn-pdf svg { width: 14px; height: 14px; }

.sheet-wrap { overflow: auto; max-width: 100%; background: #fff; }
.sheet { border-collapse: collapse; width: 100%; font-size: 0.73rem; text-align: center; color: var(--g-ink); }
.sheet th, .sheet td { border: 1px solid var(--g-border); padding: 0; }

.sheet thead th { background: var(--g-head); font-weight: 700; color: #1f2937; height: 28px; padding: 2px 4px; min-width: 48px; }
.sheet thead th.we { background: var(--g-weekend-head); color: #fff; }

.sheet .name {
  position: sticky; left: 0; z-index: 2;
  min-width: 155px; max-width: 155px; padding: 4px 8px;
  text-align: left; background: var(--g-name-bg); border-right: 2px solid var(--g-weekend-head);
}
.sheet thead .name { z-index: 3; font-size: 0.73rem; color: #1f2937; background: var(--g-head); }
.sheet .name .mat { display: block; font-size: 0.68rem; font-weight: 400; color: var(--g-ink-soft); line-height: 1.2; }
.sheet .name .nm { display: block; font-size: 0.73rem; font-weight: 700; color: var(--g-ink); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sheet td.c { position: relative; min-width: 48px; height: 36px; background: #fff; }
.sheet td.c.sun, .sheet td.c.sat { background: var(--g-weekend-cell); }
.sheet td.c.off { background: var(--g-orange); color: #fff; }
.sheet td.c.bh { background: var(--g-bh); color: #111827; }
.sheet td.c.dom::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); pointer-events: none;
}
.sheet td.c.edit { box-shadow: inset 0 0 0 2px #2563eb; }

.cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 36px; padding: 3px 2px; margin: 0; border: 0; border-radius: 0;
  background: transparent; color: inherit; cursor: pointer; line-height: 1.3;
  font-size: 0.73rem; font-variant-numeric: tabular-nums;
}
.cell:hover { outline: 2px solid #111827; outline-offset: -2px; position: relative; z-index: 1; }
.cell:focus-visible { outline: 2px solid #2563eb; outline-offset: -3px; }
td.off .cell, td.bh .cell { font-size: 0.85rem; font-weight: 800; }
.cell .rest { color: inherit; }

.sheet tfoot th, .sheet tfoot td { background: var(--g-name-bg); font-weight: 700; height: 28px; font-size: 0.78rem; }
.sheet tfoot .name { font-weight: 700; font-size: 0.73rem; color: var(--g-ink); }
.sheet tfoot td.over, .sheet tfoot td.low { background: var(--g-red); color: #fff; }

.legend {
  display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 14px;
  border-top: 1px solid #e5e7eb; background: #f9fafb; font-size: 0.75rem; color: #4b5563;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 13px; height: 13px; border-radius: 3px; border: 1px solid var(--g-border); background: #fff; }
.legend i.l-off { background: var(--g-orange); border-color: var(--g-orange); }
.legend i.l-bh { background: var(--g-bh); border-color: var(--g-bh); }
.legend i.l-sun { background: var(--g-weekend-cell); }
.legend i.l-dom { position: relative; background: var(--g-orange); border-color: var(--g-orange); }
.legend i.l-dom::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.legend i.l-edit { box-shadow: inset 0 0 0 2px #2563eb; }

.empty { padding: var(--sp-7) var(--sp-5); text-align: center; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-3); }
.empty b { display: block; color: var(--ink); font-family: var(--font-display); font-size: var(--fs-4); margin-bottom: var(--sp-1); }

@media (max-width: 560px) {
  .sheet .name { min-width: 120px; max-width: 120px; padding: 4px 6px; }
}

/* título só aparece na impressão */
.print-title { display: none; }
