/* Daily Life Doc, round 13 (zone F1): the place Clients (js/clients/clients-page.js) and the Add client sheet
   (js/clients/client-add.js), drawn as the page "Expert Plans" draws "Clients and To review", "Adding a client" and
   "On a phone": rows on the card colour, the columns Client · Needs you · Next call, a dark "2 to review", a
   yellow "quiet 3 days"; at phone width one column with a dark round count. */

/* ---------- The head row's tools ---------- */
.top .cl-srchb, .top .cl-addr { display: none; }
.cl-srch2 { margin: 0 0 10px; }
.cl-srch2 .wsrch { display: flex; max-width: none; }

/* ---------- The list ---------- */
.cl-page { max-width: 1100px; }
.cl-cols, .cl-row { display: grid; grid-template-columns: 32px minmax(0, 1.6fr) minmax(0, 1fr) minmax(120px, .55fr); align-items: center; column-gap: 14px; }
.cl-cols { padding: 0 16px 8px; font-size: var(--t-xs); font-weight: 500; color: var(--ink3); }
.cl-cols span:first-child { grid-column: 2; }
.cl-list { display: flex; flex-direction: column; gap: 8px; }
.cl-row { width: 100%; min-height: 58px; padding: 10px 16px; border-radius: 14px; background: var(--card); text-align: left; color: var(--ink);
  transition: transform var(--m-press) var(--ease-out), box-shadow var(--m-step) ease; }
