/* Symphora · Conduct & warnings — shared styles for the HR module page and
   the employee "Conduct record" page. Pair with tokens/components/shell. */

/* ---- Formal letter document ---- */
.letter {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  font-size: var(--t-md);
  line-height: 1.65;
  white-space: pre-wrap;
  color: var(--ink);
}
.letter__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
  white-space: normal;
}
.letter__ref { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-3); text-align: right; line-height: 1.7; }

/* ---- Signature / acknowledgment block ---- */
.sign-block {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper-2);
  padding: 16px 18px;
}
.sign-block--done { background: var(--good-soft); border-color: oklch(0.85 0.06 155); }
.sign-stamp {
  font-family: var(--font-mono); font-size: var(--t-sm); color: var(--good-ink);
  display: flex; flex-direction: column; gap: 2px;
}
.sign-name {
  font-family: 'Caveat', var(--font-sans), cursive;
  font-size: 26px; line-height: 1.1; color: var(--ink);
}

/* ---- Right-side drawer ---- */
.dw-scrim {
  position: fixed; inset: 0; z-index: 60;
  background: oklch(0.18 0.01 260 / 0.35);
  opacity: 0; pointer-events: none;
  transition: opacity .18s var(--ease);
}
.dw {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(560px, 96vw);
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform .22s var(--ease);
  display: flex; flex-direction: column;
}
[data-drawer-open] .dw { transform: translateX(0); }
[data-drawer-open] .dw-scrim { opacity: 1; pointer-events: auto; }
.dw__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
}
.dw__body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.dw__body > * { flex-shrink: 0; }
.dw__section > h4 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.dw__foot {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  padding: 12px 20px; border-top: 1px solid var(--line-2); background: var(--paper-2);
}

/* ---- Audit timeline ---- */
.tl { display: flex; flex-direction: column; }
.tl__item { display: grid; grid-template-columns: 14px 1fr; gap: 12px; }
.tl__rail { display: flex; flex-direction: column; align-items: center; }
.tl__dot { width: 7px; height: 7px; border-radius: 99px; background: var(--ink-4); margin-top: 5px; flex-shrink: 0; }
.tl__item:first-child .tl__dot { background: var(--accent); }
.tl__line { flex: 1; width: 1px; background: var(--line); margin-top: 3px; }
.tl__item:last-child .tl__line { display: none; }
.tl__body { padding-bottom: 14px; font-size: var(--t-sm); }
.tl__when { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-3); }

/* ---- Record meta grid (drawer) ---- */
.meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.meta__cell { background: var(--paper); padding: 10px 14px; min-width: 0; }
.meta__label {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.meta__value { font-size: var(--t-sm); margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.meta__sub { font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; }

/* ---- Severity ladder (employee history) ---- */
.ladder { display: flex; flex-direction: column; gap: 6px; }
.ladder__row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-md);
  font-size: var(--t-sm); background: var(--paper);
}
.ladder__row[data-lapsed] { opacity: 0.55; }

/* ---- Severity picker (wizard) ---- */
.sev-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 640px) { .sev-pick { grid-template-columns: 1fr; } }
.sev-pick__opt {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 12px; text-align: left; background: var(--paper);
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color .12s var(--ease), background .12s var(--ease);
}
.sev-pick__opt:hover { border-color: var(--ink-4); }
.sev-pick__opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.sev-pick__label { font-weight: 600; font-size: var(--t-base); }
.sev-pick__hint { font-size: var(--t-xs); color: var(--ink-3); line-height: 1.45; }

/* Guided suggestion strip */
.suggest {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--r-md);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--accent-ink); font-size: var(--t-sm); line-height: 1.5;
}

/* ---- Wizard steps ---- */
.wiz-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.wiz-steps__dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-sm); color: var(--ink-3); font-weight: 500;
}
.wiz-steps__dot::before {
  content: attr(data-n);
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 99px;
  border: 1px solid var(--line); font-size: 11px; font-family: var(--font-mono);
}
.wiz-steps__dot[data-on] { color: var(--ink); }
.wiz-steps__dot[data-on]::before { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.wiz-steps__sep { width: 20px; height: 1px; background: var(--line); }

/* ---- Approval cards ---- */
.appr {
  border: 1px solid var(--accent-line); border-radius: var(--r-xl);
  background: var(--paper); overflow: hidden;
}
.appr__head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: var(--accent-soft); border-bottom: 1px solid var(--accent-line);
}
.appr__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.appr__foot { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-2); }

/* ---- Insight bars ---- */
.ibar { display: grid; grid-template-columns: 120px 1fr 36px; gap: 12px; align-items: center; font-size: var(--t-sm); }
.ibar__track { height: 10px; background: var(--paper-3); border-radius: 99px; overflow: hidden; }
.ibar__fill { height: 100%; border-radius: 99px; background: var(--accent); }
.ibar__n { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-2); text-align: right; }

/* ---- Evidence chips ---- */
.ev-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: var(--t-xs);
  padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--paper-2); color: var(--ink-2);
}

/* ---- HR private note ---- */
.hr-note {
  background: var(--warn-soft); border: 1px solid oklch(0.88 0.06 75);
  border-radius: var(--r-md); padding: 10px 12px; font-size: var(--t-sm);
}
.hr-note__meta { font-family: var(--font-mono); font-size: 10px; color: var(--warn-ink); margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---- Misc ---- */
.due-chip { font-family: var(--font-mono); font-size: var(--t-xs); }
.due-chip--late { color: var(--bad-ink); font-weight: 600; }
