/*
 * Enough style to read a board of eight columns on a laptop, and nothing more.
 *
 * No fonts, images or stylesheets from anywhere else: the page holds client data, so it makes
 * no outbound requests beyond the Telegram login widget on the login screen.
 */

:root {
  color-scheme: light dark;
  --gap: 0.75rem;
  --line: color-mix(in srgb, currentColor 20%, transparent);
  --soft: color-mix(in srgb, currentColor 7%, transparent);
  --warn: #c0392b;
  font: 15px/1.45 system-ui, sans-serif;
}

body {
  margin: 0;
  padding: var(--gap);
}

#top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap);
}

h1 {
  font-size: 1.15rem;
  margin: 0;
}

h2,
h3 {
  font-size: 1rem;
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--soft);
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: progress;
}

/* Board: eight columns side by side, scrolling sideways rather than wrapping. */
.totals-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  padding: var(--gap) 0;
  font-variant-numeric: tabular-nums;
}

.columns-inner {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13rem, 1fr);
  gap: var(--gap);
  overflow-x: auto;
  padding-bottom: var(--gap);
}

.column {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.column-count {
  font-size: 0.8rem;
  opacity: 0.6;
}

.column-empty {
  margin: 0;
  opacity: 0.4;
}

.client {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.4rem;
  border-radius: 0.4rem;
  background: var(--soft);
  text-decoration: none;
}

.client-name {
  font-weight: 600;
}

.client-company,
.client-days,
.client-debt,
.skill-hint,
.question-by,
.commitment-by,
.commitment-due,
.next-action-owner,
.stage-status {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Card: one column of blocks, each list a plain row per record. */
.card-inner {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: 48rem;
}

.card-progress {
  display: flex;
  gap: var(--gap);
  font-variant-numeric: tabular-nums;
}

.card-request,
.current-stage,
.stages,
.skills,
.questions,
.commitments,
.next-actions,
.sources {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.summary,
.event {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.evidence-raw {
  /* Not a link, on purpose — see `evidenceView`. Shown so nothing silently disappears. */
  word-break: break-all;
}

.summary-source,
.event-source,
.request-business,
.evidence {
  font-size: 0.8rem;
  opacity: 0.7;
}

.card-request p {
  margin: 0;
}

.stage,
.skill,
.question,
.commitment,
.next-action {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stage-done .stage-title {
  opacity: 0.55;
  text-decoration: line-through;
}

.stage-in_progress .stage-title {
  font-weight: 600;
}

.skill-yes .skill-title::before {
  content: '✓ ';
}

.commitment.overdue {
  color: var(--warn);
  font-weight: 600;
}

ul {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.1rem;
}

.empty {
  margin: 0;
  opacity: 0.5;
}

#error {
  padding: 0.6rem;
  border: 1px solid var(--warn);
  border-radius: 0.5rem;
  color: var(--warn);
}
