/* ===== KPI CARDS ===== */
.card {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  border-color: var(--b2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}
.card .bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}
.card .lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 10px;
}
.card .val {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--t1);
  line-height: 1;
}
.card .val.xl {
  font-size: 34px;
}
/* MoM delta badge — soft pastel so the card value stays the hero.
   Applies to any `.chg`, not just inside `.card`, so social.js + similar
   inline usages share the same restrained aesthetic. */
.chg {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid transparent;
  line-height: 1.4;
}
.card .chg { margin-top: 8px; }
.chg.up {
  background: rgba(34, 197, 94, 0.1);
  color: #4ADE80;
  border-color: rgba(34, 197, 94, 0.2);
}
.chg.dn {
  background: rgba(239, 68, 68, 0.1);
  color: #FCA5A5;
  border-color: rgba(239, 68, 68, 0.2);
}
.chg.neutral {
  background: rgba(255, 255, 255, 0.04);
  color: var(--t4);
  border-color: rgba(255, 255, 255, 0.08);
}
.card .sub {
  font-size: 10px;
  color: var(--t2);
  margin-top: 6px;
}

/* ===== META CARD ===== */
.card.meta-bg {
  background: linear-gradient(135deg, #0C3D8F, #1877F2);
  border: none;
  box-shadow: 0 4px 24px rgba(24,119,242,.15);
}
.card.meta-bg .lbl {
  color: rgba(255,255,255,.5);
}
.card.meta-bg .val {
  color: #fff;
}
.card.meta-bg .sub {
  color: rgba(255,255,255,.4);
}

/* ===== CHARTS ===== */
.ch {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ch .ch-t {
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: 2px;
}
.ch .ch-s {
  font-size: 10px;
  color: var(--t4);
  margin-bottom: 12px;
}

/* ===== TABLE WRAPPER ===== */
.tw {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.tw .th {
  padding: 16px 20px 8px;
  font-size: 12px;
  font-weight: 700;
}
table {
  width: 100%;
  border-collapse: collapse;
}
table th {
  padding: 8px 16px;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--t4);
  font-weight: 600;
  text-align: right;
  border-bottom: 1px solid var(--b2);
}
table th:first-child {
  text-align: left;
}
table td {
  padding: 9px 16px;
  font-size: 11px;
  color: var(--t2);
  text-align: right;
  border-bottom: 1px solid var(--b1);
}
table td:first-child {
  text-align: left;
  color: var(--t1);
  font-weight: 500;
}
table td strong {
  color: #fff;
}
table tr:hover td {
  background: rgba(255,255,255,.01);
}
table tr.hl td {
  background: rgba(234,143,215,.03);
}
table tr.hl td:first-child {
  color: var(--gold);
  font-weight: 700;
}

/* ===== PILLS — pastel status/delta, pro look ===== */
.p {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.4;
  border: 1px solid transparent;
}
.p.g { background: rgba(34, 197, 94, 0.1); color: #4ADE80; border-color: rgba(34, 197, 94, 0.2); }
.p.r { background: rgba(239, 68, 68, 0.1); color: #FCA5A5; border-color: rgba(239, 68, 68, 0.2); }
.p.y { background: rgba(234, 179, 8, 0.1); color: #FCD34D; border-color: rgba(234, 179, 8, 0.2); }
.p.n { background: rgba(255, 255, 255, 0.04); color: var(--t4); border-color: rgba(255, 255, 255, 0.08); }

/* ===== INSIGHT CARDS ===== */
.insight-hero {
  text-align: center;
  padding: 40px 0 32px;
}
.insight-hero h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.insight-hero p {
  color: var(--t3);
  font-size: 13px;
}
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.insight-card {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  padding: 28px;
  position: relative;
}
.insight-card.full {
  grid-column: 1 / -1;
}
.insight-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.insight-card h3 .icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.insight-card .tag {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--t4);
  margin-bottom: 12px;
}
.insight-card p {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.7;
  margin-bottom: 10px;
}
.insight-card p strong {
  color: var(--t1);
}
.insight-card ul {
  list-style: none;
  padding: 0;
}
.insight-card ul li {
  font-size: 11px;
  color: var(--t2);
  padding: 6px 0;
  border-bottom: 1px solid var(--b1);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.insight-card ul li:last-child {
  border: none;
}
.insight-card ul li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.insight-card ul li.green::before  { background: var(--green); }
.insight-card ul li.gold::before   { background: var(--gold); }
.insight-card ul li.blue::before   { background: var(--blue); }
.insight-card ul li.red::before    { background: var(--red); }

.kpi-mini {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}
.kpi-mini .km {
  background: var(--bg);
  border: 1px solid var(--b1);
  border-radius: 10px;
  padding: 12px 14px;
  flex: 1;
  text-align: center;
}
.kpi-mini .km .kmv {
  font-size: 18px;
  font-weight: 800;
  color: var(--t1);
}
.kpi-mini .km .kml {
  font-size: 8px;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ===== META SECTION — inline with left blue accent to flag META source ===== */
.meta-section {
  border: none;
  border-left: 3px solid #1877F2;
  border-radius: 0;
  padding: 4px 0 4px 14px;
  margin: 0 0 16px;
  background: transparent;
}
.meta-section .sl { color: #4FA0FF; }

/* ===== PLACEHOLDER / LOADING ===== */
.page-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--t3);
  font-size: 14px;
  font-weight: 500;
}

/* ===== DATE RANGE PICKER ===== */
.dp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin: 0 0 20px 0;
  background: linear-gradient(135deg, rgba(24, 119, 242, 0.06), rgba(139, 92, 246, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}
.dp-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.dp-bar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--t4);
  text-transform: uppercase;
}
.dp-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #F1F5F9;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dp-trigger:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(234, 143, 215, 0.3);
}
.dp-trigger svg {
  opacity: 0.7;
}
.dp-trigger svg:first-child {
  color: var(--gold, #EA8FD7);
  opacity: 1;
}
.dp-days {
  font-size: 11px;
  color: var(--t4);
  font-weight: 500;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}
.dp-refresh {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--t3);
  cursor: pointer;
  transition: all 0.15s ease;
}
.dp-refresh:hover {
  color: var(--gold, #EA8FD7);
  transform: rotate(45deg);
}
.dp-refresh.spinning svg {
  animation: dp-spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes dp-spin {
  to { transform: rotate(360deg); }
}
.is-refreshing {
  position: relative;
  transition: opacity 0.18s ease;
}
.is-refreshing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(234,143,215,0.04) 50%, transparent 100%);
  pointer-events: none;
  animation: refresh-shimmer 0.9s ease-in-out;
  z-index: 1;
}
@keyframes refresh-shimmer {
  0% { opacity: 0; transform: translateX(-20%); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateX(20%); }
}
.dp-panel {
  padding: 18px;
  margin: -8px 0 20px 0;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  backdrop-filter: blur(12px);
}
.dp-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.dp-preset {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: var(--t2);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dp-preset:hover {
  background: rgba(234, 143, 215, 0.08);
  border-color: rgba(234, 143, 215, 0.3);
  color: #F1F5F9;
}
.dp-preset.on {
  background: linear-gradient(135deg, rgba(234, 143, 215, 0.15), rgba(234, 143, 215, 0.05));
  border-color: var(--gold, #EA8FD7);
  color: var(--gold, #EA8FD7);
  font-weight: 700;
}
.dp-preset.is-current {
  position: relative;
}
.dp-preset.is-current::before {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: dp-current-pulse 2s ease-in-out infinite;
}
@keyframes dp-current-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25); }
  50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); }
}
.dp-updated-slot:empty {
  display: none;
}
.dp-updated-slot .status-badge {
  font-size: 11px;
}
.dp-custom {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.dp-custom-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.dp-custom-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  color: var(--t4);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.dp-custom-row input[type="date"] {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #F1F5F9;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color-scheme: dark;
}
.dp-custom-row input[type="date"]:focus {
  outline: none;
  border-color: var(--gold, #EA8FD7);
}
.dp-apply {
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--gold, #EA8FD7), #C96BB5);
  border: none;
  border-radius: 8px;
  color: #0B1120;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dp-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 143, 215, 0.3);
}

/* ===== PAID LOADING / ERROR STATES ===== */
.paid-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 18px;
  color: var(--t3);
  font-size: 13px;
}
.paid-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--gold, #EA8FD7);
  border-radius: 50%;
  animation: dpspin 0.9s linear infinite;
}
@keyframes dpspin {
  to { transform: rotate(360deg); }
}

/* ===== SKELETON LOADERS (pink shimmer) ===== */
.skel {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(234, 143, 215, 0.08);
  border-radius: 0;
}
.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(234, 143, 215, 0.04) 30%,
    rgba(234, 143, 215, 0.22) 50%,
    rgba(234, 143, 215, 0.04) 70%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: skel-shimmer 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes skel-shimmer {
  100% { transform: translateX(100%); }
}
.skel-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.012);
  border: 1px solid rgba(234, 143, 215, 0.1);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 110px;
  position: relative;
  overflow: hidden;
}
.skel-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(234, 143, 215, 0.04) 30%,
    rgba(234, 143, 215, 0.18) 50%,
    rgba(234, 143, 215, 0.04) 70%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: skel-shimmer 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}
