/* POV — Partner Operations Visibility · ANT venue view
   Deliberately plain: this is an operational worksheet, not a dashboard. Data reads as a
   table; grouping is shown by banding and a thin rule, not by coloured header rows. */

/* ---------- chrome ---------- */

.topbar {
  background: var(--an-paper);
  border-bottom: 1px solid var(--an-line);
}

.topbar__inner,
.shell,
.footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand__logo { height: 38px; width: auto; display: block; }
.brand__copy { display: flex; flex-direction: column; line-height: 1.3; }
.brand__copy strong { font-size: 15px; }
.brand__copy span { font-size: 12.5px; color: var(--an-ink-soft); }

.viewer-chip { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.viewer-chip__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--an-ink-faint);
}

.shell { padding-top: 20px; padding-bottom: 44px; }

/* ---------- report header ---------- */

.intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.intro h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
}

.intro__meta {
  margin: 5px 0 0;
  font-size: 13.5px;
  color: var(--an-ink-soft);
}

.intro__meta span + span::before {
  content: "·";
  margin: 0 8px;
  color: var(--an-ink-faint);
}

.intro__actions { display: flex; gap: 7px; flex-wrap: wrap; }

.button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 6px;
  border: 1px solid var(--an-line);
  background: var(--an-paper);
  color: var(--an-ink);
  cursor: pointer;
}

.button:hover { background: var(--an-canvas); }

.button--primary {
  background: var(--an-navy);
  border-color: var(--an-navy);
  color: #fff;
}

.button--primary:hover { background: #2a4560; }
.button[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- status line ---------- */

.status {
  display: flex;
  align-items: baseline;
  gap: 8px 18px;
  flex-wrap: wrap;
  padding: 9px 0 12px;
  border-top: 1px solid var(--an-line);
  border-bottom: 1px solid var(--an-line);
  margin-bottom: 16px;
  font-size: 13.5px;
}

.status__count { font-size: 15px; font-weight: 700; }
.status__item { color: var(--an-ink-soft); }
.status__item b { color: var(--an-ink); font-weight: 600; }
.status__flag { font-weight: 600; }
.status__flag--final { color: var(--an-good); }
.status__flag--open { color: var(--an-warn); }
.status__flag--closing { color: var(--an-warn); }

.venue-notes {
  padding: 10px 13px;
  background: var(--an-blue-soft);
  border-left: 3px solid var(--an-blue);
  border-radius: 0 4px 4px 0;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  margin-bottom: 16px;
}

/* ---------- event tabs ---------- */

.event-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 6px;
}

.event-nav__item {
  font: inherit;
  font-size: 12.5px;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 5px;
  border: 1px solid var(--an-line);
  background: var(--an-paper);
  color: var(--an-ink-soft);
  cursor: pointer;
}

.event-nav__item[aria-current="true"] {
  background: var(--an-navy);
  border-color: var(--an-navy);
  color: #fff;
  font-weight: 600;
}

.event-nav__item--past { opacity: 0.7; }

/* ---------- tables ---------- */

.table-title {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--an-ink-soft);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--an-line);
  border-radius: 5px;
  background: var(--an-paper);
  margin-bottom: 22px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  position: sticky;
  top: 0;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--an-ink-soft);
  background: var(--an-canvas);
  padding: 8px 11px;
  border-bottom: 1px solid var(--an-line);
  white-space: nowrap;
}

tbody td {
  padding: 7px 11px;
  border-bottom: 1px solid var(--an-line-soft);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: 0; }

.table-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.table-toolbar .table-title { margin: 0; }
.button--small { font-size: 12px; padding: 4px 10px; }

/* ---------- attendee table ---------- */

.att-table td.num {
  color: var(--an-ink-faint);
  font-variant-numeric: tabular-nums;
  width: 34px;
}

/* Group bars: functional, not decorative. Quiet grey so they read as structure rather
   than as blocks of colour; the count on the right means collapsing them all gives the
   food summary without a separate table. */
.att-table tr.group-row td {
  padding: 0;
  background: var(--an-canvas);
  border-bottom: 1px solid var(--an-line);
  border-top: 1px solid var(--an-line);
}

.att-table tr.group-row:first-child td { border-top: 0; }

.group-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 7px 11px;
  background: none;
  border: 0;
  color: var(--an-ink);
  cursor: pointer;
}

.group-toggle:hover { background: #e9edf2; }

.caret {
  font-size: 9px;
  color: var(--an-ink-faint);
  width: 14px;
  flex: none;
}

.group-name { flex: 1; }

.att-table td.food { white-space: nowrap; }

.group-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding-left: 12px;
}

.swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 7px;
  vertical-align: 1px;
  background: var(--swatch, var(--an-ink-faint));
}

.name { font-weight: 600; }
.name-sub { font-size: 12px; color: var(--an-ink-faint); margin-top: 1px; }
.muted { color: var(--an-ink-faint); }

.guest-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--an-warn);
  margin-left: 6px;
}

.note {
  color: var(--an-warn);
  font-weight: 600;
}

.check-cell { width: 30px; }
.check-cell input { width: 15px; height: 15px; cursor: pointer; margin-top: 1px; }
.att-table tr.checked td:not(.check-cell) { opacity: 0.4; text-decoration: line-through; }

/* ---------- states ---------- */

.state {
  background: var(--an-paper);
  border: 1px solid var(--an-line);
  border-radius: 5px;
  padding: 40px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--an-ink-soft);
  font-size: 13.5px;
}

.state strong { color: var(--an-ink); font-size: 15px; }
.state--error { border-color: #f0c8c8; background: var(--an-bad-soft); }
.state--error strong { color: var(--an-bad); }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--an-line);
  border-top-color: var(--an-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 26px;
  font-size: 12px;
  color: var(--an-ink-faint);
  border-top: 1px solid var(--an-line);
}

/* ---------- print: the kitchen sheet ---------- */

@media print {
  @page { margin: 10mm; }

  body { background: #fff; }

  .topbar,
  .intro__actions,
  .event-nav,
  .footer,
  .check-cell input { display: none !important; }

  .shell { max-width: none; padding: 0; }
  .intro { margin-bottom: 8px; }
  .intro h1 { font-size: 15px; }

  .status { padding: 6px 0 8px; margin-bottom: 10px; font-size: 11px; }
  .venue-notes { background: #fff; border: 1px solid #999; margin-bottom: 10px; font-size: 11px; }

  .table-wrap { border-color: #999; margin-bottom: 12px; overflow: visible; }
  table { font-size: 10.5px; }
  thead { display: table-header-group; }
  thead th { background: #eee; padding: 4px 6px; }
  tbody td { padding: 4px 6px; }
  tr { break-inside: avoid; }

  .att-table tr[hidden] { display: table-row !important; }
  .att-table tr.group-row td { background: #eee !important; border-color: #666; }
  .group-toggle { padding: 3px 6px; font-size: 10.5px; }
  .caret { display: none; }
  .table-toolbar .button { display: none; }
  .swatch { border: 1px solid #666; }

  /* Something to tick against as plates go out. */
  .check-cell::after {
    content: "";
    display: block;
    width: 11px;
    height: 11px;
    border: 1px solid #333;
    border-radius: 2px;
  }
}