.cl-row:hover { box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.cl-row:active { transform: scale(.99); }
.cl-row .av2 { width: 32px; height: 32px; font-size: var(--t-sm); }
.cl-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cl-who b { font-size: var(--t-s); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Round 34 (zone P): the quiet tag "Test" beside a test person's name. */
.cl-nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cl-test { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--ink3); font-size: var(--t-xs); font-style: normal; font-weight: 500; }
.cl-sub { font-size: var(--t-xs); color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-sub.narrow { display: none; }
.cl-needc { min-width: 0; }
.cl-need { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.cl-need.rv { background: var(--ink); color: var(--surface); }
.cl-also { margin-right: 6px; } /* round 53 (WALK-1 fault 12): "AI paused" and "3 to review" do not touch */
.cl-need.quiet { background: var(--try-bg); color: var(--try-d); }
.cl-need.noplan { background: var(--soft); color: var(--ink2); }
/* Fixer FX-P (AUDIT-2 row 5): Publish beside "Not started" (the client's Publish sheet). */
.cl-pub { display: inline-block; margin-left: 6px; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.cl-need.urgent { background: var(--bad-bg); color: var(--bad-d); } /* fixer FX-C: a client in crisis */
.cl-num { display: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: var(--t-2xs);
  font-weight: 600; line-height: 22px; text-align: center; }
.cl-call { display: flex; flex-direction: column; font-size: var(--t-sm); line-height: 1.3; }
.cl-call small { font-size: var(--t-2xs); color: var(--ink3); }
.cl-none { color: var(--ink3); }
.cl-nomatch { padding: 24px 16px; color: var(--ink3); font-size: var(--t-sm); }

/* ---------- One column at phone width ---------- */
@media (max-width: 880px) {
  .top .cl-add { display: none; }
  .top .cl-srchb, .top .cl-addr { display: grid; }
  .cl-cols { display: none; }
  .cl-row { grid-template-columns: 40px minmax(0, 1fr) auto; min-height: 64px; padding: 10px 12px; }
  .cl-row .av2 { width: 36px; height: 36px; }
  .cl-call { display: none; }
  .cl-sub.wide { display: none; }
  .cl-sub.narrow { display: block; }
  .cl-who b { font-size: var(--t-m); }
  .cl-sub { font-size: var(--t-sm); }
  .cl-need.rv { display: none; }
  .cl-num { display: inline-block; }
  .cl-sub.cl-nc { color: var(--ink2); font-size: var(--t-xs); }
}
@media (max-width: 400px) {
  .cl-pub { display: none; } /* fixer FX-P: the name keeps its room; the client's head has Publish */
  .cl-sub.cl-nc { white-space: normal; } /* round 53 (C18a): beside "AI paused" the next call wraps, never cut */
}

/* ---------- Add client (a sheet) ---------- */
.ac-f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ac-f > label, .ac-f > .ac-l { font-size: var(--t-xs); font-weight: 600; color: var(--ink2); }
.ac-f input, .ac-f select { width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--field); color: var(--ink); font: inherit;
  font-size: var(--t-s); outline: none; }
.ac-f input:focus, .ac-f select:focus { box-shadow: inset 0 0 0 1.5px var(--sage); }
.ac-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft); align-self: flex-start; }
.ac-seg button { min-height: 32px; padding: 0 14px; border-radius: 999px; font-size: var(--t-sm); font-weight: 600; color: var(--ink2);
  transition: background-color var(--m-step) ease, color var(--m-step) ease; }
.ac-seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.ac-from { font-size: var(--t-xs); color: var(--ink3); }
.ac-err { font-size: var(--t-xs); color: var(--bad-d); }
.ac-f .ac-err { margin: 0 2px; }
.ac-link { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--field); }
.ac-link a:not(.pill) { color: var(--note-d); font-weight: 600; font-size: var(--t-s); word-break: break-all; text-decoration: none; }
.ac-link .row2 { display: flex; gap: 6px; flex-wrap: wrap; }
.ac-qr { align-self: flex-start; padding: 10px; border-radius: 10px; background: #fff; }
.ac-qr svg { display: block; width: 168px; height: 168px; }
.ac-done { font-size: var(--t-s); color: var(--ink2); margin-bottom: 12px; }
.wsrch input::-webkit-search-cancel-button { -webkit-appearance: none; }
/* Round 47 (zone C): the filter Mine · All · each person · Unassigned (base.css .filters), and the Atlas row
   Assigned with Move to (js/client/client-move.js). */
/* Fixer FX2 (walk W1 fault 5): the filter and the source chips (round 60) stand in one row that scrolls sideways, a
   thin line between the two groups, so a phone shows at most two rows of chips (with Clients · To review · Calls). */
.cl-bars { display: flex; align-items: center; gap: 6px; margin: 2px calc(var(--gut) * -1) 14px; padding: 0 var(--gut); overflow-x: auto; scrollbar-width: none; }
.cl-bars::-webkit-scrollbar { display: none; }
.cl-bars:not(:has(.filter)) { display: none; }
.cl-bars > .filters, .cl-bars > .cl-srcbar, .cl-bars .cl-src { display: contents; }
.cl-bars > .cl-fil[hidden] { display: none; }
.cl-fil:not([hidden]) + .cl-srcbar .cl-src::before { content: ''; flex: none; align-self: center; width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
/* Round 47 (zone C2): the same filter on To review and Calls (js/clients/assign-filter.js), above the page's own
   column, so the row stays at the start when To review's column is centered on All clear. */
.as-fil[hidden] { display: none; }
.as-fil + .calls { margin-top: -4px; }
.am-v { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.am-move { flex: none; min-height: 36px; }
/* Round 60 (zone F): the partner's Status line in a row in ink, first in the grey line (fixer FX2: before "Assigned";
   at phone width on its own line, .cl-stl). */
.cl-sub .cl-st { color: var(--ink2); font-weight: 500; }
@media (min-width: 881px) {
  .cl-sub.cl-two { display: flex; min-width: 0; }
  .cl-two .cl-st { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .cl-two .cl-rest { flex: none; white-space: pre; }
}
/* Round 47 (fixer F1): at phone width the filter (Clients, To review, Calls) and Move to take a 44 px touch height. */
@media (max-width: 880px) {
  .cl-fil .filter, .as-fil .filter, .cl-srcbar .filter { height: 44px; padding: 0 16px; border-radius: 22px; }
  .am-move { min-height: 44px; }
}