.skel-line {
  height: 12px;
  border-radius: 4px;
}
.skel-line.sm { height: 10px; }
.skel-line.lg { height: 22px; }
.skel-line.xl { height: 32px; }
.skel-row-r4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.skel-row-r5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.skel-row-r2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.skel-chart {
  height: 300px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.012);
  border: 1px solid rgba(234, 143, 215, 0.1);
  position: relative;
  overflow: hidden;
}
.skel-chart::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(234, 143, 215, 0.04) 30%,
    rgba(234, 143, 215, 0.18) 50%,
    rgba(234, 143, 215, 0.04) 70%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: skel-shimmer 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

/* ===== STATUS BADGES (Live / Cached / Stale / Archive) ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  vertical-align: middle;
  line-height: 1;
  font-family: 'Geist Mono', 'SF Mono', monospace;
}
.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  position: relative;
}
.status-badge.live {
  color: #4ADE80;
  border-color: rgba(74, 222, 128, 0.25);
  background: rgba(34, 197, 94, 0.06);
}
.status-badge.live .dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.35);
  animation: sbpulse 1.8s ease-out infinite;
}
@keyframes sbpulse {
  0% { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}
.status-badge.cached {
  color: #93C5FD;
  border-color: rgba(147, 197, 253, 0.2);
  background: rgba(59, 130, 246, 0.05);
}
.status-badge.stale {
  color: #FCD34D;
  border-color: rgba(253, 224, 71, 0.22);
  background: rgba(234, 179, 8, 0.06);
}
.status-badge.archive {
  color: var(--t4);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}
.paid-error {
  padding: 24px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  color: #FCA5A5;
  font-size: 13px;
  text-align: center;
}

/* Hide global month selector on Paid Media page (has its own date range picker) */
body.page-paid .month-selector { display: none !important; }

