/* ================================================================
   EDAMA Design System — Components (ed-*)
   Consolidated from records/record_modal.css + workflow/workflow.css
   All components use design tokens from tokens.css.
   ================================================================ */

/* ── Drawer ── */

.ed-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 59, 122, 0.14);
  backdrop-filter: blur(4px);
  /* Above messenger-widget (9999) so the drawer stack is always on top */
  z-index: 10098;
  animation: rm-bd-in 200ms var(--motion-ease);
}
@keyframes rm-bd-in { from { opacity: 0; } to { opacity: 1; } }

.ed-drawer {
  position: fixed; top: 0; right: 0;
  width: 560px; max-width: 100vw; height: 100vh;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--neutral-200);
  /* Above messenger-widget (9999) — drawer footer is always clickable */
  z-index: 10100;
  display: flex; flex-direction: column;
  box-shadow: -36px 0 100px -24px rgba(0,59,122,0.18);
  animation: rm-dr-in 480ms var(--motion-spring);
  font-family: var(--font-body);
  color: var(--ink);
}
@keyframes rm-dr-in {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.ed-drawer form { display: contents; }

.ed-head {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
}

.ed-kick {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

.ed-diamond {
  width: 9px; height: 9px;
  background: var(--brand-primary);
  clip-path: polygon(50% 0%,100% 50%,50% 100%,0% 50%);
  box-shadow: 0 0 0 3px rgba(0,114,188,0.10);
}

.ed-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  padding: 3px 8px;
  background: var(--neutral-100);
  border-radius: 6px;
  border: 1px solid var(--line);
  font-weight: 600;
}

.ed-autosave {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.ed-autosave .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  animation: rm-breathe 2s ease-in-out infinite;
}
@keyframes rm-breathe { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.ed-btn-ico {
  border: 0; background: transparent;
  width: 30px; height: 30px; border-radius: 6px;
  color: var(--ink-soft); font-size: 18px; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 200ms var(--motion-ease);
}
.ed-btn-ico:hover { background: var(--neutral-100); color: var(--ink); }

.ed-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px 24px;
  scrollbar-width: thin;
}
.ed-body::-webkit-scrollbar { width: 8px; }
.ed-body::-webkit-scrollbar-thumb {
  background: var(--neutral-200); border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.96);
}

/* ── Hero ── */

.ed-hero { padding: 4px 0 12px; }

.ed-title-in {
  width: 100%;
  border: 0; outline: 0; background: transparent;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  padding: 4px 0;
  caret-color: var(--brand-primary);
  resize: none;
  min-height: 32px;
  max-height: 200px;
  overflow-y: auto;
}
.ed-title-in::placeholder { color: var(--neutral-400); font-weight: 500; }

/* ── Labels & Helpers ── */

.ed-errors {
  margin: 10px 0;
  padding: 10px 14px;
  background: #FEF2F2;
  border: 1px solid var(--danger);
  border-radius: 10px;
  color: #991B1B;
  font-size: 13px;
  line-height: 1.5;
}
.ed-errors strong {
  display: block; margin-bottom: 4px;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: var(--font-mono);
}

.ed-templates {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center;
  padding: 6px 0 14px;
}

.ed-tpl-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-400);
  font-weight: 600;
  margin-right: 2px;
}

.ed-tpl {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border: 1px solid var(--neutral-200);
  background: var(--neutral-50);
  border-radius: 9999px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 150ms var(--motion-ease);
}
.ed-tpl:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: #EEF6FF; }

.ed-composer-head {
  display: flex; justify-content: space-between; align-items: center;
  margin: 14px 0 10px;
}

.ed-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  margin: 0;
}
.ed-section-label::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--brand-primary);
  border-radius: 50%;
}

/* ── Chips & Pills ── */

.ed-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 2px 0;
}

.ed-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px dashed #CBD8E2;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 180ms var(--motion-ease);
}
.ed-chip:hover {
  border-color: var(--brand-primary); color: var(--brand-primary);
  border-style: solid;
  background: #EEF6FF;
  transform: translateY(-1px);
}
.ed-chip.active {
  border-color: var(--brand-primary); color: var(--brand-primary);
  border-style: solid;
  background: #EEF6FF;
  box-shadow: 0 0 0 3px rgba(0,114,188,0.10);
}
.ed-chip .pluz { font-size: 13px; line-height: 1; opacity: 0.7; }

