/* ==========================================================================
   LeadSavePro — CEO HQ Stylesheet (command-center/public/growth-hq.css)
   Clean, Light, Simple Enterprise UI (Matches Virtual Receptionist & Opportunity Hunter)
   ========================================================================== */

.main:has(#tab-growth-hq:not(.hidden)) {
  background: #E4E8F0 !important;
  color: #0F172A !important;
}

.shell:has(#tab-growth-hq:not(.hidden)) #globalBellFloatBtn {
  display: none !important;
}

#tab-growth-hq {
  --bg: #E4E8F0;
  --surface: #FFFFFF;
  --surface2: #ECF1F7;
  --surface3: #D6E0EC;
  --border: #8A9BB0;
  --border-strong: #76889E;
  --text: #0F172A;
  --text2: #334155;
  --text3: #52637A;
  --accent: #2563EB;
  --accent2: #1D4ED8;
  --blue: #2563EB;
  --green: #15803D;
  --orange: #B45309;
  --red: #DC2626;
  color: #0F172A;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.45;
}

.ghq-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 48px;
  max-width: 1620px;
}

/* ── Simplified Top Header & Filter Bar ── */
.ghq-topbar {
  background: #FFFFFF;
  border: 1.5px solid #76889E;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.06);
}

.ghq-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ghq-title-group h1 {
  font-size: 22px;
  font-weight: 900;
  color: #0F172A;
  margin: 0 0 3px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.ghq-title-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: #DBEAFE;
  color: #1D4ED8;
  border: 1px solid #93C5FD;
}

.ghq-title-group p {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  margin: 0;
}

.ghq-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ghq-btn {
  background: #ECF1F7;
  color: #1E293B;
  border: 1.5px solid #8A9BB0;
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
}

.ghq-btn:hover {
  background: #FFFFFF;
  border-color: #64748B;
  color: #0F172A;
}

.ghq-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ghq-btn-primary {
  background: #2563EB;
  border-color: #1E3A8A;
  color: #FFFFFF;
  font-weight: 800;
}

.ghq-btn-primary:hover {
  background: #1D4ED8;
  border-color: #1E3A8A;
  color: #FFFFFF;
}

.ghq-btn-green {
  background: #16A34A;
  border-color: #14532D;
  color: #FFFFFF;
  font-weight: 800;
}

.ghq-btn-green:hover {
  background: #15803D;
  border-color: #14532D;
  color: #FFFFFF;
}

.ghq-btn-danger-outline {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #B91C1C;
}

.ghq-btn-danger-outline:hover {
  background: #FEE2E2;
  border-color: #F87171;
  color: #991B1B;
}

.ghq-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1.5px solid #CBD5E1;
}

.ghq-filter-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ghq-filter-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin-right: 2px;
}

.ghq-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #D6E0EC;
  border: 1.5px solid #76889E;
  border-radius: 10px;
  padding: 4px;
}

.ghq-pill {
  background: #FFFFFF;
  color: #1E293B;
  border: 1px solid #8A9BB0;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.14s ease;
}

.ghq-pill-group .ghq-pill {
  background: #FFFFFF;
  border: 1px solid #8A9BB0;
  padding: 6px 12px;
}

.ghq-pill:hover,
.ghq-pill-group .ghq-pill:hover {
  color: #0F172A;
  border-color: #475569;
  background: #F8FAFC;
}

.ghq-pill.active,
.ghq-pill-group .ghq-pill.active {
  background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border-color: #1E3A8A;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(29, 78, 216, 0.28);
}

.ghq-select {
  background: #ECF1F7 !important;
  color: #0F172A !important;
  border: 1.5px solid #8A9BB0 !important;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ghq-select:focus {
  outline: none !important;
  background: #FFFFFF !important;
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}

/* ── Layer 1: 6 Executive North-Star Cards ── */
.ghq-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(195px, 1fr));
  gap: 14px;
}

@media (max-width: 1440px) {
  .ghq-kpi-grid {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
  }
}

@media (max-width: 820px) {
  .ghq-kpi-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.ghq-kpi-card {
  background: #FFFFFF;
  border: 1.5px solid #76889E;
  border-radius: 14px;
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.06);
}

.ghq-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #94A3B8;
}

