:root {
  font:
    14px system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  color: #163e34;
  background: #f5f7f7;
  --green: #19795b;
  --border: #e0e8e5;
  --muted: #6c7e77;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: #123e34;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px max(24px, calc((100vw - 1220px) / 2));
  gap: 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand > span {
  display: grid;
  place-items: center;
  background: #ffffff12;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 23px;
}
.brand strong {
  font-size: 18px;
}
.brand small {
  display: block;
  color: #b9d3c7;
  font-size: 12px;
  margin-top: 3px;
}
header .pill {
  background: #ffffff15;
  color: #dbede4;
  border-color: #ffffff25;
}
.tabs {
  display: flex;
  gap: 5px;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 max(24px, calc((100vw - 1220px) / 2));
  overflow: auto;
  position: sticky;
  top: 0;
  z-index: 2;
}
.tabs button {
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: #6a7d75;
  padding: 19px 20px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  font-size: 14px;
}
.tabs button[aria-selected="true"] {
  color: #137454;
  border-bottom-color: #19795b;
  font-weight: 650;
}
.tabs button:hover {
  background: #f3f8f5;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #dfa948;
  outline-offset: 3px;
}
main {
  max-width: 1268px;
  margin: auto;
  padding: 22px 24px 50px;
}
.mode-line {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #6a7f74;
  font-size: 12px;
  padding-bottom: 24px;
}
.dot {
  width: 7px;
  height: 7px;
  background: #daaa53;
  border-radius: 50%;
  flex-shrink: 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading h1 {
  font-size: 29px;
  font-weight: 650;
  margin: 4px 0 6px;
  letter-spacing: -0.7px;
}
.page-heading p {
  margin: 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 750;
  color: #75877e;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
h2 {
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 12px;
}
h3 {
  font-size: 16px;
}
.section-heading h2 {
  margin: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 99px;
  font-size: 11px;
  border: 1px solid #dce7e1;
  white-space: nowrap;
}
.subtle {
  background: #edf3ef;
  color: #637c6c;
}
.pending {
  background: #fff5e4;
  color: #a57724;
  border-color: #f2e4c6;
}
.ready {
  background: #e4f3eb;
  color: #1e8057;
  border-color: #cce8d7;
}
.live-label {
  font-size: 11px;
  color: #33815c;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 16px;
}
.metric {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 0;
  min-width: 0;
}
.metric > span {
  display: block;
  font-size: 12px;
  color: #667c70;
}
.metric strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 10px 0;
  color: #143e31;
}
.metric small {
  font-size: 11px;
}
.source-note {
  font-size: 11px;
  color: #7c8b82;
  line-height: 1.7;
  margin: 12px 0 24px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  min-width: 0;
}
.dashboard-grid .card {
  margin-bottom: 0;
}
.dashboard-grid {
  margin: 24px 0;
}
.empty {
  text-align: center;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 220px;
  padding: 20px;
  color: #829087;
}
.empty-icon {
  display: grid;
  place-items: center;
  border: 1px solid #e0e9e3;
  border-radius: 13px;
  width: 45px;
  height: 45px;
  font-size: 23px;
  color: #759580;
  background: #f8faf8;
}
.empty h3 {
  color: #647c6d;
  margin: 16px 0 6px;
  font-weight: 550;
}
.empty p {
  max-width: 320px;
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.7;
}
.empty small {
  font-size: 11px;
}
.health-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid #edf1ee;
  font-size: 12px;
}
.health-row span {
  color: #7a897f;
}
.health-row strong {
  font-weight: 550;
  text-align: right;
  overflow-wrap: anywhere;
}
.next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #edf5ef;
  border: 1px solid #dae8dd;
  border-radius: 14px;
  padding: 24px;
  gap: 20px;
}
.next-step h2 {
  margin: 8px 0;
}
.next-step p:not(.eyebrow) {
  color: #718173;
  font-size: 12px;
  margin: 0;
}
.next-step button {
  flex-shrink: 0;
  margin: 0;
}
label {
  display: block;
  margin-top: 15px;
  font-size: 12px;
  font-weight: 550;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d4e0d8;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  margin-top: 7px;
  background: #fff;
  color: #284c3c;
}
input::placeholder {
  color: #a0aca3;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  flex-shrink: 0;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  line-height: 1.5;
  font-weight: 400;
}
button,
.link {
  display: inline-block;
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  margin-top: 15px;
  text-decoration: none;
  font-weight: 550;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #eaf2ec;
  color: #276846;
}
button.text-button {
  background: transparent;
  color: #438363;
  margin: 0;
  padding: 0;
  font-size: 11px;
}
small,
.muted {
  color: var(--muted);
  line-height: 1.7;
}
.muted {
  font-size: 12px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f3f7f3;
  padding: 16px;
  border-radius: 10px;
  font: 12px system-ui;
  line-height: 1.7;
}
#offers article,
#groups article {
  border-top: 1px solid #e7ede8;
  padding: 20px 0;
}
#offers article:first-child,
#groups article:first-child {
  border-top: 0;
}
article img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}
#qr {
  max-width: 250px;
  display: block;
  margin: 20px auto;
}
#qr[hidden] {
  display: none;
}
#notice {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 550px;
  background: #173b37;
  color: white;
  padding: 16px;
  border-radius: 12px;
  display: none;
  z-index: 10;
}
.table {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
td,
th {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid #e7ede8;
  vertical-align: top;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #839185;
  font-weight: 600;
}
td small {
  font-size: 11px;
}
details {
  margin-top: 8px;
}
#waGroups {
  max-height: 250px;
  overflow: auto;
}
#waGroups p {
  overflow-wrap: anywhere;
}
.queue-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.queue-control button {
  margin: 0;
  flex-shrink: 0;
}
.feature-list {
  padding-left: 20px;
  line-height: 2.2;
  font-size: 12px;
  color: #61766a;
}
.roadmap .card {
  display: flex;
  gap: 22px;
}
.roadmap h2 {
  margin: 15px 0 8px;
}
.roadmap p {
  margin: 0;
  color: #6f8275;
  line-height: 1.8;
  font-size: 12px;
}
.step-number {
  color: #a1b6a7;
  font-size: 22px;
  min-width: 30px;
  padding-top: 3px;
}
.tab-panel[hidden] {
  display: none !important;
}
#bestFilters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px;
  margin: 24px 0;
}
#bestFilters label { flex: 1 1 180px; }
#panel-mais-vendidos p { line-height: 1.7; }
@media (max-width: 1000px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .tabs button {
    padding: 17px 14px;
  }
}
@media (max-width: 720px) {
  header {
    padding: 18px;
  }
  .brand strong {
    font-size: 16px;
  }
  main {
    padding: 18px 16px 35px;
  }
  .tabs {
    padding: 0 10px;
  }
  .tabs button {
    padding: 15px 13px;
    font-size: 12px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading > .pill {
    display: none;
  }
  .card {
    padding: 20px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric strong {
    font-size: 26px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .section-heading .pill {
    font-size: 9px;
    padding: 5px 7px;
  }
  .next-step,
  .queue-control {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-grid {
    gap: 15px;
  }
  .source-note {
    margin-bottom: 20px;
  }
  #notice {
    left: 16px;
    right: 16px;
  }
  .mode-line {
    line-height: 1.6;
  }
  .roadmap .card {
    gap: 15px;
  }
}

/* Controles compartilhados: catálogo, grupos, fila e configurações. */
[hidden] {
  display: none !important;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.toolbar input {
  flex: 2;
  min-width: 160px;
  width: auto;
}
.toolbar select {
  flex: 1;
  min-width: 130px;
  width: auto;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.danger {
  background: #fff0ed;
  color: #aa4e39;
}
.group-options {
  max-height: 190px;
  overflow: auto;
}
.group-options label {
  font-weight: 400;
}
.group-options small {
  margin-left: 5px;
}
fieldset {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 15px;
  margin-top: 18px;
}
legend {
  font-size: 12px;
  font-weight: 550;
}
.weekday-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}
.weekday-options label {
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 400;
  margin: 7px 0;
}
.image-preview {
  max-width: 220px;
  max-height: 160px;
  object-fit: contain;
  margin: 15px 0;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  width: min(500px, 90vw);
  color: #163e34;
}
dialog::backdrop {
  background: #123e3480;
}
code,
#backupResult {
  overflow-wrap: anywhere;
}
a {
  color: #277b58;
}
a.link {
  color: white;
}
a.link.secondary {
  color: #276846;
}
.card form .grid {
  gap: 12px;
}
.card form .grid label {
  min-width: 0;
}
@media (max-width: 720px) {
  .toolbar {
    flex-direction: column;
  }
  .toolbar input,
  .toolbar select {
    width: 100%;
  }
  .tabs {
    scrollbar-width: thin;
  }
}

.landing-colors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.landing-colors input {
  height: 46px;
  padding: 4px;
}
.landing-button-editor {
  padding: 16px;
  background: #f8faf9;
  border: 1px solid #dce5df;
  border-radius: 14px;
  margin: 12px 0;
}
.landing-button-editor .actions {
  gap: 5px;
}
.landing-button-editor button {
  padding: 6px 12px;
}
.landing-phone {
  max-width: 380px;
  margin: 20px auto;
  border: 8px solid #292524;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 15px 45px #00000015;
}
.landing-preview-card {
  align-self: start;
  position: sticky;
  top: 20px;
}
.landing-editor {
  align-items: start;
}
@media (max-width: 800px) {
  .landing-preview-card {
    position: static;
  }
}

.automation-category-list {
  max-height: 280px;
  overflow: auto;
  padding: 8px 0;
}
.category-option {
  padding: 8px 4px;
  border-bottom: 1px solid #e6ebe7;
}
.category-option small {
  display: block;
}
.automation-category-list input {
  flex: none;
}
#automationPreview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.subtabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin: 20px 0;
  background: transparent;
  padding: 4px;
}
.subtabs button {
  background: #edf3ef;
  color: #31513d;
  white-space: nowrap;
}
.subtabs button[aria-selected="true"] {
  background: #166534;
  color: white;
}
.offers-layout {
  display: grid;
  gap: 20px;
}
.card > summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 650;
  padding: 8px 0;
}
.group-publication-fields {
  margin-top: 20px;
}
.automation-flow {
  padding: 14px 18px;
  background: #edf5ef;
  border-radius: 12px;
}
#automation-view-results {
  display: grid;
  gap: 16px;
}

.group-management {
  display: grid;
  gap: 20px;
}
