/* ===== Elejemais — Component styles ===== */

/* ----------------- PICKER ----------------- */
.picker {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 36px 80px;
}
.picker-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 56px;
}
.picker-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 36px;
}
.picker-controls {
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.seg__btn {
  padding: 7px 14px;
  background: transparent;
  border: 0;
  font-size: 12.5px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  transition: 120ms ease;
  font-weight: 500;
}
.seg__btn:hover { color: var(--ink); }
.seg__btn.is-active {
  background: var(--ink);
  color: var(--bg);
}
.seg--sm .seg__btn { padding: 5px 11px; font-size: 11.5px; }

.picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.campaign-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: 220ms cubic-bezier(.2,.7,.2,1);
}
.campaign-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--muted-2);
}
.campaign-card__stripe {
  height: 4px;
  width: 100%;
}
.campaign-card__body { padding: 20px 22px 22px; }
.campaign-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 22px 0 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.campaign-card__progress { margin-bottom: 4px; }
.campaign-card__role {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted);
}
.campaign-card--new {
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px;
  border: 1.5px dashed var(--muted-2);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
  min-height: 380px;
  padding: 24px;
}
.campaign-card--new:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
  transform: none;
}

.popmenu {
  position: absolute;
  right: 0; top: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  min-width: 180px;
  z-index: 20;
}
.popmenu button {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: none; border: 0;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.popmenu button:hover { background: var(--surface-2); }
.popmenu button.danger { color: var(--red); }
.popmenu hr { border: 0; height: 1px; background: var(--line); margin: 4px 0; }

.picker-foot {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  font-size: 12px;
}

/* ----------------- ONBOARDING ----------------- */
.onboarding {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.onboarding__chrome {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 36px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  gap: 16px;
}
.obstep {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: default;
  padding: 4px 10px;
  border-radius: 999px;
}
.obstep__dot {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
  color: var(--muted);
}
.obstep.is-active .obstep__dot {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.obstep.is-active { color: var(--ink); }
.obstep.is-done { color: var(--ink-2); cursor: pointer; }
.obstep.is-done .obstep__dot { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.onboarding__body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
}
.onboarding__left {
  padding: 56px 64px;
  display: flex; flex-direction: column;
  max-width: 720px;
}
.onboarding__preview {
  background: var(--surface-2);
  border-left: 1px solid var(--line);
  padding: 56px 56px;
  display: flex; flex-direction: column;
  gap: 24px;
}
.obform { margin-top: 36px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; }

.tipo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.tipo-card {
  position: relative;
  text-align: left;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition: 140ms;
  font-family: inherit;
  color: inherit;
}
.tipo-card:hover { border-color: var(--muted-2); }
.tipo-card.is-selected {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 5%, var(--surface));
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 12%, transparent);
}
.tipo-card__check {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
}

.metabox {
  margin-top: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--accent) 4%, var(--surface));
}

.review { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.rev-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.rev-row.is-h { padding: 16px 0; border-bottom: 0; margin-top: 4px; }

.preview-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.tip {
  display: flex; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.tip > span:first-child { color: var(--accent); margin-top: 2px; }

/* ----------------- SHELL ----------------- */
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100vh;
  background: var(--bg);
}
.shell.is-collapsed { grid-template-columns: 64px 1fr; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 14px 12px;
  gap: 4px;
  overflow: hidden;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  margin-bottom: 4px;
}
.campaign-switch {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 10px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  margin: 4px 0 12px;
  transition: 120ms;
}
.campaign-switch:hover { border-color: var(--muted-2); }
.campaign-switch__dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav__item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  border-radius: var(--r);
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
  transition: 120ms;
}
.sidenav__item:hover { background: var(--surface-2); }
.sidenav__item.is-active {
  background: color-mix(in oklab, var(--accent) 8%, var(--surface-2));
  color: var(--accent-strong);
  font-weight: 500;
}
.sidenav__bar {
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.sidebar__foot {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 12px;
  padding-top: 12px;
}
.quota {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
}
.quota__bar {
  height: 4px; background: var(--surface);
  border-radius: 999px; margin-top: 6px;
  overflow: hidden;
}
.quota__bar > div { height: 100%; background: var(--accent); }

.main {
  display: flex; flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  gap: 16px;
}
.topbar__crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.topbar__right { display: flex; align-items: center; gap: 8px; }
.topbar__search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 6px 10px;
  min-width: 280px;
  color: var(--muted);
}
.topbar__search input {
  background: none; border: 0; outline: none;
  font-size: 13px;
  color: var(--ink);
  flex: 1;
}
.topbar__search input::placeholder { color: var(--muted-2); }

