:root{--brand:#0284c7;--brand-soft:#e0f7ff;--brand-text:#075985;--ink:#0f172a;--muted:#64748b;--border:#dbeafe;--green:#0f9f6e;--green-soft:#ecfdf5;--green-text:#047857;--red:#dc2626;--sidebar:#083344}*{box-sizing:border-box}html,body{margin:0;background:#f6fbff;color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,select{font:inherit}.shell{display:flex;min-height:100vh}.sidebar{position:sticky;top:0;display:flex;width:250px;min-width:250px;height:100vh;flex-direction:column;padding:22px 14px;color:#fff;background:var(--sidebar)}.s-brand{padding:4px 10px 28px}.s-brand .s-title{font-size:20px;font-weight:800}.s-brand .s-sub{margin-top:5px;color:#94a3b8;font-size:11px}.s-group-lbl{margin:0 10px 8px;color:#64748b;font-size:9px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}.s-item{display:flex;width:100%;align-items:center;gap:11px;padding:12px;border:1px solid transparent;border-radius:9px;color:#fff;background:transparent;text-align:left}.s-item.active{background:var(--brand)}.s-icon{display:grid;width:34px;height:34px;place-items:center;border:1px solid rgba(255,255,255,.2);border-radius:8px;background:rgba(255,255,255,.12)}.s-icon svg{width:17px;fill:none;stroke:currentColor;stroke-width:1.8}.s-text{min-width:0}.s-title-nav{font-size:12px;font-weight:700}.s-desc-nav{margin-top:3px;color:rgba(255,255,255,.65);font-size:10px}.paused-label{margin-top:24px}.s-item.disabled{margin-bottom:4px;color:rgba(255,255,255,.42);opacity:.55;cursor:not-allowed}.s-item.disabled .s-icon{border-color:rgba(255,255,255,.1);color:rgba(255,255,255,.45);background:rgba(255,255,255,.03)}.s-item.disabled .s-desc-nav{color:rgba(255,255,255,.32)}.module-status{margin-left:auto;padding:3px 5px;border:1px solid rgba(255,255,255,.1);border-radius:99px;color:rgba(255,255,255,.36);font-size:7px;font-weight:700;text-transform:uppercase}.s-modulo-activo{margin-top:auto;padding:14px;border:1px solid rgba(255,255,255,.1);border-radius:10px;background:rgba(255,255,255,.04)}.s-ma-label{margin-bottom:5px;color:rgba(255,255,255,.62);font-size:9px;font-weight:700;letter-spacing:.1em}.s-ma-name{font-size:13px;font-weight:700}.s-ma-desc{margin-top:3px;color:#64748b;font-size:10px}.main{min-width:0;flex:1}.topbar{display:flex;min-height:70px;align-items:center;justify-content:space-between;gap:20px;padding:12px 30px;border-bottom:1px solid var(--border);background:#fff}.topbar-title{font-size:16px;font-weight:700}.topbar-caption{margin-top:3px;color:var(--muted);font-size:11px}.topbar-pill{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:99px;font-size:10px;font-weight:700}.topbar-pill.ok{color:var(--green-text);background:var(--green-soft)}.sync-dot{width:6px;height:6px;border-radius:50%;background:currentColor}.content{max-width:1450px;margin:auto;padding:28px 30px 20px}.view{display:none}.view.visible{display:block}.sec-lbl{color:var(--brand);font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.section-title{margin:6px 0 8px;font-size:25px;letter-spacing:-.03em}.section-desc{max-width:760px;margin:0;color:var(--muted);font-size:12px;line-height:1.6}.panel{padding:18px;border:1px solid var(--border);border-radius:11px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.03)}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:15px}.panel-title{font-size:13px;font-weight:700}.panel-sub{margin-top:4px;color:var(--muted);font-size:10px}.chart-panel{margin-top:24px;padding:20px}.chart-panel-head{align-items:center}.chart-controls{display:flex;align-items:center;gap:20px}.ch-select{height:36px;min-width:112px;padding:0 11px;border:1px solid #bfdbfe;border-radius:8px;color:var(--ink);background:#fff}.chart-legend{color:var(--muted);font-size:10px}.chart-legend span{display:inline-flex;align-items:center;gap:7px}.chart-legend b{color:#475569;font-weight:500}.legend-line{display:inline-block;width:14px;height:3px;border-radius:99px;background:#0284c7}.legend-line.sales{background:var(--brand)}.legend-line.branding{background:#0f766e}.chart-wrap{position:relative;width:100%}.h-360{height:360px}.month-tabs{display:grid;grid-template-columns:repeat(12,minmax(78px,1fr));gap:7px;margin:18px 0;overflow-x:auto;padding-bottom:3px}.month-tab{position:relative;min-width:78px;height:38px;padding:0 12px;border:1px solid var(--border);border-radius:9px;color:var(--ink);background:#fff;font-size:11px;font-weight:600;cursor:pointer}.month-tab:hover:not(:disabled){border-color:#7dd3fc}.month-tab.active{border-color:#0284c7;color:#075985;background:#e0f7ff}.month-tab:disabled{color:#94a3b8;background:#f8fafc;cursor:default}.current-dot{display:inline-block;width:6px;height:6px;margin-left:5px;border-radius:50%;background:#0284c7;vertical-align:1px}.campaigns-panel{margin-bottom:4px}.table-scroll{overflow-x:auto}.data-table{width:100%;border-collapse:collapse;font-size:11px}.data-table th{padding:11px 12px;border-bottom:1px solid var(--border);color:#526987;background:#f8fafc;font-size:9px;letter-spacing:.04em;text-align:left;text-transform:uppercase;white-space:nowrap}.data-table td{padding:13px 12px;border-bottom:1px solid var(--border);color:#334155;vertical-align:middle}.data-table tbody tr:last-child td{border-bottom:0}.data-table .num{text-align:right;white-space:nowrap}.campaign-name{min-width:180px;color:var(--ink)!important;font-weight:600}.ad-name-col{color:var(--muted);font-size:10px;white-space:nowrap}.date-col{white-space:nowrap;color:#475569;font-size:10px}.campaign-total{font-weight:700;background:#f8fafc;border-left:2px solid var(--border)!important}.pct-col{font-weight:600}.resultados-col{min-width:100px;color:var(--muted);font-size:10px}.status-pill,.objective-pill{display:inline-flex;padding:4px 8px;border-radius:99px;font-size:9px;font-weight:700;white-space:nowrap}.status-pill.green{color:#047857;background:#ecfdf5}.status-pill.red{color:#b91c1c;background:#fef2f2}.status-pill.muted{color:#64748b;background:#f1f5f9}.objective-pill{color:#475569;background:#f1f5f9}.ad-links{display:flex;min-width:110px;flex-wrap:wrap;gap:5px}.ad-links a{display:inline-flex;padding:4px 7px;border:1px solid #bfdbfe;border-radius:6px;color:#0284c7;background:#eff6ff;font-size:9px;font-weight:600;text-decoration:none}.ad-links a:hover{border-color:#0284c7;background:#dbeafe}.no-data{color:#94a3b8;font-size:10px}.table-empty{padding:28px!important;color:var(--muted)!important;text-align:center}.empty-state{display:flex;min-height:210px;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:22px;border:1px dashed var(--border);border-radius:10px;color:var(--muted);text-align:center;font-size:11px}.empty-state strong{color:var(--ink);font-size:13px}.site-footer{display:flex;justify-content:space-between;gap:18px;padding:22px 2px 4px;color:#94a3b8;font-size:9px}@media(max-width:760px){.shell{display:block}.sidebar{position:relative;width:100%;min-width:0;height:auto}.s-item.disabled,.paused-label,.s-modulo-activo{display:none}.main{width:100%}.content,.topbar{padding-right:18px;padding-left:18px}.chart-panel-head{align-items:flex-start;flex-direction:column}.chart-controls{width:100%;justify-content:space-between}}@media(max-width:520px){.topbar{align-items:flex-start;flex-direction:column}.site-footer{flex-direction:column}}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 18px 0 6px;
}