.ghq-kpi-card.green::before { background: #16A34A; }
.ghq-kpi-card.blue::before { background: #2563EB; }
.ghq-kpi-card.orange::before { background: #D97706; }
.ghq-kpi-card.red::before { background: #DC2626; }

.ghq-kpi-label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ghq-kpi-val {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #0F172A;
  line-height: 1.15;
}

.ghq-kpi-sub {
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
  background: #ECF1F7;
  border: 1px solid #B8C4D4;
  border-radius: 8px;
  padding: 6px 9px;
}

.ghq-kpi-sub b {
  color: #0F172A;
  font-weight: 800;
}

.ghq-tier-mini-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.ghq-mini-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ECF1F7;
  border: 1px solid #8A9BB0;
  color: #1E293B;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ghq-mini-tag.paid { background: #DCFCE7; border-color: #86EFAC; color: #15803D; }
.ghq-mini-tag.intro { background: #DBEAFE; border-color: #93C5FD; color: #1D4ED8; }
.ghq-mini-tag.trial { background: #FEF3C7; border-color: #FCD34D; color: #B45309; }
.ghq-mini-tag.freebie { background: #E0E7FF; border-color: #A5B4FC; color: #4338CA; }
.ghq-mini-tag.danger { background: #FEE2E2; border-color: #FCA5A5; color: #B91C1C; }

/* ── Layer 1B: Scale / Fix / Cut Action Strip ── */
.ghq-action-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
}

@media (max-width: 1100px) {
  .ghq-action-strip {
    grid-template-columns: 1fr;
  }
}

.ghq-directive-card {
  background: #FFFFFF;
  border: 1.5px solid #76889E;
  border-radius: 14px;
  padding: 17px 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.06);
}

.ghq-directive-card.scale { border-left: 5px solid #16A34A; }
.ghq-directive-card.fix { border-left: 5px solid #D97706; }
.ghq-directive-card.cut { border-left: 5px solid #DC2626; }

.ghq-directive-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
}

.ghq-directive-card.scale .ghq-directive-badge { color: #15803D; background: #DCFCE7; border: 1px solid #86EFAC; }
.ghq-directive-card.fix .ghq-directive-badge { color: #B45309; background: #FEF3C7; border: 1px solid #FCD34D; }
.ghq-directive-card.cut .ghq-directive-badge { color: #B91C1C; background: #FEE2E2; border: 1px solid #FCA5A5; }

.ghq-directive-title {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.3;
  margin-top: 2px;
}

.ghq-directive-detail {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.5;
  background: #ECF1F7;
  border: 1px solid #B8C4D4;
  border-radius: 9px;
  padding: 8px 11px;
  margin-top: 2px;
}

/* ── Layer 1C: Winning Avatar & Playbook Banner ── */
.ghq-avatar-banner {
  background: #FFFFFF;
  border: 1.5px solid #76889E;
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.06);
}

.ghq-avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .ghq-avatar-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .ghq-avatar-grid { grid-template-columns: 1fr; }
}

.ghq-avatar-slot {
  background: #ECF1F7;
  border: 1.5px solid #8A9BB0;
  border-radius: 11px;
  padding: 13px 15px;
}

.ghq-avatar-slot-lbl {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin-bottom: 4px;
}

.ghq-avatar-slot-val {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.4;
}

/* ── Layer 1D: Funnel Waterfall ── */
.ghq-panel {
  background: #FFFFFF;
  border: 1.5px solid #76889E;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.06);
}

.ghq-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ghq-panel-head h2 {
  font-size: 19px;
  font-weight: 900;
  color: #0F172A;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.015em;
}

.ghq-leak-callout {
  background: #FEE2E2;
  border: 1.5px solid #F87171;
  color: #B91C1C;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.ghq-waterfall {
  display: grid;
  grid-template-columns: repeat(9, minmax(118px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ghq-stage-box {
  background: #ECF1F7;
  border: 1.5px solid #8A9BB0;
  border-radius: 12px;
  padding: 13px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  position: relative;
}

.ghq-stage-box:hover {
  background: #FFFFFF;
  border-color: #2563EB;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.ghq-stage-box.leak-alert {
  border-color: #EF4444;
  background: #FEF2F2;
}

.ghq-stage-box.leak-alert:hover {
  border-color: #DC2626;
}

.ghq-stage-step {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ghq-leak-pill {
  background: #DC2626;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}

.ghq-stage-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #1E293B;
  line-height: 1.3;
  min-height: 32px;
  margin-top: 2px;
}

.ghq-stage-count {
  font-size: 22px;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.02em;
}

.ghq-stage-bar-track {
  height: 6px;
  background: #CBD5E1;
  border-radius: 99px;
  overflow: hidden;
}

.ghq-stage-bar-fill {
  height: 100%;
  background: #2563EB;
  border-radius: 99px;
}

.ghq-stage-box.leak-alert .ghq-stage-bar-fill {
  background: #DC2626;
}

.ghq-stage-meta {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── Layer 2: Collapsible Deep-Dive Accordions ── */
.ghq-section-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 2px 4px;
}

.ghq-section-divider h3 {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #0F172A;
  margin: 0;
}

.ghq-accordion {
  background: #FFFFFF;
  border: 1.5px solid #76889E;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ghq-accordion.open {
  border-color: #475569;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.ghq-acc-header {
  padding: 16px 22px;
  background: #FFFFFF;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
  transition: background 0.14s ease;
}

.ghq-acc-header:hover {
  background: #F1F5F9;
}

.ghq-accordion.open .ghq-acc-header {
  background: #ECF1F7;
}

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

.ghq-acc-title {
  font-size: 17.5px;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.015em;
}

.ghq-acc-summary-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: #1E293B;
  background: #FFFFFF;
  border: 1px solid #8A9BB0;
  padding: 3px 10px;
  border-radius: 999px;
}

.ghq-acc-chevron {
  font-size: 12px;
  color: #475569;
  transition: transform 0.2s ease;
}

.ghq-accordion.open .ghq-acc-chevron {
  transform: rotate(180deg);
  color: #0F172A;
}

.ghq-acc-body {
  display: none;
  padding: 18px 22px 24px 22px;
  border-top: 1.5px solid #8A9BB0;
  background: #E4E8F0;
}

.ghq-accordion.open .ghq-acc-body {
  display: block;
}

/* ── Data Tables inside Accordions ── */
.ghq-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 18px;
}

@media (max-width: 680px) {
  .ghq-two-col { grid-template-columns: 1fr; }
}

.ghq-subcard {
  background: #FFFFFF;
  border: 1.5px solid #76889E;
  border-radius: 13px;
  padding: 18px;
  overflow-x: auto;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.ghq-subcard h4 {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

.ghq-subcard p.sub {
  font-size: 12.5px;
  color: #475569;
  margin: 0 0 12px 0;
}

.ghq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.ghq-table th {
  text-align: left;
  padding: 10px 9px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0F172A;
  background: #DFE7F2;
  border-bottom: 1.5px solid #8A9BB0;
  white-space: nowrap;
}

.ghq-table td {
  padding: 10px 9px;
  border-bottom: 1px solid #CBD5E1;
  color: #1E293B;
  font-weight: 500;
  vertical-align: middle;
}

.ghq-table tbody tr:last-child td {
  border-bottom: none;
}

.ghq-table tbody tr:hover td {
  background: #ECF1F7;
}

.ghq-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ghq-good { color: #15803D !important; font-weight: 700; }
.ghq-warn { color: #B45309 !important; font-weight: 700; }
.ghq-bad  { color: #DC2626 !important; font-weight: 700; }

/* ── Modals (Light & Clean) ── */
.ghq-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(3px);
  z-index: 99995;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ghq-modal-backdrop.open {
  display: flex;
}

.ghq-modal {
  background: #FFFFFF;
  color: #0F172A;
  border: 2px solid #76889E;
  border-radius: 16px;
  width: 780px;
  max-width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.24);
}

.ghq-modal-head {
  padding: 16px 22px;
  background: #DFE7F2;
  border-bottom: 1.5px solid #8A9BB0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ghq-modal-head h3 {
  font-size: 17.5px;
  font-weight: 900;
  color: #0F172A;
  margin: 0;
}

.ghq-modal-body {
  padding: 20px 22px;
  background: #FFFFFF;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ghq-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.ghq-field label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 5px;
}

.ghq-field input,
.ghq-field select,
.ghq-field textarea,
.ghq-stack-item input,
.ghq-stack-item select {
  width: 100%;
  background: #ECF1F7 !important;
  color: #0F172A !important;
  border: 1.5px solid #8A9BB0 !important;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ghq-field input:focus,
.ghq-field select:focus,
.ghq-field textarea:focus,
.ghq-stack-item input:focus,
.ghq-stack-item select:focus {
  outline: none !important;
  background: #FFFFFF !important;
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}
