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

:root {
  --navy:    #111111;
  --navy2:   #1a1a1a;
  --navy3:   #242424;
  --gold:    #ECC700;
  --gold-lt: #F5D800;
  --bg:      #F2F4F7;
  --surface: #FFFFFF;
  --border:  #E2E6ED;
  --text:    #111111;
  --muted:   #6B7A8D;
  --pos:     #2E7D32;
  --neu:     #546E7A;
  --neg:     #C62828;
  --pos-bg:  #E8F5E9;
  --neu-bg:  #ECEFF1;
  --neg-bg:  #FFEBEE;
  --radius:  12px;
  --shadow:  0 2px 12px rgba(0,0,0,.08);
}

html, body {
  height: 100%;
  background: var(--bg);
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ── Wrapper ── */
.app {
  max-width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── Header ── */
.header {
  background: var(--navy);
  padding: 16px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-logo img.logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
}
.header-logo-sub {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  font-weight: 500;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-top: 1px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* ── Week bar ── */
.week-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.week-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48px;
  background: linear-gradient(to right, transparent, var(--surface));
  pointer-events: none;
  z-index: 1;
}
.week-bar-weeks {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.week-bar-weeks::-webkit-scrollbar { display: none; }
.week-bar-nav {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: opacity .15s;
}
.week-bar-nav svg { width: 22px; height: 22px; stroke-width: 2.5; }
.week-bar-nav:hover:not(:disabled) { opacity: .6; }
.week-bar-nav:disabled { opacity: .2; cursor: default; }
.live-badge { display: none; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--gold-lt); letter-spacing: .5px; text-transform: uppercase; flex-shrink: 0; }
.live-badge.visible { display: flex; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #4caf50; animation: livePulse 1.5s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.week-pill {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
  font-family: inherit;
}
.week-pill { display: none; }
.week-pill.active {
  display: block;
  background: none;
  border: none;
  border-radius: 0;
  padding: 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ── Report bar ── */
.report-bar {
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.report-bar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--navy);
  color: var(--gold-lt);
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  justify-content: center;
  transition: opacity .15s;
}
.report-bar-btn:hover { opacity: .85; }
.report-bar-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }

@keyframes pulse-dot {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: .7; }
}

/* ── Client bar ── */
.client-bar {
  background: var(--navy2);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.client-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  letter-spacing: .3px;
}
.client-name span { color: #fff; }

/* ── Scrollable body ── */
.body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Alert banner ── */
.alert-banner {
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slide-in .4s ease;
  box-shadow: 0 0 0 1px rgba(236,199,0,.25), 0 4px 16px rgba(0,0,0,.1);
}
.alert-icon {
  width: 32px; height: 32px;
  background: var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.alert-icon svg { width: 17px; height: 17px; fill: var(--navy); }
.alert-body { flex: 1; }
.alert-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-lt);
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 3px;
}
[data-theme="light"] .alert-banner .alert-label,
[data-theme="light"] .alert-banner .alert-text,
[data-theme="light"] .alert-banner .alert-text strong,
[data-theme="light"] .alert-banner .alert-time,
[data-theme="light"] .alert-banner .alert-close { color: var(--navy); }
.alert-text {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.45;
}
.alert-text strong { color: var(--gold-lt); }
.alert-time {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.alert-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 19px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
}
.alert-close:hover { color: var(--text); }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
}
.card-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border-radius: 20px;
  padding: 3px 8px;
  border: 1px solid var(--border);
}
.card-body { padding: 14px 16px; }

