/* Lingsaa Hub — additions on top of base.css + app.css (same look as Lingsaa Support and the Monitor). */

/* Status pills: customers (st-*) and their apps (sub-*) */
.pill.st-lead { background: var(--accent-tint); color: var(--accent-ink); }
.pill.st-trial, .pill.sub-trial { background: var(--warning-tint); color: var(--warning-ink); }
.pill.st-active, .pill.sub-active { background: var(--good-tint); color: var(--good-ink); }
.pill.st-paused, .pill.sub-suspended { background: var(--critical-tint); color: var(--critical-ink); }
.pill.st-former, .pill.sub-cancelled { background: var(--surface-3); color: var(--muted); }
.pill.stage-live { background: var(--good-tint); color: var(--good-ink); }
.pill.stage-beta, .pill.stage-building { background: var(--warning-tint); color: var(--warning-ink); }
.pill.stage-internal, .pill.stage-retired { background: var(--surface-3); color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.chip.sub-active { background: var(--good-tint); color: var(--good-ink); }
.chip.sub-trial { background: var(--warning-tint); color: var(--warning-ink); }
.chip.sub-suspended { background: var(--critical-tint); color: var(--critical-ink); }
.chip.sub-cancelled { background: var(--surface-3); color: var(--muted); text-decoration: line-through; }

/* Status filter on the customer list */
.status-seg { flex-wrap: wrap; }
.seg-count { margin-left: 6px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg .btn[aria-pressed="true"] .seg-count { color: inherit; opacity: 0.8; }

table.table td.num, table.table th.num, .num { text-align: right; font-variant-numeric: tabular-nums; }
.cust-table td { vertical-align: middle; }
.row.wrap { flex-wrap: wrap; }
.row.center { justify-content: center; }

/* Dashboard */
.tiles-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
a.tile-link { color: inherit; text-decoration: none; transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease); }
a.tile-link:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); text-decoration: none; }
.tile-warn .tile-value { color: var(--critical-ink); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dash-grid > .card + .card, .dash-grid .stack > .card + .card { margin-top: 0; }
.due-late { color: var(--critical-ink); font-weight: 600; }
.due-soon { color: var(--warning-ink); font-weight: 600; }
.tidy-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.card h2 .icon { vertical-align: -3px; color: var(--muted); }

/* Customer page */
.cust-head { display: flex; flex-direction: column; gap: 6px; }
.cust-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.cust-main, .cust-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cust-main > .card + .card, .cust-side > .card + .card { margin-top: 0; }
.warn-text { color: var(--warning-ink); }
.danger-text { color: var(--critical-ink); }
.pre { white-space: pre-wrap; margin: 0; }
.side-notes { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--grid); }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-list li + li { border-top: 1px solid var(--grid); padding-top: 10px; }
.contact-list .row { gap: 6px; }
.plain-list { list-style: none; margin: 6px 0 0; padding: 0; }
.remove-people { margin-top: 12px; }
.remove-people summary, details summary { cursor: pointer; color: var(--text-2); }

.note-composer textarea { min-height: 70px; }
.note-composer select { width: auto; min-height: 32px; padding: 4px 8px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-item { position: relative; padding: 10px 0 10px 18px; border-left: 2px solid var(--grid); margin-left: 6px; }
.tl-item::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.tl-item.tl-system::before { background: var(--axis); }
.tl-item.tl-call::before, .tl-item.tl-whatsapp::before { background: var(--good); }
.tl-item.tl-meeting::before, .tl-item.tl-visit::before { background: var(--accent-2); }
.tl-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tl-head .btn { margin: -4px 0; }
.tl-body { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; }
.tl-system .tl-body { color: var(--text-2); }
.tl-system .tl-head b { color: var(--muted); font-weight: 600; }

/* Forms */
.view.narrow-wide { max-width: 860px; }
.span-2 { grid-column: 1 / -1; }
.form-actions { gap: 8px; }
.dup-list { margin: 0; padding-left: 18px; }
input.mono { font-family: var(--mono); letter-spacing: 0.02em; }
input:disabled, select:disabled { opacity: 0.75; }
.help-facts .fact { grid-template-columns: 130px minmax(0, 1fr); }

@media (max-width: 1100px) {
  .tiles-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cust-layout, .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .tiles-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-sm { display: none; }
}
