/*
 * Titan Lock — collections-screens.css (collections screens and widgets). Owner: WS6-M2.
 * Registered on every panel by the S0 seam (ConfiguresTitanPanel). Styles only
 * this module's own .tl-cs-* / .tl-ledger-receipt classes: the Collections and
 * ledger pages, the counter R13 page, the CollectionsOverview /
 * PortfolioByReseller / FollowUps widgets. Panel-specific rules are scoped
 * under .fi-panel-{admin|portal|counter}. Plain CSS (no Tailwind build).
 * After an edit run `php artisan filament:assets` — the panels serve the
 * published copy in public/css/app/. A state is never colour alone (icon +
 * label); gold only for keys. The 80-mm receipt print rules are NOT here
 * (collections.css, WS6-M1, is their single owner).
 */

/* ── Layout atoms ─────────────────────────────────────────────────────────── */
.tl-cs-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tl-cs-muted,
.tl-cs-caption {
  color: var(--tl-steel-600);
  font-size: 0.875rem;
}
.tl-cs-caption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
}
.tl-cs-link {
  color: var(--tl-orange-700);
  font-weight: 600;
  text-decoration: none;
}
.tl-cs-link:hover,
.tl-cs-link:focus-visible {
  text-decoration: underline;
}
.tl-cs-danger {
  color: var(--tl-lock-fg) !important;
  font-weight: 700;
}
.tl-cs-good {
  color: var(--tl-green-800);
}

/* ── Portfolio by reseller (table widget) ─────────────────────────────────── */
.tl-cs-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tl-cs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.tl-cs-table th {
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--tl-steel-600);
  border-bottom: 1px solid var(--tl-steel-200);
  white-space: nowrap;
}
.tl-cs-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--tl-steel-100);
  vertical-align: middle;
  color: var(--tl-ink-900);
}
.tl-cs-table tbody tr:hover {
  background: var(--tl-steel-50);
}
.tl-cs-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tl-cs-tier {
  display: block;
  font-size: 0.75rem;
  color: var(--tl-steel-500);
}
.tl-cs-keys {
  color: var(--tl-gold-700);
  font-weight: 600;
}
.tl-cs-keys__icon {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.25rem;
  vertical-align: -0.15rem;
  color: var(--tl-gold-600);
}

/* ── Counter R13: totals, period toggle, note ─────────────────────────────── */
.tl-cs-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .tl-cs-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.tl-cs-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.9rem;
  background: var(--tl-white);
  border: 1px solid var(--tl-steel-200);
  border-radius: var(--tl-radius-md);
  box-shadow: var(--tl-shadow-1);
}
.tl-cs-kpi__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tl-steel-600);
}
.tl-cs-kpi__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tl-ink-900);
  font-variant-numeric: tabular-nums;
}
.tl-cs-kpi__hint {
  font-size: 0.75rem;
  color: var(--tl-steel-500);
}
.tl-cs-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tl-cs-note,
.tl-cs-empty {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  background: var(--tl-steel-50);
  border-radius: var(--tl-radius-sm);
  font-size: 0.85rem;
  color: var(--tl-steel-600);
}
.tl-cs-note__icon,
.tl-cs-empty__icon {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--tl-steel-500);
}
.tl-cs-empty__icon {
  color: var(--tl-green-700);
}

/* ── Follow-ups (R1) card rows ────────────────────────────────────────────── */
.tl-cs-cards {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--tl-steel-200);
  border-radius: var(--tl-radius-md);
  background: var(--tl-white);
}
.tl-cs-card + .tl-cs-card {
  border-top: 1px solid var(--tl-steel-100);
}
.tl-cs-card__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem; /* ≥ 44-px tap target */
  padding: 0.6rem 0.8rem;
  color: inherit;
  text-decoration: none;
}
a.tl-cs-card__link:hover,
a.tl-cs-card__link:focus-visible {
  background: var(--tl-steel-50);
}
.tl-cs-avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--tl-radius-pill);
  background: var(--tl-green-50);
  color: var(--tl-green-800);
  font-size: 0.8rem;
  font-weight: 700;
}
.tl-cs-card__main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}
.tl-cs-card__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tl-ink-900);
}
.tl-cs-card__detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tl-steel-500);
}
.tl-cs-card__side {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}
.tl-cs-card__amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tl-cs-card__stage {
  font-size: 0.7rem;
  color: var(--tl-steel-500);
}
.tl-cs-see-all {
  align-self: flex-end;
  font-size: 0.875rem;
}

/* ── Ledger receipt page ──────────────────────────────────────────────────── */
.tl-ledger-receipt {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 40rem;
}

/* ── Counter panel: bigger tap targets on the list rows ───────────────────── */
.fi-panel-counter .tl-cs-list .fi-ta-record {
  min-height: 3.25rem;
}