/* ── KPI row ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.kpi {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.kpi-value {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.kpi-value span { font-size: 0.65em; font-family: inherit; font-weight: 700; color: inherit; }
.kpi-delta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.kpi-delta.up { color: var(--pos); }
.kpi-delta.dn { color: var(--neg); }
.kpi-delta svg { width: 12px; height: 12px; }

/* ── Mention detail sheet ── */
.md-outlet { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.md-headline { font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--text); margin-bottom: 16px; }
.md-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.md-stat { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.md-actions { display: flex; gap: 10px; margin-bottom: 4px; }
.md-actions .modal-btn { flex: 1; }
.modal-btn-sec { background: var(--bg) !important; color: var(--text) !important; border: 1px solid var(--border) !important; }

/* ── Mention item clickable ── */
.mention-item { cursor: pointer; border-radius: 6px; padding: 12px 6px; margin: 0 -6px; transition: background .12s; }
.mention-item:hover { background: var(--bg); }
.mention-item:last-child { border-bottom: none; }

/* ── Sentiment ── */
.sentiment-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sentiment-bar {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  gap: 2px;
}
.sb-pos { background: var(--pos); border-radius: 99px 0 0 99px; }
.sb-neu { background: #90A4AE; }
.sb-neg { background: var(--neg); border-radius: 0 99px 99px 0; }
.sentiment-legend {
  display: flex;
  gap: 0;
  justify-content: space-between;
}
.sent-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.sent-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sent-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}
.sent-name {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* ── ApexCharts ── */
#chart-trend, #chart-sentiment { width: 100%; overflow: hidden; }
#chart-trend { margin: 0 -16px; width: calc(100% + 32px); }
.apexcharts-canvas { max-width: 100% !important; }
.apexcharts-canvas svg { max-width: 100% !important; }

/* ── Trend chart ── */
.chart-wrap {
  position: relative;
  height: 130px;
}
.chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 4px;
}
.chart-labels span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* ── Card ghost (sin fondo ni borde) ── */
.card-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.card-ghost .card-header { border-bottom-color: transparent; }
.card-ghost .card-tag { background: transparent; border-color: transparent; }

/* ── Media ranking ── */
.media-list { display: flex; flex-direction: column; gap: 10px; }
.media-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.media-rank {
  width: 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  flex-shrink: 0;
}
.media-logo {
  width: 88px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
  text-align: center;
  letter-spacing: -.3px;
  line-height: 1.2;
  overflow: hidden;
}
.media-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
[data-theme="dark"] .media-logo {
  background: #c8c8c8;
  border-radius: 8px;
  padding: 5px 8px;
}
.media-info { flex: 1; min-width: 0; }
.media-name { font-size: 12px; font-weight: 600; color: var(--navy); }
.media-bar-track {
  height: 5px;
  background: var(--bg);
  border-radius: 99px;
  margin-top: 6px;
  overflow: hidden;
}
.media-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--navy3));
  border-radius: 99px;
  transition: width 1.2s cubic-bezier(.22,1,.36,1);
}
.media-item:nth-child(1) .media-bar-fill { background: linear-gradient(90deg, var(--gold), var(--gold-lt)); }
.media-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Mentions feed ── */
.mention-list { display: flex; flex-direction: column; gap: 0; }
.mention-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mention-item:last-child { border-bottom: none; padding-bottom: 0; }
.mention-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mention-source {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mention-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mention-outlet {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .2px;
}
.mention-badges { display: flex; gap: 5px; align-items: center; }
.badge {
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 7px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.badge-pos { background: var(--pos-bg); color: var(--pos); }
.badge-neu { background: var(--neu-bg); color: var(--neu); }
.badge-neg { background: var(--neg-bg); color: var(--neg); }
.badge-ave {
  background: linear-gradient(135deg, #fff7e0, #fff3cc);
  color: #7a5c00;
  border: 1px solid #e6c84a40;
}
.mention-headline {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}
.mention-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mention-time { font-size: 12px; color: var(--muted); }
.mention-reach {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.mention-reach svg { width: 11px; height: 11px; stroke: var(--muted); fill: none; stroke-width: 2; }

/* ── CTA Reporte ── */
.btn-report {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s, transform .1s;
  position: relative;
  overflow: hidden;
}
.btn-report::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(184,151,42,.25));
}
.btn-report:active { transform: scale(.98); }
.btn-report:hover { background: var(--navy3); }
.btn-report svg { width: 18px; height: 18px; fill: none; stroke: var(--gold-lt); stroke-width: 2; flex-shrink: 0; }
.btn-report-sub { font-size: 12px; color: rgba(255,255,255,.5); font-weight: 400; margin-top: 1px; }

/* ── Bottom nav / Sidebar ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px 8px;
  gap: 3px;
  cursor: pointer;
  position: relative;
}
.nav-item svg { width: 22px; height: 22px; fill: none; stroke: rgba(255,255,255,.35); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active svg { stroke: var(--gold-lt); }
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 2px;
  background: var(--gold);
  border-radius: 0 0 4px 4px;
}
.nav-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}
.nav-item.active .nav-label { color: var(--gold-lt); }
.nav-badge {
  position: absolute;
  top: 8px; right: calc(50% - 14px);
  width: 14px; height: 14px;
  background: var(--neg);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--navy);
}

/* ── Report modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 400;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open { display: flex; animation: fade-in .2s ease; }
.modal {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 24px 20px 40px;
  animation: slide-up .3s cubic-bezier(.22,1,.36,1);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 0 auto 20px;
}
.modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}
.modal-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.modal-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.modal-opt:hover, .modal-opt.sel { border-color: var(--gold); background: #fffbee; }
.modal-opt-icon {
  width: 36px; height: 36px;
  background: var(--bg);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-opt-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--navy); stroke-width: 1.8; }
.modal-opt-info { flex: 1; }
.modal-opt-name { font-size: 12px; font-weight: 600; color: var(--navy); }
.modal-opt-desc { font-size: 12px; color: var(--muted); margin-top: 1px; }
.modal-check { width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.modal-opt.sel .modal-check { background: var(--gold); border-color: var(--gold); }
.modal-opt.sel .modal-check::after { content: '✓'; font-size: 12px; color: #fff; font-weight: 700; }
.modal-btn {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.modal-btn:hover { background: var(--navy3); }
.modal-close-row { text-align: center; margin-top: 12px; }
.modal-close-link { font-size: 12px; color: var(--muted); cursor: pointer; }
.modal-close-link:hover { color: var(--navy); }

/* ── Map fullscreen ── */
#map-wrap.map-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  z-index: 150 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}
#map-wrap.map-fullscreen #map-canvas { height: 100% !important; }
body.map-is-fullscreen #mapFsBtn {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 151;
  background: rgba(255,255,255,.95);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.map-fs-btn {
  width: 28px; height: 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.map-fs-btn:hover { background: var(--border); }
.map-fs-btn svg { width: 13px; height: 13px; stroke: var(--navy); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Map markers ── */
@keyframes map-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(236,199,0,.7); }
  60%      { box-shadow: 0 0 0 10px rgba(236,199,0,0); }
}
.mk-main { width:14px;height:14px;background:#ECC700;border-radius:50%;border:2.5px solid #fff;animation:map-pulse 2s infinite;box-sizing:border-box; }
.mk-city { width:9px;height:9px;background:#F5D800;border-radius:50%;border:2px solid #fff;opacity:.9;box-sizing:border-box; }
.mk-intl { width:8px;height:8px;background:#aaccff;border-radius:50%;border:2px solid rgba(255,255,255,.7);opacity:.85;box-sizing:border-box; }
.map-tip {
  background: rgba(17,17,17,.88) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  padding: 4px 8px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.35) !important;
  white-space: nowrap !important;
}
.map-tip::before { display:none !important; }

/* ── View switching ── */
.view-section { display: none; flex-direction: column; flex: 1; overflow-y: auto; padding: 16px 16px 96px; gap: 14px; }
.view-section.view-active { display: flex; animation: viewFadeIn .2s ease; }
.body.view-section { display: none; }
.body.view-section.view-active { display: grid; animation: viewFadeIn .2s ease; }
@keyframes viewFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── View header ── */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 6px;
}
.view-title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

/* ── Alerts list ── */
.filter-bar-view { padding: 0 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 2px; }
.btn-mark-all {
  font-size: 11px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: var(--muted);
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.btn-mark-all:hover { color: var(--navy); border-color: var(--navy); }
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: slide-in .3s cubic-bezier(.22,1,.36,1);
  transition: opacity .25s, transform .25s;
}
.alert-item.alert-read { opacity: .65; }
.alert-item-bar { width: 4px; flex-shrink: 0; }
.sev-critical .alert-item-bar, .alert-sev-badge.sev-critical { background: var(--neg); }
.sev-high     .alert-item-bar, .alert-sev-badge.sev-high     { background: var(--gold); }
.sev-info     .alert-item-bar, .alert-sev-badge.sev-info     { background: #90A4AE; }
.alert-item-body { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.alert-item-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.alert-sev-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
}
.alert-sev-badge.sev-high { color: #111; }
.alert-item-outlet { font-size: 11px; font-weight: 600; color: var(--muted); }
.alert-item-time   { font-size: 11px; color: var(--muted); margin-left: auto; }
.alert-item-title  { font-size: 13px; font-weight: 700; color: var(--navy); }
.alert-item-text   { font-size: 12px; color: var(--muted); line-height: 1.5; }
.alert-item-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-alert-read {
  font-size: 11px; font-weight: 600; font-family: 'Poppins', sans-serif;
  color: var(--navy); background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 7px; padding: 4px 10px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-alert-read:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-alert-dismiss {
  font-size: 11px; font-weight: 600; font-family: 'Poppins', sans-serif;
  color: var(--muted); background: none; border: none; cursor: pointer;
  padding: 4px 6px; transition: color .15s;
}
.btn-alert-dismiss:hover { color: var(--neg); }
.alert-read-tag { font-size: 11px; color: var(--muted); padding: 4px 0; }

/* ── Config cards ── */
.config-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.config-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 14px 16px 0;
}
.config-card-sub { font-size: 11px; color: var(--muted); padding: 2px 16px 10px; }
.config-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.config-row:last-child { border-bottom: none; }
.config-row-info { flex: 1; }
.config-row-label { font-size: 13px; font-weight: 600; color: var(--navy); }
.config-row-sub   { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ── Toggle switch ── */
.toggle { position: relative; cursor: pointer; flex-shrink: 0; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  display: block;
  width: 42px; height: 24px;
  background: var(--border);
  border-radius: 99px;
  position: relative;
  transition: background .2s;
}
.toggle input:checked + .toggle-track { background: var(--navy); }
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s cubic-bezier(.22,1,.36,1);
}
.toggle input:checked ~ .toggle-track .toggle-thumb { transform: translateX(18px); }

/* ── Keywords ── */
.keyword-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 16px 0; }
.kw-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 4px 10px 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
}
.kw-chip button {
  background: none; border: none; color: var(--muted);
  font-size: 15px; cursor: pointer; line-height: 1;
  padding: 0 1px; transition: color .12s;
}
.kw-chip button:hover { color: var(--neg); }
.keyword-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px 14px;
}
.keyword-input-row .form-input { flex: 1; }
.btn-kw-add {
  flex-shrink: 0;
  font-size: 12px; font-weight: 600; font-family: 'Poppins', sans-serif;
  color: #fff; background: var(--navy); border: none;
  border-radius: 8px; padding: 0 14px; cursor: pointer;
  transition: background .15s;
}
.btn-kw-add:hover { background: var(--navy3); }

/* ── Team ── */
.team-list { display: flex; flex-direction: column; }
.team-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.team-avatar {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--navy3);
  color: rgba(255,255,255,.8);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: -.3px;
}
.team-info { flex: 1; min-width: 0; }
.team-name { font-size: 13px; font-weight: 600; color: var(--navy); }
.team-role { font-size: 11px; color: var(--muted); margin-top: 1px; }
.team-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--navy);
  background: var(--gold); border-radius: 5px; padding: 2px 7px;
}
.team-remove {
  background: none; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 0 4px;
  transition: color .12s;
}
.team-remove:hover { color: var(--neg); }
.btn-invite {
  display: block; width: calc(100% - 32px); margin: 12px 16px;
  font-size: 13px; font-weight: 600; font-family: 'Poppins', sans-serif;
  color: var(--navy); background: var(--bg); border: 1.5px dashed var(--border);
  border-radius: 9px; padding: 11px; cursor: pointer; text-align: center;
  transition: border-color .15s, background .15s;
}
.btn-invite:hover { border-color: var(--navy); background: #fff; }


/* ── Filter bar ── */
.filter-bar {
  display: flex;
  gap: 6px;
  padding: 8px 16px 6px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-pill {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  font-family: 'Poppins', sans-serif;
}
.filter-pill:hover { border-color: var(--navy); color: var(--navy); }
.filter-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Btn add mention ── */
.btn-add-mention {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: var(--navy);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-add-mention:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-add-mention svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; }

/* ── Mention empty state ── */
.mention-empty {
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ── Mention delete button ── */
.mention-del-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  opacity: 0;
  transition: opacity .15s, color .15s;
}
.mention-item:hover .mention-del-btn { opacity: 1; }
.mention-del-btn:hover { color: var(--neg); }

/* ── Mention enter animation ── */
.mention-enter {
  animation: slide-in .4s cubic-bezier(.22,1,.36,1);
}

/* ── Client switcher add btn ── */
.cs-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  padding: 13px 16px;
  cursor: pointer;
  transition: color .15s, background .15s;
  margin-top: 2px;
}
.cs-add-btn:hover { color: var(--gold-lt); background: rgba(236,199,0,.06); }
.cs-add-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; flex-shrink: 0; }