.kpi-pill {
  min-height: 86px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.kpi-pill span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.kpi-pill strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.kpi-pill small {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 10px;
}

.goal-col {
  min-width: 96px;
  text-align: center;
  vertical-align: middle !important;
}

.retail-filters {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(200px, 1fr);
  gap: 14px;
  align-items: end;
  margin: 18px 0 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.retail-filter small {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retail-filter.filter-hint p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.retail-filter select:disabled {
  color: #475569;
  background: #f8fafc;
}

.impressions-panel {
  margin-top: 18px;
}

.legend-line.impressions {
  background: #f59e0b;
}

.h-260 {
  height: 260px;
}

.h-300 {
  height: 300px;
}

.daily-panel {
  margin-top: 18px;
}

.panel-note {
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 10px;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

.retail-filter {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.retail-filter span {
  color: #526987;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.retail-filter select {
  height: 36px;
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.data-notice {
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  color: #075985;
  background: #f0f9ff;
  font-size: 12px;
  line-height: 1.5;
}

.data-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 14px;
}

.data-notice.error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fef2f2;
}

.source-headers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.source-headers span {
  padding: 4px 8px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  color: #075985;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.goal-stack {
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
}

.reservation-goal-input {
  width: 78px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  text-align: right;
}

.reservation-goal-input:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(2, 132, 199, .16);
}

@media (max-width: 1180px) {
  .kpi-strip {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 680px) {
  .kpi-strip {
    grid-template-columns: 1fr;
  }

  .kpi-pill {
    min-height: auto;
  }

  .kpi-pill strong {
    font-size: 20px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.messages-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 18px;
  margin-top: 24px;
  align-items: start;
}

.messages-planner {
  min-width: 0;
}

.messages-panel-head {
  align-items: center;
}

.messages-kicker {
  display: inline-flex;
  margin-bottom: 7px;
  padding: 4px 9px;
  border-radius: 99px;
  color: #047857;
  background: #d1fae5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.messages-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 11px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.messages-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.messages-field > span:first-child {
  color: #526987;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.messages-input-wrap,
.messages-cell-money {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  background: #fff;
}

.messages-input-wrap:focus-within,
.messages-cell-money:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, .10);
}

.messages-input-wrap b,
.messages-cell-money b {
  padding-left: 10px;
  font-size: 11px;
}

.messages-input-wrap input,
.messages-cell-money input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px 0 6px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.messages-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.messages-kpi {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.messages-kpi span,
.messages-summary-total span,
.messages-formula > span {
  display: block;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.messages-kpi strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.messages-kpi.investment {
  border-color: #bae6fd;
  background: var(--brand-soft);
}

.messages-kpi.investment strong {
  color: var(--brand);
}

.messages-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.messages-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.messages-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 11px;
}

.messages-table th {
  padding: 10px 12px;
  color: #526987;
  background: #f8fafc;
  font-size: 9px;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.messages-table td {
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  color: #334155;
  vertical-align: middle;
}

.messages-add-row {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.messages-add-row .messages-btn {
  min-width: 132px;
}

.messages-table .num {
  text-align: right;
}

.messages-table-input {
  width: 105px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font: inherit;
  text-align: right;
}

.messages-table-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, .10);
}

.messages-table-input.name {
  width: 100%;
  min-width: 180px;
  text-align: left;
}

.messages-cell-money {
  width: 125px;
  margin-left: auto;
}

.messages-cell-money .messages-table-input {
  width: 88px;
  border: 0;
  box-shadow: none;
}

.messages-row-action {
  width: 46px;
  text-align: center;
}

.messages-remove {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #94a3b8;
  background: transparent;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.messages-remove:hover {
  border-color: #fecaca;
  color: var(--red);
  background: var(--brand-soft);
}

.messages-summary {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.messages-summary-total {
  padding: 18px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
}

.messages-summary-total span {
  color: #cffafe;
}

.messages-summary-total strong {
  display: block;
  margin-top: 6px;
  font-size: 27px;
}

.messages-formula {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fafc;
}

.messages-formula p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 10px;
  line-height: 1.45;
}

.messages-actions {
  display: grid;
  gap: 8px;
}

.messages-btn {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.messages-btn.primary {
  color: #fff;
  background: var(--brand);
}

.messages-btn.primary:hover {
  background: var(--brand-text);
}

.messages-btn.secondary {
  border-color: #cbd5e1;
  color: #475569;
  background: #fff;
}

.messages-btn.secondary:hover {
  border-color: #7dd3fc;
  color: var(--brand);
  background: var(--brand-soft);
}

@media (max-width: 980px) {
  .retail-filters {
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr);
  }
}

@media (max-width: 560px) {
  .retail-filters {
    grid-template-columns: 1fr;
  }
}

.messages-feedback {
  min-height: 17px;
  color: var(--green-text);
  font-size: 10px;
  line-height: 1.4;
}

.messages-feedback.error {
  color: var(--red);
}

.campaign-name span {
  display: block;
  color: #0f172a;
  font-weight: 800;
}

.campaign-name small {
  display: block;
  margin-top: 3px;
  color: #7890b5;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.25;
}

@media(max-width:1100px) {
  .messages-layout {
    grid-template-columns: 1fr;
  }

  .messages-summary {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .messages-summary-total {
    grid-row: span 2;
  }
}

@media(max-width:900px) {
  .messages-controls {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media(max-width:760px) {
  .messages-panel-head,
  .messages-table-head {
    align-items: stretch;
    flex-direction: column;
  }

  .messages-kpis {
    grid-template-columns: 1fr;
  }

  .messages-summary {
    display: flex;
  }
}

@media(max-width:520px) {
  .messages-controls {
    grid-template-columns: 1fr;
  }
}

.legend-line.messages {
  background: #16a34a;
}

.legend-line.reservations {
  background: #ea580c;
}

/* Sidebar visual aligned with LR Suite. Text and navigation behavior stay intact. */
.sidebar {
  width: 286px;
  min-width: 286px;
  padding: 28px 22px 20px;
  border-right: 1px solid #dbe4f0;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 12px 0 32px rgba(15, 23, 42, .035);
}

.s-brand {
  position: relative;
  padding: 0 4px 24px;
}

.s-brand::before {
  display: block;
  width: 100%;
  aspect-ratio: 352 / 87;
  margin-bottom: 12px;
  border-radius: 10px;
  background: url("../assets/tierra-films-logo.png") center / cover no-repeat;
  content: "";
}

.s-brand .s-title {
  color: #0f172a;
  font-size: 18px;
  letter-spacing: -.02em;
}

.s-brand .s-sub {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
}

.app-version {
  display: inline-flex;
  margin-left: 5px;
  padding: 2px 6px;
  border: 1px solid #cfe0f7;
  border-radius: 99px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  vertical-align: 1px;
}

.s-group-lbl {
  margin: 11px 6px 9px;
  color: #64748b;
  font-size: 9px;
  letter-spacing: .11em;
}

.s-item {
  position: relative;
  min-height: 66px;
  margin-bottom: 9px;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d7e1ee;
  border-radius: 10px;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.s-item:not(.disabled):hover {
  border-color: #a8c9ff;
  background: #f8fbff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
  transform: translateY(-1px);
}

.s-item.active {
  border-color: #a9ccff;
  color: #155eef;
  background: #eff6ff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .08);
}

.s-item.active::after,
.s-item:not(.disabled)::after {
  margin-left: auto;
  color: #94a3b8;
  content: "\203A";
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
}

.s-item.active::after {
  color: #5b8def;
}

.s-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid #cfe0f7;
  border-radius: 9px;
  color: #64748b;
  background: #f8fafc;
}

.s-item.active .s-icon {
  border-color: #b9d6ff;
  color: #2563eb;
  background: #ffffff;
}

.s-icon svg {
  width: 19px;
}

.s-text {
  flex: 1;
}

.s-title-nav {
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s-desc-nav,
.s-item.active .s-desc-nav {
  overflow: hidden;
  margin-top: 4px;
  color: #64748b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paused-label {
  margin-top: 20px;
}

.s-item.disabled {
  margin-bottom: 9px;
  border-color: #e2e8f0;
  color: #475569;
  background: #ffffff;
  opacity: .58;
}

.s-item.disabled .s-icon {
  border-color: #dbe4f0;
  color: #64748b;
  background: #f8fafc;
}

.s-item.disabled .s-desc-nav {
  color: #94a3b8;
}

.module-status {
  margin-left: auto;
  padding: 3px 6px;
  border-color: #dbe4f0;
  color: #94a3b8;
  background: #f8fafc;
}

.s-modulo-activo {
  margin-top: auto;
  padding: 15px 16px;
  border: 1px solid #b9d6ff;
  border-radius: 10px;
  color: #0f172a;
  background: #eff6ff;
}

.s-ma-label {
  color: #2563eb;
}

.s-ma-name {
  color: #0f172a;
}

.s-ma-desc {
  color: #64748b;
}

@media(max-width:760px) {
  .sidebar {
    width: 100%;
    min-width: 0;
    padding: 22px 18px;
    border-right: 0;
    border-bottom: 1px solid #dbe4f0;
  }

  .s-brand {
    max-width: 280px;
  }
}

/* ===== Toggles de series ===== */
/* Toggles de series del grafico mensual */
.chart-series-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.series-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.series-toggle input {
  margin: 0;
  cursor: pointer;
  accent-color: currentColor;
}
/* ===== 02 - Proyecciones ===== */

.projection-kpis {
  margin-bottom: 4px;
}

.projection-panel {
  margin-top: 20px;
  padding: 20px;
}

.projection-panel-head {
  align-items: center;
}

.projection-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.projection-legend .legend-line.dashed {
  background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 9px);
}

.projection-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

.projection-table-panel {
  margin-top: 20px;
  margin-bottom: 20px;
}

.projection-table-head {
  align-items: center;
}

.projection-table .projection-value {
  color: var(--ink);
  font-weight: 700;
}

.projection-table .projection-cost-row td {
  background: #f8fafc;
}

.projection-gap {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.projection-gap.ok {
  color: var(--green-text);
  background: var(--green-soft);
}

.projection-gap.over {
  color: var(--brand-text);
  background: var(--brand-soft);
}

/* Simulador: el nodo final de la grafica se arrastra hacia el cierre deseado */
.projection-sim {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.projection-sim-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.projection-sim-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.projection-sim-field {
  width: 170px;
}

.projection-sim-actions .messages-btn {
  min-height: 40px;
}

.projection-sim-actions .messages-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.projection-sim-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sim-card {
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.sim-card.selected {
  border-color: #c4b5fd;
  background: #faf5ff;
}

.sim-card.efficiency {
  background: #f8fafc;
}

.sim-card > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sim-card > strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.sim-delta {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 7px;
  border-radius: 99px;
  color: #475569;
  background: #f1f5f9;
  font-size: 9px;
  font-weight: 700;
}

.sim-delta.up {
  color: #6d28d9;
  background: #ede9fe;
}

.sim-delta.down {
  color: var(--brand-text);
  background: var(--brand-soft);
}

.projection-legend .legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #fff;
}

@media(max-width:1100px) {
  .projection-sim-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media(max-width:760px) {
  .projection-panel-head,
  .projection-sim-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .projection-sim-grid {
    grid-template-columns: 1fr;
  }
}

.projection-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.projection-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.projection-legend b {
  color: var(--ink);
  font-weight: 600;
}

.projection-legend .legend-line {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 2px;
}

.sim-card > strong.ok { color: var(--green-text); }
.sim-card > strong.over { color: var(--red); }

.sim-card > small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

/* Variacion semana contra semana */
.delta-cell {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.delta-cell.up { color: #16a34a; }
.delta-cell.down { color: #dc2626; }

.campaigns-table .campaign-name small {
  display: block;
  margin-top: 3px;
  color: #b45309;
  font-size: 9px;
  font-weight: 700;
}

@media(max-width:760px) {
  .projection-controls {
    align-items: flex-start;
  }
}

.projection-gap.over {
  color: #b91c1c;
  background: #fef2f2;
}

/* Filtro por mes */
.filter-months {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
}

.filter-months .month-tab {
  display: inline-flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: auto;
  padding: 7px 13px;
  line-height: 1.2;
}

.filter-months .month-tab small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.filter-months .month-tab.active small {
  color: #0369a1;
}

.legend-line.dashed {
  background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 9px);
}

/* Columna simulada de la tabla de proyeccion */
.projection-sim-value {
  color: #c2410c;
  font-weight: 700;
  background: #fff7ed;
}

.projection-sim-field {
  width: 190px;
}

/* El filtro de meses manda en el ancho; la ficha de la cuenta va al costado */
.retail-filters {
  grid-template-columns: minmax(0, auto) minmax(220px, 1fr);
}

.filter-months {
  overflow: visible;
}

@media(max-width:900px) {
  .retail-filters {
    grid-template-columns: 1fr;
  }
}

/* 03 - Palabras clave */
.diagnosis-panel {
  margin-top: 18px;
}

.diagnosis-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 12px;
  line-height: 1.6;
}

.diagnosis-list b {
  color: var(--ink);
}

.diagnosis-list li::marker {
  color: var(--brand);
}

.kw-low {
  color: var(--red);
}

#keywords-filters + .kpi-strip {
  margin-top: 12px;
}

.grade-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.grade-pill.grade-ok {
  color: var(--green-text);
  background: var(--green-soft);
}

.grade-pill.grade-mid {
  color: #475569;
  background: #f1f5f9;
}

.grade-pill.grade-low {
  color: #b91c1c;
  background: #fef2f2;
}

/* ===== Sidebar minimizable ===== */
/* Boton en la barra superior: escritorio pasa el panel a una tira de iconos; telefono lo oculta. */
.topbar-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.sidebar-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  place-items: center;
  border: 1px solid #dbe5f2;
  border-radius: 9px;
  color: #52647d;
  background: #ffffff;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.sidebar-toggle:hover {
  border-color: #bfdbfe;
  color: #2563eb;
  background: #f8fbff;
}

.sidebar-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sidebar-toggle-arrow {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .2s ease;
}

.shell.sidebar-collapsed .sidebar-toggle-arrow {
  transform: scaleX(-1);
}

.sidebar {
  overflow: hidden;
  transition: width .2s ease, min-width .2s ease, padding .2s ease;
}

@media (min-width: 901px) {
  .shell.sidebar-collapsed .sidebar {
    width: 88px;
    min-width: 88px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .shell.sidebar-collapsed .s-brand {
    padding: 0 0 18px;
  }

  .shell.sidebar-collapsed .s-brand .s-title,
  .shell.sidebar-collapsed .s-brand .s-sub,
  .shell.sidebar-collapsed .s-group-lbl,
  .shell.sidebar-collapsed .s-text,
  .shell.sidebar-collapsed .s-modulo-activo,
  .shell.sidebar-collapsed .s-item::after {
    display: none;
  }

  .shell.sidebar-collapsed .s-item {
    min-height: 60px;
    justify-content: center;
    padding: 8px 0;
  }
}

@media (max-width: 900px) {
  .shell.sidebar-collapsed .sidebar {
    display: none;
  }
}

/* 01 - Encabezado con el desglose de conversiones por accion */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.conv-actions {
  flex: 0 1 460px;
  min-width: 0;
  padding: 11px 14px 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.conv-actions[hidden] {
  display: none;
}

.conv-actions-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.conv-actions-head > span {
  color: #334155;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.conv-actions-head > span b {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.conv-actions-head > strong {
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.conv-actions-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.conv-actions-bar {
  display: flex;
  height: 6px;
  gap: 2px;
  margin: 7px 0 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #f1f5f9;
}

.conv-actions-bar i {
  display: block;
  height: 100%;
}

.conv-actions-list {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.conv-actions-list li {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.conv-name {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conv-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.conv-value {
  padding-left: 13px;
  font-variant-numeric: tabular-nums;
}

.conv-value strong {
  color: var(--ink);
  font-size: 14px;
}

.conv-value small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.conv-actions-list .is-zero .conv-name,
.conv-actions-list .is-zero strong {
  color: #94a3b8;
}

@media(max-width:900px) {
  .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .conv-actions {
    flex: none;
  }

  .conv-actions-list {
    flex-wrap: wrap;
    row-gap: 8px;
  }
}

/* Boton de sincronizacion con la carpeta de Google Drive */
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drive-sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--brand);
  border-radius: 99px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 1px 2px rgba(2, 132, 199, .25);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.drive-sync:hover:not(:disabled) {
  border-color: #0369a1;
  background: #0369a1;
}

.drive-sync:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}

.drive-sync-meta {
  padding: 2px 7px;
  border-radius: 99px;
  color: #fff;
  background: rgba(255, 255, 255, .2);
  font-size: 9px;
  font-weight: 700;
}

.drive-sync-meta:empty {
  display: none;
}

.drive-sync svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.drive-sync[data-state="loading"] {
  cursor: progress;
}

.drive-sync[data-state="loading"] svg {
  animation: drive-spin 1s linear infinite;
}

.drive-sync[data-state="ok"] .drive-sync-meta {
  color: #065f46;
  background: #d1fae5;
}

.drive-sync[data-state="warn"] .drive-sync-meta,
.drive-sync[data-state="off"] .drive-sync-meta {
  color: #92400e;
  background: #fef3c7;
}

.drive-sync[data-state="error"] .drive-sync-meta {
  color: #b91c1c;
  background: #fee2e2;
}

@keyframes drive-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .drive-sync[data-state="loading"] svg {
    animation: none;
  }
}

/* 03 - Palabras clave | informes de la carpeta de Drive */
.drive-block {
  margin-top: 28px;
}

.drive-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.drive-block-head p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.drive-link {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 99px;
  color: var(--brand-text);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.drive-link:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.drive-panel + .drive-panel {
  margin-top: 16px;
}

.drive-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.drive-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fbff;
}

.drive-stats span {
  color: #526987;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.drive-stats strong {
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.drive-stats small {
  color: var(--muted);
  font-size: 10px;
}

.drive-terms-table .is-muted td {
  color: #94a3b8;
}

.drive-terms-table .is-loose td {
  background: #f8fafc;
}

.drive-terms-table .is-loose .campaign-name {
  font-style: italic;
}

.drive-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 12px;
}

.drive-more {
  padding: 7px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 99px;
  color: var(--brand-text);
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.drive-more:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.drive-total {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.drive-total strong {
  color: var(--ink);
  font-size: 18px;
}

.place-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.place-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.place-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-value {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.place-value strong {
  color: var(--ink);
  font-size: 14px;
}

.place-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #f1f5f9;
}

.place-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.place-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.drive-panel .panel-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

@media(max-width:1100px) {
  .drive-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media(max-width:760px) {
  .drive-block-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .drive-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.drive-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.match-pill {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 99px;
  color: #475569;
  background: #f1f5f9;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.kw-share {
  display: inline-block;
  width: 48px;
  height: 6px;
  margin-right: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #f1f5f9;
  vertical-align: middle;
}

.kw-share i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand);
}

/* 04 - Segmentacion */
.seg-period {
  margin: 8px 0 0;
  color: #526987;
  font-size: 10px;
  font-weight: 700;
}

#view-segmentation .section-head .drive-link {
  margin-bottom: 4px;
}

.act-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  cursor: help;
}

.act-pill.act-good { color: #047857; background: #ecfdf5; }
.act-pill.act-brand { color: #075985; background: #e0f2fe; }
.act-pill.act-warn { color: #92400e; background: #fffbeb; }
.act-pill.act-bad { color: #b91c1c; background: #fef2f2; }
.act-pill.act-muted { color: #64748b; background: #f1f5f9; }

.seg-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.seg-row {
  display: grid;
  grid-template-columns: minmax(170px, 230px) 1fr;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.seg-row:hover {
  border-color: var(--border);
  background: #f8fbff;
}

.seg-row.active {
  border-color: #7dd3fc;
  background: var(--brand-soft);
}

.seg-row:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.seg-row.is-loose {
  cursor: default;
}

.seg-row.is-loose strong {
  font-style: italic;
}

.seg-label strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.seg-label small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.seg-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.seg-bar,
.demand-volume,
.demand-change {
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: center;
  gap: 8px;
}

.seg-bar em,
.demand-volume em,
.demand-change em {
  color: #475569;
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.seg-track {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #f1f5f9;
}

.seg-track i {
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
}

.seg-table {
  margin-top: 16px;
}

.seg-about {
  display: block;
  max-width: 280px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
}

.chart-panel .panel-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.seg-panel {
  margin-top: 16px;
}

.seg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.seg-chip {
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 99px;
  color: #475569;
  background: #fff;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.seg-chip b {
  margin-left: 3px;
  color: var(--muted);
}

.seg-chip:hover {
  border-color: #7dd3fc;
}

.seg-chip.active {
  border-color: var(--brand);
  color: var(--brand-text);
  background: var(--brand-soft);
}

.link-btn {
  padding: 0;
  border: 0;
  color: var(--brand);
  background: none;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.seg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.demand-head,
.demand-list li {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) minmax(110px, 1fr) minmax(110px, 1fr) 54px;
  align-items: center;
  gap: 14px;
}

.demand-head {
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
  color: #526987;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.demand-head span:last-child {
  text-align: right;
}

.demand-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.demand-list li {
  padding: 9px 0;
  border-bottom: 1px solid #eef4fb;
}

.demand-list li:last-child {
  border-bottom: 0;
}

.demand-name {
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.demand-name small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.demand-volume {
  grid-template-columns: 1fr 76px;
}

.demand-volume em {
  font-weight: 600;
  white-space: nowrap;
}

.diverge {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 99px;
  background: #f1f5f9;
}

.diverge::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 50%;
  width: 1px;
  background: #cbd5e1;
}

.diverge i {
  position: absolute;
  top: 0;
  bottom: 0;
}

.diverge i.up { border-radius: 0 4px 4px 0; background: #16a34a; }
.diverge i.down { border-radius: 4px 0 0 4px; background: #dc2626; }
.demand-change em.up { color: #16a34a; }
.demand-change em.down { color: #dc2626; }

.demand-ours {
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.demand-ours small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.seg-geo-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.place-list .is-loose .place-name {
  color: var(--muted);
  font-style: italic;
}

#seg-geo .panel-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

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

@media(max-width:760px) {
  #view-segmentation .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .seg-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .demand-head {
    display: none;
  }

  .demand-list li {
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
  }
}