.avatar {
  width: 30px; height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--warm));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600;
}
.avatar--sm { width: 26px; height: 26px; font-size: 10.5px; }

.screen {
  flex: 1;
  overflow: auto;
  background: var(--bg);
}

/* ----------------- DASHBOARD ----------------- */
.dash {
  padding: 32px 36px 56px;
  max-width: 1480px;
  margin: 0 auto;
  display: flex; flex-direction: column;
  gap: 22px;
}
.dash__header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
  margin-bottom: 6px;
}
.dash__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.dash__row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.dash__row__third { grid-column: span 4; }
.dash__meta { padding: 24px 28px 22px; }
.meta-foot {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
}

[data-card-style="shadow"] .card { box-shadow: var(--shadow); border-color: transparent; }
[data-card-style="flat"] .card { background: var(--surface-2); border-color: var(--line-2); }

.feed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.feed__item {
  display: flex; align-items: flex-start; gap: 12px;
}
.feed__dot {
  width: 8px; height: 8px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}

.dash__insight {
  padding: 24px 28px;
  background: color-mix(in oklab, var(--accent) 6%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--accent) 25%, var(--line));
  border-radius: var(--r-lg);
}
.insight-bullet {
  width: 36px; height: 36px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ----------------- MAPA ----------------- */
.map-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
}
.map-stage {
  padding: 18px;
  position: relative;
  min-height: 580px;
  display: flex; align-items: center;
}
.map-legend {
  position: absolute;
  bottom: 18px; left: 22px;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.map-side { display: flex; flex-direction: column; gap: 18px; }
.kv {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
}
.kv:last-child { border-bottom: 0; }
.gaps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.gaps li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line-2);
}
.gaps li:last-child { border-bottom: 0; }
.gaps li > span:first-child { width: 24px; }
.gaps li > span:nth-child(2) { flex: 1; }

