/* AURA GROUP - KNOCK (knock.at)
 * Corporate Sponsor Portal & Ad Analytics Dashboard Stylesheet
 * 100% Ultra-Luxury Multi-Skin Design Engine: Obsidian Dark | Executive Light | Royal Sapphire
 */

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* DEFAULT: EXECUTIVE LIGHT (Matches http://localhost:3000/ Design System) */
  --bg-main: #f0f9ff;
  --bg-gradient: 
    radial-gradient(circle at 50% 5%, #e0f2fe 0%, #f0fdf4 35%, #f8fafc 100%);
  --bg-panel: #ffffff;
  --bg-card-inner: #ffffff;
  --bg-table-header: #f8fafc;
  --bg-table-hover: #f1f5f9;
  --border-panel: rgba(226, 232, 240, 0.9);
  --border-inner: #e2e8f0;
  --border-glow: rgba(2, 132, 199, 0.5);
  
  --color-sky: #0284c7;
  --color-emerald: #059669;
  --color-emerald-glow: rgba(5, 150, 105, 0.25);
  --color-amber: #d97706;
  --color-purple: #7c3aed;
  --color-rose: #e11d48;
  
  --text-main: #0A192F;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-panel: 0 10px 30px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-kpi: 0 10px 25px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
  --specular-line: rgba(255, 255, 255, 0.9);
}

/* ======================================================
   SKIN 1: EXECUTIVE LIGHT (Clean Corporate Boardroom Glass)
   ====================================================== */
body.skin-light {
  --bg-main: #f4f6fb;
  --bg-gradient: 
    radial-gradient(circle at 10% 8%, rgba(2, 132, 199, 0.1) 0px, transparent 45%),
    radial-gradient(circle at 90% 92%, rgba(16, 185, 129, 0.1) 0px, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0px, transparent 100%);
  --bg-panel: rgba(255, 255, 255, 0.94);
  --bg-card-inner: #ffffff;
  --bg-table-header: #f1f5f9;
  --bg-table-hover: #f8fafc;
  --border-panel: rgba(203, 213, 225, 0.9);
  --border-inner: #e2e8f0;
  --border-glow: rgba(2, 132, 199, 0.5);
  
  --color-sky: #0284c7;
  --color-emerald: #059669;
  --color-emerald-glow: rgba(5, 150, 105, 0.25);
  --color-amber: #d97706;
  --color-purple: #7c3aed;
  --color-rose: #e11d48;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-panel: 0 16px 40px -10px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-kpi: 0 12px 30px -8px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.03);
  --specular-line: rgba(255, 255, 255, 0.9);
}

body.skin-light .brand-title { color: #0f172a; }
body.skin-light .panel-title { color: #0f172a; }
body.skin-light .pop-title { color: #0f172a; }
body.skin-light .camp-name { color: #0f172a; }
body.skin-light .carrier-name { color: #0f172a; }
body.skin-light .kpi-value { color: #0f172a; }
body.skin-light .sponsor-filter-dropdown {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
body.skin-light .btn-back-app {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
body.skin-light .btn-back-app:hover {
  background: #f1f5f9;
  color: #0f172a;
}
body.skin-light .btn-refresh {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
body.skin-light .stream-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}
body.skin-light .stream-table td {
  border-bottom: 1px solid #edf2f7;
  color: #334155;
}
body.skin-light .stream-table tr:hover td {
  background: #f8fafc;
}
body.skin-light .stream-table td[style*="color: #fff;"] {
  color: #0f172a !important;
}
body.skin-light .camp-script-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}
body.skin-light .btn-camp-toggle {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
body.skin-light .btn-camp-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}
body.skin-light .pop-card-panel {
  background: linear-gradient(145deg, #f0fdf4 0%, #ffffff 100%);
  border-color: #86efac;
}
body.skin-light .pop-cert-details {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
}
body.skin-light .carrier-tile {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
body.skin-light .modal-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}
body.skin-light .modal-title { color: #0f172a; }
body.skin-light .form-group input,
body.skin-light .form-group textarea {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
body.skin-light .badge-carrier.CellC {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

/* ======================================================
   SKIN 2: ROYAL SAPPHIRE (Deep Navy Blue & Gold Luxury)
   ====================================================== */
body.skin-sapphire {
  --bg-main: #060d22;
  --bg-gradient: 
    radial-gradient(circle at 15% 12%, rgba(30, 64, 175, 0.45) 0px, transparent 50%),
    radial-gradient(circle at 85% 88%, rgba(2, 132, 199, 0.3) 0px, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(10, 25, 68, 0.4) 0px, transparent 70%);
  --bg-panel: rgba(14, 29, 70, 0.88);
  --bg-card-inner: rgba(7, 16, 44, 0.75);
  --bg-table-header: rgba(5, 12, 34, 0.9);
  --bg-table-hover: rgba(56, 189, 248, 0.05);
  --border-panel: rgba(56, 189, 248, 0.28);
  --border-inner: rgba(56, 189, 248, 0.16);
  --border-glow: rgba(56, 189, 248, 0.6);
  
  --color-sky: #38bdf8;
  --color-emerald: #34d399;
  --color-amber: #fbbf24;
  --color-purple: #c084fc;
  
  --text-main: #f8fafc;
  --text-muted: #93c5fd;
  --text-dim: #60a5fa;
  --shadow-panel: 0 20px 50px rgba(2, 6, 23, 0.75);
  --shadow-kpi: 0 14px 35px rgba(2, 6, 23, 0.65);
  --specular-line: rgba(56, 189, 248, 0.25);
}

body.skin-sapphire .brand-badge {
  background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.6);
}
body.skin-sapphire .pop-card-panel {
  background: linear-gradient(145deg, rgba(16, 35, 84, 0.92) 0%, rgba(8, 20, 52, 0.96) 100%);
  border-color: rgba(56, 189, 248, 0.45);
}

/* ======================================================
   CORE RESET & LAYOUT
   ====================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  padding: 24px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

/* ======================================================
   OPTION A: SLEEK COLLAPSIBLE LEFT SIDEBAR NAVIGATION MENU
   ====================================================== */
.admin-app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-main);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
}

.admin-sidebar {
  width: 275px;
  min-width: 275px;
  background: var(--bg-panel);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-right: 1px solid var(--border-panel);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 99;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Collapsed Icon-Only Mode */
.admin-sidebar.collapsed {
  width: 76px;
  min-width: 76px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border-inner);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.brand-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.admin-sidebar.collapsed .brand-text {
  display: none;
}

.sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-inner);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--color-sky);
  color: var(--color-sky);
}

.admin-sidebar.collapsed #sidebar-toggle-icon {
  transform: rotate(180deg);
}

/* Sidebar Nav Scroll Area */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nav-group-title {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.8px;
  padding: 0 10px 6px 10px;
  white-space: nowrap;
}

.admin-sidebar.collapsed .nav-group-title {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.nav-item:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
  color: #ffffff;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(2, 132, 199, 0.12));
  border-color: var(--color-sky);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.15);
}

.nav-icon {
  font-size: 16px;
  min-width: 22px;
  text-align: center;
}

.nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-sidebar.collapsed .nav-label {
  display: none;
}

.nav-badge {
  background: #f59e0b;
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 9999px;
}

.admin-sidebar.collapsed .nav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 4px;
  font-size: 9px;
}

/* Sidebar Footer & User Profile */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-inner);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-inner);
  border-radius: 12px;
  padding: 8px 10px;
}

.user-avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0f172a);
  border: 1.5px solid var(--color-sky);
  color: #fff;
  font-weight: 800;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-sidebar.collapsed .sidebar-user-info {
  display: none;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.sidebar-user-role {
  font-size: 10px;
  color: var(--color-amber);
  font-weight: 700;
}

/* Main Viewport Adjustments */
.admin-main-viewport {
  flex: 1;
  min-width: 0;
  padding: 20px 24px;
  box-sizing: border-box;
  overflow-y: auto;
}

.btn-mobile-hamburger {
  display: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-inner);
  color: #fff;
  font-size: 16px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 992px) {
  .btn-mobile-hamburger {
    display: flex;
    align-items: center;
  }
  
  .admin-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    transition: left 0.3s ease;
  }
  
  .admin-sidebar.open {
    left: 0;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
  }
}

