/* Promobot — sistema visual
   Verde-pinho para confiança, etiqueta de preço para o assunto, papel frio para
   descansar a vista. Sem gradiente, sem card flutuante em tudo. */

:root {
  --paper: #f2f4f1;
  --surface: #ffffff;
  --surface-2: #fafbf9;
  --ink: #17211c;
  --ink-2: #46544c;
  --muted: #5b6a61;
  --faint: #7c8a82;
  --line: #dce2dc;
  --line-strong: #c6cec8;

  --pine: #0e5a48;
  --pine-2: #0a4436;
  --deal: #d9480f;
  --deal-soft: #fbe9e0;
  --blue: #2f6fed;

  --ok: #157f52;
  --ok-soft: #e3f2e9;
  --warn: #a15c00;
  --warn-soft: #faefd8;
  --bad: #b42318;
  --bad-soft: #fbe7e5;

  --font-display: "Bahnschrift", "DIN Alternate", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --font-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;

  --radius-card: 14px;
  --radius-control: 8px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--pine);
}

img,
svg {
  max-width: 100%;
}

.icon {
  display: block;
  flex: none;
}

::selection {
  background: var(--deal-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.break {
  word-break: break-all;
}

/* ---------- marca ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 4px 8px;
}

.brand-light {
  color: #f2f7f3;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: var(--pine-2);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  border-radius: 6px 2px 2px 6px;
  clip-path: polygon(0 0, 74% 0, 100% 50%, 74% 100%, 0 100%);
  flex: none;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- autenticação ---------- */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 46%) minmax(0, 1fr);
}

.auth-aside {
  background: var(--pine-2);
  color: #e9f1ec;
  padding: 34px 44px 26px;
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.auth-pitch {
  margin-top: auto;
}

.auth-pitch h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-weight: 600;
  margin: 0 0 16px;
}

.auth-pitch p {
  margin: 0;
  max-width: 44ch;
  color: rgba(233, 241, 236, 0.7);
  font-size: 15px;
}

.receipt {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 6px 16px 12px;
  max-width: 470px;
}

.receipt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

.receipt-row:last-of-type {
  border-bottom: 0;
}

.receipt-name {
  color: rgba(233, 241, 236, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.receipt-old {
  color: rgba(233, 241, 236, 0.45);
  text-decoration: line-through;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.receipt-new {
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.discount-tag {
  display: inline-flex;
  align-items: center;
  background: var(--deal);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 12px 2px 7px;
  border-radius: 3px 0 0 3px;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%);
}

.receipt-note {
  margin: 8px 0 0;
  font-size: 10.5px;
  color: rgba(233, 241, 236, 0.4);
}

.auth-foot {
  margin: 0;
  font-size: 11.5px;
  color: rgba(233, 241, 236, 0.38);
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--paper);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 24px 50px -38px rgba(22, 33, 28, 0.55);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}

.auth-lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.auth-switch {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-warning {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--bad);
}

.totp-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin: 20px 0 22px;
}

.totp-qr {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #ffffff;
  line-height: 0;
}

.totp-manual {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.secret {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: 7px 9px;
  word-break: break-all;
}

.recovery-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.recovery-list li {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  text-align: center;
}

.recovery-list code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.05em;
}

.recovery-list-light li {
  background: #ffffff;
}

/* ---------- controles ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-primary {
  background: var(--pine);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--pine-2);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: #aeb9b1;
}

.btn-ghost {
  background: transparent;
  color: var(--pine);
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.btn-danger {
  background: var(--bad);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 7px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
}

.input {
  width: 100%;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  font-size: 14px;
}

.input:hover {
  border-color: #b3beb6;
}

.input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.input-sm {
  width: auto;
  padding: 6px 9px;
  font-size: 13px;
}

.input-code {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 0.22em;
  text-align: center;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- flash ---------- */

.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13.5px;
}

.flash-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 700;
  flex: none;
  margin-top: 1px;
}

.flash-success {
  background: var(--ok-soft);
  border-color: #bfe3cd;
  color: #0b5a3a;
}

.flash-error {
  background: var(--bad-soft);
  border-color: #f2c4bf;
  color: #7a1a12;
}

.flash-info {
  background: #e8f0fe;
  border-color: #c6d8fb;
  color: #1f4fb8;
}

/* ---------- shell ---------- */

.shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--pine-2);
  color: #e9f1ec;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  margin: 0 0 6px;
  padding: 0 10px;
  font-size: 11.5px;
  color: rgba(233, 241, 236, 0.42);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(233, 241, 236, 0.78);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  box-shadow: inset 2px 0 0 var(--deal);
}

.nav-item.is-disabled {
  color: rgba(233, 241, 236, 0.34);
  cursor: default;
}

.nav-item.is-disabled:hover {
  background: transparent;
  color: rgba(233, 241, 236, 0.34);
}

.nav-phase {
  margin-left: auto;
  font-size: 10px;
  color: rgba(233, 241, 236, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 1px 6px;
}

.rail-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: rgba(233, 241, 236, 0.5);
}

