/* Sales: customer type labels.
   Owned by public/js/customers.js and loaded after /styles.css. Class names here belong to this module;
   a look shared by several modules goes in /styles.css (npm run check-styles enforces this). */

/* ---------- customers: type labels ---------- */
.badge.ct-individual { background: var(--surface-2); color: var(--muted); }
.badge.ct-contractor { background: #fff1c2; color: #7a5600; }
.badge.ct-company { background: #dfe9ff; color: #24408f; }
.badge.ct-organization { background: var(--second-soft); color: var(--second); }
@media (prefers-color-scheme: dark) {
  .badge.ct-contractor { background: #4a3a0c; color: #ffd866; }
  .badge.ct-company { background: #1c2b52; color: #9db6ff; }
}

/* ---------- customers: list headings and sales person filter ---------- */
.cust-head { display: none; }
@media (min-width: 1000px) {
  .order-row.cust-head { display: grid; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-top: .55rem; padding-bottom: .55rem; }
  .cust-head .o-total, .cust-head .o-id { font-weight: 700; color: var(--muted); }
}
.toolbar .cust-seller, .toolbar .cust-label { width: auto; max-width: 100%; }
/* A customer's chat labels under their name in the list */
.cust-row .label-tags { margin-top: .2rem; }

/* Companies: their people (on the customer page and when adding a company) */
.people-box { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .8rem .8rem; display: grid; gap: .5rem; }
.people-box legend { padding: 0 .3rem; font-weight: 600; font-size: .9rem; }
.people-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: .4rem; }
@media (max-width: 640px) { .people-row { grid-template-columns: 1fr auto; } .people-row input:nth-child(2), .people-row input:nth-child(3) { grid-column: 1; } }
.people-list { list-style: none; margin: 0; padding: 0; display: grid; }
.people-list li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.people-list li:last-child { border-bottom: 0; }
.pl-main { flex: 1; min-width: 0; }
.people-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.people-head h2 { margin: 0; }
.form .people-row input { width: 100%; min-width: 0; }
/* A customer's labels on their page, with the Change button beside them */
.cust-labels { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

/* The Credit card (GAKA 1.111.0): criteria in two columns, ticked or crossed */
.credit-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .7rem 1rem; }
.credit-line .credit-title { font-size: 1.02rem; }
.credit-line .credit-words { flex: 1 1 12rem; color: var(--muted, #5b6475); }
.credit-line .credit-words strong { color: var(--text); }
.credit-line .credit-words strong.neg { color: var(--danger, #d93025); }
.credit-line .credit-words strong.pos { color: var(--ok); }
.credit-line .actions { margin: 0; }
.credit-decide { justify-content: flex-end; border-top: 1px solid var(--line, rgb(128 128 128 / .25)); padding-top: .7rem; margin-top: .7rem; }
.credit-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .5rem 1.5rem; margin: .5rem 0; }
.credit-groups h3 { font-size: .85rem; margin: .3rem 0; color: var(--muted, #5b6475); text-transform: uppercase; letter-spacing: .04em; }
.credit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.credit-list li { display: grid; grid-template-columns: 1.2rem 1fr; align-items: start; gap: .5rem; }
.credit-list li small { display: block; }
.credit-list li.no > div > div { color: var(--danger, #d93025); }
.credit-mark { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; font-size: .75rem; font-weight: 700; }
.credit-list li.ok .credit-mark { background: #d8f3e4; color: #17633e; }
.credit-list li.no .credit-mark { background: #fde8e8; color: #b42318; }