/* Drag & Drop Audio Upload Zone */
.audio-drop-zone {
  border: 2px dashed rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.04);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.audio-drop-zone:hover,
.audio-drop-zone.drag-over {
  border-color: #38bdf8;
  border-style: solid;
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.drop-icon {
  font-size: 26px;
  margin-bottom: 6px;
  transition: transform 0.2s ease;
}

.audio-drop-zone:hover .drop-icon {
  transform: scale(1.15) rotate(-5deg);
}

.drop-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 3px;
}

.drop-sub {
  font-size: 11px;
  color: #94a3b8;
}

.drop-link {
  color: #38bdf8;
  text-decoration: underline;
  font-weight: 700;
}

.drop-filename-badge {
  margin-top: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
}

.admin-layout {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

/* ======================================================
   1. TOP NAVIGATION & HEADER
   ====================================================== */
.admin-header {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--border-panel);
  border-radius: 20px;
  padding: 14px 20px;
  box-shadow: var(--shadow-panel);
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.admin-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, var(--specular-line) 50%, transparent 100%);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.logo-k {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.brand-title {
  font-size: 17.5px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.text-sky { color: var(--color-sky); }
.text-emerald { color: var(--color-emerald); }
.text-purple { color: var(--color-purple); }
.text-amber { color: var(--color-amber); }
.mono { font-family: var(--font-mono); }

.badge-portal {
  font-size: 9.5px;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(2, 132, 199, 0.3) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.08em;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 500;
  margin-top: 2px;
}

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

/* THEME / SKIN SWITCHER SEGMENTED CONTROL */
.skin-switcher-group {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-panel);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

body.skin-light .skin-switcher-group {
  background: #e2e8f0;
  border-color: #cbd5e1;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.skin-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.skin-btn:hover {
  color: var(--text-main);
}

.skin-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.4);
}