.icon-btn {
  display: grid;
  place-items: center;
  padding: 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(233, 241, 236, 0.65);
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 246, 0.88);
  backdrop-filter: blur(10px);
}

.topbar-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.topbar-title p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

.status.is-off .status-dot {
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
}

.content {
  width: 100%;
  max-width: 1220px;
  padding: 26px 30px 48px;
}

/* ---------- estatísticas ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.stat:last-child {
  border-right: 0;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.stat-label .icon {
  color: var(--pine);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-value.is-bad {
  color: var(--bad);
}

.stat-note {
  font-size: 11.5px;
  color: var(--faint);
}

/* ---------- grade e cartões ---------- */

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

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-body {
  padding: 18px;
}

.card-reveal {
  border-color: #e8c98c;
  margin-bottom: 18px;
}

.link-sm {
  font-size: 12.5px;
  color: var(--pine);
  text-decoration: none;
}

.link-sm:hover {
  text-decoration: underline;
}

.body-text {
  margin: 0 0 10px;
  font-size: 13.5px;
}

.body-text:last-child {
  margin-bottom: 0;
}

/* ---------- passos ---------- */

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

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.step:first-child {
  padding-top: 0;
}

.step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.step-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  flex: none;
  margin-top: 1px;
}

.step-mark.is-done {
  background: var(--ok-soft);
  border-color: #bfe3cd;
  color: var(--ok);
}

.step-text {
  min-width: 0;
}

.step-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.step-text p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.step .pill {
  margin-left: auto;
}

/* ---------- pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

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

.pill-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.pill-bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.pill-muted {
  background: #eef1ed;
  color: var(--muted);
}

/* ---------- tabelas ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  text-align: left;
  padding: 9px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.table td {
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table .row-detail td {
  padding-top: 0;
  background: var(--surface-2);
}

.table-logs td {
  vertical-align: top;
}

.level {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.level-info {
  background: #e8f0fe;
  color: #1f4fb8;
}

.level-warning {
  background: var(--warn-soft);
  color: var(--warn);
}

.level-error,
.level-critical {
  background: var(--bad-soft);
  color: var(--bad);
}

.logmsg {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- vazio ---------- */

.empty {
  padding: 34px 20px;
  text-align: center;
}

.empty-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--paper);
  color: var(--pine);
}

.empty-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.empty-text {
  margin: 4px auto 0;
  max-width: 42ch;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- saúde ---------- */

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

.status-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}

.status-card-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--paper);
  color: var(--pine);
  flex: none;
}

.status-card-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.status-card-value {
  margin: 1px 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.status-card-note {
  margin: 1px 0 0;
  font-size: 11.5px;
  color: var(--faint);
}

.status-card.is-bad {
  border-color: #f2c4bf;
  background: #fffafa;
}

.status-card.is-warn {
  border-color: #ecd3a2;
  background: #fffdf7;
}

.health-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
}

.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}

.health-dot.is-ok {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

.health-dot.is-warn {
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
}

.kv {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 9px 16px;
  margin: 0;
  font-size: 13.5px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  min-width: 0;
}

.kv-compact {
  gap: 6px 12px;
  font-size: 13px;
}

/* ---------- detalhes ---------- */

.details {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--pine);
}

.details .recovery-list {
  margin-bottom: 12px;
}

/* ---------- usuários ---------- */

.user-line {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
}

.user-email {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- notas ---------- */

.foot-note {
  margin: 14px 2px 0;
  font-size: 12px;
  color: var(--faint);
}

/* ---------- erros ---------- */

.error-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--paper);
}

.error-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px;
  text-align: center;
}

.error-code {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--line-strong);
  margin: 18px 0 0;
}

.error-card h1 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 6px 0 8px;
}

.error-text {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.error-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- responsivo ---------- */

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

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

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-aside {
    padding: 22px 26px;
    gap: 18px;
  }

  .auth-pitch {
    margin-top: 0;
  }

  .auth-pitch h1 {
    font-size: 28px;
  }

  .auth-pitch p,
  .receipt,
  .auth-foot {
    display: none;
  }

  .auth-main {
    padding: 28px 18px 40px;
    align-items: start;
  }

  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    overflow-x: auto;
  }

  .rail-nav {
    flex-direction: row;
    gap: 14px;
  }

  .nav-section {
    flex-direction: row;
    gap: 4px;
  }

  .nav-label,
  .nav-phase {
    display: none;
  }

  .rail-footer {
    margin-top: 0;
    margin-left: auto;
    padding-top: 0;
    border-top: 0;
  }

  .user-meta {
    display: none;
  }

  .topbar {
    padding: 10px 18px;
  }

  .content {
    padding: 18px 18px 40px;
  }
}

