/* Client onboarding — drawer "Agreement & proposal" group + wizard.
   Reuses the app's semantic ramp tokens (--success/-soft/-bd etc.), the
   --font-display / --ink / --line vars, and the .np-modal shell. */

/* ----- empty state ----- */
.ob-mount { display: block; }
.ob-loading { color: var(--ink-mute); font-size: 13px; margin: 4px 0; }
.ob-empty { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.ob-empty-lede { color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; margin: 0; }
.ob-empty-note { color: var(--ink-mute); font-size: 12.5px; margin: 0; }

/* ----- proposal card + steps ----- */
.ob-proposal { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: var(--paper, #fff); }
.ob-proposal:last-child { margin-bottom: 0; }
.ob-proposal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.ob-proposal-addr { font-family: var(--font-display); font-size: 15px; color: var(--ink); font-weight: 600; }
.ob-proposal-amt { font-size: 12.5px; color: var(--ink-mute); white-space: nowrap; font-variant-numeric: tabular-nums; }

.ob-step { display: flex; gap: 12px; padding: 9px 0; }
.ob-step + .ob-step { border-top: 1px solid var(--line); }
.ob-step-num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--neutral-soft); color: var(--ink-soft);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.ob-step-main { flex: 1 1 auto; min-width: 0; }
.ob-step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ob-step-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ob-step-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; position: relative; }
.ob-inv-num { font-size: 12px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* ----- status chips (semantic ramp) ----- */
.ob-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.ob-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.ob-chip-neutral { background: var(--neutral-soft); color: var(--ink-soft); border-color: var(--neutral-bd); }
.ob-chip-info    { background: var(--info-soft);    color: var(--info);      border-color: var(--info-bd); }
.ob-chip-success { background: var(--success-soft); color: var(--success);   border-color: var(--success-bd); }
.ob-chip-warn    { background: var(--warn-soft);    color: var(--warn);       border-color: var(--warn-bd); }
.ob-chip-danger  { background: var(--danger-soft);  color: var(--danger);     border-color: var(--danger-bd); }

/* armed (two-click) confirm state */
.btn.is-armed { background: var(--danger); color: #fff; border-color: var(--danger); }

/* disabled step action — the release button stays visibly locked until the
   cover email is marked sent, so the cover-first ordering reads at a glance */
.ob-step-actions .btn:disabled,
.ob-step-actions .btn[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; filter: saturate(.6); }

.ob-toast { font-size: 11.5px; color: var(--success); font-weight: 600; margin-left: 4px; }

/* ----- wizard (extends .np-modal) ----- */
.ob-wiz-card { max-width: 560px; }
.ob-client-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* align-items:end keeps the inputs on one line even when a label wraps to two
   (e.g. "Acceptance of Design" next to the shorter "Retainer"). */
.ob-wiz-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.ob-wiz-clients { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.ob-wiz-note { font-size: 12.5px; color: var(--ink-mute); line-height: 1.5; margin: 10px 0 0; }
.ob-wiz-note code { background: var(--neutral-soft); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; color: var(--ink-soft); }
.ob-wiz-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ob-file-btn { cursor: pointer; }
.ob-file-name { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ob-wiz-error { color: var(--danger); font-size: 12.5px; margin: 12px 0 0; font-weight: 500; }

/* preview row on the terms step */
.ob-wiz-preview { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 12px; border-top: 1px dashed var(--line); }
.ob-wiz-preview .ob-muted { flex: 1 1 220px; line-height: 1.4; }

/* ----- Integrations: agreement template panel ----- */
.tpl-panel { display: flex; flex-direction: column; gap: 14px; }
.tpl-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tpl-row-main { min-width: 0; }
.tpl-name { font-family: var(--font-display); font-size: 14.5px; color: var(--ink); font-weight: 600; }
.tpl-meta { font-size: 12.5px; color: var(--ink-mute); margin-top: 3px; font-variant-numeric: tabular-nums; }
.tpl-row-actions { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.tpl-empty { color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; margin: 0; }
.tpl-terms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
/* A `1fr` track won't shrink below its item's min-content, and a number <input>
   has a wide intrinsic one (~180px) — so 4x180 + gaps overflowed the card, and
   the page, on tablets (760px up to ~900px). min-width: 0 drops that floor and
   the fields stretch to the track instead. */
.tpl-terms .int-field { min-width: 0; }
.tpl-warn { color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-bd);
  border-radius: 8px; padding: 8px 11px; font-size: 12.5px; line-height: 1.45; margin: 0; }
.tpl-ok { color: var(--success); font-size: 12.5px; font-weight: 600; }

@media (max-width: 760px) { .tpl-terms { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .tpl-terms { grid-template-columns: 1fr; }
  .tpl-row { flex-direction: column; }
  .tpl-row-actions { justify-content: flex-start; }
}

.ob-review { display: flex; flex-direction: column; gap: 10px; }
.ob-review-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.ob-review-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); margin: 0 0 5px; font-weight: 700; }
.ob-review-card p:not(.ob-review-h) { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.55; }
.ob-muted { color: var(--ink-mute); font-size: 12px; }
.ob-wiz-reassure { margin: 12px 0 0; font-size: 12.5px; color: var(--success); background: var(--success-soft);
  border: 1px solid var(--success-bd); border-radius: 8px; padding: 9px 12px; line-height: 1.45; }

@media (max-width: 560px) {
  .ob-client-row, .ob-wiz-two { grid-template-columns: 1fr; }
  .ob-proposal-head { flex-direction: column; gap: 4px; }
}
