:root {
  --hh-navy: #0b1f33;
  --hh-navy-2: #12304a;
  --hh-ember: #a82820;
  --hh-ember-deep: #7a1f18;
  --hh-ember-bright: #c43528;
  --hh-ember-soft: rgba(168, 40, 32, 0.1);
  --hh-gold: #c4a574;
  --hh-gold-bright: #e8d4b0;
  --hh-ink: #1a1a1a;
  --hh-muted: #5c5c5c;
  --hh-bg: #faf9f7;
  --hh-panel: #ffffff;
  --hh-sand: #f0ebe4;
  --hh-line: #e5ddd3;
  --hh-ok: #2f6b45;
  --hh-warn: #9a3412;
  --hh-radius: 12px;
  --hh-shadow: 0 1px 2px rgba(11, 31, 51, 0.04), 0 8px 24px rgba(11, 31, 51, 0.05);
  font-family: "Heebo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--hh-bg);
  color: var(--hh-ink);
  min-height: 100vh;
}

.validation-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #7a1f18, #a82820);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.55rem 1rem;
  box-shadow: 0 2px 8px rgba(11, 31, 51, 0.18);
}

.muted {
  color: var(--hh-muted);
}

.error-text {
  color: var(--hh-ember-deep);
  font-weight: 600;
}

.app-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px 2rem;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hh-line);
  margin-bottom: 1rem;
  background: var(--hh-panel);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.header-logo {
  height: 36px;
  width: auto;
  display: block;
}

.header-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--hh-navy);
  line-height: 1.2;
}

.header-user {
  font-size: 0.8rem;
  color: var(--hh-muted);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--hh-line);
  background: var(--hh-sand);
  color: var(--hh-navy);
}

.badge-staging {
  background: var(--hh-ember-soft);
  border-color: #e8b4ae;
  color: var(--hh-ember-deep);
}

.main-pane {
  display: grid;
  gap: 1rem;
}

.search-panel {
  background: var(--hh-panel);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  box-shadow: var(--hh-shadow);
  padding: 1rem;
}

.search-input {
  width: 100%;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--hh-line);
  background: #fff;
  color: var(--hh-ink);
}

.search-input:focus {
  outline: 2px solid var(--hh-ember);
  outline-offset: 1px;
  border-color: var(--hh-ember);
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hh-muted);
  margin: 0.85rem 0 0.45rem;
  letter-spacing: 0.02em;
}

.product-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.product-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--hh-line);
  background: #fff;
  color: var(--hh-ink);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.product-chip:hover:not(:disabled) {
  border-color: var(--hh-gold);
  background: #fffaf3;
}

.product-chip:focus-visible {
  outline: 2px solid var(--hh-ember);
  outline-offset: 2px;
}

.product-chip.selected {
  background: var(--hh-navy);
  border-color: var(--hh-navy);
  color: #fff;
}

.product-chip.selected .chip-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.product-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chip-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--hh-sand);
  color: var(--hh-navy);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}

.product-chip.cat-GAS.selected,
.badge.cat-GAS {
  --tone: #a82820;
}
.product-chip.cat-WOOD.selected {
  background: #5c4033;
  border-color: #5c4033;
}
.product-chip.cat-PELLET.selected {
  background: #6b5a40;
  border-color: #6b5a40;
}
.product-chip.cat-OIL.selected {
  background: #7a5c2e;
  border-color: #7a5c2e;
}
.product-chip.cat-ELECTRIC.selected {
  background: #2f4f6b;
  border-color: #2f4f6b;
}
.product-chip.cat-OUTDOOR_GRILL_SMOKER_HEATING.selected {
  background: #3f5d3a;
  border-color: #3f5d3a;
}
.product-chip.cat-OTHER.selected {
  background: #4a5560;
  border-color: #4a5560;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
  margin-top: 0.85rem;
}

.city-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--hh-muted);
  font-weight: 600;
}

.city-field input {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--hh-ink);
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--hh-line);
  min-width: 180px;
}

.city-field input:focus {
  outline: 2px solid var(--hh-ember);
  outline-offset: 1px;
}

.export-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-inline-start: auto;
  align-items: center;
}

.export-cluster select {
  font: inherit;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--hh-line);
  background: #fff;
}

.advanced-panel {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: var(--hh-sand);
  border: 1px solid var(--hh-line);
  display: grid;
  gap: 0.75rem;
}

.advanced-panel[hidden] {
  display: none !important;
}

.advanced-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
}

.op-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.65rem;
  min-height: 0.5rem;
}