/* ===== BUDGET TRACKER ===== */
.budget-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 0 10px 0;
}
@media (max-width: 900px) {
  .budget-wrap { grid-template-columns: repeat(2, 1fr); }
}
.budget-card {
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.014), rgba(255, 255, 255, 0.004));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.budget-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--t4);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.budget-val {
  font-size: 26px;
  font-weight: 800;
  color: #F1F5F9;
  font-family: 'Inter', sans-serif;
  line-height: 1.1;
  letter-spacing: -0.3px;
}
.budget-sub {
  margin-top: 6px;
  font-size: 11px;
  color: var(--t4);
  font-weight: 500;
}
.budget-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(234, 143, 215, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  transition: border-color 0.15s ease;
}
.budget-input-row:focus-within {
  border-color: var(--gold, #EA8FD7);
}
.budget-currency {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold, #EA8FD7);
}
.budget-input-row input[type="number"] {
  flex: 1;
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #F1F5F9;
  letter-spacing: -0.3px;
  padding: 0;
  -moz-appearance: textfield;
}
.budget-input-row input[type="number"]::-webkit-outer-spin-button,
.budget-input-row input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.budget-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 0 28px 0;
}
.budget-bar-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
  border-radius: 4px;
}

/* ===== INVESTMENT CONSUMPTION BAR (hero) ===== */
.invest-bar {
  margin: 4px 0 28px 0;
  padding: 18px 20px 16px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.012), rgba(255,255,255,.004));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
}
.invest-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.invest-bar-lbl {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #9A9A9A;
  text-transform: uppercase;
}
.invest-bar-val {
  font-family: 'Geist', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #FFFFFF;
  white-space: nowrap;
}
.invest-bar-sep {
  color: #5A5A5A;
  font-weight: 500;
  margin: 0 2px;
}
.invest-bar-pct {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  color: #9A9A9A;
  letter-spacing: 0.04em;
  margin-left: 4px;
}
.invest-bar-track {
  position: relative;
  height: 10px;
  background: rgba(255,255,255,.05);
  border-radius: 6px;
  overflow: visible;
}
.invest-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(.22,1,.36,1), background 0.3s ease, box-shadow 0.3s ease;
}
.invest-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 55%);
  pointer-events: none;
}
.invest-bar-thumb {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 18px;
  transform: translate(-50%, -50%);
  background: #FFFFFF;
  border-radius: 2px;
  transition: left 0.8s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
.invest-bar-scale {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 8px);
  display: flex;
  justify-content: space-between;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #5A5A5A;
}
.invest-bar-foot {
  margin-top: 30px;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #6D6D6D;
  text-align: right;
  text-transform: uppercase;
}

