/* The Client File (CLAUDE.md decision 53): year switcher, tabs, notes, AI consent, sealed year and
   timeline. Builds on clients.css (.cl-*) and the design tokens; sans only, tabular figures. */

.cf-head-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* E2 wires "Ask about this client" into this slot later. */
.cf-ask-slot:empty { display: none; }

/* Year switcher: each year is a small unblurred chip (a repeated item); the selected year is lifted
   onto a panel. */
.cf-years { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px; margin: -4px; }
.cf-years::-webkit-scrollbar { display: none; }
.cf-year { display: flex; flex-direction: column; gap: 3px; min-width: 112px; min-height: 52px; padding: 9px 14px; border-radius: 16px; border: 1px solid var(--glass-edge); background: color-mix(in srgb, var(--surface-solid) 42%, transparent); box-shadow: inset 0 1px 0 var(--glass-highlight); color: var(--ink); flex: 0 0 auto; transition: background-color 0.15s ease-out, box-shadow 0.15s ease-out; }
.cf-year:hover { background: color-mix(in srgb, var(--panel-bg) 70%, transparent); }
.cf-year b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cf-year small { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cf-year[aria-current="page"] { background: var(--panel-bg); border-color: transparent; box-shadow: var(--shadow-panel); }
.cf-year .cf-span { font-weight: 400; color: var(--muted); }
.cf-year.next { border: 1px dashed var(--line-strong); background: transparent; box-shadow: none; }
.cf-year.next small { color: var(--ink); font-weight: 500; }

/* The Client File's tabs: a chrome pill bar that stays under the top bar while the page scrolls. */
.cf-tabs { position: sticky; top: 66px; z-index: 10; display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--radius-pill); align-self: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cf-tabs::-webkit-scrollbar { display: none; }
.cf-tabs .cl-tab { border-radius: var(--radius-pill); min-height: 34px; padding: 0 16px; font-size: 14px; }
.cf-tabs .cl-tab:hover { background: var(--row-hover); }
.cf-tabs .cl-tab[aria-current="page"] { background: var(--panel-bg); box-shadow: var(--shadow-panel); }

/* Where the year stands: the Overview's one feature card (.cl-feat in clients.css). */
.cf-feat { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 30px; padding: 24px 26px 22px; }
.cf-feat-lab { font-size: 13px; line-height: 18px; font-weight: 500; color: color-mix(in srgb, var(--on-action) 76%, transparent); }
.cf-feat-big { margin: 10px 0 4px; font-size: 40px; line-height: 44px; font-weight: 500; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.cf-feat-big small { font-size: 16px; font-weight: 400; letter-spacing: 0; color: color-mix(in srgb, var(--on-action) 70%, transparent); }
.cf-feat-sm { font-size: 13px; line-height: 19px; color: color-mix(in srgb, var(--on-action) 76%, transparent); }
.cf-stages { display: flex; gap: 3px; margin: 18px 0 10px; }
.cf-stages i { height: 6px; flex: 1; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--on-action) 16%, transparent); }
.cf-stages i.s, .cf-legend i.s { background: var(--on-action); }
.cf-stages i.r, .cf-legend i.r { background: color-mix(in srgb, var(--on-action) 55%, transparent); }
.cf-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: color-mix(in srgb, var(--on-action) 76%, transparent); font-variant-numeric: tabular-nums; }
.cf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cf-legend i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--on-action) 22%, transparent); }
.cf-needs { border-left: 1px solid color-mix(in srgb, var(--on-action) 14%, transparent); padding-left: 28px; min-width: 0; display: flex; flex-direction: column; }
.cf-needs .cf-feat-lab { margin-bottom: 8px; }
.cf-need { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 -12px; border-radius: var(--radius-control); color: var(--on-action); }
.cf-need:hover { background: color-mix(in srgb, var(--on-action) 8%, transparent); }
.cf-need .n { width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--on-action) 12%, transparent); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cf-need .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cf-need .t b { font-size: 14px; font-weight: 500; }
.cf-need .t span { font-size: 12.5px; color: color-mix(in srgb, var(--on-action) 72%, transparent); }
.cf-need svg { flex-shrink: 0; color: color-mix(in srgb, var(--on-action) 60%, transparent); }
.cf-need:focus-visible { outline-color: var(--on-action); }
.cf-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot-waiting); flex-shrink: 0; }
.cf-dot.sealed { background: var(--dot-done); }
.cf-dot.in_review { background: var(--dot-review); }
.cf-dot.in_progress { background: var(--dot-preparing); }

