.ew-page { display: grid; gap: 16px; }
.ew-page :focus-visible {
  outline: 3px solid #0b65c2;
  outline-offset: 2px;
}
.ew-head {
  align-items: start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}
.ew-head h2 { margin: 0 0 6px; }
.ew-head .lead { color: var(--muted); margin: 0; max-width: 68ch; }
.ew-version {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  min-height: 44px;
  padding: 10px 14px;
}
.ew-version strong { color: var(--ect-dark); font-size: 1.35rem; }

.ew-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
}

.ew-editor,
.ew-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.ew-editor { display: grid; gap: 16px; }
.ew-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 12px 12px 4px;
}
.ew-group legend {
  color: var(--ect-dark);
  font-weight: 700;
  padding: 0 6px;
}

.ew-steps {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ew-step {
  align-items: center;
  background: #f7faf8;
  border: 1px solid #d8e2dc;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 10px 12px;
}
.ew-step--central { background: #f5f7f6; }
.ew-step-n {
  align-items: center;
  background: var(--ect-dark);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}
.ew-step--central .ew-step-n { background: #3d5c4c; }
.ew-step-body {
  align-items: center;
  display: grid;
  gap: 10px 16px;
  grid-template-columns: minmax(0, 1fr) 140px;
}
.ew-step-copy { display: grid; gap: 2px; min-width: 0; }
.ew-step-copy strong { overflow-wrap: anywhere; }
.ew-owner { color: #44564c; font-size: 0.82rem; }
.ew-days { color: #33443a; font-size: 0.82rem; font-weight: 650; gap: 4px; }
.ew-days input,
.ew-note input,
.ew-clock-actions .btn,
.ew-editor .btn {
  min-height: 44px;
}
.ew-days input { width: 100%; }
.ew-note { margin: 0; }
.ew-editor-foot { display: grid; gap: 12px; }
.ew-inline-total { color: #33443a; margin: 0; }
.ew-inline-total.is-over { color: var(--danger); }
.ew-editor .form-actions { align-items: center; }
.ew-side .table-wrap { overflow-x: auto; }
.ew-side th,
.ew-side td { white-space: nowrap; }
.ew-side td:last-child { min-width: 10rem; white-space: normal; }

.ew-side { display: grid; gap: 16px; }
.ew-panel h3 { margin: 0 0 8px; }
.ew-panel p { color: var(--muted); margin: 0 0 12px; }
.ew-summary,
.ew-clock-kpis {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 12px;
}
.ew-summary div,
.ew-clock-kpis div {
  background: #f7faf8;
  border: 1px solid #d8e2dc;
  border-radius: 8px;
  padding: 10px 12px;
}
.ew-summary dt,
.ew-clock-kpis dt { color: #44564c; font-size: 0.82rem; }
.ew-summary dd,
.ew-clock-kpis dd { font-size: 1.25rem; font-weight: 700; margin: 4px 0 0; }
.ew-total.is-over { color: var(--danger); }
.ew-365-warn { color: var(--danger); font-weight: 650; margin: 0; }
.ew-365-warn[hidden] { display: none; }
.ew-clock-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ew-side .table-wrap { margin-top: 8px; }
.ew-side tbody tr.is-active td { background: #e8f3ee; font-weight: 650; }

@media (max-width: 1024px) {
  .ew-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ew-step-body { grid-template-columns: 1fr; }
  .ew-summary,
  .ew-clock-kpis { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ew-step, .ew-total { transition: none; }
}
