#pageStatus {
  margin: 24px 24px 0;
}

#inventoryAppRoot > .page {
  display: none;
  padding: 0;
  gap: 0;
}

#inventoryAppRoot > .page.active {
  display: flex;
}

#inventoryAppRoot .header {
  display: none;
}

#inventoryAppRoot .badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

#inventoryAppRoot .inventory-note {
  font-size: 12px;
  color: var(--text-muted);
}

#inventoryAppRoot .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

#inventoryAppRoot .checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

#inventoryAppRoot .checkbox-inline input {
  width: auto;
}

#inventoryAppRoot .status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

#inventoryAppRoot .status-pill.yes {
  background: #dcfce7;
  color: #166534;
}

#inventoryAppRoot .status-pill.no {
  background: #e5e7eb;
  color: #374151;
}

#inventoryAppRoot .route-group-list {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#inventoryAppRoot .route-group-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
}

#inventoryAppRoot .route-group-header {
  width: 100%;
  border: none;
  background: #f8fafc;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

#inventoryAppRoot .route-group-header:hover {
  background: #f1f5f9;
}

#inventoryAppRoot .route-group-header-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

#inventoryAppRoot .route-group-caret {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  transition: transform .15s ease;
}

#inventoryAppRoot .route-group-caret.open {
  transform: rotate(90deg);
}

#inventoryAppRoot .route-group-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

#inventoryAppRoot .route-group-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

#inventoryAppRoot .route-group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

#inventoryAppRoot .route-group-body {
  padding: 0 16px 16px;
}

#inventoryAppRoot .route-group-empty {
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  background: #fafafa;
}

#inventoryAppRoot .route-group-table th,
#inventoryAppRoot .route-group-table td {
  padding: 12px 10px;
}

#inventoryAppRoot .route-date-widget {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#inventoryAppRoot .route-date-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

#inventoryAppRoot .route-date-calendar-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
}

#inventoryAppRoot .route-date-calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#inventoryAppRoot .route-date-calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#inventoryAppRoot .route-date-calendar-nav select {
  min-width: 180px;
}

#inventoryAppRoot .route-date-calendar-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdff;
  overflow: hidden;
}

#inventoryAppRoot .route-date-calendar-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

#inventoryAppRoot .route-date-calendar-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: capitalize;
}

#inventoryAppRoot .route-date-calendar-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

#inventoryAppRoot .route-date-weekdays,
#inventoryAppRoot .route-date-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

#inventoryAppRoot .route-date-weekdays {
  padding: 8px 10px 0;
}

#inventoryAppRoot .route-date-weekday {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  text-align: center;
  padding-bottom: 6px;
}

#inventoryAppRoot .route-date-days {
  padding: 0 10px 10px;
}

#inventoryAppRoot .route-date-day {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin: 2px;
  background: transparent;
  border: 1px solid transparent;
  padding: 0;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

#inventoryAppRoot .route-date-day.muted {
  color: #c0c7d1;
  font-weight: 500;
}

#inventoryAppRoot .route-date-day.discovered {
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

#inventoryAppRoot .route-date-day.discovered:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, .12);
}

#inventoryAppRoot .route-date-day.state-never {
  background: #e5e7eb;
  color: #111827;
  border-color: #d1d5db;
}

#inventoryAppRoot .route-date-day.state-stale {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

#inventoryAppRoot .route-date-day.state-fresh {
  background: #bbf7d0;
  color: #166534;
  border-color: #4ade80;
}

#inventoryAppRoot .route-date-day.night-match {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .18);
}

#inventoryAppRoot .route-date-day.verification-pending {
  background: #e5e7eb;
  color: #374151;
  border-color: #d1d5db;
}

#inventoryAppRoot .route-date-day.verification-hit {
  background: #bbf7d0;
  color: #166534;
  border-color: #4ade80;
}

#inventoryAppRoot .route-date-day.verification-miss {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

#inventoryAppRoot .route-date-day.today {
  outline: 2px solid #93c5fd;
  outline-offset: -2px;
}

#inventoryAppRoot .route-date-day.discovered.selected {
  border-color: #1f2937;
  box-shadow: inset 0 0 0 2px #1f2937;
}

#inventoryAppRoot .route-date-day.discovered.today.selected {
  outline-color: #1d4ed8;
}

#inventoryAppRoot .route-date-day.blocked {
  cursor: not-allowed;
  opacity: .68;
}

#inventoryAppRoot .route-date-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

#inventoryAppRoot .route-date-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

#inventoryAppRoot .route-date-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
}

#inventoryAppRoot .route-date-legend-swatch.state-never {
  background: #e5e7eb;
  border-color: #d1d5db;
}

#inventoryAppRoot .route-date-legend-swatch.state-stale {
  background: #fef3c7;
  border-color: #fcd34d;
}

#inventoryAppRoot .route-date-legend-swatch.state-fresh {
  background: #bbf7d0;
  border-color: #4ade80;
}

#inventoryAppRoot .route-date-legend-swatch.night-match {
  background: #2563eb;
  border-color: #2563eb;
}

#inventoryAppRoot .route-date-legend-swatch.verification-pending {
  background: #e5e7eb;
  border-color: #d1d5db;
}

#inventoryAppRoot .route-date-legend-swatch.verification-hit {
  background: #bbf7d0;
  border-color: #4ade80;
}

#inventoryAppRoot .route-date-legend-swatch.verification-miss {
  background: #fee2e2;
  border-color: #fca5a5;
}

#inventoryAppRoot .route-date-legend-swatch.selected {
  background: #fff;
  border: 2px solid #1f2937;
}

#inventoryAppRoot .route-date-legend-swatch.today {
  background: #fff;
  border: 2px solid #93c5fd;
}

#inventoryAppRoot .inventory-view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
}

#inventoryAppRoot .inventory-view-toggle button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

#inventoryAppRoot .inventory-view-toggle button + button {
  border-left: 1px solid var(--border);
}

#inventoryAppRoot .inventory-view-toggle button:hover {
  background: #f6f8fa;
  color: var(--text);
}

#inventoryAppRoot .inventory-view-toggle button.active {
  background: var(--primary);
  color: #fff;
}

#inventoryAppRoot .inventory-availability-group-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#inventoryAppRoot .inventory-availability-subgroup {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fbfdff;
}

#inventoryAppRoot .inventory-availability-subgroup-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

#inventoryAppRoot .inventory-availability-subgroup-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

#inventoryAppRoot .inventory-availability-subgroup-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

#inventoryAppRoot .inventory-availability-subgroup-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#inventoryAppRoot .inventory-availability-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#inventoryAppRoot .inventory-availability-date-table th,
#inventoryAppRoot .inventory-availability-date-table td {
  padding: 10px 12px;
}