/* Invest bar hover tooltip — glass like echarts */
.invest-bar-tip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 220px;
  padding: 14px 18px;
  background: rgba(12, 12, 12, 0.55);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
  color: #FFFFFF;
  letter-spacing: 0.01em;
}
.invest-bar-track:hover .invest-bar-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.invest-bar-tip-lbl {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9A9A9A;
  margin-bottom: 10px;
}
.invest-bar-tip-val {
  font-family: 'Geist', 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #FFFFFF;
  line-height: 1;
}
.invest-bar-tip-foot {
  margin-top: 8px;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9A9A9A;
}
/* Collapsible META PAID MEDIA section in dashboard */
.meta-section { margin-bottom: 20px; }
.meta-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 0 0 12px 0;
  margin: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.meta-section-head .sl { flex: 1; }
.meta-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9A9A9A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.meta-section-head:hover .meta-section-toggle {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
}
.meta-section-toggle svg { transition: transform 0.25s ease; }
.meta-section.is-collapsed .meta-section-toggle svg { transform: rotate(-90deg); }
.meta-section-body {
  max-height: 2000px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.2s ease;
}
.meta-section.is-collapsed .meta-section-body {
  max-height: 0;
  opacity: 0;
}

.invest-bar-tip-meta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C9C9C9;
}

/* PDF / refresh button group in date picker bar */
.dp-bar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}
/* ===== UNIFIED PDF EXPORT BUTTON (gold glass, dark theme) ===== */
.btn-pdf,
.dp-pdf {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  height: 34px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #C9C9C9;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-pdf::before,
.dp-pdf::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 62%,
    transparent 100%);
  transform: translateX(-110%);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.btn-pdf:hover,
.dp-pdf:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
}
.btn-pdf:hover::before,
.dp-pdf:hover::before {
  transform: translateX(110%);
}
.btn-pdf:active,
.dp-pdf:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-pdf:focus-visible,
.dp-pdf:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}
.btn-pdf svg,
.dp-pdf svg {
  flex-shrink: 0;
  stroke-width: 2.2;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.2));
}

