/* ==========================================================================
   Gas Plant Comparison Arena — Host Dashboard Styles
   Complements assets/css/theme.css with a commanding Host Control Center,
   live analytics visualizations, responsive layout, and @media print support.
   ========================================================================== */

.dashboard-body {
  min-height: 100vh;
  padding: 16px 20px 48px;
  color: #1e1b4b;
  position: relative;
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Top Command Header
   -------------------------------------------------------------------------- */
.dash-header {
  max-width: 1440px;
  margin: 0 auto 18px;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 18px;
  color: #ffffff;
  position: relative;
  z-index: 2;
}

.dash-header-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

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

.dash-brand-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.dash-title {
  margin: 0;
  font-family: 'Fredoka', 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
}

.dash-subtitle {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
}

.dash-header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.sync-telemetry-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: rgba(15, 10, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 10px;
  border-radius: 999px;
}

.telemetry-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}

.telemetry-chip strong {
  color: #ffffff;
  font-weight: 700;
}

.telemetry-online strong {
  color: #6ee7b7;
}

.polling-selector {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.88);
  padding-left: 4px;
}

.polling-selector select {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.polling-selector select option {
  color: #111827;
  background: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot.is-offline {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
}

/* --------------------------------------------------------------------------
   Main Grid & Cards
   -------------------------------------------------------------------------- */
.dash-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 2;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(420px, 1.35fr);
  gap: 18px;
}

.white-card {
  padding: 20px 22px;
  border-radius: 20px;
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wrap-row {
  flex-wrap: wrap;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d28d9;
  margin-bottom: 2px;
}

.white-card h2 {
  margin: 0;
  font-family: 'Fredoka', 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.25rem;
  color: #1e1b4b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.white-card h3 {
  margin: 0 0 8px;
  font-family: 'Fredoka', 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.05rem;
  color: #1e1b4b;
}

/* Badges & Pills */
.mode-status-badge,
.round-phase-pill,
.count-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.mode-status-badge {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.mode-status-badge.is-lobby {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.mode-status-badge.is-paused {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.mode-status-badge.is-finished {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.round-phase-pill {
  background: #ede9fe;
  color: #5b21b6;
}

.count-pill {
  background: #46178f;
  color: #ffffff;
  font-size: 0.78rem;
  padding: 2px 10px;
}

/* Buttons size helpers & light-surface ghost override */
.btn-sm {
  padding: 8px 13px !important;
  font-size: 0.84rem !important;
}

.btn-xs {
  padding: 5px 10px !important;
  font-size: 0.76rem !important;
}

.white-card .btn-3d.btn-ghost,
.modal-card .btn-3d.btn-ghost {
  --btn-bg: #f3f4f6;
  --btn-hover: #e5e7eb;
  --btn-shadow: #cbd5e1;
  --btn-color: #1f2937;
  border: 1.5px solid #d1d5db;
}

/* Inputs & Selects */
.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: 5px;
}

.dash-input,
.dash-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  color: #111827;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dash-input:focus,
.dash-select:focus {
  outline: none;
  border-color: #6d28d9;
  background: #ffffff;
}

.mono-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

/* --------------------------------------------------------------------------
   Room Share & QR Card
   -------------------------------------------------------------------------- */
.room-share-layout {
  display: grid;
  grid-template-columns: 158px 1fr;
  gap: 16px;
  align-items: center;
}

.qr-preview-box {
  width: 158px;
  height: 158px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(30, 27, 75, 0.08);
  cursor: pointer;
}

.qr-preview-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.room-share-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

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

.copy-url-row .dash-input {
  flex: 1;
  min-width: 0;
}

.pin-control-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  padding: 10px 14px;
}

.pin-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pin-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #6d28d9;
  letter-spacing: 0.06em;
}

.pin-code {
  font-family: 'Fredoka', ui-monospace, monospace;
  font-size: 1.55rem;
  letter-spacing: 0.12em;
  color: #2e1065;
}

.pin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

/* Toggle Switch */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d1d5db;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: #26890c;
}

.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(18px);
}

.toggle-text {
  font-size: 0.84rem;
  font-weight: 600;
  color: #374151;
}

/* --------------------------------------------------------------------------
   Game Mode & Match Controls
   -------------------------------------------------------------------------- */
.mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.mode-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 11px 14px;
  border-radius: 14px;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-option-btn:hover {
  border-color: #a78bfa;
  background: #f5f3ff;
}

.mode-option-btn.is-active {
  border-color: #46178f;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  color: #2e1065;
  box-shadow: 0 4px 12px rgba(70, 23, 143, 0.14);
}

.mode-icon {
  font-size: 1.55rem;
  line-height: 1;
}

.mode-option-btn strong {
  display: block;
  font-size: 0.94rem;
}

.mode-option-btn small {
  display: block;
  font-size: 0.76rem;
  color: #6b7280;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 12px;
  margin-bottom: 14px;
}

.inline-input-group {
  display: flex;
  gap: 6px;
}

.setting-toggles {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 2px;
}

.match-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

/* --------------------------------------------------------------------------
   Live Kahoot Stage / Race Progress Panel
   -------------------------------------------------------------------------- */
.stage-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #1f2937;
  font-size: 0.82rem;
  font-weight: 700;
}