.removable-chip {
  border: 1px solid #e8b4ae;
  background: var(--hh-ember-soft);
  color: var(--hh-ember-deep);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.search-meta {
  min-height: 1.35rem;
  margin: 0.65rem 0 0.35rem;
  color: var(--hh-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.search-meta.loading {
  color: var(--hh-ember);
}

.search-meta.error {
  color: var(--hh-ember-deep);
}

.btn {
  border: 0;
  border-radius: 9px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--hh-ember);
  color: #fff;
}

.btn:hover:not(:disabled) {
  background: var(--hh-ember-bright);
}

.btn:focus-visible {
  outline: 2px solid var(--hh-navy);
  outline-offset: 2px;
}

.btn.secondary {
  background: #fff;
  color: var(--hh-navy);
  border: 1px solid var(--hh-line);
}

.btn.ghost {
  background: transparent;
  color: var(--hh-navy);
  border: 1px solid transparent;
}

.btn.ghost:hover {
  background: var(--hh-sand);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.facet-hint {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  color: var(--hh-muted);
}

.export-cluster {
  position: relative;
  margin-inline-start: auto;
}

.export-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  inset-inline-end: 0;
  z-index: 20;
  display: grid;
  gap: 0.25rem;
  min-width: 16rem;
  padding: 0.45rem;
  background: #fff;
  border: 1px solid var(--hh-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 28, 63, 0.12);
}

.export-menu[hidden] {
  display: none;
}

.export-menu button {
  text-align: right;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--hh-navy);
}

.export-menu button:hover:not(:disabled) {
  background: var(--hh-sand);
}

.export-menu button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.selection-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin: 0.5rem 0;
  padding: 0.55rem 0.75rem;
  background: #fff7ef;
  border: 1px solid #f0d2b0;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.customer-table-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--hh-line);
  border-radius: 10px;
  background: #fff;
}

.customer-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

.customer-table th,
.customer-table td {
  padding: 0.32rem 0.45rem;
  border-bottom: 1px solid var(--hh-line);
  white-space: nowrap;
  vertical-align: middle;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-table tbody tr:nth-child(even) {
  background: #fcfbf9;
}

.customer-table th {
  position: sticky;
  top: 0;
  background: #f7f4ef;
  color: var(--hh-navy);
  font-weight: 800;
  z-index: 2;
}

.customer-table .col-check,
.customer-table .col-name,
.customer-table .col-phone {
  position: sticky;
  background: inherit;
  z-index: 1;
}

.customer-table th.col-check,
.customer-table th.col-name,
.customer-table th.col-phone {
  z-index: 3;
  background: #f7f4ef;
}

.customer-table .col-check {
  inset-inline-end: 0;
  width: 2.2rem;
  text-align: center;
}

.customer-table .col-name {
  inset-inline-end: 2.2rem;
  min-width: 10rem;
  font-weight: 700;
}

.customer-table .col-phone {
  inset-inline-end: 12.2rem;
  min-width: 7.5rem;
}

.customer-row {
  cursor: pointer;
}

.customer-row:hover {
  background: #fffaf3 !important;
}

.customer-row.selected {
  background: #fff1e4 !important;
}

.customer-row:focus-visible {
  outline: 2px solid var(--hh-ember);
  outline-offset: -2px;
}

.story-card {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--hh-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #faf7f2 100%);
}

.story-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--hh-navy);
}

.story-card .story-meta {
  font-size: 0.8rem;
  color: var(--hh-muted);
  margin-bottom: 0.5rem;
}

.story-card .story-body {
  white-space: pre-wrap;
  line-height: 1.45;
  max-height: 6.5rem;
  overflow: hidden;
}

.story-card.expanded .story-body {
  max-height: none;
}

.story-empty {
  color: var(--hh-muted);
  font-style: italic;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, 0.35);
  z-index: 40;
  display: flex;
  justify-content: flex-start;
}

.drawer-panel {
  width: min(480px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 24px rgba(11, 31, 51, 0.18);
  overflow: auto;
  padding: 1rem 1.1rem 2rem;
}

.drawer-panel h2 {
  margin: 0 0 0.75rem;
  color: var(--hh-navy);
}

.drawer-section {
  margin: 0.85rem 0;
}

.drawer-section h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: var(--hh-navy);
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.activity-item {
  border-bottom: 1px solid var(--hh-line);
  padding: 0.65rem 0;
}

.activity-item .act-meta {
  font-size: 0.78rem;
  color: var(--hh-muted);
  margin-bottom: 0.25rem;
}

.activity-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0 0.75rem;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #fffaf3;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
}

.export-cluster {
  margin-inline-start: 0;
}