body.skin-light .skin-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

/* GEAR BUTTON (USER AUTH & TEAM ROLES) */
.btn-gear-auth {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-gear-auth:hover {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38bdf8 !important;
  transform: rotate(45deg) scale(1.08);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.telemetry-live-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 7px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-emerald);
  letter-spacing: 0.04em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-emerald);
  box-shadow: 0 0 10px var(--color-emerald);
  animation: pulseDot 1.8s infinite ease-in-out;
}

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

.sponsor-filter-dropdown {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-panel);
  color: var(--text-main);
  border-radius: 12px;
  padding: 7px 12px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sponsor-filter-dropdown:focus {
  border-color: var(--color-sky);
}

.btn-pop-export {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 12px;
  padding: 7px 14px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.btn-pop-export:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.5);
}

.btn-back-app {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-panel);
  color: var(--text-muted);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-back-app:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* ======================================================
   2. EXECUTIVE KPI METRICS
   ====================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.kpi-card {
  background: var(--bg-panel);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-panel);
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-kpi);
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  width: 100%;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-sky), transparent);
  opacity: 0.6;
}

.kpi-card:hover {
  transform: translateY(-3px);
}

.kpi-card.glow-cyan:hover { border-color: rgba(56, 189, 248, 0.5); box-shadow: 0 16px 40px rgba(2, 132, 199, 0.25); }
.kpi-card.glow-emerald:hover { border-color: rgba(16, 185, 129, 0.5); box-shadow: 0 16px 40px rgba(16, 185, 129, 0.25); }
.kpi-card.glow-purple:hover { border-color: rgba(168, 85, 247, 0.5); box-shadow: 0 16px 40px rgba(168, 85, 247, 0.25); }
.kpi-card.glow-amber:hover { border-color: rgba(245, 158, 11, 0.5); box-shadow: 0 16px 40px rgba(245, 158, 11, 0.25); }
.kpi-card.glow-green:hover { border-color: rgba(34, 197, 94, 0.5); box-shadow: 0 16px 40px rgba(34, 197, 94, 0.25); }

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.kpi-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-pill-blue { background: rgba(56, 189, 248, 0.15); color: var(--color-sky); border: 1px solid rgba(56, 189, 248, 0.3); }
.kpi-pill-green { background: rgba(16, 185, 129, 0.15); color: var(--color-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.kpi-pill-purple { background: rgba(168, 85, 247, 0.15); color: var(--color-purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.kpi-pill-amber { background: rgba(245, 158, 11, 0.15); color: var(--color-amber); border: 1px solid rgba(245, 158, 11, 0.3); }

.kpi-middle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.kpi-icon-bg {
  font-size: 22px;
  opacity: 0.8;
}

.kpi-footer {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}

.text-trend-up {
  color: var(--color-emerald);
  font-weight: 800;
}

/* ======================================================
   3. DASHBOARD MAIN GRID (TWO COLUMNS)
   ====================================================== */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
  align-items: start;
}

@media (max-width: 1100px) {
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-col-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.dashboard-col-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border-panel);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow-panel);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--specular-line), transparent);
}

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

.panel-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.01em;
}

.panel-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

.btn-secondary-action {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--color-sky);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-secondary-action:hover {
  background: rgba(56, 189, 248, 0.22);
}

