:root {
  --bg: #06081D;
  --sidebar: #0A0C22;
  --card: #080C26;
  --card-inner: #0B1030;
  --border: #242C68;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --cyan: #00D4FF;
  --purple: #B100FF;
  --pink: #FF2D8D;
  --emerald: #34D399;
  --amber: #FBBF24;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Noto Sans Bengali', 'Segoe UI', sans-serif;
  min-height: 100vh;
  line-height: 1.45;
}

.app-shell {
  display: grid;
  grid-template-columns: 265px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid #1F244D;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 12px;
  border-bottom: 1px solid #1F244D;
  margin-bottom: 12px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00D4FF, #B100FF, #FF2D8D);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.35);
}

.brand-title { font-weight: 800; font-size: 14px; color: #fff; display: flex; align-items: center; gap: 6px; }
.ott-pill { font-size: 9px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 212, 255, 0.16); color: var(--cyan); border: 1px solid rgba(0, 212, 255, 0.4); }
.brand-sub { font-size: 10px; color: var(--muted); }

.nav-list { display: flex; flex-direction: column; gap: 3px; }

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: #CBD5E1;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  font-family: inherit;
  width: 100%;
}

.nav-item:hover { background: #15193D; color: #fff; }

.nav-item.active, .friday-glow-active {
  background: linear-gradient(90deg, #9333EA, #B100FF, #FF2D8D);
  border-color: rgba(255, 45, 141, 0.55);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.4);
}

.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748B;
  padding: 10px 8px 4px;
}

.sidebar-footer {
  border-top: 1px solid #1F244D;
  padding-top: 12px;
  margin-top: 12px;
  text-align: center;
}

.main-col { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 60px;
  padding: 0 22px;
  border-bottom: 1px solid #1F244D;
  background: #090B20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #121536;
  border: 1px solid #252A59;
  border-radius: 999px;
  padding: 6px 14px;
  flex: 1;
  max-width: 480px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
  flex: 1;
  font-size: 12px;
  font-family: inherit;
}

.ctrl-k {
  background: linear-gradient(90deg, #9333EA, #B100FF);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.topbar-right { display: flex; align-items: center; gap: 10px; font-size: 12px; }

.pill-btn {
  background: #121536;
  border: 1px solid #28337A;
  color: #E2E8F0;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.main-area { padding: 18px 22px 72px; max-width: 1520px; width: 100%; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #2B357A;
  background: linear-gradient(90deg, #0B1033 0%, #1B124A 52%, #0A1846 100%);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: 0 0 32px rgba(59, 130, 246, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

@keyframes cmsMascotFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); filter: drop-shadow(0 0 18px rgba(0,212,255,0.35)); }
  50% { transform: translateY(-10px) rotate(2deg) scale(1.04); filter: drop-shadow(0 0 30px rgba(236,72,153,0.55)); }
}
.hero-banner img {
  animation: cmsMascotFloat 4.2s ease-in-out infinite;
  transition: transform 0.25s ease;
}
.hero-banner img:hover {
  transform: scale(1.08) rotate(-2deg);
}

.hero-title { font-size: 28px; font-weight: 900; color: #fff; letter-spacing: -0.02em; }
.hero-grad {
  font-style: italic;
  background: linear-gradient(90deg, #00D4FF, #B100FF, #FF2D8D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 13px; color: #CBD5E1; margin-top: 4px; }

.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-pill {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #28337A;
  background: rgba(12, 18, 54, 0.9);
  color: #E2E8F0;
  cursor: pointer;
}
.hero-pill.active {
  background: linear-gradient(90deg, #9333EA, #B100FF, #EC4899);
  border-color: rgba(244, 114, 182, 0.7);
  color: #fff;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.45);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.source-card {
  background: var(--card-inner);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.12);
}

.source-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(177, 0, 255, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  font-size: 15px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.prog-track {
  height: 7px;
  border-radius: 999px;
  background: #131942;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #00D4FF, #A855F7, #EC4899);
}

.pipeline-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 8px;
}

.pipe-node {
  background: #0D1338;
  border: 1px solid rgba(0, 212, 255, 0.45);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.db-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.db-mini {
  background: var(--card-inner);
  border: 1px solid #252E6E;
  border-radius: 10px;
  padding: 10px;
  font-size: 11px;
}

.gauges-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.gauge-box {
  background: #070B22;
  border: 1px solid #232B66;
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
}

.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
}
.tag-emerald { background: rgba(52, 211, 153, 0.16); color: var(--emerald); border: 1px solid rgba(52, 211, 153, 0.35); }
.tag-amber { background: rgba(251, 191, 36, 0.16); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.35); }
.tag-pink { background: rgba(255, 45, 141, 0.16); color: #FF7AB8; border: 1px solid rgba(255, 45, 141, 0.35); }

.btn {
  background: linear-gradient(90deg, #9333EA, #B100FF, #FF2D8D);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.btn-secondary {
  background: #121536;
  border: 1px solid #28337A;
  color: #E2E8F0;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #171D48; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.media-card { background: var(--card-inner); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; }
.media-card:hover { border-color: var(--cyan); }
.thumb { aspect-ratio: 16 / 9; background: #050819; display: grid; place-items: center; overflow: hidden; font-size: 11px; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-body { padding: 10px 12px; }
.media-title { font-size: 13px; font-weight: 600; margin: 5px 0 3px; }
.media-sub { font-size: 11px; color: var(--muted); }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar select, .filter-bar input { background: #121536; border: 1px solid #28337A; color: #fff; border-radius: 8px; padding: 7px 10px; font-size: 12px; }

.helper-fab {
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 40;
  background: linear-gradient(90deg, #B100FF, #FF2D8D);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255, 45, 141, 0.55);
}

.helper-drawer {
  position: fixed;
  right: 20px;
  bottom: 70px;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: #0A0E2A;
  border: 1px solid rgba(0, 212, 255, 0.5);
  border-radius: 16px;
  padding: 16px;
  z-index: 45;
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.28);
}
.hidden, .helper-drawer.hidden, .modal-backdrop.hidden { display: none !important; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.78); display: grid; place-items: center; padding: 20px; z-index: 60; }
.modal-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; max-width: 720px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 20px; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.close-btn { background: transparent; border: none; color: var(--muted); font-size: 24px; cursor: pointer; }

@media (max-width: 1200px) {
  .sources-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
}