/* ----------------- TABLE ----------------- */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl thead th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.tbl thead th.num { text-align: right; }
.tbl tbody td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.tbl tbody td.num { text-align: right; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* ----------------- REPORTS ----------------- */
.rep-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.rep-card {
  padding: 20px 22px;
  display: flex; flex-direction: column;
  min-height: 200px;
  transition: 200ms;
}
.rep-card:hover {
  border-color: var(--muted-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ----------------- MODAL ----------------- */
.modal-back {
  position: fixed; inset: 0;
  background: color-mix(in oklab, var(--ink) 40%, transparent);
  display: flex; align-items: center; justify-content: center;
  z-index: 80;
  animation: fadein 200ms ease;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 30px 26px;
  max-width: 460px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: slideup 300ms cubic-bezier(.2,.7,.2,1);
}

/* ----------------- RESPONSIVE ----------------- */
@media (max-width: 1080px) {
  .picker-grid, .rep-grid { grid-template-columns: repeat(2, 1fr); }
  .dash__grid { grid-template-columns: repeat(2, 1fr); }
  .dash__row { grid-template-columns: 1fr !important; }
  .dash__row > * { grid-column: span 1 !important; }
  .map-layout { grid-template-columns: 1fr; }
  .onboarding__body { grid-template-columns: 1fr; }
  .onboarding__preview { border-left: 0; border-top: 1px solid var(--line); }
  .meta-foot { grid-template-columns: repeat(2, 1fr); }
}

/* ── Bottom nav (mobile shell) ── */
.shell__bottomnav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 58px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  z-index: 60;
  align-items: stretch;
  box-shadow: 0 -2px 12px -4px rgba(20,20,15,0.10);
}
.shell__bottomnav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 120ms;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.shell__bottomnav__item.is-active { color: var(--accent); }

@media (max-width: 768px) {
  /* Shell */
  .shell { grid-template-columns: 1fr !important; }
  .sidebar { display: none; }
  .screen  { padding-bottom: 58px; }
  .shell__bottomnav { display: flex; }

  /* Topbar */
  .topbar { padding: 10px 14px; gap: 8px; }
  .topbar__search { display: none; }
  .topbar__right .btn--icon { display: none; }
  .topbar__crumbs > *:not(:last-child) { display: none; }
  .topbar__crumbs { font-size: 13px; font-weight: 500; color: var(--ink); }

  /* Dashboard */
  .dash { padding: 16px 14px 36px; gap: 14px; }
  .dash__header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 0; }
  .dash__header > div:last-child > .btn:not(.btn--primary) { display: none; }
  .dash__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .dash__row  { grid-template-columns: 1fr !important; gap: 12px; }
  .dash__row > * { grid-column: span 1 !important; }
  .dash__meta { padding: 16px 14px 14px; }
  .dash__insight { padding: 16px 14px; }
  .meta-foot { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
  .fig { font-size: 40px; }

  /* Campaign hero */
  .campaign-hero__banner { height: 130px !important; }
  .campaign-hero__info {
    padding: 0 14px 16px !important;
    margin-top: -30px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
  .campaign-hero__avatar { width: 68px !important; height: 68px !important; }
  .campaign-hero__details h2 { font-size: 22px !important; margin: 0 0 4px !important; }
  .campaign-hero__actions { order: 3; width: 100%; }

  /* Picker */
  .picker { padding: 16px 14px 56px; }
  .picker-top { margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
  .picker-hero { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
  .picker-hero h1 { font-size: 38px !important; }
  .picker-controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .picker-grid { grid-template-columns: 1fr; }
  .campaign-card--new { min-height: 120px; }

  /* Onboarding */
  .onboarding__chrome { padding: 12px 16px; }
  .onboarding__chrome .obstep span:not(.obstep__dot) { display: none; }
  .onboarding__body { grid-template-columns: 1fr; }
  .onboarding__preview { display: none; }
  .onboarding__left { padding: 24px 16px 36px; }

  /* Map */
  .map-layout { grid-template-columns: 1fr; }
  .map-stage { min-height: 320px; }

  /* Modal — bottom sheet */
  .modal-back { align-items: flex-end; padding: 0; }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: var(--r-xl) var(--r-xl) 0 0 !important;
    border-bottom-color: transparent;
    padding: 22px 16px 28px;
  }

  /* Tables compact */
  .tbl { font-size: 12px; }
  .tbl thead th, .tbl tbody td { padding: 10px 12px; }

  /* Reports */
  .rep-grid { grid-template-columns: 1fr; }
}

/* ── Very small phones (480px) ── */
@media (max-width: 480px) {
  .dash__grid { grid-template-columns: 1fr; }
  .meta-foot  { grid-template-columns: 1fr; }
  .tipo-grid  { grid-template-columns: 1fr; }
  .campaign-card__stats { grid-template-columns: repeat(3, 1fr); }
}


/* ── Scrollable table wrapper ── */
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* ensure table doesn't compress columns */
}
.tbl-wrap .tbl { min-width: 560px; }

/* ── 2-col form grid that collapses on mobile ── */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===== Modal form primitives ===== */
.input {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 500 13.5px/1.3 var(--sans);
  color: var(--ink);
  outline: none;
  transition: border-color 140ms, box-shadow 140ms;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
.input.mono { font-family: var(--mono); letter-spacing: 0.01em; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 16px) center, calc(100% - 11px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input[type="number"] { -moz-appearance: textfield; }
.input[type="number"]::-webkit-outer-spin-button,
.input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.tabs { display: inline-flex; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.tab {
  background: none; border: 0; padding: 9px 14px;
  font: 500 13px var(--sans); color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }

.callout {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
  display: flex; align-items: center; gap: 6px;
}

.chip-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 12px var(--sans);
  color: var(--ink-2);
  cursor: pointer;
  transition: 140ms;
}
.chip:hover { background: var(--surface-2); }
.chip--on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: 140ms;
}
.dropzone:hover { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 5%, var(--surface-2)); }

.toggle { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.toggle input { width: 16px; height: 16px; accent-color: var(--accent); }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.pill--ativa     { background: oklch(0.95 0.05 155); color: oklch(0.4 0.12 155); }
.pill--atenção   { background: oklch(0.96 0.07 70);  color: oklch(0.5 0.15 70); }
.pill--nova      { background: oklch(0.95 0.05 230); color: oklch(0.45 0.13 230); }

.avatar--lg { width: 56px; height: 56px; font-size: 18px; }

.btn--icon { padding: 7px; min-width: 32px; }
.btn--sm { padding: 4px 9px; font-size: 11.5px; }
.btn--block { width: 100%; justify-content: center; }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { text-align: center; font-size: 11px; padding: 6px 0; font-weight: 500; }
.cal-cell {
  min-height: 78px;
  padding: 6px;
  background: var(--surface-2);
  border-radius: 6px;
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11.5px;
}
.cal-cell.is-today { outline: 2px solid var(--accent); background: color-mix(in oklab, var(--accent) 6%, var(--surface-2)); }
.cal-ev { padding: 2px 5px; border-radius: 3px; color: white; font-size: 10px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   RESPONSIVIDADE COMPLEMENTAR
   Regras que cobrem inline-styles e casos não tratados acima.
   ============================================================ */

/* ── 1280px — conteiner máximo ── */
@media (max-width: 1280px) {
  .picker { padding: 24px 28px 80px; }
  .dash   { padding: 28px 28px 56px; }
}

/* ── 1080px (tablet landscape) — já coberto acima, complementos ── */
@media (max-width: 1080px) {
  .onboarding__left { padding: 40px 48px; }
  .shell { grid-template-columns: 64px 1fr; }
  .shell.is-collapsed { grid-template-columns: 64px 1fr; }
}

/* ── 900px — transição sidebar para ícones ── */
@media (max-width: 900px) {
  .shell:not(.is-collapsed) { grid-template-columns: 64px 1fr; }
  .sidebar__brand .serif,
  .sidebar__brand .eyebrow,
  .campaign-switch__info,
  .sidenav__item span:not(:first-child),
  .sidebar__foot .quota,
  .sidebar__foot .row:not(.row--avatar) > *:not(.avatar) { display: none; }
  .sidebar { padding: 14px 8px; align-items: center; }
  .campaign-switch { justify-content: center; padding: 8px; }
  .sidenav__item { justify-content: center; padding: 10px; }
  .sidenav__item.is-active .sidenav__bar { display: none; }
}

/* ── 768px (mobile) — complementos ao bloco existente ── */
@media (max-width: 768px) {
  /* Heading principal de todas as telas (38px inline) */
  .dash__header h1.serif,
  .dash h1.serif {
    font-size: clamp(22px, 6vw, 32px) !important;
    line-height: 1.1 !important;
  }

  /* Onboarding title (48px inline) */
  .onboarding__left h1.serif {
    font-size: clamp(26px, 7vw, 38px) !important;
    line-height: 1.05 !important;
  }

  /* Insight do dashboard: botão vai para linha separada */
  .dash__insight > .row {
    flex-wrap: wrap;
    gap: 14px;
  }
  .dash__insight > .row > .btn {
    width: 100%;
    justify-content: center;
  }

  /* Campaign hero — ações empilham */
  .campaign-hero__actions {
    flex-wrap: wrap !important;
    width: 100%;
    gap: 8px !important;
  }
  .campaign-hero__actions .btn {
    flex: 1;
    min-width: 110px;
    justify-content: center;
  }

  /* Form grid 2 colunas → 1 coluna */
  .form-grid-2 { grid-template-columns: 1fr; }

  /* Seg de status na tabela de lideranças */
  .card .seg { flex-wrap: wrap; }

  /* Tabela de liderancas/apoiadores: cabeçalho do card */
  .card > .row:first-child { flex-wrap: wrap; gap: 8px; }

  /* Topbar: título não quebra */
  .topbar__crumbs {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100vw - 130px);
  }

  /* Dash header: botão secundário some, só primário */
  .dash__header > div:last-child .btn:not(.btn--primary):not(:last-child) {
    display: none;
  }

  /* Relatório grid 1 col (já coberto mas garantindo) */
  .rep-grid { grid-template-columns: 1fr !important; }

  /* Modal — garante scroll vertical em conteúdo longo */
  .modal { overflow-y: auto; }

  /* Onboarding preview some em mobile */
  .onboarding__preview { display: none; }
  .onboarding__body { grid-template-columns: 1fr !important; }
  .onboarding__left { padding: 24px 18px 40px !important; }

  /* Picker hero: botão "Nova campanha" em largura total */
  .picker-hero { flex-direction: column; align-items: stretch; }
  .picker-hero > .btn { width: 100%; justify-content: center; }

  /* Picker footer */
  .picker-foot { flex-direction: column; gap: 4px; align-items: flex-start; }
}

/* ── 600px — phones médios ── */
@media (max-width: 600px) {
  /* Picker controls: seg não estoura */
  .picker-controls .seg {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  /* Topbar: padding menor */
  .topbar { padding: 10px 12px; }

  /* Dashboard meta-foot: 2 colunas → 1 coluna */
  .meta-foot { grid-template-columns: 1fr 1fr !important; }

  /* Stat cards do grid: fonte */
  .dash__grid .fig,
  .dash__grid .serif[style] { font-size: 32px !important; }

  /* Onboarding steps: esconde label, só o dot */
  .obstep__label { display: none; }
}

/* ── 480px — phones pequenos (complementa o bloco existente) ── */
@media (max-width: 480px) {
  /* Picker */
  .picker { padding: 14px 12px 72px; }
  .picker-top { gap: 10px; }

  /* Campaign card nova: altura mínima menor */
  .campaign-card--new { min-height: 100px; }

  /* Seg na tela cheia */
  .seg { font-size: 11px; }
  .seg__btn { padding: 6px 10px; }

  /* Modal: padding lateral menor */
  .modal { padding: 20px 14px 24px !important; }

  /* Meta-foot: 1 coluna */
  .meta-foot { grid-template-columns: 1fr !important; }

  /* Dashboard grid: 1 coluna */
  .dash__grid { grid-template-columns: 1fr !important; }

  /* Stat numbers menores */
  .fig { font-size: 32px !important; }

  /* SmallStat no liderancas/apoiadores screen */
  .dash .dash__grid .card .serif { font-size: 28px !important; }
}

/* ── Inteligência: grids de conteúdo ── */
.intel-filters {
  display: grid;
  grid-template-columns: 1fr 180px 200px 1fr;
  gap: 14px;
  align-items: end;
}
.intel-charts { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; margin-bottom: 20px; }
.intel-proj   { display: grid; grid-template-columns: 1fr 1fr;  gap: 20px; margin-bottom: 20px; }

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

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

/* ── 360px — phones mínimos ── */
@media (max-width: 360px) {
  .picker-top .row:first-child .serif { font-size: 18px; }
  .btn { font-size: 12.5px; padding: 8px 10px; }
  .btn--lg { padding: 10px 14px; font-size: 13.5px; }
  .topbar__crumbs { max-width: calc(100vw - 100px); }
}
