/* ============================================================
   PCC ProspectOS — Corporate Design System
   PCC Brand: Red #ED1C24 · Charcoal #2B2B2B · Greys
   ============================================================ */

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

:root {
  /* PCC Brand Palette */
  --pcc-red:      #ED1C24;
  --pcc-deep-red: #B5121B;
  --pcc-black:    #000000;
  --charcoal:     #2B2B2B;
  --graphite:     #555555;
  --mid-grey:     #8A8A8A;
  --light-grey:   #D9D9D9;
  --soft-grey:    #F3F4F6;
  --white:        #FFFFFF;

  /* Semantic aliases */
  --navy:    var(--charcoal);
  --blue:    var(--pcc-red);
  --blue-lt: #FDE8E9;
  --amber:   #C97B00;
  --amber-lt:#FEF3C7;
  --green:   #047857;
  --green-lt:#D1FAE5;
  --red:     var(--pcc-deep-red);
  --red-lt:  #FDE8E9;
  --slate:   var(--graphite);
  --slate-lt: var(--soft-grey);
  --border:  var(--light-grey);
  --white:   #FFFFFF;
  --text:    var(--charcoal);
  --muted:   var(--graphite);
  --radius:  6px;
  --shadow:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.12);
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Arial, Helvetica, system-ui, sans-serif;
  font-size: 13px;
  color: var(--charcoal);
  background: var(--soft-grey);
  overflow: hidden;
}

/* ── SHELL ──────────────────────────────────────────── */
.shell { display: flex; height: 100vh; }

/* ── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  width: 214px; flex-shrink: 0;
  background: var(--charcoal);
  display: flex; flex-direction: column;
  overflow: hidden;
  border-right: 3px solid var(--pcc-red);
}

.sidebar-logo {
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; gap: 10px;
  background: #1e1e1e;
}

.sidebar-logo img {
  width: 38px; height: 38px;
  border-radius: 4px;
  object-fit: contain;
  background: white;
  padding: 3px;
}

.sidebar-logo-text { color: white; }
.sidebar-logo-text .app-name { font-family: 'Aptos', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .04em; color: #ffffff; }
.sidebar-logo-text .app-ver  { font-size: 9px; color: var(--pcc-red); letter-spacing: .06em; font-weight: 600; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 8px 6px; overflow-y: auto; }

.nav-section-label {
  font-size: 9px; font-weight: 700; letter-spacing: 1.2px;
  color: rgba(255,255,255,.3); text-transform: uppercase;
  padding: 10px 10px 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 4px; cursor: pointer;
  color: rgba(255,255,255,.6); font-size: 12px; font-weight: 500;
  transition: all .15s; margin-bottom: 1px;
  border-left: 3px solid transparent;
}

.nav-item:hover { background: rgba(255,255,255,.07); color: white; border-left-color: rgba(237,28,36,.4); }
.nav-item.active { background: var(--pcc-red); color: white; font-weight: 700; border-left-color: transparent; }
.nav-item .nav-icon { font-size: 14px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto; background: var(--pcc-red); color: white;
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 10px;
}

/* ── Collapsible sidebar groups ───────────────────────── */
.nav-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px 4px; cursor: pointer; user-select: none;
  border-radius: 4px; transition: background .15s;
}
.nav-group-header:hover { background: rgba(255,255,255,.06); }
.nav-group-label {
  font-size: 9px; font-weight: 700; letter-spacing: 1.2px;
  color: rgba(255,255,255,.35); text-transform: uppercase;
}
.nav-group-chevron {
  font-size: 8px; color: rgba(255,255,255,.25);
  transition: transform .2s; flex-shrink: 0;
}
.nav-group.collapsed .nav-group-chevron { transform: rotate(-90deg); }
.nav-group-body { overflow: hidden; transition: max-height .25s ease; }
.nav-group.collapsed .nav-group-body { max-height: 0 !important; }

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.12);
  background: #000;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  font-size: 9px;
  color: rgba(255,255,255,.72);
  letter-spacing: .3px;
}

.sidebar-footer-link,
.sidebar-footer-brand {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  transition: color .15s, background .15s, opacity .15s;
}

.sidebar-footer-link {
  padding: 4px 6px;
  font-size: 10px;
  opacity: .74;
}

.sidebar-footer-brand {
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 700;
  opacity: .56;
}

.sidebar-footer-link:hover,
.sidebar-footer-brand:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  opacity: 1;
}

.mp-dev-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.58);
}

.mp-dev-modal.hidden { display: none; }

.mp-dev-dialog {
  position: relative;
  width: min(420px, 94vw);
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(0,0,0,.34);
  padding: 30px 28px 26px;
  text-align: center;
}

.mp-dev-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #555;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.mp-dev-close:hover { background: #f3f4f6; color: #000; }

.mp-dev-logo {
  display: block;
  width: min(220px, 72vw);
  height: auto;
  margin: 0 auto 22px;
}

.mp-dev-text {
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.mp-dev-subtext {
  margin-top: 8px;
  color: var(--graphite);
  font-size: 12px;
  font-weight: 700;
}

/* ── MAIN AREA ──────────────────────────────────────── */
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  background: white;
  border-bottom: 1px solid var(--light-grey);
  padding: 0 20px; height: 50px; flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.topbar-logo-accent {
  width: 3px; height: 28px; background: var(--pcc-red);
  border-radius: 2px; flex-shrink: 0;
}

.topbar-title { font-size: 15px; font-weight: 800; color: var(--charcoal); line-height: 1; white-space: nowrap; }
.topbar-breadcrumb { font-size: 11px; color: var(--graphite); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.topbar-context-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--light-grey);
}
.topbar-context-select {
  height: 28px;
  max-width: 132px;
  border: 1px solid var(--light-grey);
  border-radius: 6px;
  background: #fff;
  color: var(--charcoal);
  font-size: 11px;
  font-weight: 600;
  padding: 0 7px;
}

