/* LineBuster Food Truck Dashboard (Front of House & TV Mode) */

.dashboard-layout {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  background: var(--bg-dark);
}

.dashboard-topbar {
  padding: 16px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), #e05d00);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.venue-tag {
  background: rgba(255, 107, 0, 0.15);
  color: var(--primary);
  border: 1px solid var(--primary-glow);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Dashboard Body Grid */
.dashboard-content {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 24px;
  padding: 24px;
  height: 100%;
  overflow: hidden;
  transition: grid-template-columns 0.4s ease;
}



.main-queue-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  overflow: hidden;
}

/* Metrics Banner */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
}

.metric-value.highlight {
  color: var(--primary);
}

/* Queue Table Container */
.table-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.table-header-row {
  display: grid;
  grid-template-columns: 75px 1.8fr 1.2fr 1fr;
  padding: 14px 20px;
  background: var(--bg-card-hover);
  border-bottom: 1px solid var(--border-color);
  font-weight: 800;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.queue-table-body {
  flex: 1;
  overflow-y: auto;
}

.queue-row {
  display: grid;
  grid-template-columns: 75px 1.8fr 1.2fr 1fr;
  padding: 16px 20px;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}


.queue-row:hover {
  background: var(--bg-card-hover);
}

.queue-row.called {
  background: rgba(255, 107, 0, 0.12);
  border-left: 4px solid var(--primary);
}

.pos-badge {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.patron-name {
  font-size: 1.125rem;
  font-weight: 700;
}

.row-actions {
  display: flex;
  gap: 8px;
}

/* Side Card (QR & Controls) */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.qr-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

/* HORIZONTAL COMPACT QR + PIN CONTAINER */
.horizontal-qr-card {
  padding: 16px !important;
}

.qr-horizontal-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.horizontal-qr-card .qr-canvas-container {
  width: 130px;
  height: 130px;
  padding: 8px;
  flex-shrink: 0;
}

.horizontal-qr-card .pin-display-box {
  flex: 1;
  padding: 8px 12px;
  text-align: left;
}



.qr-canvas-container {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}


.pin-display-box {
  background: var(--bg-dark);
  border: 1px dashed var(--primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  width: 100%;
}

.pin-number {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 4px;
}

.timer-indicator {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .dashboard-content {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* TV DASHBOARD FULL-VIEWPORT LAYOUT STYLING */
body.dashboard-mode #dashboard-view {
  height: 100vh !important;
  width: 100vw !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.dashboard-mode .dashboard-layout {
  height: 100vh !important;
  width: 100vw !important;
}

body.dashboard-mode .dashboard-content {
  height: calc(100vh - 24px) !important;
  width: calc(100vw - 32px) !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

body.dashboard-mode .side-panel #dash-stellar-nav-container {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

body.dashboard-mode .side-panel #dash-stellar-nav-container .stellar-nav-widget {
  height: 100% !important;
  margin-top: 0 !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

body.dashboard-mode .side-panel #dash-stellar-nav-container .stellar-nav-stage {
  flex: 1 !important;
  height: 100% !important;
  aspect-ratio: unset !important;
}

body.dashboard-mode .side-panel #dash-stellar-nav-container .stellar-nav-media {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* TV DASHBOARD AUTO-HIDE TOPBAR & FLOATING MENU */
body.dashboard-mode #app-header {
  display: none !important;
}


#dash-floating-menu-btn {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: opacity 0.5s ease, transform 0.2s ease;
}

#dash-floating-menu-btn.tv-menu-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ANTI-BURN-IN LAYOUT SWAPPING */
.dashboard-content {
  transition: grid-template-columns 0.5s ease;
}

.dashboard-content.burnin-swapped {
  grid-template-columns: 340px 1fr;
}

.dashboard-content.burnin-swapped .main-queue-panel {
  order: 2;
}

.dashboard-content.burnin-swapped .side-panel {
  order: 1;
}

/* STELLAR NAVIGATOR WIDGET (TV & PATRON) */
.stellar-nav-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  margin-top: 14px;
  width: 100%;
}

.stellar-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
}

.stellar-nav-title {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stellar-nav-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.stellar-nav-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.stellar-nav-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.stellar-nav-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stellar-nav-badge {
  display: none !important;
}

.stellar-nav-cta-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--primary), #e05d00);
  color: white;
  font-weight: 800;
  font-size: 0.8125rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.stellar-nav-cta-btn:hover {
  transform: scale(1.04);
}

.stellar-nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-dark);
  border-top: 1px solid var(--border-color);
}

.stellar-nav-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stellar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.stellar-dot.active {
  background: var(--primary);
  transform: scale(1.25);
}

/* Upgraded Documentation Reader Modal Styles */
.docs-modal-card {
  max-width: 1080px;
  width: 95%;
  height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  backdrop-filter: blur(16px);
  padding: 0 !important;
  color: var(--text-main);
}

.docs-modal-header {
  padding: 12px 20px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-main);
}

.docs-modal-body-wrap {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
}

.docs-sidebar {
  width: 280px;
  background: var(--bg-dark);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
  overflow-y: auto;
  padding: 16px 14px;
}

.docs-sidebar.collapsed {
  margin-left: -280px;
}

.docs-toc-item {
  margin-bottom: 4px;
  list-style: none;
}

.docs-toc-link {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}

.docs-toc-link:hover,
.docs-toc-link:focus,
.docs-toc-link.active-toc {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 700;
}

.docs-toc-h1 { font-weight: 800; color: var(--text-main); }
.docs-toc-h2 { padding-left: 10px; font-weight: 700; color: var(--text-main); }
.docs-toc-h3 { padding-left: 20px; font-size: 0.75rem; color: var(--text-muted); }

.docs-viewer-pane {
  flex: 1;
  overflow-y: auto;
  padding: 24px 36px;
  background: var(--bg-card);
  color: var(--text-main);
  line-height: 1.65;
}

mark.doc-search-match {
  background: var(--primary-glow);
  color: var(--primary);
  border-radius: 2px;
  padding: 0 3px;
  font-weight: 700;
}

mark.doc-search-match.active-match {
  background: var(--primary);
  color: var(--text-inverse);
  outline: 2px solid var(--primary);
}
