/* =========================================================
   OnRemark — Control Hub Section (P1)
   Real product UI. Not AI-generated dashboards.
   ========================================================= */

/* ---------- Section Container ---------- */
.control-hub {
  position: relative;
  padding: clamp(80px, 10vw, 120px) 0;
  background: var(--navy-900);
  color: var(--t-on-dark);
  overflow: hidden;
}

.control-hub::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: 
    radial-gradient(600px 400px at 20% 80%, rgba(255, 107, 107, 0.08), transparent 50%),
    radial-gradient(500px 350px at 80% 20%, rgba(58, 77, 118, 0.06), transparent 50%);
  pointer-events: none;
}

.control-hub .wrap {
  position: relative;
  z-index: 1;
}

/* ---------- Section Header ---------- */
.control-hub-header {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.control-hub-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--coral-soft);
}

.control-hub-header .eyebrow::before {
  background: var(--coral-soft);
}

.control-hub-header h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 20px;
}

.control-hub-header .lead {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.6;
  color: var(--t-on-dark-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- Dashboard Preview Container ---------- */
.dashboard-preview-container {
  position: relative;
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ---------- Real Dashboard UI ---------- */
.real-dashboard {
  position: relative;
  min-height: 600px;
  background: #0E1838;
}

/* Real product screenshot variant */
.real-dashboard--shot {
  min-height: 0;
  background: #0E1838;
}

.real-dashboard--shot > img {
  display: block;
  width: 100%;
  height: auto;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-header .logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-header .logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

.dashboard-header .controls {
  display: flex;
  gap: 12px;
}

.dashboard-header .control-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.dashboard-header .control-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--coral);
}

/* Dashboard Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 0;
  min-height: 540px;
}

/* Sidebar */
.dashboard-sidebar {
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-on-dark-muted);
  margin-bottom: 12px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--t-on-dark-muted);
  font-size: 14px;
  transition: background .18s ease, color .18s ease;
  cursor: pointer;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.sidebar-item.active {
  background: rgba(255, 107, 107, 0.15);
  color: var(--coral-soft);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.sidebar-item .icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}

/* Main Content */
.dashboard-main {
  padding: 20px;
  background: rgba(255, 255, 255, 0.01);
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dashboard-toolbar .title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

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

.toolbar-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.toolbar-btn.primary {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.toolbar-btn.primary:hover {
  background: var(--coral-600);
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
}

.kpi-card .label {
  font-size: 12px;
  color: var(--t-on-dark-muted);
  margin-bottom: 8px;
}

.kpi-card .value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.kpi-card .change {
  font-size: 12px;
  color: #4CAF50;
}

.kpi-card .change.negative {
  color: #F44336;
}

/* Activity List */
.activity-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
}

.activity-section .section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.activity-item .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--coral-600));
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.activity-item .content {
  flex: 1;
}

.activity-item .title {
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.activity-item .meta {
  font-size: 12px;
  color: var(--t-on-dark-muted);
}

.activity-item .status {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
}

.activity-item .status.warning {
  background: rgba(255, 152, 0, 0.2);
  color: #FF9800;
}

/* Right Panel */
.dashboard-right {
  background: rgba(255, 255, 255, 0.02);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
}

/* Campaign List */
.campaign-item {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.campaign-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--coral);
}

.campaign-item .name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.campaign-item .stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--t-on-dark-muted);
}

.campaign-item .stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Hotspots */
.hotspot {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--coral);
  border: 3px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 10;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
}

.hotspot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--coral);
  opacity: 0.5;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
  }
}

.hotspot svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

/* Hotspot Tooltip */
.hotspot-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--t-strong);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease-out, transform .18s var(--ease), visibility .18s;
  z-index: 20;
  box-shadow: var(--sh-lg);
}

.hotspot:hover .hotspot-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 200px 1fr;
  }
  
  .dashboard-right {
    display: none;
  }
  
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    display: none;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .control-hub-header h2 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
  }
}

/* ---------- Animation States ---------- */
.control-hub .animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
}

.control-hub .animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}