.ed-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 4px 5px 12px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 9999px;
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms var(--motion-ease);
  box-shadow: 0 1px 3px rgba(0,59,122,0.04), 0 1px 2px rgba(0,59,122,0.06);
  font-family: inherit;
}
.ed-pill:hover { border-color: var(--brand-primary); background: #fff; }
.ed-pill .ico {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neutral-400);
  font-weight: 600;
}
.ed-pill .val {
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ed-pill .x {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  color: var(--neutral-400);
  font-size: 14px; line-height: 1;
  cursor: pointer;
  transition: all 120ms var(--motion-ease);
}
.ed-pill .x:hover { background: var(--danger); color: #fff; }

.ed-prio-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.ed-prio-dot.low  { background: var(--success); }
.ed-prio-dot.med  { background: var(--warning); }
.ed-prio-dot.high { background: var(--danger); }
.ed-prio-dot.crit { background: #9F2A2A; box-shadow: 0 0 0 2px rgba(159,42,42,0.2); }

/* ── Editors ── */

.ed-editor {
  margin-top: 12px;
  background: var(--neutral-50);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  animation: rm-ed-in 260ms var(--motion-spring);
  box-shadow: 0 1px 3px rgba(0,59,122,0.04);
}
@keyframes rm-ed-in {
  from { transform: translateY(-4px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.ed-editor .eh {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.ed-editor .eh .t {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.ed-editor .eh .t em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 400;
  margin-left: 6px;
  font-family: var(--font-body);
}
.ed-editor .eh .done {
  background: var(--brand-primary);
  color: #fff;
  border: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,59,122,0.04);
}
.ed-editor .eh .done:hover { background: var(--brand-secondary); }

.ed-prio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ed-prio-opt, .ed-rc {
  border: 1px solid var(--neutral-200);
  background: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 160ms var(--motion-ease);
  font-family: inherit;
}
.ed-prio-opt {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ed-prio-opt:hover, .ed-rc:hover { border-color: var(--brand-primary); }
.ed-prio-opt.sel, .ed-rc.sel {
  border-color: var(--brand-primary);
  background: #EEF6FF;
  box-shadow: 0 0 0 3px rgba(0,114,188,0.22);
}
.ed-prio-opt .top {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.ed-prio-opt .hint {
  font-size: 11px; color: var(--ink-soft);
  line-height: 1.4;
}

.ed-radio-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.ed-rc .rc-body { display: flex; flex-direction: column; gap: 1px; }
.ed-rc .rc-body .l1 { font-size: 13px; font-weight: 600; color: var(--ink); }
.ed-rc.sel .rc-body .l1 { color: var(--brand-secondary); }
.ed-rc .rc-body .l2 { font-size: 11px; color: var(--ink-soft); margin-top: 1px; }

.ed-pill-buttons {
  display: flex; flex-wrap: wrap; gap: 8px;
}

/* Generic styled inputs inside editors */
.ed-editor input[type="text"],
.ed-editor input[type="number"],
.ed-editor input[type="datetime-local"],
.ed-editor input[type="date"],
.ed-editor input[type="time"],
.ed-editor textarea,
.ed-editor select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--neutral-200);
  background: #fff;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  outline: 0;
}
.ed-editor input:focus, .ed-editor textarea:focus, .ed-editor select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0,114,188,0.10);
}
.ed-editor textarea { min-height: 80px; resize: vertical; line-height: 1.55; }
.ed-editor select[multiple] { min-height: 140px; }

.ed-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ed-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.ed-row-bill { display: grid; grid-template-columns: 1fr 100px; gap: 10px; }

.ed-field-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

/* ── Buttons ── */

.ed-big-toggle {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}

.ed-tog-sw {
  width: 36px; height: 20px; border-radius: 20px;
  background: #CBD8E2;
  position: relative;
  transition: background 180ms var(--motion-ease);
  flex-shrink: 0;
}
.ed-tog-sw::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  top: 2px; left: 2px;
  transition: all 220ms var(--motion-spring);
  box-shadow: 0 1px 2px rgba(0,59,122,0.2);
}
.ed-big-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.ed-big-toggle input:checked + .ed-tog-sw { background: var(--brand-primary); }
.ed-big-toggle input:checked + .ed-tog-sw::after { left: 18px; }
.ed-big-toggle .lbl-group { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.ed-big-toggle .l1 { font-size: 13px; font-weight: 600; color: var(--ink); }
.ed-big-toggle .l2 { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

.ed-rag-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ed-rag-rc {
  border: 1px solid var(--neutral-200);
  background: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 160ms var(--motion-ease);
  font-family: inherit;
  display: flex; align-items: center; gap: 10px;
}
.ed-rag-rc:hover { border-color: var(--brand-primary); }
.ed-rag-rc.sel { border-color: var(--brand-primary); background: #EEF6FF; box-shadow: 0 0 0 3px rgba(0,114,188,0.22); }
.ed-rag-rc[data-val="green"] .rag-ico { background: var(--success); }
.ed-rag-rc[data-val="amber"] .rag-ico { background: var(--warning); }
.ed-rag-rc[data-val="red"]   .rag-ico { background: var(--danger); }
.rag-ico {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.ed-rag-rc .l1 { font-size: 13px; font-weight: 600; color: var(--ink); }
.ed-rag-rc .l2 { font-size: 11px; color: var(--ink-soft); margin-top: 1px; }

.ed-links {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.ed-links .ed-section-label { margin-bottom: 10px; }

.ed-link-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  border-left: 0; border-right: 0; border-top: 0;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.ed-link-row:last-child { border-bottom: 0; }
.ed-link-row:hover { background: #EEF6FF; }
.ed-link-row .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.ed-link-row .v { font-size: 13px; color: var(--ink); font-weight: 500; }
.ed-link-row .v em { font-style: italic; color: var(--neutral-400); font-weight: 400; }
.ed-link-row .arrow { color: var(--neutral-400); font-size: 14px; transition: transform 150ms; }
.ed-link-row:hover .arrow { color: var(--brand-primary); transform: translateX(2px); }

.ed-foot {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  display: flex; justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.ed-foot .actions { display: flex; gap: 8px; }

.ed-btn {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 600;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 150ms var(--motion-ease);
}
.ed-btn.ghost {
  background: transparent;
  border-color: var(--neutral-200);
  color: var(--ink-soft);
}
.ed-btn.ghost:hover { border-color: var(--ink-soft); color: var(--ink); background: var(--neutral-50); }
.ed-btn.primary {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,59,122,0.04);
}
.ed-btn.primary:hover { background: var(--brand-secondary); border-color: var(--brand-secondary); }
.ed-btn.primary kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
  color: #fff;
  font-weight: 700;
}

/* Hidden Django form fields — they live in DOM for POST but are invisible */
.ed-hidden-forms { display: none; }

@media (max-width: 640px) {
  .ed-drawer { width: 100vw; border-left: 0; }
}

/* ── Workflow Strip ── */

.ed-wf-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  margin-bottom: 16px;
}

.ed-wf-strip-states {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

/* ── State Machine ── */

.ed-wf-state-pill {
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  background: var(--neutral-100);
  color: var(--ink-soft);
  font-weight: 500;
}

.ed-wf-state-pill.active {
  background: var(--brand-primary);
  color: #fff;
}

/* ── SLA Badge ── */

.ed-wf-sla-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #EEF6FF;
  color: var(--brand-primary);
  font-weight: 600;
  white-space: nowrap;
}

.ed-wf-sla-badge.overdue {
  background: #FEF2F2;
  color: var(--danger);
}

.ed-wf-strip-btn {
  background: var(--brand-primary);
  color: #fff;
  border: 0;
  border-radius: 9999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.ed-wf-strip-btn:hover {
  background: #005fa3;
}

.ed-wf-strip-expand {
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  line-height: 1;
}

.ed-wf-strip-expand:hover {
  color: var(--brand-primary);
}

.ed-wf-backdrop {
  position: fixed;
  inset: 0;
  background: var(--border);
  /* Above messenger-widget (9999) so the drawer stack is always on top */
  z-index: 10098;
}

/* ── Workflow Drawer ── */

.ed-wf-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--neutral-200);
  /* Above messenger-widget (9999) — drawer footer is always clickable */
  z-index: 10100;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: -20px 0 60px var(--border);
}

.ed-wf-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ed-wf-drawer-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-secondary);
}

.ed-wf-drawer-close {
  background: transparent;
  border: 0;
  font-size: 18px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
}

.ed-wf-drawer-close:hover {
  color: var(--brand-secondary);
}

.ed-wf-state-machine {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 0;
  overflow-x: auto;
}

.ed-wf-sm-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ed-wf-sm-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--neutral-200);
  border: 2px solid #fff;
  box-sizing: border-box;
}

.ed-wf-sm-node.current .ed-wf-sm-dot {
  background: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 114, 188, 0.22);
}

.ed-wf-sm-line {
  flex: 1;
  height: 2px;
  background: var(--neutral-200);
  min-width: 12px;
  align-self: center;
  margin-bottom: 20px; /* offset to align with dot row */
}

.ed-wf-sm-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  max-width: 60px;
  word-break: break-word;
}

