.schedule{width:100%;margin:auto;padding:2.3rem var(--layout-gutter,clamp(1.3rem,2.5vw,5rem)) 4rem}.schedule h1,.schedule h2,.schedule p{margin:0}.schedule h1{font:400 2.7rem/1.2 var(--display);margin:.35rem 0 .55rem}.schedule-heading{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;margin-bottom:1.8rem}.schedule-heading p{color:var(--muted);font-size:.87rem}.schedule .secondary{min-height:44px;white-space:nowrap}.schedule-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.85rem;margin-bottom:1.5rem}.schedule-kpi{padding:1.2rem 1.3rem;border:1px solid var(--line);border-radius:.85rem;background:var(--panel)}.schedule-kpi span{font-size:.75rem;color:var(--muted)}.schedule-kpi strong{display:block;font-size:2rem;line-height:1.3;font-weight:600;margin:.3rem 0}.schedule-kpi small{font-size:.65rem;color:var(--subtle)}.schedule-kpi.danger strong{color:var(--ruim)}.schedule-kpi.success strong{color:var(--bom)}.schedule-filters{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-bottom:1.25rem}.schedule-picker{position:relative;min-width:15rem;max-width:24rem;flex:1;z-index:3}.schedule-picker summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;list-style:none;cursor:pointer;min-height:44px;background:var(--raised);border:1px solid var(--line);border-radius:.5rem;padding:.75rem;font-size:.8rem}.schedule-picker summary::-webkit-details-marker{display:none}.picker-options{position:absolute;top:calc(100% + .3rem);left:0;right:0;max-height:23rem;overflow:auto;background:var(--panel);border:1px solid var(--linha-forte);box-shadow:var(--zc-shadow);border-radius:.65rem;padding:.4rem}.picker-options button{display:block;width:100%;min-height:44px;text-align:left;background:none;border:0;border-radius:.3rem;color:var(--text);font-size:.8rem;padding:.6rem}.picker-options button:hover,.picker-options button[aria-pressed=true]{background:var(--raised)}.schedule-search{flex:1;min-width:10rem}.schedule-search input{width:100%;min-height:44px;padding:.75rem;border:1px solid var(--line);border-radius:.5rem;color:var(--text);background:var(--panel);font-size:.8rem}.schedule-switch{display:flex;align-items:center;gap:.2rem;padding:.25rem;background:var(--panel);border:1px solid var(--line);border-radius:.5rem}.schedule-switch button{min-height:40px;padding:.45rem .7rem;background:none;border:0;border-radius:.3rem;color:var(--muted);font-size:.72rem;font-weight:500;white-space:nowrap}.schedule-switch button[aria-pressed=true]{color:var(--accent-ink);background:var(--accent)}.schedule-board{border:1px solid var(--line);border-radius:1rem;background:var(--panel);overflow:hidden}.schedule-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem;padding:1.35rem 1.5rem}.schedule-toolbar h2{font-size:1.1rem;font-weight:600;margin:.3rem 0}.schedule-toolbar p{color:var(--subtle);font-size:.7rem}.schedule-toolbar-actions{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.schedule-period{display:flex;gap:.2rem}.schedule-period button{min-width:42px;min-height:42px;border:1px solid var(--line);border-radius:.4rem;background:var(--raised);color:var(--text);font-size:.75rem}.schedule-view-switch{margin:0 1.5rem 1rem;width:fit-content}.schedule-scroll{overflow:auto;position:relative;border-top:1px solid var(--line)}.schedule-grid{min-width:920px;--label-width:16rem}.schedule-axis,.schedule-row{display:grid;grid-template-columns:var(--label-width) minmax(0,1fr)}.schedule-axis{position:sticky;top:0;z-index:2;background:var(--raised);border-bottom:1px solid var(--line)}.schedule-axis-label{font:500 .65rem var(--label);letter-spacing:.12em;padding:1rem}.schedule-axis-days{display:flex;position:relative;min-height:3rem}.schedule-tick{padding:1rem .4rem;border-left:1px solid var(--line);text-align:center;font-size:.62rem;color:var(--subtle);white-space:nowrap;overflow:hidden}.schedule-row{min-height:5.75rem;border-bottom:1px solid var(--line)}.schedule-row:last-child{border:0}.schedule-row-label{display:flex;align-items:center;gap:.75rem;padding:1rem;position:sticky;left:0;z-index:1;background:var(--panel);border-right:1px solid var(--line);min-width:0}.schedule-avatar{flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;width:2.5rem;height:2.5rem;border-radius:.55rem;background:var(--raised);color:var(--subtle);font:400 1.1rem var(--display)}.schedule-avatar img{width:100%;height:100%;object-fit:cover}.schedule-row-label>div:last-child{min-width:0}.schedule-project-name{display:block;background:none;border:0;padding:0;text-align:left;max-width:100%;font-size:.8rem;font-weight:600;color:var(--text);overflow-wrap:anywhere}.schedule-project-name:hover{text-decoration:underline}.schedule-row-label small{display:block;color:var(--subtle);font-size:.64rem;margin-top:.2rem}.schedule-row-lane{position:relative;min-width:0;background-image:linear-gradient(to right,var(--grade) 1px,transparent 1px);background-size:var(--grid-step) 100%;display:flex;align-items:center;min-height:5.75rem}.schedule-today{position:absolute;left:var(--today);top:0;bottom:0;z-index:1;border-left:2px solid #dfba63;pointer-events:none}.schedule-today-label{position:absolute;top:.2rem;left:0;transform:translateX(-50%);font-size:.5rem;font-weight:700;padding:.1rem .3rem;background:#dfba63;color:#16130c;border-radius:.2rem}.schedule-bar{position:absolute;top:2rem;min-height:2rem;max-width:100%;border:1px solid currentColor;border-radius:.45rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:left;font-size:.68rem;font-weight:600;padding:.5rem .65rem;background:var(--raised);color:var(--blue)}.schedule-bar:hover{filter:brightness(1.12)}.schedule-unplanned{margin:.7rem 1rem;min-height:42px;border:1px dashed var(--linha-forte);background:transparent;border-radius:.45rem;color:var(--muted);padding:.5rem .7rem;font-size:.7rem;text-align:left}.schedule-unplanned:hover{color:var(--text);border-color:var(--text)}.schedule-legend{display:flex;flex-wrap:wrap;gap:.6rem 1.4rem;padding:1rem 1.5rem;font-size:.65rem;color:var(--muted)}.schedule-legend span{display:flex;align-items:center;gap:.4rem}.legend-dot{display:inline-block;width:.5rem;height:.5rem;border-radius:50%}.legend-dot.pronto{background:var(--bom)}.legend-dot.andamento{background:#dfba63}.legend-dot.futuro{background:var(--blue)}.legend-dot.atrasado{background:var(--ruim)}.legend-dot.falta{background:#d1956b}.schedule-help{font-size:.75rem;color:var(--muted);padding:1rem 0}.schedule-sync{font-size:.65rem;color:var(--subtle)}.schedule-notice{border:1px solid var(--line);border-radius:.5rem;padding:.8rem;margin-bottom:1rem!important;background:var(--raised);font-size:.8rem}.schedule-notice.error{color:var(--ruim)}.schedule-loading,.schedule-empty{text-align:center;color:var(--muted);font-size:.85rem;padding:3rem 1rem}.schedule-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,18rem),1fr));gap:.85rem;padding:0 1.5rem 1rem}.schedule-card{border:1px solid var(--line);border-radius:.7rem;padding:1rem;min-width:0}.schedule-card-head{display:flex;align-items:center;gap:.6rem;margin-bottom:.9rem}.schedule-card h3{margin:0;font-size:.85rem;overflow-wrap:anywhere}.schedule-card-date{font:400 1.65rem/1.3 var(--display);display:block;margin:.35rem 0}.schedule-card small{color:var(--subtle);font-size:.67rem}.schedule-card .secondary{width:100%;margin-top:1rem}.schedule-badge{font-size:.65rem;color:var(--muted);display:flex;align-items:center;gap:.4rem}.schedule-badge.atrasado{color:var(--ruim)}.schedule-badge.pronto{color:var(--bom)}.schedule-card-links{display:flex;gap:1rem;margin-top:.6rem}.schedule-card-links a{font-size:.7rem;color:var(--muted)}.schedule-back{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1rem;font-size:.8rem}.schedule-back a{color:var(--muted)}.schedule-plan-callout{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;border:1px solid var(--line);border-radius:.65rem;background:var(--raised);padding:.8rem 1rem;margin:0 1.5rem 1rem}.schedule-plan-callout div{flex:1}.schedule-plan-callout small{display:block;color:var(--subtle);font-size:.7rem}.schedule-plan-callout strong{font-size:.85rem}.plan-dialog{width:min(94vw,31rem);max-height:90dvh;overflow:auto;padding:1.5rem;border:1px solid var(--linha-forte);border-radius:1rem;background:var(--panel);color:var(--text);box-shadow:var(--zc-shadow)}.plan-dialog::backdrop{background:var(--zc-overlay)}.plan-dialog h2{font:400 1.7rem/1.25 var(--display);margin:.5rem 0}.plan-dialog p{font-size:.78rem;color:var(--muted);margin:.6rem 0 1rem}.plan-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.plan-close{background:none;border:0;color:var(--muted);font-size:1.6rem;min-width:42px;min-height:42px}.plan-field{display:block;font-size:.8rem;margin:1rem 0}.plan-field input{display:block;width:100%;min-height:46px;background:var(--raised);color:var(--text);border:1px solid var(--linha-forte);border-radius:.5rem;padding:.7rem;margin-top:.4rem}.plan-dialog footer{display:flex;gap:.6rem;justify-content:flex-end;flex-wrap:wrap;margin-top:1.5rem}.plan-error{color:var(--ruim)!important}.plan-note{padding:.8rem;border-radius:.5rem;background:var(--raised)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.schedule-archive{display:flex;align-items:center;gap:.45rem;font-size:.72rem;color:var(--muted);min-height:44px}.schedule-archive input{accent-color:var(--accent);width:1rem;height:1rem}.schedule-plan-callout a{color:var(--muted);font-size:.75rem;text-underline-offset:.2rem}
.schedule-row-label small,.schedule-card small,.schedule-bar,.schedule-badge{font-size:.75rem}.schedule-tick{font-size:.7rem}
@media(max-width:1100px){.schedule{padding:1.8rem 1.3rem 3rem}.schedule-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.schedule-filters>.schedule-switch{width:100%}.schedule-filters>.schedule-switch button{flex:1}}
@media(max-width:600px){.schedule{padding:1.3rem .85rem 2rem}.schedule-heading{align-items:flex-start;gap:.6rem}.schedule h1{font-size:2.2rem}.schedule-heading p{font-size:.75rem;max-width:16rem}.schedule-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}.schedule-kpi{padding:.85rem}.schedule-kpi strong{font-size:1.7rem}.schedule-picker{min-width:100%;max-width:none}.schedule-search{min-width:100%}.schedule-toolbar{padding:1rem}.schedule-toolbar-actions{width:100%;justify-content:space-between;gap:.3rem}.schedule-switch button{padding:.4rem .55rem}.schedule-cards{grid-template-columns:1fr;padding:0 1rem 1rem}.schedule-view-switch{margin-left:1rem}.schedule-plan-callout{margin:0 1rem 1rem}.schedule-legend{padding:1rem}.schedule-grid{--label-width:12rem}.plan-dialog{padding:1.2rem}.schedule-period button{min-width:40px}.schedule-help{line-height:1.7}}

/* Identidade das linhas: a mesma cor em qualquer filtro, período ou visualização. */
.schedule-row, .schedule-card {
  --project-mark: hsl(var(--project-hue) var(--project-saturation) 65%);
  --project-ink: hsl(var(--project-hue) var(--project-saturation) 84%);
  --project-fill: hsl(var(--project-hue) var(--project-saturation) 18%);
}
:root[data-theme=light] :is(.schedule-row,.schedule-card) {
  --project-mark: hsl(var(--project-hue) var(--project-saturation) 38%);
  --project-ink: hsl(var(--project-hue) var(--project-saturation) 23%);
  --project-fill: hsl(var(--project-hue) var(--project-saturation) 91%);
}
.schedule-row-label, .schedule-card { border-left: 4px solid var(--project-mark); }
.schedule-row-label .schedule-avatar, .schedule-card .schedule-avatar { box-shadow: 0 0 0 1px var(--project-mark); }
.schedule-row-lane { background-color: hsl(var(--project-hue) var(--project-saturation) 60% / .035); }
.schedule-bar { color: var(--project-ink); background: var(--project-fill); border-color: var(--project-mark); }
.schedule-bar::before { content: ''; display: inline-block; width: .4rem; height: .4rem; margin-right: .45rem; border-radius: 50%; background: var(--status-color,var(--text)); }
.schedule-bar.pronto { --status-color: var(--bom); }
.schedule-bar.atrasado { --status-color: var(--ruim); }
.schedule-bar.andamento { --status-color: #dfba63; }
.schedule-bar.futuro { --status-color: var(--blue); }
.schedule-bar.falta { --status-color: #d1956b; }
.schedule-card-head h3 { border-bottom: 2px solid var(--project-mark); padding-bottom: .25rem; }
.schedule-unplanned { border-left: 3px solid var(--project-mark); }

/* Leitura precisa do dia, inclusive onde ainda não há uma faixa planejada. */
.schedule-axis-days { cursor: crosshair; }
.schedule-axis-days:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.schedule-axis-days::after, .schedule-row-lane::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: var(--cursor,0);
  border-left: 1px dashed var(--accent); pointer-events: none; opacity: 0; z-index: 2;
}
.schedule-grid[data-cursor] :is(.schedule-axis-days,.schedule-row-lane)::after { opacity: .5; }
.schedule-tooltip {
  position: fixed; z-index: 100; width: max-content; max-width: min(26rem,calc(100vw - 16px));
  padding: .8rem 1rem; border: 1px solid var(--linha-forte); border-radius: var(--zc-radius-md);
  background: var(--raised); color: var(--text); box-shadow: var(--zc-shadow);
  font: 400 .76rem/1.6 var(--corpo); overflow-wrap: anywhere;
}
.schedule-tooltip strong, .schedule-tooltip span { display: block; }
.schedule-tooltip strong { font-weight: 600; margin-bottom: .2rem; }
.schedule-tooltip span { color: var(--muted); }
.schedule-whatsapp { margin: 0 0 1.25rem; color: var(--muted); }
.schedule-whatsapp.error { color: var(--ruim); }
body:has(#prazos) .zc-header-inner { width: 100%; padding-inline: var(--layout-gutter,clamp(1.3rem,2.5vw,5rem)); }
@media(min-width:1800px) {
  .schedule-grid { --label-width: 18rem; }
  .schedule-heading { margin-bottom: 1.4rem; }
  .schedule-kpis { margin-bottom: 1.2rem; }
  .schedule-row, .schedule-row-lane { min-height: 5rem; }
  .schedule-bar { top: 1.5rem; }
}
@media(max-width:1000px) { body:has(#prazos) .zc-header-inner { padding-inline: 1rem; } }

/* Períodos completos usam meses reais: fevereiro e anos bissextos mantêm a escala. */
.schedule-axis-days { min-height: 4.6rem; }
.schedule-axis-year {
  position: absolute; top: 0; height: 1.6rem; padding: .25rem .45rem;
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--text); font: 500 .7rem var(--corpo); overflow: hidden;
}
.schedule-tick { position: absolute; top: 1.6rem; bottom: 0; padding: .9rem .3rem; }
.schedule-row-lane { background-image: var(--calendar-grid); background-size: 100% 100%; }
.schedule-today-label { top: 1.65rem; }
.schedule-bar-compact { padding-inline: 0; text-indent: -9999px; border-radius: .25rem; }
.schedule-bar-compact::before { display: none; }
.schedule-row-label .schedule-badge { display: none; }
.schedule-row:has(.schedule-bar-compact) .schedule-badge { display: flex; margin-top: .3rem; }
.schedule-range-note { padding: 0 1.5rem 1rem; font-size: .73rem; line-height: 1.5; color: var(--muted); }
.schedule-range-all { border: 0; padding: .2rem; background: none; color: var(--text); text-decoration: underline; font: inherit; }
@media(max-width:600px) {
  .schedule-toolbar-actions > #prazos-zoom { width: 100%; }
  #prazos-zoom button { flex: 1; }
  .schedule-period { margin-top: .5rem; }
  .schedule-range-note { padding-inline: 1rem; }
}

/* Duração e capacidade permanecem legíveis mesmo quando a barra anual é estreita. */
.schedule-duration{display:block;color:var(--text);font-size:.85rem;line-height:1.4;margin:.35rem 0;font-weight:600}
.schedule-row-label .schedule-execution,.schedule-execution{font-size:.7rem;color:var(--muted)}
.schedule-grid{--label-width:19rem}.schedule-row-label{padding:.9rem 1rem}.schedule-tooltip{max-width:min(34rem,calc(100vw - 16px));font-size:.76rem;line-height:1.5}.schedule-tooltip span{display:block;margin-top:.2rem}
.plan-dialog{width:min(94vw,38rem)}.plan-execution{padding:0;border:0;min-width:0;margin:1rem 0}.plan-execution legend{font-size:.8rem;margin-bottom:.6rem}
.plan-execution-options,.plan-duration-options{display:flex;flex-wrap:wrap;gap:.45rem}.plan-execution-options button{flex:1;min-width:0}.plan-execution-options [aria-pressed=true]{color:var(--accent-ink);background:var(--accent);border-color:var(--accent)}
.plan-duration-options{margin:.6rem 0}.plan-duration-options button{min-height:2.2rem;padding:.35rem .7rem}.plan-duration-caption{font-size:.72rem;color:var(--muted);display:block;margin-top:.3rem}
.plan-availability{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;font-size:.8rem}.plan-availability p{flex-basis:100%;margin:0}
@media(max-width:600px){.schedule-grid{--label-width:15rem}.plan-dialog{padding:1rem}.plan-execution-options button{padding:.6rem .3rem;font-size:.7rem}}

/* Sequência: uma linha baixa por serviço, para a fila inteira caber na tela. */
.schedule-grid-sequencia .schedule-row,.schedule-grid-sequencia .schedule-row-lane{min-height:2.75rem}
.schedule-grid-sequencia .schedule-row-label{padding-block:.3rem}
.schedule-grid-sequencia .schedule-avatar{width:2rem;height:2rem}
.schedule-grid-sequencia .schedule-row-label small{display:block;margin:0;white-space:normal}
.schedule-grid-sequencia .schedule-bar{top:.75rem;min-height:1.25rem}
.schedule-grid-sequencia .schedule-unplanned{margin-block:.25rem;min-height:2.1rem;padding-block:.15rem}
