/* dashboard.css — ops dashboard styles
   Uses brand palette: dark navy (#0A1628) + lime (#BFFF00)
*/

.dash-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.95);
  border-bottom: 1px solid rgba(191, 255, 0, 0.15);
  backdrop-filter: blur(8px);
}
.dash-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 56px;
}
.dash-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.dash-logo .accent { color: #BFFF00; }

.dash-nav-links {
  display: flex;
  gap: 1.5rem;
}
.dash-nav-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}
.dash-nav-links a:hover,
.dash-nav-links a.active { color: #BFFF00; }

.dash-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.dash-header { margin-bottom: 2rem; }
.dash-header h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: #fff;
  letter-spacing: -0.03em;
}
.dash-subtitle {
  color: rgba(255,255,255,0.45);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .kpi-grid { grid-template-columns: 1fr; } }

.kpi-card {
  background: #0d1e35;
  border: 1px solid rgba(191, 255, 0, 0.08);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}
.kpi-card.kpi-highlight {
  border-color: rgba(191, 255, 0, 0.3);
  background: linear-gradient(135deg, #0d1e35, #0f2318);
}
.kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.5rem;
}
.kpi-value {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1;
}
.kpi-highlight .kpi-value { color: #BFFF00; }
.kpi-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  margin-top: 0.4rem;
}

/* Main grid */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-panel {
  background: #0d1e35;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}
.panel-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-header h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.panel-badge {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.pipeline-badge { color: rgba(191,255,0,0.7); background: rgba(191,255,0,0.08); }

/* Tables */
.table-wrap { overflow-x: auto; }
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.dash-table th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dash-table td {
  padding: 0.75rem 1.25rem;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: rgba(191,255,0,0.03); }
.dash-table strong { color: #fff; font-weight: 600; }

.dma-id {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  margin-left: 0.4rem;
}

.loading-cell, .empty-cell {
  text-align: center;
  color: rgba(255,255,255,0.2);
  font-style: italic;
  padding: 1.5rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-live   { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-leased { background: rgba(191,255,0,0.12); color: #BFFF00; }
.stage-brief  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.stage-creative { background: rgba(147,51,234,0.15); color: #c084fc; }
.stage-onair  { background: rgba(191,255,0,0.12); color: #BFFF00; }

/* Utilization bar */
.util-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.util-bar > div {
  height: 4px;
  border-radius: 2px;
  background: rgba(191,255,0,0.3);
  min-width: 60px;
}
.util-fill {
  background: #BFFF00;
  height: 4px;
  border-radius: 2px;
  max-width: 100px;
}
.util-bar span { font-size: 0.75rem; color: rgba(255,255,255,0.45); }

/* Pipeline */
.pipeline-stages {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pipeline-stage {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pipeline-stage:last-child { border-bottom: none; }
.pipeline-stage.stage-active { background: rgba(191,255,0,0.03); }

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
}
.stage-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stage-active .stage-name { color: #BFFF00; }
.stage-count {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.4);
}
.stage-active .stage-count { color: #BFFF00; }

.stage-campaigns {
  padding: 0 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.campaign-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
}
.cc-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}
.cc-meta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  margin-top: 0.15rem;
}

/* Full-width campaigns panel */
#campaigns-panel { margin-top: 1.5rem; }

/* Footer */
.dash-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}
.dash-footer a { color: rgba(191,255,0,0.5); text-decoration: none; }
.dash-footer a:hover { color: #BFFF00; }

/* ---- Outreach Pipeline ---- */
#outreach-pipeline {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-header h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  letter-spacing: -0.03em;
}

/* Outreach KPI row */
.outreach-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 800px) { .outreach-kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .outreach-kpi-row { grid-template-columns: 1fr; } }

.out-kpi {
  background: #0d1e35;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-align: center;
}
.okpi-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.4rem;
}
.okpi-val {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: #fff;
  letter-spacing: -0.04em;
}
.okpi-pct {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  margin-top: 0.2rem;
}

/* Send volume chart */
.out-chart-panel { margin-bottom: 1.5rem; }
.chart-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.7rem;
}
.chart-legend span { padding: 0.15rem 0.4rem; border-radius: 3px; }
.leg-touch1 { color: #BFFF00; background: rgba(191,255,0,0.1); }
.leg-touch3 { color: #22c55e; background: rgba(34,197,94,0.1); }
.leg-touch7 { color: #60a5fa; background: rgba(96,165,250,0.1); }
.chart-wrap { padding: 1rem 1.25rem; height: 160px; }

/* Engagement funnel */
#funnel-panel { margin-bottom: 1.5rem; }
.funnel-steps {
  padding: 0.5rem 0;
}
.funnel-step {
  display: grid;
  grid-template-columns: 80px 60px 1fr 60px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.funnel-step:last-child { border-bottom: none; }
.fn-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
}
.fn-count {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  text-align: right;
}
.fn-bar {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}
.fn-fill {
  height: 100%;
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
  transition: width 0.6s ease;
}
.fn-fill-lime { background: #BFFF00; }
.fn-pct {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  text-align: right;
}

/* Outreach grid (replies + bounces side by side) */
.outreach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) { .outreach-grid { grid-template-columns: 1fr; } }

/* Reply queue */
.reply-company {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
}
.reply-segment {
  font-size: 0.68rem;
  color: rgba(191,255,0,0.5);
  display: block;
  margin-top: 0.1rem;
}
.reply-email {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
}
.reply-subject {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  margin-top: 0.1rem;
}
.reply-preview {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  font-style: italic;
  margin-top: 0.2rem;
  line-height: 1.4;
}
.reply-time {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
}
.reply-status-select {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.reply-status-select:hover { border-color: rgba(191,255,0,0.4); }

/* Status badges */
.badge-new       { background: rgba(96,165,250,0.15); color: #60a5fa; }
.badge-responded { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-booked    { background: rgba(191,255,0,0.12); color: #BFFF00; }
.bounce-badge    { color: rgba(251,146,60,0.8); background: rgba(251,146,60,0.08); }
.bounce-remove   { background: rgba(239,68,68,0.15); color: #f87171; }
.bounce-verify   { background: rgba(251,191,36,0.12); color: #fbbf24; }
.rate-badge      { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6); }

/* Segment table */
#segments-panel { margin-bottom: 0; }
#segments-panel td:nth-child(4),
#segments-panel td:nth-child(6) { color: #BFFF00; font-weight: 600; }