/* ===== PAGE-LEVEL MONTH PICKER (Dashboard, Social) ===== */
.page-month-picker {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.pmp-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font: 600 10px 'Inter', sans-serif;
  letter-spacing: .8px;
  cursor: pointer;
  border: 1px solid var(--b1);
  background: transparent;
  color: var(--t4);
  transition: .15s;
}
.pmp-btn.on {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.pmp-btn:hover:not(.on):not(.disabled) {
  color: var(--t2);
  border-color: var(--b2);
}
.pmp-btn.disabled {
  opacity: .3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== BUDGET MODAL ===== */
.bm-open-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: rgba(234,143,215,.08); border: 1px solid rgba(234,143,215,.25);
  color: var(--gold); border-radius: 8px;
  font: 600 11px 'Inter', sans-serif; cursor: pointer; transition: .15s;
}
.bm-open-btn:hover { background: rgba(234,143,215,.15); }

.bm-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.bm-dialog {
  background: #0F172A; border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; width: 100%; max-width: 680px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.bm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font: 700 14px 'Inter', sans-serif; color: var(--t1); letter-spacing: .4px;
}
.bm-close {
  background: none; border: none; color: var(--t4);
  font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1;
  transition: color .15s;
}
.bm-close:hover { color: var(--t1); }
.bm-body { padding: 20px 24px 24px; }
.bm-section-lbl {
  font: 600 10px 'Inter', sans-serif; letter-spacing: 1px;
  color: var(--t4); text-transform: uppercase; margin-bottom: 10px;
}
.bm-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid rgba(255,255,255,.06); }
.bm-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bm-table thead th {
  padding: 10px 12px; text-align: left;
  font: 600 10px 'Inter', sans-serif; letter-spacing: .8px;
  color: var(--t4); background: rgba(255,255,255,.02);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.bm-table tbody tr { border-bottom: 1px solid rgba(255,255,255,.04); }
.bm-table tbody tr:last-child { border-bottom: none; }
.bm-row { cursor: pointer; transition: background .12s; }
.bm-row:hover { background: rgba(255,255,255,.03); }
.bm-table td { padding: 11px 12px; color: var(--t2); vertical-align: middle; }
.bm-edit-btn {
  font: 600 10px 'Inter', sans-serif; letter-spacing: .5px;
  color: var(--gold); cursor: pointer; padding: 3px 8px;
  border: 1px solid rgba(234,143,215,.2); border-radius: 5px;
  transition: background .12s;
}
.bm-row:hover .bm-edit-btn { background: rgba(234,143,215,.08); }
.bm-del-btn {
  font: 600 10px 'Inter', sans-serif; letter-spacing: .5px;
  color: #EF4444; cursor: pointer; padding: 3px 8px; margin-left: 6px;
  border: 1px solid rgba(239,68,68,.2); border-radius: 5px;
  transition: background .12s;
}
.bm-row:hover .bm-del-btn { background: rgba(239,68,68,.08); }

.bm-form { margin-top: 4px; }
.bm-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
}
@media (max-width: 520px) { .bm-form-row { grid-template-columns: 1fr; } }
.bm-form label {
  display: flex; flex-direction: column; gap: 5px;
  font: 600 10px 'Inter', sans-serif; letter-spacing: .6px; color: var(--t4);
}
.bm-form input {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 9px 12px;
  color: var(--t1); font: 500 13px 'Inter', sans-serif;
  transition: border-color .15s;
}
.bm-form input:focus { outline: none; border-color: rgba(234,143,215,.4); }
.bm-form-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 4px;
}
.bm-status { font: 500 12px 'Inter', sans-serif; color: var(--t4); }
.bm-status.ok { color: #22C55E; }
.bm-status.err { color: #EF4444; }
.bm-save-btn {
  padding: 9px 20px; background: var(--gold); border: none;
  border-radius: 8px; color: #0B1120;
  font: 700 12px 'Inter', sans-serif; cursor: pointer;
  transition: opacity .15s;
}
.bm-save-btn:hover { opacity: .88; }

/* ===== PROPUESTAS CRM HUB (SPA page, scoped .pp-*) ===== */
.pp-page { padding: 0; }

.pp-strip {
  padding: 20px 24px;
  border: 1px solid var(--hair);
  background: var(--bg-elev);
  margin: 0 0 28px;
}
.pp-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.pp-s { position: relative; }
.pp-s:not(:first-child) { border-left: 1px solid var(--hair); padding-left: 24px; }
.pp-s .pp-n {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 40px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.pp-s .pp-n.live { color: var(--color-brand); }
.pp-s .pp-l {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--t4);
  text-transform: uppercase;
  font-weight: 600;
}
@media (max-width: 900px) {
  .pp-strip-grid { grid-template-columns: repeat(2, 1fr); }
  .pp-s:nth-child(3) { border-left: 0; padding-left: 0; }
}

.pp-proposals { padding: 8px 0 60px; }
.pp-filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}
.pp-filter-chips {
  display: inline-flex;
  gap: 0;
  background: var(--bg-elev);
  border: 1px solid var(--hair);
  padding: 4px;
}
.pp-filter-chips button {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--t3);
  padding: 7px 14px;
  font-weight: 600;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.pp-filter-chips button.active { background: var(--color-brand); color: #000; }
.pp-filter-chips button:not(.active):hover { color: var(--ink); }

.pp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.pp-empty {
  grid-column: 1 / -1;
  padding: 56px 0;
  text-align: center;
  color: var(--t3);
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pp-card {
  background: var(--bg-elev);
  border: 1px solid var(--hair);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.pp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(234, 143, 215, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(234, 143, 215, 0.35);
}
.pp-thumb {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #0A0A0A;
}
.pp-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
}
.pp-card:hover .pp-img { transform: scale(1.05); }
.pp-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0) 55%, rgba(10, 10, 10, 0.85) 100%);
}
.pp-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  padding: 4px 10px;
  text-transform: uppercase;
  font-weight: 800;
  z-index: 3;
}
.pp-badge.live  { background: var(--color-brand); color: #000; }
.pp-badge.draft { background: rgba(255, 255, 255, 0.1); color: var(--t3); border: 1px solid var(--hair-strong); }
.pp-badge.arch  { background: rgba(255, 255, 255, 0.06); color: var(--t4); border: 1px solid var(--hair); }
.pp-npro {
  position: absolute;
  bottom: 12px; left: 14px;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--t3);
  text-transform: uppercase;
  z-index: 3;
}
.pp-body { padding: 18px 20px 14px; display: flex; flex-direction: column; flex: 1; }
.pp-title {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-weight: 500;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--ink);
}
.pp-title .pp-acc { color: var(--color-brand); }
.pp-desc {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.55;
  margin: 0 0 14px;
}
.pp-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.pp-meta .pp-k {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--t4);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 3px;
}
.pp-meta .pp-v {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink);
  font-weight: 600;
}
.pp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
  flex: 1;
}
.pp-tags span {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  background: rgba(234, 143, 215, 0.06);
  border: 1px solid rgba(234, 143, 215, 0.35);
  color: #F5CEED;
  font-weight: 600;
  text-transform: uppercase;
}
.pp-cta {
  padding: 10px 0 0;
  border-top: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-brand);
  font-weight: 700;
}
.pp-cta svg { width: 12px; height: 12px; transition: transform 0.25s ease; }
.pp-card:hover .pp-cta svg { transform: translate(3px, -3px); }