.cf-hold { display: inline-flex; align-items: center; gap: 6px; }

/* Sealed year banner */
.cf-sealed { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-card); background: var(--ok-soft); color: var(--ok); font-size: 14px; line-height: 20px; }
.cf-sealed .tick { font-weight: 600; }
.cf-sealed p { color: var(--ink); }
.cf-sealed p + p { margin-top: 4px; color: var(--muted); font-size: 13px; }

/* Key and value lines (exports, client page) */
.cf-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; font-size: 13.5px; padding-top: 8px; }
.cf-kv > :nth-child(odd) { color: var(--muted); }
.cf-kv > :nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }

/* Notes */
.cf-notes { display: flex; flex-direction: column; }
.cf-note { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.cf-note:first-child { border-top: 0; padding-top: 4px; }
.cf-note-body { font-size: 14px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cf-note-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.cf-note-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cf-pin { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--review); }
.cf-textarea { width: 100%; min-height: 84px; border-radius: var(--radius-control); border: 0; background: var(--field-bg); box-shadow: var(--shadow-field); padding: 10px 12px; font: inherit; font-size: 14px; line-height: 20px; color: var(--ink); resize: vertical; }
.cf-textarea:focus { outline: none; box-shadow: var(--shadow-field), 0 0 0 3px color-mix(in srgb, var(--action) 22%, transparent); }
.cf-textarea[aria-invalid="true"] { box-shadow: var(--shadow-field), inset 0 0 0 1px var(--danger); }
.cf-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }

/* AI consent */
.cf-consent-missing { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--radius-control); background: var(--review-soft); color: var(--review); font-size: 13.5px; line-height: 19px; }

/* Timeline */
.cf-tl { display: flex; flex-direction: column; }
.cf-tle { display: grid; grid-template-columns: 96px 12px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: start; font-size: 14px; line-height: 20px; }
.cf-tle:first-child { border-top: 0; }
.cf-tle .when { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.cf-tle .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--dot-waiting); }
.cf-tle .dot.person { background: var(--ink); }
.cf-tle .dot.engine { background: var(--dot-preparing); }
.cf-tle .dot.client { background: var(--dot-done); }
.cf-tle .dot.support { background: var(--dot-review); }
.cf-tle .what { min-width: 0; overflow-wrap: anywhere; }
.cf-tle .what small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cf-tl-empty { font-size: 13.5px; color: var(--muted); padding: 8px 0; }

@media (max-width: 1000px) {
  .cf-feat { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .cf-needs { border-left: 0; padding-left: 0; border-top: 1px solid color-mix(in srgb, var(--on-action) 14%, transparent); padding-top: 16px; }
}
/* The top bar stops being sticky at phone width, so the tabs follow it. */
@media (max-width: 700px) {
  .cf-tabs { position: static; }
}
@media (max-width: 640px) {
  .cf-year { min-width: 92px; }
  .cf-feat { padding: 20px; }
  .cf-feat-big { font-size: 34px; line-height: 38px; }
  .cf-tle { grid-template-columns: 12px minmax(0, 1fr); }
  .cf-tle .when { grid-column: 2; order: 2; padding-top: 0; }
  .cf-tle .dot { grid-row: 1; }
}

/* A removed client (decision 54): read-only banner, and the admins' "Manage" area at the foot of the file */
.cf-removed { display: flex; justify-content: space-between; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius-card); background: var(--neutral-soft); color: var(--ink); font-size: 14px; line-height: 20px; }
.cf-removed p { flex: 1 1 280px; }
.cf-manage { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