.ed-wf-sm-node.current .ed-wf-sm-label {
  color: var(--brand-primary);
  font-weight: 700;
}

.ed-wf-sla-bar {
  padding: 8px 12px;
  background: #EEF6FF;
  border: 1px solid rgba(0, 114, 188, 0.12);
  border-radius: 8px;
  font-size: 12px;
  color: var(--brand-secondary);
}

.ed-wf-sla-bar.overdue {
  background: #FEF2F2;
  border-color: var(--danger);
  color: #991B1B;
}

/* ── Action Buttons ── */

.ed-wf-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ed-wf-action-group {
  width: 100%;
}

.ed-wf-action-btn {
  background: var(--brand-primary);
  color: #fff;
  border: 0;
  border-radius: 9999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 6px;
  transition: background 0.15s;
  box-sizing: border-box;
}

.ed-wf-action-btn:hover {
  background: #005fa3;
}

.ed-wf-action-reject,
.ed-wf-action-reopen {
  background: var(--neutral-100);
  color: var(--ink-soft);
  border: 1px solid var(--neutral-200);
}

.ed-wf-action-reject:hover,
.ed-wf-action-reopen:hover {
  background: #e2eaf0;
}

.ed-wf-comment-details {
  margin-bottom: 6px;
}

.ed-wf-comment-details summary {
  list-style: none;
  cursor: pointer;
}