.main-pane {
  display: grid;
  gap: 1rem;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.page-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.list-error {
  padding: 0.85rem;
  border: 1px solid #e8b4ae;
  border-radius: 10px;
  background: #fff5f3;
}

.result-list {
  display: grid;
  gap: 0.5rem;
}

.result-card {
  width: 100%;
  text-align: right;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--hh-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.result-card:hover,
.result-card.active {
  border-color: var(--hh-gold);
  background: #fffaf3;
}

.result-card:focus-visible {
  outline: 2px solid var(--hh-ember);
  outline-offset: 1px;
}

.result-name {
  font-weight: 800;
  color: var(--hh-navy);
  margin-bottom: 0.25rem;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: var(--hh-muted);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.result-side {
  display: grid;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--hh-muted);
  text-align: left;
  min-width: 9rem;
}

.result-side .warn {
  color: var(--hh-warn);
  font-weight: 700;
}

.side-label {
  color: var(--hh-muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.badge {
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--hh-sand);
  color: var(--hh-navy);
  border: 1px solid var(--hh-line);
}

.badge.cat-GAS {
  background: #fde8e6;
  color: #7a1f18;
  border-color: #f0c4bf;
}
.badge.cat-WOOD {
  background: #f3ebe4;
  color: #5c4033;
  border-color: #e0d0c2;
}
.badge.cat-PELLET {
  background: #f3efe6;
  color: #6b5a40;
  border-color: #ddd3bc;
}
.badge.cat-OIL {
  background: #f7f0e2;
  color: #7a5c2e;
  border-color: #e5d5b0;
}
.badge.cat-ELECTRIC {
  background: #e8eef4;
  color: #2f4f6b;
  border-color: #c5d3e0;
}
.badge.cat-OUTDOOR_GRILL_SMOKER_HEATING {
  background: #eaf2e8;
  color: #3f5d3a;
  border-color: #c9dbc5;
}
.badge.cat-OTHER {
  background: #eef0f2;
  color: #4a5560;
  border-color: #d5d9de;
}

mark {
  background: #fde68a;
  color: inherit;
  border-radius: 2px;
  padding: 0 0.1em;
}

.match-reason {
  font-size: 0.72rem;
  color: var(--hh-muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

.prov-pill {
  display: inline-block;
  margin-inline-start: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #fff3cd;
  color: #7a5c2e;
  border: 1px solid #f0dfa8;
  vertical-align: middle;
}

.dash-compact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.dash-tile {
  background: var(--hh-panel);
  border: 1px solid var(--hh-line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}

.dash-label {
  font-size: 0.75rem;
  color: var(--hh-muted);
  font-weight: 600;
}

.dash-n {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--hh-navy);
  margin-top: 0.15rem;
}

.footnote {
  color: var(--hh-muted);
  font-size: 0.85rem;
  margin: 0;
}

.workspace-header {
  background: var(--hh-panel);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  box-shadow: var(--hh-shadow);
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.workspace-header .title {
  margin: 0;
  font-size: 1.45rem;
  color: var(--hh-navy);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  color: var(--hh-muted);
  font-size: 0.92rem;
}

.address-card {
  background: #fff;
  border: 1px solid var(--hh-line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}

.addr-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1rem;
}

.addr-row dt {
  font-size: 0.75rem;
  color: var(--hh-muted);
}

.addr-row dd {
  margin: 0;
  font-weight: 700;
}

.biz1-raw {
  margin-top: 0.55rem;
}

.biz1-raw summary {
  cursor: pointer;
  color: var(--hh-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tab {
  border: 1px solid var(--hh-line);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.tab.active {
  background: var(--hh-navy);
  color: #fff;
  border-color: var(--hh-navy);
}

.panel {
  background: var(--hh-panel);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  padding: 0.85rem;
  min-height: 180px;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: right;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--hh-line);
  font-size: 0.9rem;
  vertical-align: top;
}

th {
  color: var(--hh-muted);
  font-weight: 700;
}

.empty {
  color: var(--hh-muted);
  padding: 0.75rem 0;
}

.timeline-item {
  border-inline-start: 3px solid var(--hh-gold);
  padding: 0.35rem 0.7rem;
  margin: 0.35rem 0;
}

.kind-chip {
  display: inline-block;
  margin-inline-start: 0.3rem;
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: var(--hh-sand);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(700px 280px at 90% 0%, rgba(168, 40, 32, 0.08), transparent),
    var(--hh-bg);
}

.login-card {
  width: min(420px, 100%);
  background: var(--hh-panel);
  border: 1px solid var(--hh-line);
  border-radius: 14px;
  box-shadow: var(--hh-shadow);
  padding: 1.4rem;
  display: grid;
  gap: 0.45rem;
}

.login-logo {
  height: 42px;
  width: auto;
  margin-bottom: 0.25rem;
}

.login-card h1 {
  margin: 0;
  color: var(--hh-navy);
  font-size: 1.35rem;
}

.login-card label {
  font-size: 0.85rem;
  color: var(--hh-muted);
  font-weight: 600;
}

.login-card input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--hh-line);
  font: inherit;
  margin-bottom: 0.35rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 40;
}

.modal {
  width: min(540px, 100%);
  background: var(--hh-panel);
  border-radius: 14px;
  border: 1px solid var(--hh-line);
  padding: 1rem;
  max-height: 90vh;
  overflow: auto;
  display: grid;
  gap: 0.35rem;
}

.modal h2 {
  margin: 0;
  color: var(--hh-navy);
}

.modal label {
  font-size: 0.85rem;
  color: var(--hh-muted);
  font-weight: 600;
}

.modal select,
.modal input,
.modal textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--hh-line);
  font: inherit;
}

.modal pre {
  white-space: pre-wrap;
  font-size: 0.8rem;
}

@media (max-width: 960px) {
  .dash-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .result-card {
    grid-template-columns: 1fr;
  }
  .result-side {
    text-align: right;
  }
}

@media (max-width: 720px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .addr-grid {
    grid-template-columns: 1fr;
  }
  .export-cluster {
    margin-inline-start: 0;
    width: 100%;
  }
  .toolbar-row {
    align-items: stretch;
  }
}

/* —— Side navigation / office UX —— */
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
  gap: 0;
}

.layout.nav-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.side-nav {
  background: var(--hh-navy, #0b1f33);
  color: #f4f7fb;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}

.nav-collapse {
  align-self: flex-start;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: inherit;
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.side-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: right;
  background: transparent;
  border: none;
  color: inherit;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: rgba(242, 169, 59, 0.22);
  outline: 1px solid rgba(242, 169, 59, 0.55);
}

.nav-icon {
  flex: 0 0 1.5rem;
  text-align: center;
}

.nav-collapsed .nav-label {
  display: none;
}

.layout-main {
  min-width: 0;
}

.convenience-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1rem 0;
}

.recent-fav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.85rem;
}

.recent-fav details > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.recent-link {
  font-size: 0.8rem;
}

mark.hl {
  background: #ffe566;
  color: inherit;
  padding: 0 0.1em;
  border-radius: 2px;
  box-decoration-break: clone;
}

.match-reason {
  font-size: 0.72rem;
  color: var(--hh-muted, #5b6b7c);
  margin-top: 0.15rem;
}

.match-reason.approx {
  color: #9a5b00;
  font-weight: 600;
}

.match-diag {
  font-size: 0.68rem;
}

.urgent-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #c0392b;
  margin-inline-end: 0.25rem;
  vertical-align: middle;
}

.fav-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 0.15rem;
  font-size: 0.95rem;
  color: #c48a1a;
}

td.warn {
  color: #b33;
  font-weight: 700;
}

.ops-page {
  padding: 0.5rem 0 1.5rem;
}

.ops-toolbar {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ops-toolbar h2 {
  margin: 0;
  color: var(--hh-navy);
}

.cal-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1rem;
}

.cal-event,
.queue-item {
  display: block;
  width: 100%;
  text-align: right;
  border: 1px solid var(--hh-line);
  background: var(--hh-panel);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  font: inherit;
}

.cal-event:hover,
.queue-item:hover {
  border-color: var(--hh-navy);
}

.cal-queue h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ops-table th,
.ops-table td {
  border-bottom: 1px solid var(--hh-line);
  padding: 0.45rem 0.5rem;
  text-align: right;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: rgba(11, 31, 51, 0.04);
}

.google-cal-status {
  font-size: 0.9rem;
}

.data-freshness {
  border: 1px solid var(--hh-line);
  background: #fff8e8;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin: 0.5rem 0 0.85rem;
  font-size: 0.85rem;
  display: grid;
  gap: 0.2rem;
}

.data-freshness.stale {
  border-color: #c48a1a;
}

.fresh-title {
  font-weight: 700;
  color: var(--hh-navy);
}

.fresh-warn {
  color: #8a4b00;
  font-weight: 600;
  margin-top: 0.25rem;
}

.approx-banner,
.empty-direct {
  margin: 0.5rem 0 0.75rem;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .layout .nav-label {
    display: none;
  }
  .cal-layout {
    grid-template-columns: 1fr;
  }
}