@media (max-width: 720px) {
  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .status-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .totp-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .recovery-list {
    grid-template-columns: 1fr 1fr;
  }

  .topbar-title p {
    display: none;
  }

  .status {
    display: none;
  }

  .table {
    min-width: 520px;
  }

  .card {
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Fase 1: lojas, produtos, ofertas, regras ---------- */

.head-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 10px;
}

.actions-row form {
  display: inline-flex;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

.mini-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.mini-steps li {
  margin-bottom: 7px;
}

.store-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
}

.store-help {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.form-pad {
  padding-top: 14px;
}

.query-form,
.filter-form,
.reject-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.query-form {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.filter-form {
  width: 100%;
}

.field.grow,
.filter-form .field.grow {
  flex: 1 1 220px;
}

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

.query-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.query-row:last-child {
  border-bottom: 0;
}

.query-meta {
  display: block;
  font-size: 11.5px;
  color: var(--faint);
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.thumb {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  flex: none;
}

.thumb-empty {
  display: grid;
  place-items: center;
  color: var(--faint);
}

.product-text {
  min-width: 0;
}

.product-title {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-title:hover {
  color: var(--pine);
  text-decoration: underline;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.right {
  text-align: right;
}

.actions-cell {
  text-align: right;
  white-space: nowrap;
}

.actions-cell form {
  display: inline-flex;
}

.pager {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.pager-link {
  min-width: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  font-size: 12.5px;
  text-decoration: none;
  color: var(--muted);
}

.pager-link.is-active {
  background: var(--pine);
  border-color: var(--pine);
  color: #ffffff;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.tab:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.tab.is-active {
  background: var(--pine);
  border-color: var(--pine);
  color: #ffffff;
}

.tab-count {
  min-width: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 11px;
  text-align: center;
}

.tab.is-active .tab-count {
  background: rgba(255, 255, 255, 0.22);
}

.discount-inline {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--deal-soft);
  color: var(--deal);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.offer-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.offer-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.offer-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.price-old {
  color: var(--faint);
  font-size: 13px;
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.price-now {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.discount-tag-light {
  background: var(--deal);
  color: #ffffff;
  font-size: 12px;
  padding: 2px 11px 2px 6px;
}

.msg-preview {
  margin: 0;
  padding: 16px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}

.preview-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.reject-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tag-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.tag-list li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.tag-list code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--pine);
}

.table-compact th,
.table-compact td {
  padding: 7px 12px;
}

.table-compact {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.preset {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.preset.is-active {
  border-color: var(--pine);
  background: #f4faf6;
  box-shadow: inset 0 0 0 1px var(--pine);
}

.preset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preset-head strong {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.preset-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  min-height: 36px;
}

.preset-facts {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: grid;
  gap: 5px;
  font-size: 12.5px;
}

.preset-facts li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 4px;
}

.preset-facts span {
  color: var(--muted);
}

.preset-facts strong {
  font-variant-numeric: tabular-nums;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  margin: 4px 0 18px;
  cursor: pointer;
}

.check-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--pine);
}

.simulation-kv {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sim-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.sim-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}

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

.sim-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-figures {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

@media (max-width: 900px) {
  .store-grid,
  .offer-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .store-help {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 16px;
  }

  .preset-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .offer-image {
    max-width: 220px;
  }
}

@media (max-width: 720px) {
  .tag-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .table-products {
    min-width: 760px;
  }
}

/* ---------- Fase 2: canal e modelos ---------- */

.action-divider {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 18px;
}

.template-body {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  min-height: 260px;
  resize: vertical;
}

.inline-form {
  display: inline-flex;
  margin-top: 10px;
}

.inline-form .btn {
  margin: 0;
}

/* ---------- wizard de primeira configuração ---------- */

.wizard-meter {
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 12px;
}

.wizard-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pine);
  transition: width 0.25s ease;
}

.wizard-list {
  display: flex;
  flex-direction: column;
}

.wizard-step {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.wizard-step:first-child {
  padding-top: 0;
}

.wizard-step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.wizard-mark {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.wizard-step.is-done .wizard-mark {
  background: var(--ok-soft);
  border-color: #bfe3cd;
  color: var(--ok);
}

.wizard-body {
  min-width: 0;
  flex: 1;
}

.wizard-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wizard-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.wizard-what {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.wizard-why {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.wizard-detail {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.wizard-detail::before {
  content: "Agora: ";
  color: var(--faint);
}

.wizard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.wizard-actions .inline-form {
  margin-top: 0;
}

.wizard-actions .btn {
  margin: 0;
}

/* ---------- ofertas manuais e de teste ---------- */

.pill-blue {
  background: #e6effd;
  color: var(--blue);
}

.actions-row.center {
  justify-content: center;
}

.alert {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13.5px;
}

.alert-error {
  background: var(--bad-soft);
  border-color: #f0c4bf;
  color: var(--bad);
}

.alert-info {
  background: #e6effd;
  border-color: #c9dbfb;
  color: #1f4fa8;
}

.import-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.import-form .field {
  margin-bottom: 0;
  min-width: 220px;
}

.import-form .field.grow {
  flex: 2;
}

.price-preview {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin: -2px 0 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.price-preview strong {
  font-variant-numeric: tabular-nums;
}

.price-preview-warning {
  color: var(--bad);
  font-size: 12.5px;
}

.delete-form {
  max-width: 380px;
}