.stage-badge.is-primary {
  background: #ede9fe;
  color: #5b21b6;
}

.stage-badge.is-live {
  background: #dcfce7;
  color: #15803d;
}

.kahoot-stage-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kahoot-question-banner {
  background: linear-gradient(135deg, #2b0f63, #46178f);
  color: #ffffff;
  border-radius: 16px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.kahoot-q-phase {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.white-card .kahoot-question-banner h3,
.kahoot-question-banner .kahoot-q-prompt {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
}

.kahoot-q-sub {
  margin: 6px 0 0;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.9);
}

.kahoot-q-sub strong {
  color: #ffffff;
}

.kahoot-timer-box {
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 10px 18px;
  min-width: 112px;
}

.kahoot-timer-num {
  display: block;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 2rem;
  line-height: 1;
  color: #ffffff;
}

.kahoot-timer-num.is-urgent {
  color: #fca5a5;
}

.kahoot-timer-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.8);
}

.countdown-bar-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.countdown-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #26890c, #d89e00);
  transition: width 0.2s linear;
}

.countdown-bar-fill.is-urgent {
  background: linear-gradient(90deg, #e21b3c, #f97316);
}

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.dist-bar-card {
  border-radius: 12px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
}

.dist-bar-card.is-correct {
  border-color: #26890c;
  background: #f0fdf4;
}

.dist-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.dist-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.dist-bar-fill {
  height: 100%;
  border-radius: 999px;
}

/* Race Mode Progress Panel */
.race-overview-bar {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.race-overview-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3b0764;
  margin-bottom: 8px;
}

.race-lanes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.race-lane {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 9px 12px;
}

.race-lane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.mini-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #46178f, #1368ce, #26890c);
  transition: width 0.3s ease;
}

/* --------------------------------------------------------------------------
   Live Player Telemetry Table
   -------------------------------------------------------------------------- */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 10px;
}

.search-box .dash-input {
  border: none;
  background: transparent;
  padding: 7px 4px;
  width: 190px;
}

.filter-online-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}

.table-responsive {
  overflow-x: auto;
}

.telemetry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.telemetry-table th {
  text-align: left;
  padding: 10px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.telemetry-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.telemetry-table tbody tr:hover {
  background: #f9fafb;
}

.empty-table-cell {
  text-align: center;
  padding: 26px 12px !important;
  color: #6b7280;
  font-weight: 600;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.9rem;
  background: #f3f4f6;
  color: #374151;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.player-avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: #ede9fe;
  border: 2px solid #ddd6fe;
  flex-shrink: 0;
}

.player-name-text {
  font-weight: 700;
  color: #111827;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.is-online {
  background: #dcfce7;
  color: #15803d;
}

.status-pill.is-offline {
  background: #f3f4f6;
  color: #6b7280;
}

.progress-cell-wrap {
  min-width: 135px;
}

.progress-cell-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: 4px;
}