/* ── Client option menu btn ── */
.cs-opt-menu-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.35);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity .15s, color .15s, background .15s;
  flex-shrink: 0;
}
.cs-option:hover .cs-opt-menu-btn { opacity: 1; }
.cs-opt-menu-btn:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ── Context menu ── */
.ctx-menu {
  position: fixed;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 500;
  overflow: hidden;
  animation: fade-in .15s ease;
  min-width: 140px;
}
.ctx-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.ctx-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.ctx-item.danger { color: #ef9a9a; }
.ctx-item.danger:hover { background: rgba(198,40,40,.15); color: #ef5350; }
.ctx-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── Form styles (shared by client & mention modals) ── */
.modal-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.form-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
  color: var(--navy);
  background: var(--bg);
  transition: border-color .15s;
  outline: none;
}
.form-input:focus { border-color: var(--navy); background: #fff; }
select.form-input { cursor: pointer; }
.form-color {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  cursor: pointer;
  background: var(--bg);
}

/* ── Shake animation ── */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ── Header report button ── */
.header-report-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 9px;
  padding: 7px 13px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  flex-shrink: 0;
}
.header-report-btn:hover  { opacity: .88; }
.header-report-btn:active { transform: scale(.97); }
.header-report-btn svg { width: 14px; height: 14px; fill: none; stroke: var(--navy); stroke-width: 2; flex-shrink: 0; }
.header-report-label { display: none; }


/* ── Dark theme ── */
[data-theme="dark"] {
  --bg:      #111111;
  --surface: #1c1c1c;
  --border:  #2e2e2e;
  --text:    #f0f0f0;
  --muted:   #888;
  --shadow:  0 2px 16px rgba(0,0,0,.5);
  --pos:     #66BB6A;
  --neg:     #EF5350;
  --pos-bg:  #1a3a1a;
  --neu-bg:  #1e2a2e;
  --neg-bg:  #3a1a1a;
}

[data-theme="dark"] body { color: var(--text); }

/* Cards */
[data-theme="dark"] .card,
[data-theme="dark"] .kpi,
[data-theme="dark"] .alert-item,
[data-theme="dark"] .config-card { background: var(--surface); border-color: var(--border); }

/* Text colors that use hardcoded --navy */
[data-theme="dark"] .card-title,
[data-theme="dark"] .card-tag,
[data-theme="dark"] .kpi-value,
[data-theme="dark"] .kpi-label,
[data-theme="dark"] .media-name,
[data-theme="dark"] .media-count,
[data-theme="dark"] .media-rank,
[data-theme="dark"] .mention-outlet,
[data-theme="dark"] .mention-headline,
[data-theme="dark"] .sent-pct,
[data-theme="dark"] .chart-labels span,
[data-theme="dark"] .view-title,
[data-theme="dark"] .config-row-label,
[data-theme="dark"] .config-card-title,
[data-theme="dark"] .team-name,
[data-theme="dark"] .modal-title,
[data-theme="dark"] .modal-opt-name,
[data-theme="dark"] .alert-item-title,
[data-theme="dark"] .filter-pill { color: var(--text); }

/* Borders */
[data-theme="dark"] .card-header,
[data-theme="dark"] .mention-item,
[data-theme="dark"] .config-row,
[data-theme="dark"] .team-member,
[data-theme="dark"] .filter-bar,
[data-theme="dark"] .filter-bar-view { border-color: var(--border); }

/* md dark */
[data-theme="dark"] .md-headline { color: var(--text); }
[data-theme="dark"] .md-stat { background: #141414; }
[data-theme="dark"] .mention-item:hover { background: #1a1a1a; }

/* card-tag */
[data-theme="dark"] .card-tag { background: #252525; border-color: var(--border); color: var(--muted); }

/* Filter pills */
[data-theme="dark"] .filter-pill { border-color: var(--border); background: transparent; }
[data-theme="dark"] .filter-pill.active { background: var(--text); color: var(--surface); border-color: var(--text); }
[data-theme="dark"] .filter-pill:hover:not(.active) { border-color: var(--text); }

/* Modal */
[data-theme="dark"] .modal { background: var(--surface); }
[data-theme="dark"] .modal-sub { color: var(--muted); }
[data-theme="dark"] .modal-opt { border-color: var(--border); }
[data-theme="dark"] .modal-opt:hover,
[data-theme="dark"] .modal-opt.sel { background: #2a1f00; border-color: var(--gold); }
[data-theme="dark"] .modal-opt-desc { color: var(--muted); }
[data-theme="dark"] .modal-close-link { color: var(--muted); }
[data-theme="dark"] .modal-check { border-color: var(--border); }
[data-theme="dark"] .modal-opt-icon { background: #2e2e2e; }
[data-theme="dark"] .modal-opt-icon svg { stroke: var(--text); }

/* Form inputs */
[data-theme="dark"] .form-input { background: #252525; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .form-input:focus { background: #2a2a2a; border-color: var(--muted); }
[data-theme="dark"] select.form-input option { background: #252525; }
[data-theme="dark"] .form-color { background: #252525; border-color: var(--border); }

/* Media logo / bar */

[data-theme="dark"] .media-bar-track { background: #252525; }
[data-theme="dark"] .media-bar-fill { background: linear-gradient(90deg, var(--muted), #555); }
[data-theme="dark"] .media-item:nth-child(1) .media-bar-fill { background: linear-gradient(90deg, var(--gold), var(--gold-lt)); }

/* Sentiment */
[data-theme="dark"] .sb-neu { background: #546E7A; }

/* KPI delta */
[data-theme="dark"] .kpi-value span { color: inherit; }

/* Alert banner en dark */

/* Mapa — botón fullscreen en dark */
[data-theme="dark"] .map-fs-btn { background: #2e2e2e; border-color: var(--border); }
[data-theme="dark"] .map-fs-btn:hover { background: #3a3a3a; }
[data-theme="dark"] .map-fs-btn svg { stroke: var(--text); }
[data-theme="dark"] body.map-is-fullscreen #mapFsBtn { background: #1c1c1c; box-shadow: 0 2px 10px rgba(0,0,0,.6); }

/* Mapa — leyenda */
.map-legend-item {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.map-legend-item.map-legend-main { color: var(--text); }
.map-legend-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Mapa — reducir brillo en dark mode */
[data-theme="dark"] #map-canvas { filter: brightness(0.75) saturate(0.6); }

/* Chart grid lines y puntos oscuros */
[data-theme="dark"] #trendChart line { stroke: #2a2a2a; }
[data-theme="dark"] .chart-dot-dark { fill: var(--gold) !important; stroke-color: var(--surface); }

/* Toggle — track inactivo gris, activo dorado */
[data-theme="dark"] .toggle-track { background: #444; }
[data-theme="dark"] .toggle input:checked + .toggle-track { background: var(--gold); }

/* Keywords */
[data-theme="dark"] .kw-chip { background: #252525; border-color: var(--border); color: var(--text); }

/* Team avatar */
[data-theme="dark"] .team-avatar { background: #2e2e2e; }

/* Alert list */
[data-theme="dark"] .alert-item-title { color: var(--text); }
[data-theme="dark"] .btn-alert-read { background: #252525; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .btn-alert-read:hover { background: var(--text); color: var(--surface); }

/* Client switcher dropdown */
[data-theme="dark"] .cs-opt-name { color: #fff; }

/* Invite / add buttons */
[data-theme="dark"] .btn-invite { background: #252525; border-color: #3a3a3a; color: var(--text); }
[data-theme="dark"] .btn-invite:hover { background: var(--surface); border-color: var(--muted); }
[data-theme="dark"] .btn-add-mention { background: #252525; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .btn-add-mention:hover { background: var(--text); color: var(--surface); border-color: var(--text); }
[data-theme="dark"] .btn-mark-all { color: var(--muted); border-color: var(--border); }
[data-theme="dark"] .btn-mark-all:hover { color: var(--text); border-color: var(--text); }

/* Toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 300;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  border: 1px solid var(--gold);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Client switcher ── */
.client-switcher {
  background: var(--navy2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
}
.cs-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 9px 16px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.cs-avatar {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -.3px;
}
.cs-info { flex: 1; min-width: 0; }
.cs-label {
  font-size: 10px;
  color: rgba(255,255,255,.4);
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2px;
}
.cs-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-chevron {
  width: 16px;
  height: 16px;
  stroke: rgba(255,255,255,.4);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform .2s;
}
.client-switcher.open .cs-chevron { transform: rotate(180deg); }

/* Dropdown mobile: bottom sheet fijo */
.cs-dropdown {
  display: none;
  position: fixed;
  bottom: 56px;
  left: 0;
  right: 0;
  background: #1c1c1c;
  border-top: 1px solid rgba(255,255,255,.12);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0,0,0,.5);
  z-index: 200;
  animation: slide-up .25s cubic-bezier(.22,1,.36,1);
  padding-bottom: env(safe-area-inset-bottom);
}
.client-switcher.open .cs-dropdown { display: block; }
.cs-dropdown-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 14px 16px 8px;
}
.cs-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background .12s;
}
.cs-option:hover { background: rgba(255,255,255,.06); }
.cs-option.active { background: rgba(236,199,0,.08); }
.cs-opt-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--navy3);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -.3px;
}
.cs-option.active .cs-opt-avatar {
  background: var(--gold);
  color: var(--navy);
  border-color: transparent;
}
.cs-opt-info { flex: 1; min-width: 0; }
.cs-opt-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-opt-sector {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  margin-top: 2px;
}
.cs-opt-check {
  width: 15px;
  height: 15px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  opacity: 0;
}
.cs-option.active .cs-opt-check { opacity: 1; }

/* ── Live badge en desktop (oculto en mobile) ── */

/* ── Sidebar brand (oculto en mobile) ── */
.sidebar-brand { display: none; }

/* ── Columnas (base: apiladas en móvil) ── */
.col-left, .col-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.card { max-width: 100%; }

/* ── Desktop ── */
@media (min-width: 900px) {
  .week-bar-nav { display: none; }
  .week-bar::after { display: none; }
  .week-pill { display: block; }
  .week-pill.active {
    background: var(--navy3);
    border: 1px solid rgba(184,151,42,.5);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--gold-lt);
  }

  /* Sidebar */
  .bottom-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    border-top: none;
    border-right: 1px solid rgba(255,255,255,.08);
    padding: 0 0 24px;
    gap: 2px;
    overflow-y: auto;
  }

  /* Logo en sidebar */
  .sidebar-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 10px;
    flex-shrink: 0;
  }
  .sidebar-logo-img {
    height: 26px;
    width: auto;
    object-fit: contain;
    object-position: left;
  }
  .sidebar-brand-sub {
    font-size: 11px;
    color: rgba(255,255,255,.45);
    font-weight: 500;
    letter-spacing: .7px;
    text-transform: uppercase;
  }

  /* Nav items: horizontal (icono + label) */
  .nav-item {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    padding: 11px 16px;
    gap: 12px;
    border-radius: 8px;
    margin: 0 8px;
    width: calc(100% - 16px);
    transition: background .15s;
  }
  .nav-item:hover { background: rgba(255,255,255,.06); }
  .nav-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2.5; }
  .nav-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }

  /* Active: fondo + borde izquierdo */
  .nav-item.active {
    background: rgba(236,199,0,.1);
    border-left: 3px solid var(--gold);
    padding-left: 13px;
  }
  .nav-item.active::before { display: none; }

  /* Badge en sidebar */
  .nav-badge {
    position: static;
    width: 18px;
    height: 18px;
    font-size: 10px;
    order: 3;
    margin-left: auto;
  }

  /* App: desplazada al lado del sidebar */
  .app {
    max-width: none;
    margin-left: 220px;
  }

  /* Header: ocultar logo (ya está en sidebar) */
  .header-logo { display: none; }
  .client-bar { display: none; }
  .header {
    padding: 0 36px 0 28px;
    height: 60px;
    justify-content: flex-end;
  }

  /* Switcher: flota sobre el header, pegado a la izquierda del contenido */
  .client-switcher {
    position: fixed;
    top: 0;
    left: 220px;
    height: 60px;
    right: 0;
    max-width: 380px;
    background: transparent;
    border-bottom: none;
    display: flex;
    align-items: center;
    padding: 0 0 0 28px;
    z-index: 101;
  }
  .cs-btn {
    background: var(--navy3);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: 7px 12px 7px 10px;
    width: 100%;
    max-width: 320px;
    transition: border-color .15s, background .15s;
  }
  .cs-btn:hover {
    border-color: rgba(236,199,0,.4);
    background: #1e1e1e;
  }
  .cs-avatar { width: 32px; height: 32px; border-radius: 8px; font-size: 11px; }
  .cs-label { margin-bottom: 3px; }

  /* Dropdown desktop: absolute, sale hacia abajo */
  .cs-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 28px;
    bottom: auto;
    right: auto;
    width: 300px;
    border-radius: 12px;
    border-top: 1px solid rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.12);
    animation: fade-in .15s ease;
    padding-bottom: 6px;
  }

  /* Body: grid de dos columnas */
  .body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "alert alert"
      "left  right";
    align-items: start;
    padding: 24px 36px 40px;
    gap: 20px;
  }

  .alert-banner { grid-area: alert; }
  .col-left { grid-area: left; gap: 16px; }
  .col-right { grid-area: right; gap: 16px; }

  .kpi { padding: 16px 18px 14px; }
  .kpi-value { font-size: 30px; }

  .map-card #map-canvas { height: 300px !important; }

  .toast { bottom: 24px; }

  .header-report-label { display: inline; }

  .view-section { padding: 28px 44px 40px; gap: 20px; }
  .body.view-section { padding: 24px 36px 40px; gap: 20px; }
  .alert-list { gap: 12px; }
  .config-card { max-width: 600px; }

  /* Modal: centrado en pantalla, no sheet */
  .modal-overlay { align-items: center; }
  .modal {
    border-radius: 16px;
    padding-bottom: 28px;
    animation: fade-in .2s ease;
  }

  .card-header { padding: 16px 20px 12px; }
  .card-body { padding: 16px 20px; }
}

@media (min-width: 1100px) {
  .bottom-nav { width: 240px; }
  .app { margin-left: 240px; }
  .body { padding: 28px 44px 40px; gap: 24px; }
  .col-left, .col-right { gap: 20px; }
  .map-card #map-canvas { height: 340px !important; }
}