.btn-refresh {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-panel);
  color: var(--text-muted);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* ======================================================
   4. SPONSOR CAMPAIGNS LIST & PROGRESS
   ====================================================== */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.campaign-card {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-inner);
  border-radius: 14px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: all 0.2s ease;
}

.campaign-card:hover {
  border-color: var(--border-glow);
}

.camp-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.camp-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.camp-status-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.camp-status-active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.camp-status-paused {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.camp-status-completed {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

.camp-script-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-inner);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.35;
}

.camp-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.camp-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

body.skin-light .camp-progress-bar {
  background: #e2e8f0;
}

.camp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7 0%, #10b981 100%);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.camp-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.camp-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
}

.btn-camp-toggle {
  background: transparent;
  border: 1px solid var(--border-inner);
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-camp-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* ======================================================
   5. CARRIER TELEMETRY BREAKDOWN
   ====================================================== */
.carrier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.carrier-tile {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-inner);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.carrier-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carrier-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.carrier-dot.vodacom { background: #e60000; box-shadow: 0 0 8px rgba(230,0,0,0.6); }
.carrier-dot.mtn { background: #ffcc00; box-shadow: 0 0 8px rgba(255,204,0,0.6); }
.carrier-dot.cellc { background: #000000; border: 1px solid #fff; }
.carrier-dot.telkom { background: #0088cc; box-shadow: 0 0 8px rgba(0,136,204,0.6); }
.carrier-dot.webrtc { background: #10b981; box-shadow: 0 0 8px rgba(16,185,129,0.6); }

.carrier-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
}

.carrier-share {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--color-sky);
}

/* ======================================================
   6. PROOF OF PERFORMANCE CARD
   ====================================================== */
.pop-card-panel {
  background: linear-gradient(145deg, rgba(13, 27, 42, 0.85) 0%, rgba(6, 17, 27, 0.95) 100%);
  border-color: rgba(56, 189, 248, 0.3);
}

.pop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.pop-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pop-seal {
  font-size: 24px;
}

.pop-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.pop-sub {
  font-size: 11px;
  color: var(--text-dim);
}

.pop-actions {
  display: flex;
  gap: 7px;
}

.btn-pop-subaction {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-panel);
  color: var(--text-main);
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-pop-subaction:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-cert-highlight {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.3) 100%);
  border-color: rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}

.btn-cert-highlight:hover {
  background: rgba(16, 185, 129, 0.3);
}

.pop-cert-details {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-inner);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cert-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
}

.cert-lbl {
  color: var(--text-dim);
  font-weight: 600;
}

.cert-val {
  font-weight: 700;
}

/* ======================================================
   7. LIVE IMPRESSION DATA TABLE
   ====================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
}

.stream-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11.5px;
}

.stream-table th {
  background: var(--bg-table-header);
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-panel);
  white-space: nowrap;
}

.stream-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-inner);
  white-space: nowrap;
  font-family: var(--font-mono);
}

.stream-table tr:hover td {
  background: var(--bg-table-hover);
}

.badge-carrier {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-carrier.Vodacom { background: rgba(230, 0, 0, 0.2); color: #fca5a5; }
.badge-carrier.MTN { background: rgba(255, 204, 0, 0.2); color: #fde047; }
.badge-carrier.CellC { background: rgba(255, 255, 255, 0.15); color: #fff; }
.badge-carrier.Telkom { background: rgba(0, 136, 204, 0.2); color: #7dd3fc; }
.badge-carrier.WebRTC { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

/* ======================================================
   8. MODAL FORMS & CONTROLS (EXECUTIVE LIGHT POPUPS)
   ====================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 25, 47, 0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 22px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 24px 26px 20px 26px;
  box-shadow: 0 25px 60px rgba(10, 25, 47, 0.18);
  overflow: hidden;
  position: relative;
  color: #0A192F;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #f1f5f9;
  flex-shrink: 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #0A192F;
}

.modal-close {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #e2e8f0;
  color: #0A192F;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 6px;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 9px 13px;
  color: #0A192F;
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 0 2px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #090e1a;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 -10px 20px rgba(9, 14, 26, 0.95);
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-panel);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-submit-campaign {
  background: linear-gradient(135deg, #0284c7 0%, #10b981 100%);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

/* Toast System */
.admin-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10001;
}

.admin-toast {
  background: var(--bg-panel);
  border: 1px solid var(--color-sky);
  backdrop-filter: blur(20px);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slideInToast 0.2s ease;
}

@keyframes slideInToast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
