/* Painel operacional (app/dashboard.js). */
.tzd { display: grid; gap: 18px; }
.tzd-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.tzd-head h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.5px; }
.tzd-head p { margin: 0; color: var(--muted); }
.tzd-btn { border: 1px solid var(--tz-outline-control); background: var(--surface, #fff); color: var(--ink); border-radius: var(--tz-r-sm); height: 34px; padding: 0 12px; font-weight: 600; }
.tzd-btn:hover { border-color: var(--blue); color: var(--blue); }
.tzd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tzd-kpi { background: var(--surface, #fff); border: 1px solid var(--tz-outline-container); border-radius: var(--tz-r-md); padding: 14px 16px; display: grid; gap: 2px; border-top: 3px solid var(--blue); }
.tzd-kpi span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tzd-kpi strong { font-size: 30px; letter-spacing: -1px; line-height: 1.15; }
.tzd-kpi small { font-size: 12px; color: var(--muted); }
.tzd-kpi.ok { border-top-color: var(--green, #159866); }
.tzd-kpi.warn { border-top-color: var(--amber, #b97608); }
.tzd-kpi.late { border-top-color: #d14343; }
.tzd-kpi.late strong { color: #d14343; }
.tzd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .tzd-grid { grid-template-columns: 1fr; } }
.tzd-card { background: var(--surface, #fff); border: 1px solid var(--tz-outline-container); border-radius: var(--tz-r-md); padding: 16px 18px; min-width: 0; }
.tzd-card h3 { margin: 0 0 12px; font-size: 15px; }
.tzd-muted { color: var(--muted); font-size: 13px; margin: 0; }
.tzd-list { display: grid; gap: 6px; }
.tzd-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--tz-outline-container); background: var(--panel, #f7f9fc); border-radius: var(--tz-r-md); padding: 9px 12px; text-align: left; color: var(--ink); }
.tzd-row:hover { border-color: var(--blue); }
.tzd-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.tzd-pill { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 20px; white-space: nowrap; }
.tzd-pill.ok { background: var(--green2, #e6f8f0); color: var(--green, #159866); }
.tzd-pill.warn { background: var(--amber2, #fff3d7); color: var(--amber, #b97608); }
.tzd-pill.late { background: #fde2e2; color: #d14343; }
.tzd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tzd-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--tz-outline-divider); }
.tzd-table td { padding: 8px; border-bottom: 1px solid var(--tz-outline-divider); }
.tzd-table th:not(:first-child), .tzd-table td:not(:first-child) { text-align: center; }
.tzd-table td.late { color: #d14343; font-weight: 700; }
.tzd-bar { display: grid; grid-template-columns: 120px 1fr 30px; gap: 10px; align-items: center; margin-bottom: 9px; font-size: 13px; }
.tzd-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tzd-bar div { height: 10px; background: var(--panel, #f1f5f9); border-radius: 6px; overflow: hidden; }
.tzd-bar i { display: block; height: 100%; border-radius: 6px; }
.tzd-bar b { text-align: right; }
.tzd-cols { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 170px; align-items: end; }
.tzd-col { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; gap: 4px; font-size: 12px; }
.tzd-col b { font-size: 12px; }
.tzd-col i { align-self: end; width: 70%; max-width: 38px; background: var(--blue); border-radius: 6px 6px 3px 3px; min-height: 3px; }
.tzd-col span { color: var(--muted); text-transform: capitalize; }

/* Resumo do período (app/dashboard-periodo.js) */
.tzd-period { margin-top: 16px; }
.tzd-period-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tzd-period-head h3 small { font-weight: 600; color: var(--muted); font-size: 12px; margin-left: 6px; }
.tzd-link { color: var(--blue); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.tzd-period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.tzd-period-bar button { padding: 6px 12px; border: 1px solid var(--tz-outline-control); border-radius: var(--tz-r-sm); background: var(--surface, #fff); color: var(--ink); font-weight: 700; font-size: 12px; cursor: pointer; }
.tzd-period-bar button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.tzd-period-bar span { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.tzd-period-bar input { padding: 6px 8px; border: 1px solid var(--tz-outline-control); border-radius: var(--tz-r-sm); background: var(--surface, #fff); color: var(--ink); }
.tzd-period .tzd-kpis { margin-bottom: 16px; }
.tzd-period-grid { gap: 14px; }
.tzd-sub { border: 1px solid var(--tz-outline-container); border-radius: var(--tz-r-md); padding: 12px 14px; min-width: 0; }
.tzd-sub h4 { margin: 0 0 10px; font-size: 13px; }
.tzd-delta { margin-left: 6px; font-size: 11px; font-style: normal; font-weight: 800; padding: 1px 6px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.tzd-delta.good { color: #15803d; background: rgba(22,163,74,.12); } .tzd-delta.bad { color: #b91c1c; background: rgba(220,38,38,.12); } .tzd-delta.neutral { color: var(--muted); background: rgba(127,127,127,.12); }
@media (max-width: 760px) {
  .tzd-head { align-items: flex-start; }
  .tzd-head > div { flex: 1 1 auto; min-width: 0; }
  .tzd-head .tzd-btn { flex: none; min-width: max-content; white-space: nowrap; }
  .tzd-team-table { display: block; width: 100%; border-collapse: separate; border-spacing: 0; }
  .tzd-team-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .tzd-team-table tbody { display: grid; gap: 8px; }
  .tzd-team-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--tz-outline-container); border-radius: var(--tz-r-md); background: var(--surface); }
  .tzd-team-table td { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; padding: 7px 8px; border: 0; font-size: 12px; }
  .tzd-team-table td:first-child { grid-column: 1 / -1; justify-content: flex-start; border-bottom: 1px solid var(--tz-outline-divider); background: var(--panel); font-weight: 600; }
  .tzd-team-table td:not(:first-child)::before { content: attr(data-label); color: var(--muted); font-size: 11px; line-height: 1.25; }
  .tzd-team-table td.late { color: var(--tz-danger, #dc2626); font-weight: 600; }
  .tzd-period-bar { gap: 7px; }
  .tzd-period-bar button { min-height: 38px; padding-inline: 11px; }
  .tzd-period-bar span { flex: 1 1 100%; width: 100%; margin-left: 0; gap: 7px; }
  .tzd-period-bar span input[type="datetime-local"] { flex: 1 1 145px; width: auto; min-width: 0; min-height: 40px; }
  .tzd-period-bar span button { min-height: 40px; }
  .tzd-period .tzd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tzd-period .tzd-kpi { min-width: 0; padding: 11px 12px; }
  .tzd-period .tzd-kpi strong { font-size: clamp(22px, 7vw, 28px); overflow-wrap: anywhere; }
  .tzd-period .tzd-kpi span, .tzd-period .tzd-kpi small { line-height: 1.35; }
  .tzd-sub { padding: 11px 10px; }
  .tzd-sub h4 { line-height: 1.35; }
  .tzd-bar { grid-template-columns: minmax(70px, 105px) minmax(0, 1fr) 26px; gap: 7px; }
  .tzd-period .tzd-cols { gap: 4px; }
}
.tzd-period .tzd-cols { display: flex; gap: 3px; height: 160px; align-items: stretch; }
.tzd-period .tzd-col { flex: 1; min-width: 0; font-size: 10.5px; }
.tzd-period .tzd-col b { font-size: 10.5px; }
.tzd-period .tzd-col i { width: 80%; }
.tzd-period .tzd-col span { white-space: nowrap; font-size: 10px; }
