.operator-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: #1a1a2e;
  color: #fff;
}
.operator-nav .brand { margin: 0; }
.operator-nav .brand h1 { margin: 0; font-size: 1.25rem; }
.operator-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.operator-nav .nav-links a {
  color: #a5b4fc;
  text-decoration: none;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.operator-nav .nav-links a:hover { text-decoration: underline; }
.operator-nav .nav-toggle {
  display: none;
  background: none;
  border: 1px solid #a5b4fc;
  color: #a5b4fc;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  min-height: 44px;
  align-items: center;
}

.btn-primary, .btn-secondary { min-height: 44px; }
.operator-nav a { min-height: 44px; }

/* Nav badge — pill rendered inside the "Invoices" nav link to surface the
   operator's open alert count. Hidden by default; renderAlerts shows it. */
.nav-badge {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 6px;
  line-height: 1.4;
  min-width: 18px;
  text-align: center;
}

/* Action Required card — pills + compact row list */
.alert-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}
.alert-pill.flagged { background: #fef3c7; color: #92400e; }
.alert-pill.rejected { background: #fee2e2; color: #991b1b; }
.alert-pill.discrepancy { background: #ede9fe; color: #5b21b6; }
.alert-pill.discrepancy:hover,
.alert-pill.flagged:hover,
.alert-pill.rejected:hover { filter: brightness(0.96); }

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 10px 4px;
  border-top: 1px solid #f3f4f6;
  text-decoration: none;
  color: inherit;
}
.alert-row:first-child { border-top: none; }
.alert-row:hover { background: #fafafa; }
.alert-row-main { min-width: 0; flex: 1; }
.alert-row-vendor {
  color: #1a1a2e;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
}
.alert-row-meta { color: #6b7280; font-size: 0.75rem; margin-top: 2px; }
.alert-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.alert-row-amount { color: #1a1a2e; font-weight: 600; font-size: 0.875rem; }

table.invoice-table tr.alert-row-target td { background: #fff7ed; }
table.invoice-table tr.alert-row-target:target td { background: #fef3c7; }

@media (max-width: 768px) {
  .operator-nav .nav-links { display: none; }
  .operator-nav .nav-toggle { display: inline-flex; }

  body.nav-open .operator-nav .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    right: 0;
    left: 0;
    background: #1a1a2e;
    padding: 1rem;
    gap: 0.75rem;
    z-index: 10;
  }

  .summary-strip { flex-direction: column; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn-primary, .cta-row .cta-link { width: 100%; justify-content: center; }

  .loc-row { flex-direction: column; align-items: stretch; }
  .loc-row select { min-width: 0; width: 100%; }

  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-row label { margin-top: 0.5rem; }
  .filter-row select, .filter-row input[type="date"], .filter-row .btn {
    width: 100%;
  }

  .stat-row { flex-direction: column; }

  table.invoice-table thead { display: none; }
  table.invoice-table,
  table.invoice-table tbody,
  table.invoice-table tr,
  table.invoice-table td {
    display: block;
    width: 100%;
  }
  table.invoice-table tr {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
  }
  table.invoice-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: none;
    gap: 0.75rem;
  }
  table.invoice-table td::before {
    content: attr(data-label);
    flex: 0 0 45%;
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
  }
}