/* ===== PROPUESTAS STATUS BADGES — additional states ===== */
.pp-badge.review {
  background: rgba(234,143,215,.1);
  color: var(--color-brand);
  border: 1px solid rgba(234,143,215,.35);
}
.pp-badge.approved {
  background: rgba(76,209,122,.1);
  color: #4CD17A;
  border: 1px solid rgba(76,209,122,.35);
}
.pp-badge.in-progress {
  background: rgba(212,168,67,.1);
  color: #F5CEED;
  border: 1px solid rgba(234,143,215,.25);
}
.pp-badge-edit {
  cursor: pointer;
  user-select: none;
  transition: filter 0.15s ease, background 0.15s ease;
}
.pp-badge-edit:hover { filter: brightness(1.2); }
.pp-badge-caret {
  opacity: 0.7;
  font-size: 9px;
  margin-left: 2px;
}

/* ===== STATUS DROPDOWN MENU ===== */
.pp-status-menu {
  min-width: 180px;
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 0 !important;
}
.pp-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  color: var(--t2);
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease, background 0.15s ease;
  border-radius: 0 !important;
}
.pp-status-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--ink); }
.pp-status-item.active { color: var(--color-brand); background: rgba(234, 143, 215, 0.06); }
.pp-status-item.live     { color: var(--color-brand); }
.pp-status-item.draft    { color: var(--t3); }
.pp-status-item.review   { color: var(--color-brand); }
.pp-status-item.approved { color: #4CD17A; }
.pp-status-item.in-progress { color: #F5CEED; }
.pp-status-item.arch     { color: var(--t4); }