.module-content { flex: 1; overflow-y: auto; padding: 20px; }
.module-pane { display: none; }
.module-pane.active { display: block; }

/* ── CARDS ──────────────────────────────────────────── */
.card {
  background: white;
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card-title {
  font-size: 11px; font-weight: 700; color: var(--charcoal);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: .04em;
  padding-bottom: 8px; border-bottom: 2px solid var(--soft-grey);
}

.card-title::before {
  content: ''; display: inline-block;
  width: 3px; height: 14px;
  background: var(--pcc-red); border-radius: 2px; flex-shrink: 0;
}

.card-grid { display: grid; gap: 12px; }
.card-grid-2 { grid-template-columns: 1fr 1fr; }
.card-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.card-grid-4 { grid-template-columns: repeat(4,1fr); }

/* ── KPI CHIPS ──────────────────────────────────────── */
.kpi-chip {
  background: white;
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--light-grey);
  position: relative; overflow: hidden;
}

.kpi-chip::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}

.kpi-chip.blue  { border-top-color: var(--pcc-red); }
.kpi-chip.amber { border-top-color: var(--amber); }
.kpi-chip.green { border-top-color: var(--green); }
.kpi-chip.red   { border-top-color: var(--pcc-deep-red); }
.kpi-chip.navy  { border-top-color: var(--charcoal); }

.kpi-val   { font-size: 28px; font-weight: 800; color: var(--charcoal); line-height: 1.1; }
.kpi-label { font-size: 10px; color: var(--graphite); margin-top: 4px; font-weight: 500; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 4px; font-size: 11px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: all .15s; text-decoration: none; white-space: nowrap;
}

