/* Clients and contacts (js/clients.js): initials badges, the client and contact pages, the New client dialog */
.clav { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--hover); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2); font: 600 11px var(--font); letter-spacing: .02em; }
.clav.round { border-radius: 50%; } .clav.sm { width: 28px; height: 28px; font-size: 11px; } .clav.lg { width: 34px; height: 34px; font-size: 12px; }
.cltbl .clname { display: flex; align-items: center; gap: 10px; } .cltbl .clname b { font-weight: 400; }
/* client / supplier / archived: a quiet teal tag right after the name */
.cltag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 5px;
  color: var(--accent); font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap; }
.cltag.off { color: var(--muted); border-color: var(--line-strong); }
.cltbl .clname { gap: 8px; flex-wrap: wrap; }
.cltbl td a { color: var(--text); text-decoration: none; } .cltbl td a:hover { color: var(--accent); }
.clmore { display: flex; justify-content: center; padding: 14px 0 4px; }
.clsave { min-width: 0; }
.clpg .rec { grid-template-columns: minmax(0, 1fr) 380px; }
.clpg .card h2 .muted { font-weight: 400; }
.clchk { display: flex; gap: 16px; align-items: center; min-height: 34px; } .clchk label { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; white-space: nowrap; }
.field .clchk input[type=checkbox] { flex: none; width: 16px; height: 16px; margin: 0; }   /* not the full width of a form field */
/* the VAT line under the billing address */
.clvat { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 12px; border-radius: 8px; background: var(--hover); font-size: 12.5px; color: var(--text-2); }
.clvat b { font-weight: 600; color: var(--text); margin-right: 4px; }
.clvat-w { margin-top: 6px; padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); background: var(--amber-bg); color: var(--text); font-size: 12px; border-radius: 6px; }
/* contacts on a client page, companies on a contact page */
.clc { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); } .clc:first-child { border-top: 0; }
.clc .t { flex: 1; min-width: 0; } .clc .t a { color: inherit; text-decoration: none; } .clc .t a:hover b { color: var(--accent); } .clc .t b { font-weight: 500; }
.clc .muted.small a { color: var(--muted); } .clc .muted.small a:hover { color: var(--accent); }
.clc .iconbtn { width: 26px; height: 26px; opacity: .55; } .clc:hover .iconbtn { opacity: 1; } .clc .iconbtn:hover { color: var(--red); background: var(--red-bg); }
.clc .clrole { margin-top: 4px; width: 100%; height: 28px; }
.cladd { margin: 0 0 12px; padding: 12px; border-radius: 10px; background: var(--hover); } .cladd .field { margin-bottom: 8px; }
.cladd .row, .ncl .row { display: flex; gap: 8px; justify-content: flex-end; }
.kadd { margin-top: 10px; }
/* company / person suggestions under an input */
.clpick, .cladd .field { position: relative; }
.clsug { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; padding: 4px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); }
.clsug button { display: grid; width: 100%; text-align: left; gap: 1px; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; color: var(--text); }
.clsug button:hover { background: var(--accent-bg); } .clsug b { font-weight: 500; } .clsug small { color: var(--muted); font-size: 11.5px; } .clsug p { margin: 6px 8px; }
.clchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); font-weight: 500; }
.clchip .iconbtn { width: 22px; height: 22px; color: inherit; }
/* New client dialog */
.dialog.ncl { max-width: 620px; padding: 18px 20px 20px; }
.nclh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; } .nclh h2 { margin: 0; }
.ncl #nclSrc { margin-bottom: 14px; }
.nclq { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted); }
.nclq:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); color: var(--accent); }
.nclq input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 400 15px var(--font); color: var(--text); }
.nclres { display: grid; gap: 2px; margin-top: 10px; max-height: 340px; overflow: auto; } .nclres > p { margin: 8px 2px; }
.nclr { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; color: var(--text); }
.nclr:hover { background: var(--accent-bg); } .nclr.off { opacity: .6; } .nclr.busy { opacity: .5; pointer-events: none; }
.nclr .t { flex: 1; min-width: 0; display: grid; } .nclr .t b { font-weight: 500; } .nclr .t small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ncl-alt { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.nclsrc { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 10px; border-radius: 8px; background: var(--accent-bg); color: var(--accent); font-size: 12.5px; }
.nclsrc span { flex: 1; } .nclsrc .bad { color: var(--red); } .nclsrc a { color: var(--accent); font-weight: 500; }
.ncl #nclVat { margin: 2px 0 14px; }
@container (max-width: 900px) { .clpg .rec { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .ncl .form { grid-template-columns: 1fr; } }
