/* Components (docs/design/ui-design-system.md §5): one block per component. */

/* Eyebrow: mono uppercase section label. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Buttons: ink primary, white secondary. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r-md);
  padding: 12px 20px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { color: #fff; background: var(--ink); }
.btn-primary:hover { background: var(--ink-hover); }
.btn-secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn:disabled { cursor: not-allowed; opacity: .38; }

/* StatusPill: 5px dot + label; colours from the state map (internal/ui/status.go). */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--r-pill);
  padding: 4px 10px;
  border: 1px solid;
}
.pill-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ResultBadge: mono label ("READY", "SIGNATURE VALID"). */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-pill);
  padding: 6px 12px;
  border: 1px solid;
}

/* FieldGrid: key/value cells separated by 1px --line-soft lines. Each cell
   outlines itself into the gap, so a last row that is not full shows blank
   space rather than grey filler. */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.field { background: var(--surface); padding: 12px 14px; outline: 1px solid var(--line-soft); }
.field dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.field dd { margin: 6px 0 0; font-size: 13.5px; font-weight: 500; }

/* Panel: the section card. */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.panel-body { padding: 22px; }

/* Chip: a small bordered label (media types, modules, path steps). */
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 14px;
}

/* StatCard: label, counter, delta. */
.stat-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.stat-label { font-size: 12px; color: var(--text-3); letter-spacing: -.005em; }
.stat-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.03em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.stat-delta { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* DataTable: a grid table; its layout class sets --dt-cols. */
.data-table { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.dt-row {
  display: grid;
  grid-template-columns: var(--dt-cols);
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--text-2);
}
.dt-head {
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom-color: var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* SidebarNav and WorkspaceSwitcher: the app shell's left column. */
.side-nav { list-style: none; margin: 0; padding: 0; }
.side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--r-xs);
  font-size: 13px;
  font-weight: 450;
  color: var(--text-2);
}
.side-item a { color: inherit; text-decoration: none; }
.side-item.active { background: var(--line-soft); color: var(--ink); font-weight: 550; }
.side-count { font-family: var(--font-mono); font-size: 10px; font-weight: 400; color: var(--text-3); }
.workspace-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 10px 12px;
}
.workspace-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
}
.workspace-mark { width: 20px; height: 20px; border-radius: 6px; background: var(--ink); flex: 0 0 auto; }

/* KanbanColumn: one ITAD stage with a 3px progress bar and asset cards. */
.kanban-col { background: var(--surface); padding: 16px 14px; min-height: 220px; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; }
.kanban-name { font-size: 12.5px; font-weight: 550; letter-spacing: -.01em; }
.kanban-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.kanban-bar {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--line-soft);
  color: var(--ink);
}
.kanban-bar rect { fill: currentColor; }
.kanban-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.kanban-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 11px; background: var(--surface-3); }
.kanban-id { font-family: var(--font-mono); font-size: 11px; color: var(--ink); }
.kanban-device { font-size: 11.5px; line-height: 1.35; color: var(--text-3); margin-top: 4px; }

/* FlowStep: a tinted step card with a dot. */
.flow-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
}
.flow-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.flow-title { font-size: 15px; font-weight: 550; letter-spacing: -.012em; }
.flow-sub { font-size: 13px; color: var(--text-3); margin-top: 3px; }

/* Tones last, so they override a component's own colours. */
.tone-ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.tone-warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.tone-bad { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.tone-neutral { color: var(--neutral); background: var(--neutral-bg); border-color: var(--neutral-line); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-bad { color: var(--bad); }
.text-neutral { color: var(--neutral); }
