/* ==========================================================================
   VELVET & VELD — LIVE OPERATIONS COMMAND CENTER & SOCIAL/ADS STYLING
   Warm Saddle Leather, Burnished Gold & Deep Espresso Palette
   ========================================================================== */

/* 0. Live Mode Unified Workspace View (Removes duplicate topbar clutter!) */
#adminDashboardApp.erp-live-mode .erp-topbar {
  display: none !important;
}

#adminDashboardApp.erp-live-mode .erp-scroll-body {
  height: 100vh !important;
  max-height: 100vh !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#adminDashboardApp.erp-live-mode .erp-panes-container {
  height: 100% !important;
}

#adminDashboardApp.erp-live-mode #pane-overview {
  height: 100% !important;
}

/* 1. Cockpit Command Layout (Matching Website Signature Brown #24160E & Warm Gold) */
.live-command-cockpit {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 680px;
  background: radial-gradient(circle at 50% 50%, #24160E 0%, #1A100A 55%, #160D08 100%);
  color: #FAF8F5;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Top Live Command Header Bar (Single Unified Cockpit Header) */
.live-command-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1.25rem;
  min-height: 58px;
  background: rgba(36, 22, 14, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(229, 205, 174, 0.22);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  z-index: 25;
  gap: 0.85rem;
  flex-wrap: nowrap;
}

.live-brand-cluster {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.live-title-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.live-title-sep {
  color: #C29B38;
  margin: 0 4px;
  font-weight: 300;
}

.live-view-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 255, 163, 0.1);
  border: 1px solid rgba(0, 255, 163, 0.35);
  border-radius: 999px;
  color: #00FFA3;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00FFA3;
  box-shadow: 0 0 8px #00FFA3;
  animation: radarBlink 1.4s infinite ease-in-out;
}

@keyframes radarBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.live-cockpit-title {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #FAF8F5;
  text-transform: uppercase;
  line-height: 1.2;
}

.live-cockpit-sub {
  font-size: 0.68rem;
  color: #E5CDAE;
  letter-spacing: 0.04em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Center Controls: SAST Clock + Globe / 2D Toggle + Focus SA + Zoom Capsule */
.live-controls-cluster {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.live-sast-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  height: 34px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(194, 155, 56, 0.22);
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.76rem;
  font-weight: 600;
  color: #FAF8F5;
  white-space: nowrap;
}

.live-sast-badge i {
  color: #00FFA3;
  font-size: 0.8rem;
}

.live-toggle-group {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid rgba(194, 155, 56, 0.22);
  height: 34px;
  align-items: center;
}

.live-toggle-btn {
  padding: 4px 11px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #E5CDAE;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.live-toggle-btn.active {
  background: #C29B38;
  color: #140D09;
  box-shadow: 0 2px 8px rgba(194, 155, 56, 0.4);
}

.live-toggle-btn:hover:not(.active) {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.live-btn-focus {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  height: 34px;
  background: rgba(194, 155, 56, 0.12);
  border: 1px solid rgba(194, 155, 56, 0.45);
  border-radius: 8px;
  color: #FAF8F5;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.live-btn-focus:hover {
  background: rgba(194, 155, 56, 0.28);
  border-color: #C29B38;
  box-shadow: 0 0 10px rgba(194, 155, 56, 0.35);
  color: #FFFFFF;
}

/* Integrated Camera & Zoom Toolbar Capsule */
.live-zoom-capsule {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(194, 155, 56, 0.22);
  border-radius: 8px;
  padding: 2px;
  height: 34px;
}

.live-capsule-divider {
  width: 1px;
  height: 16px;
  background: rgba(194, 155, 56, 0.25);
  margin: 0 2px;
}

.live-zoom-val {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #00E5FF;
  padding: 0 6px;
  min-width: 44px;
  text-align: center;
  user-select: none;
}

.live-icon-btn {
  background: transparent;
  border: none;
  color: #E5CDAE;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.15s ease;
}

.live-icon-btn:hover {
  background: rgba(229, 205, 174, 0.14);
  color: #FFFFFF;
}

/* Right Header Actions Cluster */
.live-actions-cluster {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.live-btn-back-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(229, 205, 174, 0.28);
  border-radius: 8px;
  color: #FAF8F5;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.live-btn-back-store:hover {
  background: rgba(194, 155, 56, 0.2);
  border-color: #C29B38;
  color: #FFD700;
}

.live-operator-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 34px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(194, 155, 56, 0.22);
  border-radius: 8px;
  font-size: 0.72rem;
  color: #FAF8F5;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.live-operator-badge:hover {
  border-color: rgba(194, 155, 56, 0.45);
}

.live-op-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00FFA3;
  box-shadow: 0 0 6px #00FFA3;
}

.live-op-pill {
  background: rgba(0, 255, 163, 0.15);
  color: #00FFA3;
  font-size: 0.60rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.live-logout-btn {
  height: 34px;
  width: 34px;
  border: 1px solid rgba(226, 74, 74, 0.35);
  background: rgba(226, 74, 74, 0.1);
  color: #FF8080;
  border-radius: 8px;
}

.live-logout-btn:hover {
  background: rgba(226, 74, 74, 0.25);
  color: #FFFFFF;
  border-color: #E24A4A;
}
  padding: 1px 5px;
  border-radius: 4px;
}

.live-btn-focus:hover {
  background: rgba(194, 155, 56, 0.3);
  transform: translateY(-1px);
}

.live-icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(194, 155, 56, 0.2);
  color: #FAF8F5;
  cursor: pointer;
  transition: all 0.2s ease;
}

