/* Monthly report: text-only preview, with print layout in receipt.css. */
.report-controls,
.report-print {
  display: grid;
  gap: 12px;
}
.report-print {
  padding: 24px;
  margin-top: 16px;
  border: 1px solid var(--border-subtle);
  overflow-wrap: anywhere;
}
.report-print p {
  margin: 0;
}
.report-table {
  display: table;
  width: 100%;
  border-collapse: collapse;
}
.report-table thead {
  display: table-header-group;
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}
.report-table tbody {
  display: table-row-group;
}
.report-table tr {
  display: table-row;
}
.report-table th,
.report-table td {
  display: table-cell;
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.report-table td::before {
  display: none;
}
/* Atividade: one timeline across projects, machines and agents */
.activity {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.activity-summary {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 550;
}
.cipher-note {
  margin: 0;
  padding: 10px 14px;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--accent-soft);
  color: var(--text-secondary);
  font-size: 13px;
}
.activity-chips {
  flex-wrap: wrap;
}
.activity-timeline {
  display: grid;
  gap: 20px;
}
.activity-day {
  display: grid;
  gap: 8px;
  margin: 0;
}
.activity-day > h3 {
  margin: 0;
}
.activity-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  grid-template-areas:
    'time title status action'
    'time facts status action';
  gap: 4px 16px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface-panel);
  min-width: 0;
}
.activity-time {
  grid-area: time;
  color: var(--text-muted);
  font: 12px/1.4 var(--font-mono);
}
.activity-title {
  grid-area: title;
  color: var(--text-primary);
  font-weight: 550;
  overflow-wrap: anywhere;
}
.activity-facts {
  grid-area: facts;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 13px;
}
.activity-project {
  color: var(--text-secondary);
}
.activity-status {
  grid-area: status;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.activity-row > button {
  grid-area: action;
}
@media (max-width: 760px) {
  .activity-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'time' 'title' 'facts' 'status' 'action';
  }
  .activity-status {
    justify-content: flex-start;
  }
}

/* Alertas: unread counter in the sidebar */
.nav-count {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface-panel);
  font: 600 11px/1.5 var(--font-mono);
  text-align: center;
}
.nav-count[hidden] {
  display: none;
}

/* Esta semana: the weekly summary above the Atividade timeline */
.week {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface-panel);
}
.week > h3 {
  margin: 0;
}
.week-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.week-tile {
  display: grid;
  gap: 2px;
}
.week-tile > strong {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 600;
}
.week-agents,
.week-coverage {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}
.week-coverage:empty {
  display: none;
}
.week-attention {
  display: grid;
  gap: 6px;
}
.week-attention > h3 {
  margin: 4px 0 0;
}
.week-run {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Máquinas */
.machines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.machine-card {
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface-panel);
  overflow-wrap: anywhere;
}
.machine-card p {
  margin: 8px 0;
}
.machine-status,
.machine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.machine-chain {
  font-size: 13px;
}

/* Pesquisa local na toolbar da Atividade */
.activity-search {
  flex: 1 1 260px;
  min-width: 0;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface-panel);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
}
.activity-search:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Workspace governance goals */
.goal-panel {
  margin-block: 0.75rem;
}
.goal-form {
  display: grid;
  gap: 0.75rem;
  margin-block: 0.75rem;
}
.goal-form[hidden] {
  display: none;
}
.goal-row,
.goal-row label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.goal-row input[type='number'] {
  width: 5rem;
}
.goal-results {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Histórico do conhecimento */
.history,
.history-comparison {
  display: grid;
  gap: 12px;
}
.history-version {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  overflow-wrap: anywhere;
}
.history-version .actions {
  margin-left: auto;
}
.history-version [aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--accent);
}
.history-titles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  overflow-wrap: anywhere;
}
.history-titles h3 {
  margin: 0;
  font-size: 14px;
}
.history-diff {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}
.history-line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 2px 12px;
  min-height: 1.5em;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.5;
}
.history-added {
  background: var(--surface-panel);
  border-left: 3px solid var(--accent);
}
.history-removed {
  background: var(--surface-panel);
  border-left: 3px solid var(--text-secondary);
  text-decoration: line-through;
}
.history-unchanged {
  border-left: 3px solid transparent;
}

.history-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
