/* ============================================================
   Clients
   ============================================================ */

.search-wrap{position:relative;margin-bottom:var(--sp-3)}
.search-wrap svg{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);
  width:17px;height:17px;fill:none;stroke:var(--ink-3);stroke-width:2;stroke-linecap:round;
}
.search-wrap input{padding-left:42px}

.count{font-size:var(--t-label);color:var(--ink-3);margin-bottom:var(--sp-3);font-weight:600}

/* ---------- a client row ---------- */
.clients{display:flex;flex-direction:column;gap:var(--sp-2)}
.crow{
  display:grid;grid-template-columns:1fr auto;align-items:center;
  gap:2px var(--sp-3);width:100%;text-align:left;
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r-md);padding:var(--sp-3) var(--sp-4);
  box-shadow:var(--lift);transition:transform .14s,border-color .16s;
  min-height:76px;
}
.crow:active{transform:scale(.99);border-color:var(--orange)}
.crow .nm{grid-column:1;grid-row:1;font-size:var(--t-body);font-weight:650;letter-spacing:-.01em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crow .meta{grid-column:1;grid-row:2;font-size:var(--t-label);color:var(--ink-3);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crow .right{grid-column:2;grid-row:1/3;text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.crow .amt{font-size:var(--t-body);font-weight:700}
.crow .amt.owed{color:var(--orange)}
.crow .amt.clear{color:var(--good)}

/* ---------- preview sheet ---------- */
.pv-top{display:flex;align-items:flex-start;gap:var(--sp-3);margin-bottom:var(--sp-4)}
.pv-top h2{font-size:var(--t-title);font-weight:700;letter-spacing:-.02em;line-height:1.2}
.pv-top p{font-size:var(--t-label);color:var(--ink-3);margin-top:3px}

.pv-money{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);
  padding:var(--sp-4);margin-bottom:var(--sp-4);
}
.pv-line{display:flex;justify-content:space-between;align-items:baseline;padding:5px 0;font-size:var(--t-label);color:var(--ink-2)}
.pv-line b{font-size:var(--t-body);font-weight:700;color:var(--ink)}
.pv-line.total{border-top:1px solid var(--line-soft);margin-top:var(--sp-2);padding-top:var(--sp-3)}
.pv-line.total b{font-size:var(--t-title);letter-spacing:-.02em}
.pv-line b.owed{color:var(--orange)}
.pv-line b.clear{color:var(--good)}

.pv-svc{
  display:flex;justify-content:space-between;align-items:center;gap:var(--sp-3);
  padding:var(--sp-3) 0;border-bottom:1px solid var(--line-soft);
}
.pv-svc:last-child{border-bottom:0}
.pv-svc .s-n{font-size:var(--t-label);font-weight:650}
.pv-svc .s-s{font-size:var(--t-micro);color:var(--ink-3);margin-top:2px}
.pv-svc .s-v{font-size:var(--t-label);font-weight:700;text-align:right;white-space:nowrap}

.pv-acts{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--sp-2);margin-bottom:var(--sp-3)}
.pv-act{
  display:flex;flex-direction:column;align-items:center;gap:6px;
  padding:var(--sp-3) 6px;border-radius:var(--r-sm);
  background:var(--surface);border:1px solid var(--line);
  font-size:var(--t-micro);font-weight:650;color:var(--ink-2);min-height:66px;justify-content:center;
}
.pv-act svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.pv-act.pay{background:var(--good-bg);border-color:transparent;color:var(--good)}
.pv-act:active{transform:scale(.97)}

.pv-note{
  font-size:var(--t-label);color:var(--ink-2);line-height:1.6;
  background:var(--surface-2);border:1px solid var(--line-soft);
  border-radius:var(--r-sm);padding:var(--sp-3);margin-bottom:var(--sp-3);
}

/* ---------- service picker rows in the form ---------- */
.svc-row{
  background:var(--surface);border:1px solid var(--line);
  border-left:3px solid var(--orange);
  border-radius:var(--r-sm);padding:var(--sp-3);margin-bottom:var(--sp-2);
}
.svc-row .sr-head{display:flex;align-items:center;gap:var(--sp-2);margin-bottom:var(--sp-3)}
.svc-row .sr-head b{font-size:var(--t-label);font-weight:700;flex:1}
.svc-row .drop{
  width:34px;height:34px;border-radius:9px;display:grid;place-items:center;
  color:var(--ink-3);border:1px solid var(--line);
}
.svc-row .drop svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}

/* ---------- empty list ---------- */
.list-empty{text-align:center;padding:var(--sp-6) var(--sp-4);color:var(--ink-3)}
.list-empty p{font-size:var(--t-body);max-width:30ch;margin:0 auto}

/* filter row — three quiet dropdowns instead of two rows of chips */
.filter-row{
  display:grid;grid-template-columns:1fr 1fr;gap:var(--sp-2);margin-bottom:var(--sp-3);
}
.filter-row .pk-btn:last-of-type{grid-column:1/-1}
[data-theme="dark"] .svc-row .sr-head .rm{
  width:32px;height:32px;border-radius:9px;display:grid;place-items:center;
  color:var(--ink-3);border:1px solid var(--line);flex-shrink:0;
}
.svc-row .sr-head .rm svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