.live-icon-btn:hover {
  background: rgba(194, 155, 56, 0.25);
  border-color: #C29B38;
  color: #C29B38;
}

/* Center Stage Area: Floating Left & Right Panels + Centered 3D Canvas */
.live-cockpit-stage {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.live-globe-card-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.live-canvas-viewport {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.live-canvas-viewport:active {
  cursor: grabbing;
}

/* Top Center Status Legend (Matches Reference) */
.live-center-legend {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 6px 18px;
  background: rgba(26, 17, 13, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(194, 155, 56, 0.28);
  border-radius: 999px;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #FAF8F5;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.yellow { background: #FFD700; box-shadow: 0 0 8px #FFD700; }
.legend-dot.purple { background: #B266FF; box-shadow: 0 0 8px #B266FF; }
.legend-dot.green { background: #00FFA3; box-shadow: 0 0 8px #00FFA3; }

/* Bottom Center Guidance Pill */
.live-orbit-guidance-pill {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: rgba(26, 17, 13, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(194, 155, 56, 0.28);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #E5CDAE;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

/* Left Cockpit Metrics Panel */
.live-left-panel {
  position: absolute;
  top: 18px;
  left: 20px;
  width: 295px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 15;
  pointer-events: auto;
}

.cockpit-metric-card {
  background: rgba(16, 11, 8, 0.84);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cockpit-metric-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75), 0 0 20px rgba(194, 155, 56, 0.15);
}

.card-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.card-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: #C29B38;
  text-transform: uppercase;
}

.card-trend-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #00FFA3;
  background: rgba(0, 255, 163, 0.14);
  border: 1px solid rgba(0, 255, 163, 0.35);
  padding: 2px 7px;
  border-radius: 999px;
}

.card-big-value {
  font-size: 1.85rem;
  font-weight: 700;
  color: #FAF8F5;
  line-height: 1.1;
  font-family: 'Bodoni Moda', Georgia, serif;
}

.card-big-unit {
  font-size: 0.76rem;
  font-weight: 400;
  color: #E5CDAE;
  margin-left: 5px;
}

.card-metric-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 0.75rem;
}

.metric-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: #E5CDAE;
}

.metric-pill-val {
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.metric-pill-val.purple { background: rgba(178, 102, 255, 0.18); color: #C084FC; border: 1px solid rgba(178, 102, 255, 0.4); }
.metric-pill-val.green { background: rgba(0, 255, 163, 0.18); color: #00FFA3; border: 1px solid rgba(0, 255, 163, 0.4); }
.metric-pill-val.yellow { background: rgba(255, 215, 0, 0.18); color: #FFD700; border: 1px solid rgba(255, 215, 0, 0.4); }

/* Regional Node Buttons Grid */
.regional-nodes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 0.5rem;
}

.regional-node-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(194, 155, 56, 0.2);
  border-radius: 8px;
  color: #FAF8F5;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.regional-node-btn:hover {
  background: rgba(194, 155, 56, 0.25);
  border-color: #C29B38;
  color: #FFD700;
  transform: translateY(-1px);
}

.regional-node-badge {
  font-weight: 700;
  color: #00FFA3;
  font-size: 0.72rem;
}

/* Right Cockpit Panel: Live Activity Stream */
.live-right-panel {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 325px;
  max-height: calc(100% - 36px);
  display: flex;
  flex-direction: column;
  background: rgba(16, 11, 8, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 15;
  pointer-events: auto;
  overflow: hidden;
}

.live-stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(194, 155, 56, 0.16);
  background: rgba(0, 0, 0, 0.2);
}

.live-stream-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #C29B38;
  text-transform: uppercase;
}

.live-stream-realtime {
  font-size: 0.68rem;
  color: #00FFA3;
  background: rgba(0, 255, 163, 0.12);
  border: 1px solid rgba(0, 255, 163, 0.3);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}

.live-stream-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0.85rem 1rem;
  overflow-y: auto;
  max-height: 480px;
}

/* Custom Sleek Gold Scrollbar (Eliminates ugly browser white scrollbars!) */
.live-stream-list::-webkit-scrollbar {
  width: 4px;
}
.live-stream-list::-webkit-scrollbar-track {
  background: transparent;
}
.live-stream-list::-webkit-scrollbar-thumb {
  background: rgba(194, 155, 56, 0.35);
  border-radius: 4px;
}
.live-stream-list::-webkit-scrollbar-thumb:hover {
  background: rgba(194, 155, 56, 0.7);
}

.live-stream-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(194, 155, 56, 0.16);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  transition: all 0.2s ease;
  animation: slideInActivity 0.4s ease;
}

@keyframes slideInActivity {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.live-stream-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(194, 155, 56, 0.45);
  transform: translateX(-2px);
}

.stream-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.stream-city {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #FAF8F5;
}

.stream-time {
  font-size: 0.68rem;
  color: #A69E87;
}

.stream-card-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.stream-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stream-badge.status-checkout { background: rgba(0, 255, 163, 0.16); color: #00FFA3; border: 1px solid rgba(0, 255, 163, 0.35); }
.stream-badge.status-cart { background: rgba(178, 102, 255, 0.18); color: #C084FC; border: 1px solid rgba(178, 102, 255, 0.4); }
.stream-badge.status-visitor { background: rgba(255, 215, 0, 0.16); color: #FFD700; border: 1px solid rgba(255, 215, 0, 0.35); }
.stream-badge.status-order { background: rgba(0, 229, 255, 0.16); color: #00E5FF; border: 1px solid rgba(0, 229, 255, 0.35); }
.stream-badge.status-dispatch { background: rgba(229, 205, 174, 0.18); color: #E5CDAE; border: 1px solid rgba(229, 205, 174, 0.35); }

.stream-action {
  font-size: 0.72rem;
  color: #E5CDAE;
}

.stream-card-product {
  font-size: 0.74rem;
  color: #FAF8F5;
  font-family: 'Bodoni Moda', Georgia, serif;
}

.live-stream-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.15rem;
  border-top: 1px solid rgba(194, 155, 56, 0.16);
  background: rgba(0, 0, 0, 0.35);
}

.conversion-rate-val {
  font-weight: 700;
  color: #00FFA3;
}


/* ==========================================================================
   2. SOCIAL & ADS COMMAND CENTER STYLING (Luxury Saddle Leather & Gold)
   ========================================================================== */

#pane-social-ads {
  background: radial-gradient(circle at 50% 25%, #24160E 0%, #1A100A 55%, #160D08 100%) !important;
  min-height: 100%;
}

.social-ads-container {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  color: #FAF8F5;
}

.social-header-cluster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-header-title h2 {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 1.5rem;
  color: #FAF8F5;
  margin-bottom: 0.25rem;
}

.social-header-title p {
  font-size: 0.85rem;
  color: #E5CDAE;
}

/* Sub-Navigation Tabs */
.social-subnav-bar {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  border: 1px solid rgba(194, 155, 56, 0.25);
}

.social-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #E5CDAE;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-subtab-btn:hover {
  color: #FAF8F5;
  background: rgba(194, 155, 56, 0.15);
}

.social-subtab-btn.active {
  background: #C29B38;
  color: #1F1D1A;
  box-shadow: 0 2px 10px rgba(194, 155, 56, 0.4);
}

/* Publisher Grid */
.social-publisher-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 1024px) {
  .social-publisher-grid {
    grid-template-columns: 1fr;
  }
}

.social-composer-card {
  background: #24160E;
  border: 1px solid #382317;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4);
}

/* Target Platforms Toggle Pills */
.platform-toggles-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.platform-pill-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(194, 155, 56, 0.2);
  color: #E5CDAE;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.platform-pill-toggle.active {
  background: rgba(194, 155, 56, 0.25);
  border-color: #C29B38;
  color: #E5CDAE;
}

.platform-pill-toggle.instagram.active { border-color: #E1306C; color: #E1306C; background: rgba(225, 48, 108, 0.15); }
.platform-pill-toggle.facebook.active { border-color: #1877F2; color: #1877F2; background: rgba(24, 119, 242, 0.15); }
.platform-pill-toggle.tiktok.active { border-color: #00F2FE; color: #00F2FE; background: rgba(0, 242, 254, 0.15); }
.platform-pill-toggle.twitter.active { border-color: #FFFFFF; color: #FFFFFF; background: rgba(255, 255, 255, 0.15); }

/* Post Composer Form Elements */
.social-textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(194, 155, 56, 0.22);
  border-radius: 8px;
  padding: 0.85rem;
  color: #FAF8F5;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.social-textarea:focus {
  outline: none;
  border-color: #C29B38;
  box-shadow: 0 0 12px rgba(194, 155, 56, 0.35);
}

.quick-hashtags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.hashtag-chip {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: #C29B38;
  font-size: 0.72rem;
  cursor: pointer;
  border: 1px solid rgba(194, 155, 56, 0.25);
  transition: all 0.15s ease;
}

.hashtag-chip:hover {
  background: rgba(194, 155, 56, 0.25);
  color: #FAF8F5;
}

/* Media Uploader Box */
.social-media-dropzone {
  border: 1.5px dashed rgba(194, 155, 56, 0.3);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.25rem;
  background: rgba(0, 0, 0, 0.25);
}

.media-preset-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 0.75rem;
}

.preset-pill-btn {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(194, 155, 56, 0.12);
  border: 1px solid rgba(194, 155, 56, 0.25);
  color: #FAF8F5;
  font-size: 0.7rem;
  cursor: pointer;
}

.preset-pill-btn:hover {
  background: #C29B38;
  color: #1F1D1A;
}

/* Big Multi-Post Button */
.btn-multi-publish {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #C29B38 0%, #A37F2C 100%);
  color: #1F1D1A;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(194, 155, 56, 0.4);
  transition: all 0.2s ease;
}

.btn-multi-publish:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(194, 155, 56, 0.55);
}

/* Device Simulator Preview Card */
.social-simulator-card {
  background: #24160E;
  border: 1px solid #382317;
  border-radius: 14px;
  padding: 1.5rem;
}

.sim-phone-frame {
  max-width: 340px;
  margin: 0 auto;
  background: #0D0907;
  border: 4px solid #332219;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
}

.sim-phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(194, 155, 56, 0.15);
}

.sim-profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid #C29B38;
}

.sim-username {
  font-size: 0.8rem;
  font-weight: 700;
  color: #FAF8F5;
}

.sim-image-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.sim-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
  color: #FAF8F5;
  font-size: 1.1rem;
}

.sim-actions-left {
  display: flex;
  gap: 12px;
}

.sim-caption-wrap {
  padding: 0 14px 14px;
  font-size: 0.78rem;
  color: #E3D9CC;
  line-height: 1.4;
}

/* Published Posts History & Audience Feedback Cards (Compact & Elegant) */
.social-history-card {
  display: flex;
  flex-direction: column;
  background: #24160E;
  border: 1px solid #382317;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.social-history-card:hover {
  border-color: rgba(194, 155, 56, 0.5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(194, 155, 56, 0.12);
}

.history-card-main {
  display: flex;
  align-items: stretch;
  width: 100%;
}

/* Compact, Proportionate Media Thumbnail (Eliminates gigantic full-bleed images!) */
.history-card-media {
  width: 125px;
  min-width: 125px;
  max-width: 125px;
  position: relative;
  overflow: hidden;
  background: #0D0907;
  cursor: pointer;
  align-self: stretch;
}

.history-card-media img {
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.history-card-media:hover img {
  transform: scale(1.08);
}

.media-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FAF8F5;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  gap: 5px;
}

.history-card-media:hover .media-zoom-overlay {
  opacity: 1;
}

/* Body Content */
.history-card-body {
  flex: 1;
  padding: 0.95rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.history-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.history-platforms {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.platform-mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: capitalize;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #FAF8F5;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.platform-mini-tag.instagram { border-color: rgba(225, 48, 108, 0.4); color: #E1306C; background: rgba(225, 48, 108, 0.12); }
.platform-mini-tag.facebook { border-color: rgba(24, 119, 242, 0.4); color: #1877F2; background: rgba(24, 119, 242, 0.12); }
.platform-mini-tag.tiktok { border-color: rgba(0, 242, 254, 0.4); color: #00F2FE; background: rgba(0, 242, 254, 0.12); }
.platform-mini-tag.twitter { border-color: rgba(255, 255, 255, 0.4); color: #FFFFFF; background: rgba(255, 255, 255, 0.12); }
.platform-mini-tag.linkedin { border-color: rgba(10, 102, 194, 0.4); color: #0A66C2; background: rgba(10, 102, 194, 0.12); }
.platform-mini-tag.pinterest { border-color: rgba(230, 0, 35, 0.4); color: #E60023; background: rgba(230, 0, 35, 0.12); }

.history-date {
  font-size: 0.72rem;
  color: #A69E87;
  display: flex;
  align-items: center;
  gap: 5px;
}

.history-caption {
  font-size: 0.82rem;
  color: #FAF8F5;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Audience Feedback & Engagement Row */
.history-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(194, 155, 56, 0.12);
}

.history-stats-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-pill {
  font-size: 0.74rem;
  color: #E5CDAE;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stat-pill strong {
  color: #FAF8F5;
  font-weight: 700;
}

.stat-pill.reach i { color: #00E5FF; }
.stat-pill.likes i { color: #FF4D6D; }
.stat-pill.shares i { color: #00FFA3; }
.stat-pill.comments i { color: #C29B38; }

.stat-pill.sentiment {
  background: rgba(0, 255, 163, 0.12);
  color: #00FFA3;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid rgba(0, 255, 163, 0.3);
}

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

.btn-feedback-toggle {
  background: rgba(194, 155, 56, 0.12);
  border: 1px solid rgba(194, 155, 56, 0.3);
  color: #FAF8F5;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-feedback-toggle:hover {
  background: #C29B38;
  color: #140D09;
}

.btn-boost-ad {
  background: rgba(0, 255, 163, 0.12);
  border: 1px solid rgba(0, 255, 163, 0.35);
  color: #00FFA3;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-boost-ad:hover {
  background: #00FFA3;
  color: #0D1610;
}

/* Comments / Feedback Drawer */
.history-comments-drawer {
  background: rgba(13, 9, 7, 0.95);
  border-top: 1px solid rgba(194, 155, 56, 0.16);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideDownComments 0.25s ease;
}

@keyframes slideDownComments {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.75rem;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 6px;
  border: 1px solid rgba(194, 155, 56, 0.1);
}

.comment-user {
  font-weight: 700;
  color: #C29B38;
  white-space: nowrap;
}

.comment-text {
  color: #FAF8F5;
  flex: 1;
  line-height: 1.35;
}

.comment-platform {
  font-size: 0.68rem;
  color: #A69E87;
  white-space: nowrap;
}

/* Lightbox Preview Modal for High-Res Media */
.social-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.social-lightbox-content {
  max-width: 650px;
  width: 100%;
  background: #24160E;
  border: 1px solid #382317;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  animation: zoomInLightbox 0.25s ease;
}

@keyframes zoomInLightbox {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-img-wrap {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  background: #000;
}

.lightbox-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lightbox-footer {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lightbox-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-close-btn:hover {
  background: #C29B38;
  color: #1F1D1A;
}

@media (max-width: 768px) {
  .history-card-main {
    flex-direction: column;
  }
  .history-card-media {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 180px;
  }
}

/* Campaigns Manager Table */
.campaign-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.campaign-status-pill.active { background: rgba(0, 255, 163, 0.15); color: #00FFA3; border: 1px solid rgba(0, 255, 163, 0.4); }
.campaign-status-pill.paused { background: rgba(255, 215, 0, 0.15); color: #FFD700; border: 1px solid rgba(255, 215, 0, 0.4); }

.campaign-channel-icons {
  display: flex;
  gap: 6px;
}

.ad-channel-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  background: rgba(194, 155, 56, 0.15);
  color: #FAF8F5;
}

/* API Credentials Cards Grid */
.api-keys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.api-card {
  background: #24160E;
  border: 1px solid #382317;
  border-radius: 12px;
  padding: 1.25rem;
}

.api-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.api-platform-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #FAF8F5;
}

.api-status-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.api-status-badge.connected { background: rgba(0, 255, 163, 0.15); color: #00FFA3; }
.api-status-badge.disconnected { background: rgba(255, 255, 255, 0.08); color: #786D5F; }

.api-field-group {
  margin-bottom: 0.75rem;
}

.api-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #E5CDAE;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.api-field-input {
  width: 100%;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(194, 155, 56, 0.22);
  border-radius: 6px;
  color: #FAF8F5;
  font-size: 0.8rem;
  font-family: monospace;
}

/* ==========================================================================
   MOBILE COMMAND CENTER & EXECUTIVE DASHBOARD OPTIMIZATION (< 860px)
   Smooth Vertical Scrolling, Zero Horizontal Clipping, Full Touch Support
   ========================================================================== */
@media (max-width: 860px) {
  /* Allow native vertical touch scrolling on mobile dashboard */
  #adminDashboardApp.erp-live-mode .erp-scroll-body {
    height: calc(100vh - 56px) !important;
    max-height: calc(100vh - 56px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0 0 calc(78px + env(safe-area-inset-bottom, 0px)) 0 !important;
  }

  #adminDashboardApp.erp-live-mode #pane-overview {
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
  }

  .live-command-cockpit {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  /* 1. Header Bar: Responsive 2-Row Layout Preventing Horizontal Text Clipping */
  .live-command-topbar {
    padding: 0.55rem 0.85rem !important;
    min-height: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.45rem !important;
    background: rgba(36, 22, 14, 0.98) !important;
    border-bottom: 1px solid rgba(229, 205, 174, 0.2) !important;
    box-sizing: border-box !important;
  }

  .live-brand-cluster {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .live-view-pill {
    padding: 2.5px 7.5px !important;
    font-size: 0.58rem !important;
    letter-spacing: 0.05em !important;
    flex-shrink: 0 !important;
  }

  .live-title-box {
    text-align: right !important;
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .live-cockpit-title {
    font-size: 0.74rem !important;
    letter-spacing: 0.02em !important;
    font-weight: 700 !important;
    color: #FAF8F5 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }

  .live-cockpit-sub {
    font-size: 0.55rem !important;
    color: #E5CDAE !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }

  /* Row 2 Controls: 3D/2D switch, SAST Clock, Focus SA */
  .live-controls-cluster {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.35rem !important;
    padding-top: 2px !important;
  }

  .live-toggle-group {
    height: 28px !important;
    padding: 2px !important;
  }

  .live-toggle-btn {
    height: 22px !important;
    padding: 2px 7px !important;
    font-size: 0.65rem !important;
  }

  .live-btn-focus {
    height: 28px !important;
    padding: 0 8px !important;
    font-size: 0.65rem !important;
    white-space: nowrap !important;
  }

  .live-sast-badge {
    height: 28px !important;
    padding: 0 6px !important;
    font-size: 0.62rem !important;
  }

  .live-zoom-capsule,
  .live-actions-cluster {
    display: none !important;
  }

  /* 2. Main Stage: Natural Column Stack Layout for Mobile */
  .live-cockpit-stage {
    display: flex !important;
    flex-direction: column !important;
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0.75rem 0.85rem !important;
    gap: 0.85rem !important;
    box-sizing: border-box !important;
  }

  /* Interactive 3D Earth Globe Card on Mobile */
  .live-globe-card-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 250px !important;
    min-height: 250px !important;
    max-height: 260px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    order: 1 !important;
    margin-bottom: 0.25rem !important;
    border: 1px solid rgba(229, 205, 174, 0.22) !important;
    background: radial-gradient(circle at 50% 50%, #24160E 0%, #150D08 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  }

  .live-canvas-viewport {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .live-center-legend {
    position: absolute !important;
    top: 8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 3px 10px !important;
    gap: 0.65rem !important;
    font-size: 0.62rem !important;
    background: rgba(22, 13, 8, 0.9) !important;
    border: 1px solid rgba(229, 205, 174, 0.25) !important;
    width: max-content !important;
    max-width: 92% !important;
    white-space: nowrap !important;
  }

  .legend-item {
    font-size: 0.6rem !important;
    gap: 4px !important;
  }

  .live-orbit-guidance-pill {
    position: absolute !important;
    bottom: 8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 3px 10px !important;
    font-size: 0.6rem !important;
    background: rgba(22, 13, 8, 0.9) !important;
    border: 1px solid rgba(229, 205, 174, 0.25) !important;
    width: max-content !important;
    max-width: 90% !important;
    white-space: nowrap !important;
  }

  /* 3. Left Metrics Panel: Natural Mobile In-Flow Cards */
  .live-left-panel {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.85rem !important;
    order: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .cockpit-metric-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
    padding: 0.85rem 1rem !important;
    background: rgba(22, 13, 8, 0.94) !important;
    border: 1px solid rgba(229, 205, 174, 0.18) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  }

  .card-big-value {
    font-size: 1.6rem !important;
  }

  .card-eyebrow {
    font-size: 0.64rem !important;
  }

  .regional-nodes-grid {
    grid-template-columns: 1fr !important;
  }

  /* 4. Right Panel: Activity Stream In-Flow Card */
  .live-right-panel {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
    max-height: none !important;
    background: rgba(22, 13, 8, 0.94) !important;
    border: 1px solid rgba(229, 205, 174, 0.18) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
    order: 3 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .live-stream-header {
    padding: 0.75rem 1rem !important;
  }

  .live-stream-list {
    max-height: 260px !important;
    padding: 0.75rem !important;
  }

  .live-stream-footer {
    padding: 0.65rem 1rem !important;
  }

  /* 5. Social & Ads Tab Mobile Optimization */
  .social-ads-container {
    padding: 0.85rem 0.65rem calc(78px + env(safe-area-inset-bottom, 0px)) 0.65rem !important;
  }

  .social-subnav-bar {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .social-subtab-btn {
    white-space: nowrap !important;
    padding: 6px 12px !important;
    font-size: 0.74rem !important;
  }

  .social-publisher-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .social-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .campaigns-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}

