@import url("brand.css");

:root {
  --green: var(--brand-mint-dark, #0c7450);
}

/* Dłuższe komunikaty o statusie dowodu nie mogą zwiększać szerokości siatki
   raportu ponad viewport. Każda karta może się skurczyć, a tekst łamie się
   wewnątrz własnej kolumny zamiast tworzyć poziomy overflow. */
.report-grid > *,
.report-main,
.report-card,
.report-history,
.report-event > * {
  min-width: 0;
}

.report-main,
.report-card,
.report-event {
  overflow-wrap: anywhere;
  word-break: normal;
}

.report-period-switch {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  margin: 0 0 18px;
  border: 1px solid var(--line, #dbe2ee);
  border-radius: 14px;
  background: var(--surface, #fff);
  box-shadow: 0 8px 24px rgba(11, 23, 54, 0.06);
}

.report-period-switch button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted, #667085);
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.report-period-switch button.is-selected {
  background: var(--brand-navy, #0a1533);
  color: #fff;
}

.report-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted, #667085);
  line-height: 1.45;
}

.report-history {
  margin-top: 18px;
}

.report-timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.report-event {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line, #e5eaf2);
}

.report-event:first-child {
  border-top: 0;
}

.report-event-day {
  color: var(--muted, #667085);
  font-size: 0.875rem;
  font-weight: 800;
}

.report-event-kind {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--brand-blue-soft, #edf3ff);
  color: #173b7a;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.report-event strong,
.report-event p {
  display: block;
}

.report-event p {
  margin: 4px 0 0;
  color: var(--muted, #667085);
  line-height: 1.45;
}

@media (max-width: 620px) {
  .report-period-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .report-event {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
