/* Soniv Host Hub — mobile-first (375px+) + desktop (768px+) */

.host-hub-page {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .host-hub-page {
    padding-bottom: 3rem;
  }
  .host-hub-bottom-nav {
    display: none;
  }
}

.host-hub-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(8, 10, 15, 0.97);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.host-hub-bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 32rem;
  margin: 0 auto;
}

.host-hub-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.host-hub-tab:active {
  background: rgba(255, 255, 255, 0.06);
}

.host-hub-tab.is-active {
  color: #ff6b1a;
}

.host-hub-tab-icon {
  font-size: 1.125rem;
  line-height: 1;
}

/* —— Pulse dashboard —— */

.pulse-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .pulse-top-row {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 360px);
    gap: 1.25rem;
    align-items: stretch;
  }
}

.pulse-hero {
  background: linear-gradient(145deg, #0d1117, #121a28);
  border: 1px solid rgba(255, 107, 26, 0.25);
  border-radius: 1.25rem;
  padding: 0;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .pulse-hero {
    border-radius: 1.5rem;
  }
}

.pulse-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.pulse-hero.has-image .pulse-hero-bg {
  opacity: 0.35;
}

.pulse-hero.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, color-mix(in srgb, var(--color-bg) 92%, transparent), color-mix(in srgb, var(--color-surface) 88%, transparent));
  pointer-events: none;
}

.pulse-hero-content {
  position: relative;
  z-index: 1;
  padding: 1rem 1.125rem;
}

@media (min-width: 640px) {
  .pulse-hero-content {
    padding: 1.25rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .pulse-hero-content {
    padding: 1.5rem 1.75rem;
  }
}

.pulse-hero-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff8c42;
  margin-bottom: 0.35rem;
}

.pulse-hero-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .pulse-hero-title {
    font-size: 1.125rem;
  }
}

.pulse-hero-metric {
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.pulse-hero-metric span {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
}

.pulse-hero-sub {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.35rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.pulse-hero-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: #00e5ff;
  margin-top: 0.25rem;
}

.pulse-stripe-banner {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(255, 107, 26, 0.06));
}

@media (min-width: 640px) {
  .pulse-stripe-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.pulse-stripe-banner-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

.pulse-stripe-banner-text {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.15rem;
}

.pulse-stripe-banner-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0.625rem 1.125rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  background: #00e5ff;
  color: #0a0a0a;
  border: none;
  cursor: pointer;
}

.pulse-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pulse-chart-head .pulse-chart-title {
  margin-bottom: 0;
}

.pulse-chart-total {
  font-size: 0.75rem;
  font-weight: 600;
  color: #00e5ff;
  white-space: nowrap;
}

#host-refresh-btn.is-spinning {
  animation: pulse-spin 0.7s linear infinite;
}

@keyframes pulse-spin {
  to {
    transform: rotate(360deg);
  }
}

.pulse-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.75rem 0 0.5rem;
  overflow: hidden;
}

.pulse-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6b1a, #ff4500);
  transition: width 0.4s ease;
}

.pulse-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.pulse-btn-primary {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b1a, #ff4500);
  color: #0a0a0a;
  text-decoration: none;
}

.pulse-btn-ghost {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-decoration: none;
}

.pulse-chip-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .pulse-chip-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.pulse-chip {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 0.75rem 0.875rem;
}

@media (min-width: 1024px) {
  .pulse-chip {
    padding: 1rem 1.125rem;
  }
}

.pulse-chip-label {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.pulse-chip-value {
  font-size: clamp(1rem, 3.5vw, 1.375rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: #fff;
}

.pulse-chip-value.accent {
  color: #ff6b1a;
}

.pulse-chip-hint {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.2rem;
}

.pulse-chart-card {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  padding: 1rem 1.125rem;
}

@media (min-width: 1024px) {
  .pulse-chart-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }
}

.pulse-chart-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
}

.pulse-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.35rem;
  height: 7rem;
}

@media (min-width: 1024px) {
  .pulse-chart-bars {
    flex: 1;
    height: auto;
    min-height: 8rem;
    max-height: 10rem;
  }
}