.ed-wf-comment-details summary::-webkit-details-marker {
  display: none;
}

.ed-wf-comment-form {
  margin-top: 6px;
}

.ed-wf-comment-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  font-size: 13px;
  margin-top: 8px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
  color: var(--ink);
}

.ed-wf-comment-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.15);
}

.ed-wf-comment-submit {
  background: var(--brand-primary);
  color: #fff;
  border: 0;
  border-radius: 9999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.15s;
}

.ed-wf-comment-submit:hover {
  background: #005fa3;
}

/* ── Timeline ── */

.ed-wf-timeline {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}

.ed-wf-tl-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.ed-wf-tl-entry {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 59, 122, 0.06);
}

.ed-wf-tl-entry:last-child {
  border-bottom: 0;
}

/* ── Avatars ── */

.ed-wf-tl-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.ed-wf-tl-body {
  flex: 1;
  min-width: 0;
}

.ed-wf-tl-who {
  font-size: 13px;
  color: var(--ink);
}

.ed-wf-tl-behalf {
  font-size: 11px;
  color: var(--brand-primary);
  font-style: italic;
}

.ed-wf-tl-comment {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 2px;
}

.ed-wf-tl-time {
  font-size: 11px;
  color: var(--neutral-400);
  margin-top: 2px;
}

.ed-wf-no-actions,
.ed-wf-no-history {
  font-size: 12px;
  color: var(--neutral-400);
  margin: 0;
  padding: 4px 0;
}

/* Unified timeline — edit entries use teal avatar */
.ed-wf-tl-edit { background: var(--brand-teal) !important; }

/* ── Empty State ─────────────────────────────────────────────────────── */

.ed-empty-state {
  text-align: center;
  padding: var(--sp-12, 3rem) var(--sp-6, 1.5rem);
  max-width: 440px;
  margin: 0 auto;
}
.ed-empty-state__icon {
  margin-bottom: var(--sp-4, 1rem);
}
.ed-empty-state__icon i {
  font-size: 3rem;
  color: var(--neutral-400, #8C8C8C);
  opacity: 0.6;
}
.ed-empty-state__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg, 1.125rem);
  font-weight: 700;
  color: var(--ink, #1A2035);
  margin: 0 0 var(--sp-2, 0.5rem);
}
.ed-empty-state__desc {
  font-size: var(--text-sm, 0.8125rem);
  color: var(--ink-soft, #475569);
  margin: 0 0 var(--sp-3, 0.75rem);
  line-height: 1.5;
}
.ed-empty-state__clause {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs, 0.75rem);
  color: var(--brand-teal, #27A9B8);
  font-weight: 600;
  background: var(--bg-2, #EAF6F8);
  padding: var(--sp-1, 0.25rem) var(--sp-3, 0.75rem);
  border-radius: var(--radius-full, 9999px);
  margin: 0 0 var(--sp-4, 1rem);
}
.ed-empty-state__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3, 0.75rem);
  flex-wrap: wrap;
}
.ed-empty-state__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2, 0.5rem);
  padding: var(--sp-2, 0.5rem) var(--sp-4, 1rem);
  border-radius: var(--radius-sm, 6px);
  font-size: var(--text-sm, 0.8125rem);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--duration, 200ms) var(--ease);
  cursor: pointer;
  border: none;
}
.ed-empty-state__btn--primary {
  background: var(--brand-primary, #0072BC);
  color: #fff;
}
.ed-empty-state__btn--primary:hover {
  background: var(--brand-secondary, #003B7A);
}
.ed-empty-state__btn--secondary {
  background: var(--bg-1, #F5F8FA);
  color: var(--ink, #1A2035);
  border: 1px solid var(--border, rgba(0,59,122,0.12));
}
.ed-empty-state__btn--secondary:hover {
  background: var(--bg-2, #EAF6F8);
}