.btn-primary   { background: var(--pcc-red); color: white; border-color: var(--pcc-red); }
.btn-primary:hover { background: var(--pcc-deep-red); border-color: var(--pcc-deep-red); }
.btn-secondary { background: white; color: var(--graphite); border-color: var(--light-grey); }
.btn-secondary:hover { background: var(--soft-grey); color: var(--charcoal); }
.btn-dark      { background: var(--charcoal); color: white; }
.btn-dark:hover{ background: #1a1a1a; }
.btn-amber     { background: var(--amber); color: white; }
.btn-green     { background: var(--green); color: white; }
.btn-red       { background: var(--pcc-red); color: white; }
.btn-sm { padding: 4px 10px; font-size: 10px; }
.btn-icon { padding: 6px 8px; }
.btn-danger { background: #dc2626; color: white; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

/* ── Quick View ─────────────────────────────────────────── */
.qv-label { font-size:10px;font-weight:600;color:#94a3b8;text-transform:uppercase;letter-spacing:.04em;margin-bottom:2px; }
.qv-value { font-size:12px;font-weight:600;color:#1e293b; }
.qv-value:empty::after { content:'—';color:#cbd5e1;font-weight:400; }

/* ── CRM Modal Tabs ─────────────────────────────────────── */
.pm-tab {
  padding: 6px 14px; font-size: 11px; font-weight: 600; cursor: pointer;
  border: none; background: transparent; color: #64748b;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.pm-tab:hover { color: var(--charcoal); }
.pm-tab.active { color: var(--pcc-red); border-bottom-color: var(--pcc-red); }
.pm-tab-pane { display: none; }
.pm-tab-pane.active { display: block; }
.card-grid-span-2 { grid-column: 1 / -1; }

/* ── TIER BADGES ────────────────────────────────────── */
.tier-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 700;
}
.tier-A { background: #FDE8E9; color: var(--pcc-deep-red); }
.tier-B { background: #FEF3C7; color: #92400e; }
.tier-C { background: #F3F4F6; color: var(--charcoal); }
.tier-D { background: #F3F4F6; color: var(--mid-grey); }

.derog-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 700; }
.derog-active  { background: #FDE8E9; color: var(--pcc-deep-red); }
.derog-none    { background: #F3F4F6; color: var(--mid-grey); }
.urgency-hot   { color: var(--pcc-red); font-weight: 700; }
.urgency-warm  { color: var(--amber); font-weight: 700; }
.urgency-cool  { color: var(--green); }

/* ── TABLE ──────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }

.data-table th {
  background: var(--charcoal); color: white;
  padding: 8px 10px; text-align: left; font-weight: 600; font-size: 10px;
  position: sticky; top: 0; z-index: 1;
  text-transform: uppercase; letter-spacing: .04em;
}

.data-table th:first-child { border-left: 3px solid var(--pcc-red); }

.data-table td { padding: 7px 10px; border-bottom: 1px solid var(--light-grey); vertical-align: top; }
.data-table tr:hover td { background: #fafafa; }
.data-table tr:nth-child(even) td { background: #fafeff; }
.data-table tr:hover td { background: #FDE8E9 !important; }
.data-table tr.highlighted td { background: #FDE8E9; }
.table-wrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--light-grey); box-shadow: var(--shadow); }

/* ── SEARCH / SELECT ────────────────────────────────── */
.form-control {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--light-grey);
  border-radius: 4px; font-size: 12px;
  background: white; color: var(--charcoal); outline: none;
}
.form-control:focus { border-color: var(--pcc-red); box-shadow: 0 0 0 2px rgba(237,28,36,.12); }
.form-label { font-size: 10px; font-weight: 700; color: var(--graphite); margin-bottom: 4px; display: block; text-transform: uppercase; letter-spacing: .04em; }

/* ── FILTER SIDEBAR ─────────────────────────────────── */
.filter-panel {
  width: 220px; flex-shrink: 0; background: white;
  border-right: 1px solid var(--light-grey);
  padding: 14px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
}

.filter-section-title {
  font-size: 9px; font-weight: 700; color: var(--charcoal);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px;
}

.filter-section-title::before {
  content: '';
  display: inline-block; width: 2px; height: 10px;
  background: var(--pcc-red); border-radius: 1px;
}

.filter-pills { display: flex; flex-wrap: wrap; gap: 4px; }

.filter-pill {
  padding: 3px 9px; border-radius: 3px; font-size: 10px; font-weight: 600;
  border: 1px solid var(--light-grey); background: white;
  cursor: pointer; color: var(--graphite); transition: all .1s;
}
.filter-pill:hover { border-color: var(--pcc-red); color: var(--pcc-red); }
.filter-pill.active { background: var(--pcc-red); color: white; border-color: var(--pcc-red); }

/* ── TWO-PANE LAYOUT ────────────────────────────────── */
.two-pane { display: flex; height: calc(100vh - 50px); overflow: hidden; }
.pane-map  { flex: 1; position: relative; }
.pane-list { width: 420px; flex-shrink: 0; display: flex; flex-direction: column; border-left: 1px solid var(--light-grey); }
.pane-list-header { padding: 10px 14px; background: white; border-bottom: 1px solid var(--light-grey); display: flex; align-items: center; gap: 8px; }
.pane-list-body { flex: 1; overflow-y: auto; }

/* ── MAP ────────────────────────────────────────────── */
#map { width: 100%; height: 100%; }

.map-toolbar {
  position: absolute; top: 12px; right: 12px; z-index: 500;
  display: flex; flex-direction: column; gap: 6px;
}
.map-toolbar-row { display: flex; gap: 6px; }

.map-btn {
  background: white;
  border: 1px solid var(--light-grey);
  border-radius: 4px; padding: 6px 10px; font-size: 11px; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow); color: var(--graphite);
  transition: all .15s;
}
.map-btn:hover  { background: var(--soft-grey); }
.map-btn.active { background: var(--charcoal); color: white; border-color: var(--charcoal); }

/* ── DISCOVERY ROW ──────────────────────────────────── */
.facility-row {
  padding: 10px 14px;
  border-bottom: 1px solid var(--light-grey);
  cursor: pointer; transition: background .1s;
}
.facility-row:hover { background: var(--soft-grey); }
.facility-row.active { background: #FDE8E9; border-left: 3px solid var(--pcc-red); }
.frow-name  { font-size: 12px; font-weight: 700; color: var(--charcoal); margin-bottom: 2px; }
.frow-sub   { font-size: 10px; color: var(--graphite); margin-bottom: 4px; }
.frow-chips { display: flex; gap: 4px; flex-wrap: wrap; }

.chip {
  display: inline-block; padding: 2px 7px; border-radius: 3px;
  font-size: 9px; font-weight: 700; border: 1px solid;
}

/* ── SCOREBOARD ─────────────────────────────────────── */
.score-bar { display: flex; height: 5px; border-radius: 3px; background: var(--light-grey); overflow: hidden; margin-top: 3px; }
.score-bar-fill { height: 100%; border-radius: 3px; background: var(--pcc-red); transition: width .4s; }
.score-dim { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.score-dim-item { font-size: 9px; color: var(--graphite); }

/* ── PIPELINE / KANBAN ──────────────────────────────── */
.kanban-board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; min-height: 400px; }

.kanban-col {
  min-width: 200px; max-width: 220px; flex-shrink: 0;
  background: var(--soft-grey);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  border: 1px solid var(--light-grey);
}

.kanban-col-header {
  padding: 8px 10px; font-size: 10px; font-weight: 700; color: white;
  background: var(--charcoal);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex; align-items: center; justify-content: space-between;
  border-left: 3px solid var(--pcc-red);
}

.kanban-col-body { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }

.kanban-card {
  background: white; border: 1px solid var(--light-grey); border-radius: 4px;
  padding: 8px 10px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .1s, box-shadow .1s;
}
.kanban-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); border-left: 2px solid var(--pcc-red); }
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card[draggable="true"]:active { cursor: grabbing; opacity: .7; }
.kanban-col.drag-over { background: #eef2ff !important; border: 1.5px dashed #6366f1; }
.kanban-card-name { font-size: 11px; font-weight: 700; color: var(--charcoal); margin-bottom: 2px; }
.kanban-card-sub  { font-size: 9px; color: var(--graphite); }

.pipeline-tabs { display: flex; border-bottom: 2px solid var(--light-grey); margin-bottom: 14px; }

.pipeline-tab {
  padding: 8px 16px; font-size: 11px; font-weight: 600; cursor: pointer;
  color: var(--graphite); border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.pipeline-tab.active { color: var(--pcc-red); border-bottom-color: var(--pcc-red); }

/* ── ANALYTICS ──────────────────────────────────────── */
.chart-card {
  background: white; border: 1px solid var(--light-grey);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}

.chart-title {
  font-size: 10px; font-weight: 700; color: var(--charcoal);
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: .05em;
  padding-bottom: 8px; border-bottom: 1px solid var(--soft-grey);
  display: flex; align-items: center; gap: 6px;
}

.chart-title::before {
  content: ''; width: 3px; height: 12px;
  background: var(--pcc-red); border-radius: 2px; flex-shrink: 0;
}

.chart-wrap { position: relative; height: 220px; }
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.analytics-full { grid-column: span 2; }

.heatmap-wrap { overflow-x: auto; }
.heatmap-table { border-collapse: collapse; font-size: 9px; width: 100%; }
.heatmap-table th { background: var(--charcoal); color: white; padding: 5px 7px; text-align: center; white-space: nowrap; font-size: 8px; text-transform: uppercase; }
.heatmap-table td { padding: 4px 6px; text-align: center; border: 1px solid var(--light-grey); cursor: pointer; transition: opacity .1s; }
.heatmap-table td:hover { opacity: .8; filter: brightness(1.1); }
.heatmap-row-label { background: var(--soft-grey); font-weight: 600; color: var(--charcoal); text-align: left !important; white-space: nowrap; }

/* ── CAMPAIGNS ──────────────────────────────────────── */
.campaign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.campaign-card {
  background: white; border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  padding: 16px; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  border-top: 3px solid;
}
.campaign-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.campaign-icon { font-size: 24px; margin-bottom: 6px; }
.campaign-name { font-size: 13px; font-weight: 700; color: var(--charcoal); margin-bottom: 2px; }
.campaign-tag  { font-size: 10px; color: var(--graphite); margin-bottom: 8px; }
.campaign-stats { display: flex; gap: 10px; margin-top: 8px; }
.campaign-stat { font-size: 10px; color: var(--graphite); }
.campaign-stat strong { color: var(--charcoal); font-size: 14px; display: block; }

/* ── CONTACTS ───────────────────────────────────────── */
.contact-card { background: white; border: 1px solid var(--light-grey); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; border-left: 3px solid var(--light-grey); }
.contact-card:hover { border-left-color: var(--pcc-red); }
.contact-name { font-size: 12px; font-weight: 700; color: var(--charcoal); }
.contact-role { font-size: 10px; color: var(--graphite); margin-bottom: 6px; }
.contact-status { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 9px; font-weight: 700; }
.status-identified  { background: #FDE8E9; color: var(--pcc-deep-red); }
.status-outreach    { background: #FEF3C7; color: #92400e; }
.status-engaged     { background: #D1FAE5; color: #065f46; }
.status-unmapped    { background: var(--soft-grey); color: var(--mid-grey); }

/* ── MODAL ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: white; border-radius: 6px; box-shadow: var(--shadow-lg);
  width: 600px; max-width: 100%; max-height: 85vh; overflow-y: auto;
  padding: 20px;
  border-top: 3px solid var(--pcc-red);
}

.modal-title {
  font-size: 14px; font-weight: 700; color: var(--charcoal);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}

.modal-title::before {
  content: ''; width: 4px; height: 18px;
  background: var(--pcc-red); border-radius: 2px;
}

.modal-textarea {
  width: 100%; height: 220px; resize: vertical; padding: 10px;
  border: 1px solid var(--light-grey); border-radius: 4px;
  font-size: 12px; font-family: inherit; line-height: 1.5;
}
.modal-footer { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--soft-grey); }

/* ── FIELD VALIDATION ───────────────────────────────── */
.req-star { color: var(--pcc-red); margin-left: 2px; font-weight: 700; }
.field-error-msg {
  font-size: 10px; color: #dc2626; margin-top: 4px;
  display: none; align-items: center; gap: 4px;
}
.field-error-msg.visible { display: flex; }
.form-control.input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 2px rgba(220,38,38,.15);
}

/* ── COMPANY LINK (Rule 3 — clickable company names) ── */
.co-link {
  cursor: pointer;
  text-decoration: none;
}
.co-link:hover {
  color: var(--pcc-blue, #1e3a5f) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.85;
}

/* ── ACTION QUEUE ───────────────────────────────────── */
.action-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--soft-grey); }
.action-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.action-overdue { background: var(--pcc-red); }
.action-due     { background: var(--amber); }
.action-ok      { background: var(--green); }
.action-text    { font-size: 11px; color: var(--charcoal); font-weight: 600; }
.action-sub     { font-size: 10px; color: var(--graphite); }

/* ── ETS OVERRIDES (PCC palette) ────────────────────── */
.ets-badge {
  display:inline-flex; align-items:center; gap:4px;
  padding:2px 8px; border-radius:3px; font-size:10px; font-weight:700;
  white-space:nowrap;
}
.ets-badge.critical { background:#FDE8E9; color:var(--pcc-deep-red); }
.ets-badge.high     { background:#FEF3C7; color:#92400e; }
.ets-badge.moderate { background:#FEF9C3; color:#854d0e; }
.ets-badge.balanced { background:#F3F4F6; color:var(--charcoal); }
.ets-badge.surplus  { background:#D1FAE5; color:#065f46; }
.ets-badge.none     { background:#F3F4F6; color:var(--mid-grey); }

.ets-panel {
  background: linear-gradient(135deg, var(--charcoal) 0%, #1a1a1a 100%);
  border-radius: 6px; padding:14px 16px; color:#fff; margin-bottom:12px;
  border-left: 4px solid var(--pcc-red);
}
.ets-panel-title {
  font-size:11px; font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; color:rgba(255,255,255,.6); margin-bottom:10px;
}
.ets-metric-row { display:flex; gap:10px; flex-wrap:wrap; }
.ets-metric {
  flex:1; min-width:110px; background:rgba(255,255,255,.08);
  border-radius:4px; padding:8px 10px;
  border-top: 2px solid var(--pcc-red);
}
.ets-metric-val { font-size:15px; font-weight:800; color:#fff; }
.ets-metric-lbl { font-size:9px; color:rgba(255,255,255,.5); margin-top:2px; }
.ets-gap-bar { height:5px; background:rgba(255,255,255,.15); border-radius:3px; margin-top:8px; overflow:hidden; }
.ets-gap-fill { height:100%; border-radius:3px; transition:width .4s; }

.ets-intel-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
.ets-intel-grid-full { grid-column:1/-1; }

.ets-chart-card {
  background:#fff; border-radius:6px; padding:14px 16px;
  box-shadow: var(--shadow); border: 1px solid var(--light-grey);
}
.ets-chart-title {
  font-size:10px; font-weight:700; color:var(--charcoal);
  text-transform:uppercase; letter-spacing:.05em; margin-bottom:10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--soft-grey);
  display: flex; align-items: center; gap: 6px;
}
.ets-chart-title::before {
  content:''; width:3px; height:12px;
  background:var(--pcc-red); border-radius:2px; flex-shrink:0;
}

.ets-heatmap { display:grid; gap:2px; overflow-x:auto; }
.ets-hm-cell {
  padding:6px 4px; text-align:center; font-size:10px; font-weight:700;
  border-radius:3px; cursor:pointer; transition:opacity .15s;
}
.ets-hm-cell:hover { opacity:.8; }

.ets-kpi-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:12px; }
.ets-kpi {
  background:#fff; border-radius:6px; padding:14px 16px;
  border:1px solid var(--light-grey); box-shadow:var(--shadow);
  border-top: 3px solid var(--pcc-red);
}
.ets-kpi-val { font-size:22px; font-weight:800; color:var(--charcoal); }
.ets-kpi-lbl { font-size:10px; color:var(--graphite); margin-top:3px; }

.ets-country-table { width:100%; border-collapse:collapse; font-size:11px; }
.ets-country-table th {
  background: var(--charcoal); padding:7px 8px; text-align:left;
  font-weight:700; color:white; border-bottom:none; font-size:9px;
  text-transform:uppercase; letter-spacing:.05em;
}
.ets-country-table th:first-child { border-left: 3px solid var(--pcc-red); }
.ets-country-table td { padding:5px 8px; border-bottom:1px solid var(--soft-grey); }
.ets-country-table tr:hover td { background:#fafafa; }

.gap-bar-inline { display:inline-block; height:6px; border-radius:3px; vertical-align:middle; margin-left:6px; }
.score-d6 { background:#FDE8E9; color:var(--pcc-deep-red); }
.fac-modal-ets { margin-top:12px; padding:12px; background:#FDE8E9; border-radius:4px; border-left:3px solid var(--pcc-red); }
.fac-modal-ets-title { font-size:10px; font-weight:700; color:var(--pcc-deep-red); text-transform:uppercase; letter-spacing:.05em; margin-bottom:8px; }
.sb-ets-col { font-size:10px; }
.ets-filter-pill { display:inline-flex; align-items:center; padding:3px 10px; border-radius:3px; font-size:10px; font-weight:600; cursor:pointer; border:1px solid transparent; transition:all .15s; margin:2px; }
.ets-filter-pill.active { border-color:var(--pcc-red); }
@keyframes pulse-red { 0%,100%{opacity:1} 50%{opacity:.6} }
.pulse-red { animation:pulse-red 1.5s infinite; }

/* ── CAMPAIGN TEMPLATE CARDS ────────────────────────── */
.camp-template-card {
  background: white;
  border: 1px solid var(--light-grey);
  border-left: 3px solid var(--pcc-red);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.camp-template-card:hover {
  box-shadow: var(--shadow-lg);
}
.camp-lead-row:hover td {
  background: #FDE8E9 !important;
}

/* ── ENGINEERING STUDY FLAGS ────────────────────────── */
.es-chip {
  font-style: italic;
  cursor: help;
}
.es-reason-line {
  font-size: 9px;
  color: var(--graphite);
  font-style: italic;
  margin-top: 3px;
  padding-left: 2px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.es-sb-badge {
  font-size: 10px;
  margin-left: 4px;
  cursor: help;
  vertical-align: middle;
}
.es-sb-reason {
  font-size: 9px;
  color: var(--graphite);
  font-style: italic;
  margin-top: 2px;
  line-height: 1.3;
}

/* ── SCROLLBARS ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--light-grey); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--mid-grey); }

/* ── UTILITY ────────────────────────────────────────── */
.text-muted  { color: var(--graphite); }
.text-navy   { color: var(--charcoal); }
.text-blue   { color: var(--pcc-red); }
.text-red    { color: var(--pcc-red); }
.text-green  { color: var(--green); }
.fw-700      { font-weight: 700; }
.fs-10       { font-size: 10px; }
.fs-11       { font-size: 11px; }
.fs-12       { font-size: 12px; }
.mt-4        { margin-top: 4px; }
.mt-8        { margin-top: 8px; }
.mt-12       { margin-top: 12px; }
.mt-16       { margin-top: 16px; }
.mb-8        { margin-bottom: 8px; }
.mb-12       { margin-bottom: 12px; }
.gap-8       { gap: 8px; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-wrap   { flex-wrap: wrap; }
.hidden      { display: none !important; }

/* ── TERRITORY BUILDER FLOATING COMPANY PANEL ───────── */
.tbcp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  max-height: calc(100vh - 80px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.1);
  border: 1px solid var(--light-grey);
  border-top: 3px solid var(--pcc-red);
  z-index: 6000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}
.tbcp.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.tbcp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--charcoal);
  flex-shrink: 0;
}
.tbcp-topbar-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
}
.tbcp-close {
  background: none;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.7);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: background .12s;
}
.tbcp-close:hover { background: rgba(255,255,255,.12); color: white; }
.tbcp-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}
.tbcp-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  padding: 3px 0;
}
.tbcp-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mid-grey);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
}
.tbcp-val {
  color: var(--charcoal);
  font-size: 11px;
  line-height: 1.4;
}

/* Clickable account list rows */
.tb-account-clickable {
  cursor: pointer;
  transition: background .1s, border-color .1s;
  border-left: 3px solid transparent;
}
.tb-account-clickable:hover {
  background: var(--soft-grey);
  border-left-color: var(--pcc-red);
}
.tb-account-active {
  background: #FDE8E9 !important;
  border-left-color: var(--pcc-red) !important;
}

/* ── REPORTING GUIDE CARDS ──────────────────────────── */
.rg-card {
  background: var(--soft-grey);
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  border-top: 3px solid var(--pcc-red);
  padding: 14px 16px;
  display: flex; flex-direction: column;
}
.rg-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--pcc-red); color: white;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-bottom: 8px;
}
.rg-title {
  font-size: 12px; font-weight: 800; color: var(--charcoal);
  margin-bottom: 4px;
}
.rg-source {
  font-size: 10px; color: var(--pcc-red);
  margin-bottom: 8px; font-weight: 600;
  padding: 3px 8px; background: #FDE8E9;
  border-radius: 3px; display: inline-block;
}
.rg-desc {
  font-size: 11px; color: var(--graphite);
  line-height: 1.55; margin-bottom: 10px; flex: 1;
}
.rg-types {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.rg-type {
  font-size: 9px; font-weight: 700;
  background: white; color: var(--charcoal);
  border: 1px solid var(--light-grey);
  border-radius: 3px; padding: 2px 7px;
  white-space: nowrap;
}

/* ── HUB TERRITORY CARDS ────────────────────────────── */
.hub-territory-card {
  background: var(--soft-grey);
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  border-left: 3px solid var(--pcc-red);
  padding: 12px 14px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.hub-territory-card:hover {
  box-shadow: var(--shadow-lg);
  border-left-color: var(--pcc-deep-red);
  background: white;
}
.hub-terr-header {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px;
}
.hub-terr-icon {
  font-size: 16px; color: var(--pcc-red); flex-shrink: 0; line-height: 1.2;
}
.hub-terr-name {
  font-size: 12px; font-weight: 700; color: var(--charcoal);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hub-terr-rep {
  font-size: 10px; color: var(--graphite); margin-top: 2px;
}
.hub-terr-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; margin-bottom: 8px;
  background: white; border-radius: 4px; border: 1px solid var(--light-grey);
  padding: 6px 4px;
}
.hub-terr-stat {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.hub-terr-val {
  font-size: 15px; font-weight: 800; color: var(--charcoal); line-height: 1.1;
}
.hub-terr-lbl {
  font-size: 8px; color: var(--graphite); text-transform: uppercase;
  letter-spacing: .04em; text-align: center;
}
.hub-terr-delete {
  flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: var(--mid-grey); font-size: 12px; font-weight: 700;
  padding: 2px 4px; border-radius: 3px; line-height: 1;
  transition: background .12s, color .12s;
}
.hub-terr-delete:hover { background: #FDE8E9; color: var(--pcc-red); }

.hub-terr-dates {
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--mid-grey);
  border-top: 1px solid var(--light-grey); padding-top: 6px;
}

/* ── SECTOR INTELLIGENCE DRAWER ─────────────────────── */
.sector-drawer {
  position: fixed; top: 0; right: -440px; width: 420px; height: 100vh;
  background: white; border-left: 1px solid var(--light-grey);
  box-shadow: var(--shadow-lg); z-index: 8000;
  display: flex; flex-direction: column;
  transition: right .28s cubic-bezier(.4,0,.2,1);
}
.sector-drawer.open { right: 0; }

.sector-drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.25);
  z-index: 7999; display: none;
}
.sector-drawer.open ~ .sector-drawer-overlay { display: block; }

.sector-drawer-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--charcoal); color: white;
  border-left: 4px solid var(--pcc-red); flex-shrink: 0;
}
.sector-drawer-title {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.sector-drawer-close {
  background: none; border: 1px solid rgba(255,255,255,.3); color: white;
  font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 3px;
  cursor: pointer; transition: background .12s;
}
.sector-drawer-close:hover { background: rgba(255,255,255,.12); }
.sector-drawer-body {
  flex: 1; overflow-y: auto; padding: 16px;
}

/* Drawer internals */
.sd-sector-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--soft-grey);
  border-radius: 6px; margin-bottom: 14px;
}
.sd-sector-icon { font-size: 28px; flex-shrink: 0; }
.sd-sector-name { font-size: 14px; font-weight: 800; color: var(--charcoal); }
.sd-sector-product { font-size: 11px; color: var(--pcc-red); font-weight: 600; margin-top: 2px; }
.sd-section { margin-bottom: 12px; }
.sd-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--graphite); margin-bottom: 4px;
}
.sd-text { font-size: 11px; color: var(--charcoal); line-height: 1.55; }
.sd-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sd-chip {
  font-size: 9px; font-weight: 600;
  background: var(--soft-grey); border: 1px solid var(--light-grey);
  border-radius: 3px; padding: 2px 7px; color: var(--charcoal);
}
.sd-kpis {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-bottom: 12px;
}
.sd-kpi {
  background: var(--soft-grey); border-radius: 4px; padding: 8px;
  border-top: 2px solid var(--pcc-red); text-align: center;
}
.sd-kpi-val { font-size: 16px; font-weight: 800; color: var(--charcoal); }
.sd-kpi-lbl { font-size: 8px; color: var(--graphite); margin-top: 2px; text-transform: uppercase; }
.sd-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.sd-table th {
  background: var(--charcoal); color: white; padding: 5px 7px;
  text-align: left; font-size: 9px; text-transform: uppercase;
}
.sd-table th:first-child { border-left: 2px solid var(--pcc-red); }
.sd-table td { padding: 5px 7px; border-bottom: 1px solid var(--light-grey); }
.sd-table tr:nth-child(even) td { background: var(--soft-grey); }

/* ── SECTOR INTELLIGENCE PANEL CARDS ─────────────────── */
.si-card {
  background: white; border: 1px solid var(--light-grey);
  border-radius: var(--radius); padding: 12px 14px;
  cursor: pointer; transition: box-shadow .15s, border-color .15s;
}
.si-card:hover { box-shadow: var(--shadow-lg); border-color: var(--pcc-red); }
.si-card-header {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px;
}
.si-icon { font-size: 20px; flex-shrink: 0; }
.si-card-name { font-size: 11px; font-weight: 700; color: var(--charcoal); }
.si-card-opp { font-size: 10px; font-weight: 600; margin-top: 1px; }
.si-card-stats {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; margin-bottom: 8px;
  background: var(--soft-grey); border-radius: 4px; padding: 6px;
}
.si-stat { display: flex; flex-direction: column; align-items: center; }
.si-stat-val { font-size: 14px; font-weight: 800; color: var(--charcoal); line-height: 1.1; }
.si-stat-lbl { font-size: 8px; color: var(--graphite); text-transform: uppercase; letter-spacing: .03em; }
.si-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 6px; border-top: 1px solid var(--light-grey);
}
.si-ets-tag { font-size: 9px; font-weight: 600; }

/* Confidence badges */
.si-confidence {
  display: inline-block; font-size: 8px; font-weight: 700;
  padding: 2px 7px; border-radius: 3px; white-space: nowrap;
  flex-shrink: 0;
}

/* Matrix row labels — clickable sector names */
.si-row-label {
  cursor: pointer !important;
  transition: background .1s;
}
.si-row-label:hover { background: #FDE8E9 !important; color: var(--pcc-red) !important; }

/* ── SECTION DIVIDER ────────────────────────────────── */
.section-rule {
  height: 1px; background: var(--light-grey);
  margin: 16px 0; position: relative;
}

/* ── REPORT MODAL ───────────────────────────────────── */
#report-modal .modal-box { width: 880px; max-width: 96vw; }

.report-preview {
  background: white;
  border: 1px solid var(--light-grey);
  border-radius: 4px;
  padding: 32px 36px;
  font-family: Arial, Helvetica, sans-serif;
}

.report-cover {
  display: flex; flex-direction: column;
  padding: 32px 0 24px;
  border-bottom: 3px solid var(--pcc-red);
  margin-bottom: 24px;
}

.report-cover-top {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 24px;
}

.report-cover-logo img { height: 44px; object-fit: contain; }

.report-cover-meta {
  font-size: 10px; color: var(--graphite); text-align: right; line-height: 1.7;
}

.report-title-block {}
.report-title { font-size: 22px; font-weight: 800; color: var(--charcoal); margin-bottom: 4px; }
.report-subtitle { font-size: 12px; color: var(--graphite); }
.report-red-rule { width: 48px; height: 4px; background: var(--pcc-red); border-radius: 2px; margin: 10px 0; }

.report-section { margin-bottom: 22px; }
.report-section-title {
  font-size: 11px; font-weight: 700; color: var(--charcoal);
  text-transform: uppercase; letter-spacing: .06em;
  padding-bottom: 6px; margin-bottom: 10px;
  border-bottom: 2px solid var(--pcc-red);
  display: flex; align-items: center; gap: 6px;
}

.report-kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
.report-kpi {
  background: var(--soft-grey); border-radius: 4px; padding: 12px 14px;
  border-top: 3px solid var(--pcc-red);
}
.report-kpi-val { font-size: 22px; font-weight: 800; color: var(--charcoal); }
.report-kpi-lbl { font-size: 9px; color: var(--graphite); margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }

.report-table { width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 12px; }
.report-table th {
  background: var(--charcoal); color: white; padding: 7px 8px;
  text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .04em;
}
.report-table th:first-child { border-left: 3px solid var(--pcc-red); }
.report-table td { padding: 6px 8px; border-bottom: 1px solid var(--light-grey); }
.report-table tr:nth-child(even) td { background: #fafafa; }

.report-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--light-grey);
  font-size: 9px; color: var(--mid-grey);
  margin-top: 20px;
}

/* ── WORKSPACE SUB-TABS BAR ────────────────────────── */
.workspace-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border-bottom: 1px solid var(--light-grey);
  padding: 8px 20px;
  height: 38px;
  flex-shrink: 0;
  overflow-x: auto;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.workspace-tab-btn {
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--graphite);
  background: var(--soft-grey);
  border: 1px solid var(--light-grey);
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}

.workspace-tab-btn:hover {
  background: #e5e7eb;
  color: var(--charcoal);
  border-color: #cbd5e1;
}

.workspace-tab-btn.active {
  background: var(--pcc-red);
  color: white;
  border-color: var(--pcc-red);
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(237,28,36,.2);
}

/* ── COMMAND CENTER HOMEPAGE STYLE RULES ── */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}
.page-head h1 {
  font-size: 18px;
  color: var(--pcc-black);
  font-weight: 800;
  letter-spacing: -.2px;
}
.page-head .sub {
  font-size: 12px;
  color: var(--graphite);
  margin-top: 2px;
}
.hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-left: 4px solid var(--pcc-red);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.hero .big {
  font-size: 22px;
}
.hero h2 {
  font-size: 14px;
  color: var(--pcc-black);
  font-weight: 700;
  margin-bottom: 2px;
}
.hero p {
  font-size: 12px;
  color: var(--graphite);
}
.hero .act {
  margin-left: auto;
  background: var(--pcc-red);
  color: var(--white);
  border: none;
  border-radius: 7px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.hero .act:hover {
  background: var(--pcc-deep-red);
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--graphite);
  margin: 12px 2px 8px;
}
.attn {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.attn-card {
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: .15s;
}
.attn-card:hover {
  border-color: var(--mid-grey);
  transform: translateY(-1px);
}
.attn-card .ico {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--soft-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 14px;
}
.attn-card .num {
  font-size: 22px;
  font-weight: 800;
  color: var(--pcc-black);
  line-height: 1;
}
.attn-card .lbl {
  font-size: 11px;
  color: var(--graphite);
  margin-top: 3px;
}
.attn-card .tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}
.tag.red {
  background: #fdecec;
  color: var(--pcc-deep-red);
}
.tag.warn {
  background: #fdf6e3;
  color: #9a7b00;
}
.tag.ok {
  background: #e9f6ee;
  color: var(--green);
}
.cols {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
}
.card {
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: 10px;
  padding: 14px 16px;
}
.card h3 {
  font-size: 13px;
  color: var(--pcc-black);
  font-weight: 700;
  margin-bottom: 2px;
}
.card .ch-sub {
  font-size: 11px;
  color: var(--mid-grey);
  margin-bottom: 12px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.link {
  font-size: 11px;
  color: var(--pcc-red);
  font-weight: 600;
  cursor: pointer;
}
.link:hover {
  text-decoration: underline;
}
.task {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--soft-grey);
}
.task:last-child {
  border-bottom: none;
}
.pri {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: var(--white);
  flex: none;
}
.pri.p1 { background: var(--pcc-red); }
.pri.p2 { background: var(--charcoal); }
.pri.p3 { background: var(--mid-grey); }
.task .t-main { flex: 1; min-width: 0; }
.task .t-name { font-size: 12.5px; color: var(--pcc-black); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task .t-meta { font-size: 10.5px; color: var(--mid-grey); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task .log {
  font-size: 11px;
  color: var(--graphite);
  border: 1px solid var(--light-grey);
  background: var(--white);
  border-radius: 6px;
  padding: 5px 9px;
  cursor: pointer;
  transition: all .15s;
}
.task .log:hover { border-color: var(--pcc-red); color: var(--pcc-red); }
.kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.kpi {
  background: var(--soft-grey);
  border: 1px solid var(--light-grey);
  border-radius: 8px;
  padding: 10px 12px;
}
.kpi .k-l { font-size: 10.5px; color: var(--graphite); text-transform: uppercase; letter-spacing: .05em; }
.kpi .k-v { font-size: 19px; font-weight: 800; color: var(--pcc-black); margin-top: 3px; }
.kpi .k-d { font-size: 10.5px; font-weight: 600; margin-top: 1px; }
.up { color: var(--green); }
.down { color: var(--pcc-deep-red); }
.bar-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.bar-row .nm { width: 60px; font-size: 11px; color: var(--graphite); }
.bar { flex: 1; height: 9px; background: var(--soft-grey); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--pcc-red); }
.bar-row .v { width: 34px; text-align: right; font-size: 11px; color: var(--charcoal); font-weight: 600; }
.brief { background: var(--soft-grey); border: 1px solid var(--light-grey); border-radius: 8px; padding: 12px; font-size: 12px; color: var(--graphite); line-height: 1.6; }
.brief b { color: var(--charcoal); }
.brief .by { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--mid-grey); margin-bottom: 7px; }

/* ── PRINT STYLES ───────────────────────────────────── */

@media print {
  .sidebar, .topbar, .filter-panel, .map-toolbar,
  .modal-footer, #report-btn-bar { display: none !important; }
  .report-preview { border: none !important; padding: 0 !important; }
  body { overflow: visible !important; }
}