.row-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Analytics & Reports Section
   -------------------------------------------------------------------------- */
.analytics-source-note {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 600;
}

.analytics-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.analytics-toolbar .dash-select {
  width: auto;
  min-width: 220px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card {
  background: linear-gradient(180deg, #faf5ff 0%, #f3f4f6 100%);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 13px 14px;
}

.kpi-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.kpi-value {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.55rem;
  color: #2e1065;
  display: block;
}

.kpi-value-sm {
  font-size: 1.05rem;
  line-height: 1.25;
}

.analytics-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}

.analytics-subcard {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
}

.subcard-hint {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: #6b7280;
}

.phase-chart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.phase-bar-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
}

.phase-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.phase-bar-track {
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.phase-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.hardest-questions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hardest-q-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #e21b3c;
  border-radius: 10px;
  padding: 9px 12px;
}

.hardest-q-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #111827;
}

.hardest-q-meta {
  font-size: 0.76rem;
  color: #6b7280;
}

.hardest-q-acc {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.05rem;
  color: #dc2626;
  white-space: nowrap;
}

.history-panel {
  border-top: 2px solid #f3f4f6;
  padding-top: 18px;
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
.modal-card {
  background: #ffffff;
  color: #111827;
  border-radius: 20px;
  padding: 20px 22px;
  max-width: 560px;
  width: 94%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.modal-wide {
  max-width: 1020px;
}

.modal-compact {
  max-width: 460px;
}

.qr-modal-card {
  max-width: 480px;
  text-align: center;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-header h2 {
  margin: 0;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.25rem;
}

.modal-close-btn {
  border: none;
  background: #f3f4f6;
  color: #374151;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.modal-close-btn:hover {
  background: #e5e7eb;
}

.qr-large-box {
  width: 320px;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 14px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 18px;
}

.qr-large-box svg {
  width: 100%;
  height: auto;
  display: block;
}

.qr-modal-url {
  font-family: ui-monospace, monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: #46178f;
  word-break: break-all;
  margin: 0 0 10px;
}

.qr-modal-pin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 12px;
  background: #fef3c7;
  border: 2px solid #f59e0b;
  color: #92400e;
}

.qr-modal-pin strong {
  font-family: 'Fredoka', monospace;
  font-size: 1.8rem;
  letter-spacing: 0.14em;
}

.player-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-modal-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ede9fe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.player-detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.detail-stat-chip {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  padding: 8px 12px;
}

.detail-stat-chip span {
  display: block;
  font-size: 0.72rem;
  color: #6b7280;
  font-weight: 700;
}

.detail-stat-chip strong {
  font-size: 1.1rem;
  color: #2e1065;
}

.detail-table-scroll {
  max-height: 55vh;
  overflow-y: auto;
}

.modal-body-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reset-warning-text {
  margin: 0;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #991b1b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
}

.checkbox-card input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
}

.checkbox-card strong {
  display: block;
  font-size: 0.9rem;
}

.checkbox-card small {
  display: block;
  font-size: 0.78rem;
  color: #6b7280;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.pin-error-msg {
  margin: 0;
  color: #dc2626;
  font-size: 0.84rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .control-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 780px) {
  .dashboard-body {
    padding: 12px 12px 36px;
  }

  .room-share-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .room-share-details {
    width: 100%;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .mode-switcher {
    grid-template-columns: 1fr;
  }

  .analytics-split-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .kahoot-question-banner {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Print / PDF Report Styling
   -------------------------------------------------------------------------- */
@media print {
  body.dashboard-body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
  }

  .bg-shapes,
  .dash-header,
  .control-grid,
  .live-stage-card,
  .no-print,
  .modal-backdrop,
  .toast-container {
    display: none !important;
  }

  .white-card {
    box-shadow: none !important;
    border: 1px solid #d1d5db !important;
    break-inside: avoid;
    margin-bottom: 14px;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