.pulse-chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.pulse-chart-bar {
  width: 100%;
  max-width: 2.5rem;
  min-height: 4px;
  border-radius: 0.35rem 0.35rem 0 0;
  background: linear-gradient(180deg, #00e5ff, rgba(0, 229, 255, 0.35));
  transition: height 0.35s ease;
}

.pulse-chart-bar-label {
  font-size: 0.5625rem;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 375px) {
  .pulse-chart-bar-label {
    font-size: 0.625rem;
  }
}

.pulse-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}

.pulse-events-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

@media (min-width: 768px) {
  .pulse-events-header h2 {
    font-size: 1.5rem;
  }
}

.pulse-event-card {
  display: block;
  background: linear-gradient(145deg, #0d1117, #111520);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

.pulse-event-card:hover {
  border-color: rgba(255, 107, 26, 0.35);
}

.pulse-event-card-thumb {
  height: 7rem;
  background-size: cover;
  background-position: center;
  background-color: #111827;
  position: relative;
}

.pulse-event-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}

.pulse-badge-soldout {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.pulse-badge-low {
  background: rgba(251, 191, 36, 0.95);
  color: #0a0a0a;
}

.pulse-badge-soon,
.pulse-badge-live {
  background: rgba(255, 107, 26, 0.95);
  color: #0a0a0a;
}

.pulse-event-capacity {
  margin-top: 0.75rem;
}

.pulse-event-capacity-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pulse-event-capacity-bar div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6b1a, #ff4500);
  transition: width 0.35s ease;
}

.pulse-event-capacity-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.45);
}

@media (min-width: 768px) {
  .pulse-event-card-thumb {
    height: 8.5rem;
  }
}

.pulse-event-card-body {
  padding: 1rem 1.125rem;
}

.pulse-event-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.pulse-event-card-meta {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
}

.pulse-event-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pulse-event-stat-label {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.4);
}

.pulse-event-stat-value {
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.pulse-event-stat-value.accent {
  color: #ff6b1a;
}

.pulse-event-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pulse-event-actions a,
.pulse-event-actions button {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem;
  border-radius: 0.5rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.pulse-event-actions .action-gate {
  background: rgba(255, 107, 26, 0.15);
  color: #ff8c42;
  border: 1px solid rgba(255, 107, 26, 0.3);
}

.pulse-event-actions .action-view {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

.pulse-event-actions .action-share {
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.08);
  color: #7eeeff;
  cursor: pointer;
  font-family: inherit;
}

.host-hub-stat-value {
  font-size: 1.25rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  .host-hub-stat-value {
    font-size: 1.75rem;
  }
}

.host-hub-sidebar {
  display: none;
}

@media (min-width: 768px) {
  .host-hub-layout {
    display: grid;
    grid-template-columns: 12rem 1fr;
    gap: 2rem;
    align-items: start;
  }
  .host-hub-sidebar {
    display: block;
    position: sticky;
    top: 6rem;
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    padding: 0.75rem;
  }
  .host-hub-sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
  }
  .host-hub-sidebar a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }
  .host-hub-sidebar a.is-active {
    background: rgba(255, 107, 26, 0.15);
    color: #ff6b1a;
  }
}

.host-touch-target {
  min-height: 44px;
  min-width: 44px;
}

/* Gate QR scanner */
.gate-qr-reader-wrap {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 107, 26, 0.35);
  background: #000;
  min-height: 220px;
}

.gate-qr-reader {
  width: 100%;
  min-height: 220px;
}

.gate-qr-reader-wrap video {
  border-radius: 1.25rem;
  object-fit: cover;
}

.gate-qr-reader-wrap #qr-reader__scan_region {
  background: #000 !important;
}

.gate-qr-reader-wrap #qr-reader__dashboard_section_csr span,
.gate-qr-reader-wrap #qr-reader__dashboard_section_fsr span {
  color: rgba(255, 255, 255, 0.7) !important;
}

@media (max-width: 390px) {
  .gate-qr-reader-wrap,
  .gate-qr-reader {
    min-height: 200px;
  }
}

.host-hub-page-header h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
}
