:root {
  --bg: #0f0d0a;
  --bg2: #15120e;
  --bg3: #1b1712;
  --card: #211b14;
  --ink: #f5f1e8;
  --dim: #aaa292;
  --line: #3b3327;
  --gold: #e6a81c;
  --gold2: #ffd75a;
  --gold3: #b9790c;
  --ok: #69c58a;
  --danger: #df6c6c;
  --warn: #e7b75d;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .34);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, .18);
  /* Pilha sem fonte externa: Arial e Liberation Sans têm métricas próximas entre Windows/Linux. */
  --ui: Arial, 'Liberation Sans', 'Nimbus Sans L', 'Helvetica Neue', sans-serif;
  --display: var(--ui);
  --cond: var(--ui);
  --muted: var(--dim);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 92% -10%, rgba(230, 168, 28, .12), transparent 34rem),
    radial-gradient(circle at 8% 110%, rgba(185, 121, 12, .08), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  font-size-adjust: .52;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { min-width: 0; font: inherit; }
img, video, canvas, svg { max-width: 100%; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; transform: none !important; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--dim); }
.optional { color: var(--dim); font-weight: 500; font-size: .84em; }
.break-anywhere { overflow-wrap: anywhere; }
.nowrap { flex-wrap: nowrap !important; }

:focus-visible {
  outline: 3px solid rgba(255, 215, 90, .24);
  outline-offset: 2px;
}

/* ---------- Tipografia ---------- */
.eyebrow {
  margin: 0 0 9px;
  color: var(--gold);
  font: 700 .84rem/1 var(--cond);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.section-title {
  margin: 0 0 7px;
  color: var(--ink);
  font: 700 clamp(1.55rem, 2.2vw, 2rem)/1.08 var(--display);
  text-transform: uppercase;
  letter-spacing: .01em;
}
.section-sub {
  margin: 0;
  color: var(--dim);
  font-size: .97rem;
  line-height: 1.55;
}

/* ---------- Botões ---------- */
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, #201b15, var(--bg3));
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 700;
  font-size: .94rem;
  box-shadow: 0 2px 0 rgba(255, 255, 255, .02) inset;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(230, 168, 28, .7);
  background: #241d15;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .16);
}
.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold2), var(--gold3));
  color: #1a1206;
  box-shadow: 0 8px 22px rgba(185, 121, 12, .18);
}
.btn.primary:hover { box-shadow: 0 11px 28px rgba(185, 121, 12, .26); }
.btn.danger { border-color: rgba(223, 108, 108, .35); color: #f0a0a0; }
.btn.danger:hover { border-color: rgba(223, 108, 108, .65); background: rgba(223, 108, 108, .08); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 38px; padding: 8px 12px; font-size: .86rem; }

/* ---------- Formulários ---------- */
.field { margin-bottom: 18px; }
.field > label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #c5bdaa;
  font-size: .9rem;
  font-weight: 700;
}
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #110f0d;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
  font-size: .98rem;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.input:hover, .textarea:hover, .select:hover { border-color: #514634; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(230, 168, 28, .10);
  background: #14110e;
}
.textarea { min-height: 185px; resize: vertical; line-height: 1.55; }
.select { min-height: 50px; }
.select-large { font-weight: 650; }
.counter { margin-top: 6px; color: var(--dim); text-align: right; font-size: .78rem; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.responsive-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }

/* ---------- QR / conexão ---------- */
.qr-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
}
.qr-card {
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(430px, 1.08fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: center;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(230, 168, 28, .075), rgba(230, 168, 28, .012));
  box-shadow: var(--shadow);
}
.qr-copy h1 {
  margin: 0 0 18px;
  max-width: 680px;
  font: 800 clamp(2.7rem, 6vw, 5.3rem)/.92 var(--display);
  text-transform: uppercase;
  letter-spacing: -.02em;
}
.qr-copy .lead {
  max-width: 610px;
  margin: 0;
  color: var(--dim);
  font-size: 1.06rem;
  line-height: 1.68;
}
.steps { display: grid; gap: 12px; margin: 27px 0; }
.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid rgba(59, 51, 39, .7);
  border-radius: 14px;
  background: rgba(255, 255, 255, .014);
  color: var(--dim);
  font-size: .95rem;
}
.step b { color: var(--ink); }
.step-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold2), var(--gold3));
  color: #1a1206;
  font: 800 .82rem var(--display);
}
.connection-help {
  display: grid;
  gap: 3px;
  margin-bottom: 22px;
  padding: 13px 15px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: rgba(230, 168, 28, .055);
  color: var(--dim);
  font-size: .9rem;
}
.connection-help strong { color: var(--ink); }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.status-pill, .badge, .secure-chip, .country-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--dim);
  background: rgba(255, 255, 255, .015);
  font-size: .82rem;
  font-weight: 650;
}
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #8d8476; }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 13px rgba(105, 197, 138, .42); }
.qr-panel { display: grid; gap: 14px; }
.qr-label-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.qr-label { color: var(--gold); font: 800 .88rem var(--cond); letter-spacing: .11em; text-transform: uppercase; }
.qr-caption { margin-top: 3px; color: var(--dim); font-size: .84rem; }
.secure-chip { color: #cfc6b4; white-space: nowrap; }
.qr-box {
  min-height: 370px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #332b20;
  border-radius: 21px;
  background: #090806;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.qr-box img {
  display: block;
  width: min(100%, 350px);
  max-height: 350px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: auto;
  image-rendering: pixelated;
  /* Necessário para o PNG retornado pela Evolution ficar visível neste projeto. */
  background: #000000;
}
.qr-placeholder { max-width: 300px; padding: 30px; color: #8e8576; text-align: center; line-height: 1.5; }
.pairing {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, .20);
}
.pairing-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pairing h3 { margin: 0; font: 800 1.45rem/1.1 var(--display); text-transform: uppercase; }
.country-chip { color: var(--gold2); border-color: rgba(230, 168, 28, .28); white-space: nowrap; }
.pairing-description { margin: 10px 0 13px; color: var(--dim); font-size: .92rem; }
.pairing-description b { color: var(--ink); }
.pairing-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.phone-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #110f0d;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.phone-input-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230, 168, 28, .10); }
.phone-prefix { padding: 0 12px; color: var(--gold2); font-weight: 800; border-right: 1px solid var(--line); }
.phone-input { border: 0; border-radius: 0; background: transparent; box-shadow: none !important; }
.pairing-button { white-space: nowrap; }
.pair-code-area {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(230, 168, 28, .30);
  border-radius: 15px;
  background: #0e0c0a;
  text-align: center;
}
.pair-code-title { margin-bottom: 4px; color: var(--dim); font: 700 .78rem var(--cond); letter-spacing: .12em; text-transform: uppercase; }
.pairing-code {
  min-height: 65px;
  display: grid;
  place-items: center;
  padding-left: .25em;
  color: var(--gold2);
  font: 800 clamp(2rem, 6vw, 3.35rem)/1 var(--display);
  letter-spacing: .25em;
  white-space: nowrap;
}
.copy-pair { margin-top: 8px; }

/* ---------- Shell ---------- */
.app-shell { min-height: 100dvh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 22px 15px;
  border-right: 1px solid var(--line);
  background: rgba(20, 17, 13, .97);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 5px 10px 24px; }
.brand-mark { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--gold2), var(--gold3)); color: #1a1206; font-size: 22px; box-shadow: 0 8px 24px rgba(185, 121, 12, .16); }
.brand h1 { margin: 0; font: 700 1.42rem/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.brand-text span { display: block; margin-top: 4px; color: var(--dim); font-size: .76rem; }
.nav { display: grid; gap: 7px; }
.nav button {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--dim);
  padding: 12px 13px;
  text-align: left;
  font: 650 .98rem var(--cond);
  letter-spacing: .055em;
  text-transform: uppercase;
  transition: .16s ease;
}
.nav button:hover { color: var(--ink); background: rgba(230, 168, 28, .045); }
.nav button.active { color: var(--ink); border-color: var(--line); background: rgba(230, 168, 28, .085); box-shadow: inset 3px 0 var(--gold); }
.nav-icon { width: 24px; text-align: center; font-size: 1.12rem; }
.nav-label-mobile { display: none; }
.sidebar-footer { margin-top: auto; padding: 12px 10px 4px; }
.mini-status { overflow: hidden; color: #837b6f; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; overflow: clip; container-type: inline-size; container-name: dashboard-main; }
.header {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 clamp(18px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 13, 10, .88);
  backdrop-filter: blur(16px);
}
.header-left { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 11px; }
.header h2 { min-width: 0; margin: 0; overflow: hidden; font: 650 1.5rem var(--display); text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; }
.connection-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(105, 197, 138, .22); border-radius: 999px; background: rgba(105, 197, 138, .055); color: #b9ddc6; padding: 8px 12px; font-size: .84rem; font-weight: 700; }
.mobile-menu { display: none; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--bg3); color: var(--ink); }
.content { width: 100%; max-width: 1500px; margin: 0 auto; padding: clamp(20px, 3vw, 34px); }

/* ---------- Dashboard ---------- */
.hero { padding: clamp(12px, 2vw, 24px) 0 28px; }
.hero h1, .send-page-head h1 { margin: 0; font: 800 clamp(2.4rem, 5vw, 4.5rem)/.97 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.hero p, .send-page-head p { max-width: 790px; margin: 14px 0 0; color: var(--dim); font-size: 1.02rem; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(420px, 1.3fr); gap: 18px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(230, 168, 28, .055), rgba(230, 168, 28, .010));
  padding: clamp(18px, 2.2vw, 25px);
  box-shadow: var(--shadow-soft);
}
.metric-card { min-height: 190px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.metric-copy p { margin: 7px 0 0; color: var(--dim); }
.metric-big { display: block; color: var(--gold); font: 800 clamp(4rem, 9vw, 6rem)/.88 var(--display); }
.metric-icon { width: 74px; height: 74px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 22px; background: rgba(230, 168, 28, .06); color: var(--gold2); font-size: 2rem; }
.section-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.result-list { display: grid; gap: 9px; margin-top: 15px; }
.result-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .018); font-size: .92rem; }
.result-item > span:first-child { min-width: 0; color: #bdb4a4; overflow-wrap: break-word; word-break: normal; }
.result-item b { text-align: right; }
.badge.ok { color: #a9dcb9; border-color: rgba(105, 197, 138, .25); background: rgba(105, 197, 138, .06); }
.badge.error { color: #efa4a4; border-color: rgba(223, 108, 108, .28); background: rgba(223, 108, 108, .05); }
.badge.warn { color: #efd39c; border-color: rgba(231, 183, 93, .25); }
.badge.neutral { color: #c2baa9; }

/* ---------- Envio ---------- */
.send-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.send-page-head h1 { font-size: clamp(2.2rem, 4vw, 3.8rem); }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr); }
.send-layout { align-items: start; }
.composer-card, .group-card { min-width: 0; }
.composer-heading { margin-bottom: 18px; }
.contextual-panel { animation: reveal .17s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
.upload-zone { position: relative; min-height: 94px; display: grid; place-items: center; border: 1px dashed #554a38; border-radius: 15px; background: rgba(255,255,255,.012); overflow: hidden; transition: .16s ease; }
.upload-zone:hover { border-color: var(--gold); background: rgba(230, 168, 28, .035); }
.upload-zone .file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-copy { display: grid; gap: 3px; pointer-events: none; text-align: center; }
.upload-copy strong { color: var(--ink); }
.upload-copy span { color: var(--dim); font-size: .82rem; }
.attachment { margin-top: 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.012); color: var(--dim); font-size: .85rem; }
.audio-actions { margin-top: 10px; }
.youtube-box { margin-bottom: 15px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .018); }
.preview-title { margin-bottom: 4px; font: 700 1.1rem var(--cond); }
.engine-note { display: flex; gap: 6px; flex-direction: column; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(230, 168, 28, .035); color: var(--dim); font-size: .84rem; line-height: 1.45; }
.engine-note strong { color: #d9cba9; }
.send-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.send-footer-label { color: var(--dim); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.selection-summary { margin-top: 2px; color: var(--ink); font-size: .92rem; font-weight: 700; }
.send-main-button { min-width: 190px; }
.progress-block { margin-top: 14px; }
.progress { height: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: #0c0b09; }
.progress > span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--gold3), var(--gold2)); transition: width .2s ease; }
.progress-block .muted { margin-top: 7px; font-size: .82rem; }

/* ---------- Grupos ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.group-toolbar { margin-top: 14px; }
.search { max-width: 360px; }
.compact-actions { justify-content: flex-end; }
.group-list { max-height: 470px; overflow: auto; border: 1px solid var(--line); border-radius: 15px; background: rgba(0,0,0,.08); scrollbar-width: thin; scrollbar-color: #54472f transparent; }
.group-item { display: grid; grid-template-columns: 20px minmax(0, 1fr); grid-template-areas: "check text"; gap: 11px; align-items: center; padding: 13px 14px; border-bottom: 1px solid rgba(59, 51, 39, .58); cursor: pointer; transition: background .13s ease; }
.group-item:last-child { border-bottom: 0; }
.group-item:hover { background: rgba(230, 168, 28, .038); }
.group-item > input { grid-area: check; width: 18px; height: 18px; margin: 0; accent-color: var(--gold); }
.group-text { grid-area: text; min-width: 0; width: 100%; display: grid; }
.group-name { min-width: 0; color: var(--ink); font-size: .94rem; font-weight: 650; line-height: 1.25; overflow-wrap: break-word; word-break: normal; hyphens: none; }
.group-meta { margin-top: 4px; color: var(--dim); font-size: .76rem; line-height: 1.25; }
.empty { padding: 38px 20px; color: var(--dim); text-align: center; }

/* ---------- Agenda / tabela ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 15px; }
.table { width: 100%; min-width: 760px; border-collapse: collapse; }
.table th, .table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .9rem; }
.table th { position: sticky; top: 0; background: #18140f; color: var(--dim); font: 700 .8rem var(--cond); letter-spacing: .09em; text-transform: uppercase; }
.table tr:last-child td { border-bottom: 0; }
.schedule-message { max-width: 430px; overflow-wrap: anywhere; }
.schedule-groups { max-height: 310px; }
.schedule-table-wrap { margin-top: 16px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .68); backdrop-filter: blur(8px); }
.modal { width: min(780px, 100%); max-height: min(92dvh, 920px); overflow: auto; border: 1px solid var(--line); border-radius: 21px; background: #17130f; padding: 22px; box-shadow: var(--shadow); }
.modal-head, .modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-actions { justify-content: flex-end; margin-top: 18px; }

/* ---------- Toast ---------- */
.toast-root { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 200; display: grid; gap: 9px; pointer-events: none; }
.toast { min-width: 280px; max-width: min(430px, calc(100vw - 30px)); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 14px; background: #191510; color: var(--ink); padding: 13px 15px; box-shadow: var(--shadow); font-size: .9rem; pointer-events: auto; }
.toast.error { border-left-color: var(--danger); }

/* ---------- Entrada / carga obrigatória ---------- */
.entry-screen, .loading-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 5vw, 60px);
}
.entry-card {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(230, 168, 28, .075), rgba(33, 27, 20, .94));
  box-shadow: var(--shadow);
}
.entry-card.compact-entry { width: min(520px, 100%); display: block; text-align: center; }
.entry-card h1, .loading-card h1 {
  margin: 0 0 15px;
  font: 800 clamp(2.6rem, 7vw, 5.2rem)/.94 var(--display);
  text-transform: uppercase;
}
.loading-card { min-width: 0; overflow: hidden; }
.loading-card > * { min-width: 0; max-width: 100%; }
.loading-card h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.loading-card p { overflow-wrap: anywhere; }
.compact-entry h1 { font-size: clamp(2.2rem, 7vw, 3.8rem); }
.entry-copy > p, .entry-card > p, .loading-card > p { color: var(--dim); line-height: 1.65; }
.entry-form { display: grid; gap: 13px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 20px; background: rgba(10, 9, 7, .42); text-align: left; }
.entry-form > label { color: #c5bdaa; font-size: .9rem; font-weight: 700; }
.entry-form .btn { width: 100%; min-height: 50px; }
.feature-list { display: grid; gap: 9px; margin-top: 24px; color: #c8bfad; font-size: .92rem; }
.entry-status { min-height: 24px; color: var(--dim); text-align: center; font-size: .88rem; }
.error-text { color: var(--danger) !important; }
.brand-mark.large { width: 58px; height: 58px; margin: 0 auto 18px; font-size: 1.7rem; }
.loading-card { width: min(600px, 100%); padding: clamp(28px, 6vw, 58px); border: 1px solid var(--line); border-radius: 26px; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.loading-card .eyebrow { margin-top: 22px; }
.loading-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.spinner { display: inline-block; width: 52px; height: 52px; border: 4px solid rgba(230, 168, 28, .16); border-top-color: var(--gold2); border-radius: 50%; animation: spin .8s linear infinite; }
.small-spinner { width: 17px; height: 17px; border-width: 2px; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Escolha de método ---------- */
.method-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: #110f0d; }
.method-tab { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); font-weight: 750; }
.method-tab.active { background: linear-gradient(135deg, var(--gold2), var(--gold3)); color: #1a1206; }

/* ---------- Contas, privacidade e administração ---------- */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 14px; background: #110f0d; }
.privacy-check { display: flex; align-items: flex-start; gap: 10px; color: var(--dim); font-size: .9rem; line-height: 1.45; }
.privacy-check input { margin-top: 4px; accent-color: var(--gold); }
.link-button { display: inline; padding: 0; border: 0; background: transparent; color: var(--gold); text-decoration: underline; font: inherit; cursor: pointer; }
.privacy-modal { max-width: 760px; max-height: min(88vh, 900px); overflow: auto; }
.privacy-modal h3 { margin: 22px 0 7px; color: var(--cream); }
.privacy-modal ul { display: grid; gap: 8px; padding-left: 22px; color: var(--dim); }
.privacy-plain-summary { display: grid; gap: 5px; margin: 16px 0 4px; padding: 14px 15px; border: 1px solid rgba(105, 197, 138, .3); border-radius: 14px; background: rgba(105, 197, 138, .055); }
.privacy-plain-summary strong { color: var(--ok); }
.privacy-plain-summary span { color: var(--dim); line-height: 1.55; }
.privacy-storage-note { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 18px; padding: 14px 15px; border: 1px solid rgba(105, 197, 138, .28); border-radius: 15px; background: rgba(105, 197, 138, .045); }
.privacy-storage-icon { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(105, 197, 138, .45); border-radius: 50%; color: var(--ok); font-weight: 900; }
.privacy-storage-note > div { min-width: 0; display: grid; gap: 4px; }
.privacy-storage-note strong { color: var(--cream); }
.privacy-storage-note span:last-child { color: var(--dim); font-size: .86rem; line-height: 1.5; }
.entry-card.in-dashboard { width: 100%; max-width: 1050px; margin: 22px auto; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-head h1 { margin: 4px 0 8px; font-family: var(--serif); font-size: clamp(2.3rem, 5vw, 4rem); line-height: .98; }
.admin-head p { max-width: 760px; color: var(--dim); }
.compact-metrics { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
.small-metric { min-height: 125px; }
.admin-table { min-width: 860px; }
.compact-modal { max-width: 560px; }
.secret-once { padding: 16px; margin: 18px 0; border: 1px solid var(--gold); border-radius: 12px; background: #0b0907; color: var(--cream); font: 700 1.05rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.nav-count { display: inline-grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 999px; background: var(--gold2); color: #1a1206; font-size: .7rem; font-weight: 900; }
code { color: var(--gold); overflow-wrap: anywhere; }

/* ---------- Envios em processo e parada de emergencia ---------- */
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.panic-compact { min-height: 38px; padding: 7px 12px; border-color: rgba(223, 108, 108, .7); background: rgba(153, 38, 38, .14); color: #ffc0c0; font-size: .76rem; letter-spacing: .045em; }
.panic-mobile { display: none; }
.process-page-head { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.process-page-head > div { min-width: 0; }
.process-page-head h1 { margin: 4px 0 8px; font: 800 clamp(2.5rem, 5vw, 4.5rem)/.95 var(--display); text-transform: uppercase; }
.process-page-head p { max-width: 780px; margin: 0; color: var(--dim); }
.panic-button { flex: 0 0 auto; min-height: 50px; padding-inline: 20px; border-color: rgba(223, 108, 108, .72); background: rgba(153, 38, 38, .15); color: #ffc0c0; letter-spacing: .04em; }
.process-safety-note { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; padding: 12px 14px; border: 1px solid rgba(223, 108, 108, .26); border-radius: 14px; background: rgba(153, 38, 38, .055); }
.process-safety-note > div { min-width: 0; display: grid; gap: 2px; }
.process-safety-note strong { color: #f0c1b8; font-size: .88rem; }
.process-safety-note span:last-child { color: var(--dim); font-size: .82rem; }
.process-safety-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(223, 108, 108, .4); border-radius: 50%; color: #ffc0c0; font-weight: 900; }
.process-overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 24px; }
.process-overview > div { min-width: 0; display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .018); }
.process-overview span { color: var(--dim); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.process-overview strong { color: var(--ink); font-size: 1.35rem; }
.metric-ok { color: var(--ok) !important; }
.metric-error { color: #ef9292 !important; }
.process-list, .process-card-list { display: grid; gap: 14px; }
.process-section { display: grid; gap: 12px; }
.process-section + .process-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.process-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.process-section-head .eyebrow { margin-bottom: 4px; }
.process-section-head h2 { margin: 0; color: var(--ink); font: 750 1.55rem var(--display); text-transform: uppercase; }
.process-card { min-width: 0; overflow: hidden; }
.process-card.active-process { border-color: rgba(230, 168, 28, .4); box-shadow: inset 3px 0 var(--gold3); }
.process-card.finished-process { background: linear-gradient(135deg, rgba(255, 255, 255, .022), rgba(230, 168, 28, .008)); }
.process-card-head { align-items: center; flex-wrap: nowrap; }
.process-card-title { min-width: 0; }
.process-card-title .section-title { overflow-wrap: anywhere; }
.planned-job-list { display: grid; gap: 8px; }
.planned-job-item { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(190px, auto) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .016); }
.planned-job-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(230, 168, 28, .075); color: var(--gold2); }
.planned-job-copy, .planned-job-time { min-width: 0; display: grid; gap: 3px; }
.planned-job-copy strong, .planned-job-time strong { color: var(--ink); overflow-wrap: break-word; word-break: normal; }
.planned-job-copy span, .planned-job-time span { color: var(--dim); font-size: .76rem; }
.planned-job-time { text-align: right; }
.planned-load-more { justify-self: center; margin-top: 10px; }
.process-live-block { margin-top: 17px; padding-top: 1px; }
.process-progress-row { display: flex; justify-content: space-between; gap: 14px; margin: 18px 0 8px; color: var(--dim); font-size: .84rem; }
.process-progress { height: 12px; }
.process-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.process-metrics > div { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0, 0, 0, .1); }
.process-metrics span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.process-metrics strong { color: var(--cream); font-size: 1.08rem; }
.current-send { display: flex; align-items: center; gap: 11px; margin-top: 13px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(230, 168, 28, .035); }
.current-send > div { display: grid; gap: 3px; min-width: 0; }
.current-send strong { color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.current-send span:last-child { color: var(--dim); font-size: .8rem; }
.process-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.final-report { margin-top: 17px; padding: 15px; border: 1px solid rgba(230, 168, 28, .19); border-radius: 14px; background: rgba(230, 168, 28, .025); }
.final-report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.final-report-head > div { display: grid; gap: 2px; }
.report-kicker { color: var(--gold); font: 750 .74rem var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.final-report-head strong { color: var(--ink); font-size: 1.04rem; }
.report-finished { color: var(--dim); font-size: .78rem; text-align: right; }
.report-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.report-metrics > div { min-width: 0; display: grid; gap: 2px; padding: 9px 10px; border: 1px solid rgba(59, 51, 39, .75); border-radius: 10px; background: rgba(0, 0, 0, .1); }
.report-metrics span { color: var(--dim); font-size: .67rem; letter-spacing: .045em; text-transform: uppercase; }
.report-metrics strong { color: var(--cream); overflow-wrap: anywhere; font-size: 1rem; }
.retry-context { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -4px 0 18px; padding: 13px 15px; border: 1px solid rgba(230, 168, 28, .32); border-radius: 14px; background: rgba(230, 168, 28, .055); }
.retry-context > div { min-width: 0; display: grid; gap: 3px; }
.retry-context strong { color: var(--gold2); }
.retry-context span { color: var(--dim); font-size: .84rem; }

/* Detalhes de um disparo */
.job-details-modal { width: min(1120px, 100%); }
.job-details-head { align-items: flex-start; }
.detailed-report { margin-bottom: 16px; }
.live-detail-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(230, 168, 28, .03); }
.live-detail-summary span { color: var(--dim); font-size: .85rem; }
.delivery-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.delivery-column { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, .11); }
.delivery-column-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.delivery-column-head .eyebrow { margin-bottom: 3px; }
.delivery-column-head h3 { margin: 0; color: var(--ink); font-size: 1rem; }
.delivery-list { max-height: 360px; overflow: auto; padding: 8px; scrollbar-width: thin; }
.delivery-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; padding: 10px 8px; border-bottom: 1px solid rgba(59, 51, 39, .55); }
.delivery-item:last-child { border-bottom: 0; }
.delivery-item > div { min-width: 0; display: grid; gap: 3px; }
.delivery-item strong { color: var(--ink); overflow-wrap: break-word; word-break: normal; font-size: .88rem; }
.delivery-item > div > span { color: var(--dim); overflow-wrap: anywhere; font-size: .72rem; line-height: 1.35; }
.delivery-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.delivery-icon.ok { color: var(--ok); background: rgba(105, 197, 138, .09); }
.delivery-icon.error { color: #ef9292; background: rgba(223, 108, 108, .09); }
.compact-empty { padding: 24px 12px; font-size: .84rem; }
.details-expired, .delivery-confirmation-note { display: grid; gap: 4px; margin-top: 15px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .015); }
.details-expired strong, .delivery-confirmation-note strong { color: var(--ink); font-size: .88rem; }
.details-expired span, .delivery-confirmation-note span { color: var(--dim); font-size: .8rem; line-height: 1.45; }
.job-details-actions { flex-wrap: wrap; }

/* ---------- Controle local de visibilidade dos grupos ---------- */
.management-list { max-height: 610px; }
.visibility-item { grid-template-columns: 20px minmax(0, 1fr) auto; grid-template-areas: "check text badge"; }
.visibility-item.hidden-from-send { opacity: .58; background: rgba(0, 0, 0, .13); }
.visibility-label { grid-area: badge; width: max-content; max-width: 100%; white-space: nowrap; }
.group-management-hero { padding-bottom: 22px; }

/* ---------- APIs de envio ---------- */
.api-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.api-page-head > div { min-width: 0; }
.api-page-head h1 { margin: 3px 0 8px; font: 800 clamp(2.5rem, 5vw, 4.5rem)/.95 var(--display); text-transform: uppercase; }
.api-page-head p { max-width: 790px; margin: 0; color: var(--dim); }
.api-page-head > .btn { flex: 0 0 auto; }
.api-risk-warning { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; padding: 14px 15px; border: 1px solid rgba(223, 108, 108, .38); border-radius: 15px; background: rgba(153, 38, 38, .075); }
.api-risk-warning > div { min-width: 0; display: grid; gap: 4px; }
.api-risk-warning strong { color: #ffc0c0; }
.api-risk-warning span:last-child { color: #cdb5ae; font-size: .86rem; line-height: 1.5; }
.api-risk-icon { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(223, 108, 108, .55); border-radius: 50%; color: #ffc0c0; font-weight: 900; }
.api-connection-note { margin-bottom: 15px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(230, 168, 28, .035); color: var(--dim); font-size: .86rem; }
.api-contract-card { margin-bottom: 24px; }
.api-contract-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.api-contract-grid > div, .api-profile-meta > div { min-width: 0; display: grid; gap: 3px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0, 0, 0, .1); }
.api-contract-grid span, .api-profile-meta span { color: var(--muted); font-size: .68rem; letter-spacing: .055em; text-transform: uppercase; }
.api-contract-grid strong, .api-profile-meta strong { color: var(--cream); overflow-wrap: break-word; word-break: normal; font-size: .86rem; }
.api-storage-note { margin-top: 14px; font-size: .85rem; }
.api-list-head { align-items: center; margin-bottom: 11px; }
.developer-api-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.developer-api-card { min-width: 0; }
.api-card-head { flex-wrap: nowrap; }
.api-card-title { min-width: 0; }
.api-card-title .section-title { overflow-wrap: break-word; word-break: normal; }
.api-profile-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.api-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.developer-api-secret-modal { width: min(900px, 100%); }
.one-time-key { display: grid; gap: 8px; margin-top: 17px; }
.one-time-key > span { color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.one-time-key .secret-once { margin: 0; }
.one-time-key .btn { justify-self: start; }
.api-placeholder-note, .api-inline-warning, .api-response-note { display: grid; gap: 4px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .016); color: var(--dim); font-size: .84rem; }
.api-inline-warning { border-color: rgba(223, 108, 108, .28); background: rgba(153, 38, 38, .045); }
.api-placeholder-note code, .api-inline-warning strong, .api-response-note strong { color: var(--cream); }
.api-example-toolbar { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; gap: 9px; align-items: center; margin-top: 17px; }
.api-example-toolbar label { color: var(--dim); font-size: .84rem; font-weight: 700; }
.api-code { max-width: 100%; min-height: 220px; margin: 9px 0 0; overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: #0b0907; padding: 15px; color: #e9d9b5; font: 500 .82rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
.developer-api-editor { width: min(780px, 100%); }
.developer-api-editor form { margin-top: 18px; }
.api-editor-group-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 5px 0 9px; }
.api-editor-group-head > div { min-width: 0; display: grid; gap: 3px; }
.api-editor-group-head label { color: var(--cream); font-weight: 750; }
.api-editor-group-head span:not(.badge) { color: var(--dim); font-size: .8rem; }
.api-config-group-list { max-height: 390px; margin-top: 10px; }

/* ---------- Menções, permissões e monitoramento social ---------- */
.feature-toggle { display: grid; grid-template-columns: 21px minmax(0, 1fr); gap: 11px; align-items: start; margin: 13px 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .016); cursor: pointer; }
.feature-toggle input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--gold); }
.feature-toggle > span { min-width: 0; display: grid; gap: 3px; }
.feature-toggle strong { color: var(--cream); overflow-wrap: break-word; word-break: normal; }
.feature-toggle small, .field-help { color: var(--dim); font-size: .79rem; line-height: 1.45; }
.field-help code, .template-help code { color: var(--gold-2); font: 700 .82rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.mention-toggle { border-color: rgba(230, 168, 28, .24); background: rgba(230, 168, 28, .03); }
.compact-feature-toggle { margin-block: 10px; }

.permission-page-head, .social-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.permission-page-head > div, .social-page-head > div { min-width: 0; }
.permission-page-head h1, .social-page-head h1 { margin: 3px 0 8px; font: 800 clamp(2.35rem, 5vw, 4.35rem)/.96 var(--display); text-transform: uppercase; }
.permission-page-head p, .social-page-head p { max-width: 820px; margin: 0; color: var(--dim); }
.permission-warning, .social-security-note { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; padding: 14px 15px; border: 1px solid rgba(230, 168, 28, .28); border-radius: 15px; background: rgba(230, 168, 28, .04); }
.permission-warning > span, .social-security-note > span { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(230, 168, 28, .45); border-radius: 50%; color: var(--gold2); font-weight: 900; }
.permission-warning > div, .social-security-note > div { min-width: 0; display: grid; gap: 4px; }
.permission-warning strong, .social-security-note strong { color: var(--cream); }
.permission-warning small, .social-security-note small { color: var(--dim); line-height: 1.5; }
.permission-manager { min-width: 0; max-width: 100%; padding-top: 14px; overflow: hidden; }
.permission-scan-status { min-width: 0; max-width: 100%; display: grid; gap: 9px; margin-bottom: 14px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.permission-scan-status > div { min-width: 0; max-width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.permission-scan-status strong { min-width: 0; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--cream); overflow-wrap: anywhere; }
.permission-scan-status span { min-width: 0; color: var(--dim); font-size: .8rem; overflow-wrap: anywhere; }
.permission-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, auto) auto; gap: 9px; align-items: center; margin-bottom: 12px; }
.permission-toolbar .search { max-width: none; }
.permission-bulk-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .018); }
.permission-selection-actions, .permission-batch-actions { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.permission-selection-actions > strong { color: var(--cream); font-size: .82rem; }
.permission-batch-actions { width: min(100%, 360px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.permission-batch-actions .btn { width: 100%; min-width: 0; min-height: 44px; }
.permission-batch-card { display: grid; gap: 11px; margin: 0 0 12px; padding: 14px; border: 1px solid rgba(85, 194, 132, .3); border-radius: 14px; background: rgba(85, 194, 132, .045); }
.permission-batch-card.is-running { border-color: rgba(230, 168, 28, .36); background: rgba(230, 168, 28, .04); }
.permission-batch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.permission-batch-head > div { min-width: 0; display: grid; gap: 3px; }
.permission-batch-head strong { color: var(--cream); }
.permission-batch-head span { color: var(--dim); font-size: .8rem; line-height: 1.45; }
.permission-batch-progress { height: 8px; }
.permission-current-group { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: baseline; }
.permission-current-group span { color: var(--muted); font-size: .7rem; letter-spacing: .055em; text-transform: uppercase; }
.permission-current-group strong { min-width: 0; color: var(--cream); overflow-wrap: anywhere; }
.permission-batch-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.permission-batch-metrics > span { display: grid; gap: 2px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--dim); font-size: .72rem; }
.permission-batch-metrics strong { color: var(--cream); font-size: .95rem; }
.permission-batch-failures { border-top: 1px solid var(--line); padding-top: 9px; }
.permission-batch-failures summary { color: var(--cream); cursor: pointer; font-weight: 750; }
.permission-batch-failures > div { display: grid; gap: 6px; margin-top: 9px; }
.permission-batch-failures p { display: grid; gap: 2px; margin: 0; padding: 8px 9px; border-radius: 9px; background: rgba(198, 76, 76, .06); }
.permission-batch-failures p strong { color: var(--ink); overflow-wrap: anywhere; }
.permission-batch-failures p span { color: var(--dim); font-size: .76rem; }
.permission-groups-list { display: grid; max-height: 620px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; scrollbar-width: thin; }
.permission-group-item { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto minmax(150px, auto); grid-template-areas: "select copy status action"; gap: 12px; align-items: center; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.permission-result-stale { background: color-mix(in srgb, var(--panel) 82%, var(--gold) 18%); }
.permission-result-saved { background: color-mix(in srgb, var(--panel) 94%, var(--ok) 6%); }
.permission-group-item:last-child { border-bottom: 0; }
.permission-select-control { grid-area: select; display: grid; place-items: center; }
.permission-select-control input { width: 19px; height: 19px; margin: 0; accent-color: var(--gold); }
.permission-group-copy { grid-area: copy; min-width: 0; display: grid; gap: 3px; }
.permission-group-copy strong { color: var(--ink); overflow-wrap: break-word; word-break: normal; }
.permission-group-copy span { color: var(--dim); font-size: .78rem; }
.permission-group-item > .badge { grid-area: status; }
.permission-toggle-button, .permission-readonly { grid-area: action; justify-self: stretch; }

.social-rules-card { margin-bottom: 23px; }
.social-rules-grid, .social-monitor-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.social-rules-grid > div, .social-monitor-meta > div { min-width: 0; display: grid; gap: 3px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0, 0, 0, .1); }
.social-rules-grid span, .social-monitor-meta span:not(.badge) { color: var(--muted); font-size: .68rem; letter-spacing: .055em; text-transform: uppercase; }
.social-rules-grid strong, .social-monitor-meta strong { color: var(--cream); overflow-wrap: break-word; word-break: normal; font-size: .84rem; }
.social-list-head { margin-bottom: 11px; }
.social-monitor-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.social-monitor-card { min-width: 0; }
.social-card-head { align-items: flex-start; flex-wrap: nowrap; }
.social-card-head > div { min-width: 0; }
.social-card-head .section-title { overflow-wrap: break-word; word-break: normal; }
.social-network-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0; }
.social-monitor-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.social-monitor-meta .badge { justify-self: start; white-space: normal; }
.social-last-check { margin: 12px 0 0; }
.social-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.social-monitor-editor { width: min(940px, 100%); overscroll-behavior: contain; }
.social-monitor-editor form { margin-top: 16px; }
.social-network-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-schedule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.compact-textarea { min-height: 92px; }
.template-help { display: grid; gap: 4px; margin-bottom: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--dim); font-size: .8rem; }
.template-help strong { color: var(--cream); }
.social-title-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social-config-group-list { max-height: 340px; margin-top: 10px; }

/* ---------- Tablet ---------- */
@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 92px minmax(0, 1fr); }
  .sidebar { padding: 18px 9px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand-text, .nav-label, .mini-status { display: none; }
  .nav button { justify-content: center; padding: 12px 8px; }
  .nav-count { position: absolute; top: 4px; right: 7px; }
  .grid.two, .dashboard-grid, .compact-metrics { grid-template-columns: 1fr; }
  .content { padding: 24px; }
  .process-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .entry-card { grid-template-columns: 1fr; max-width: 700px; }
  .qr-card { grid-template-columns: 1fr; max-width: 720px; }
  .qr-copy h1, .qr-copy .lead { text-align: center; margin-inline: auto; }
  .qr-copy .eyebrow { text-align: center; }
  .status-row { justify-content: center; }
  .connection-help { max-width: 620px; margin-inline: auto; }
  .send-page-head { align-items: flex-start; flex-direction: column; }
  .process-page-head { flex-direction: column; }
  .api-page-head { align-items: flex-start; flex-direction: column; }
  .api-contract-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .developer-api-list { grid-template-columns: 1fr; }
  .permission-page-head, .social-page-head { align-items: flex-start; flex-direction: column; }
  .social-monitor-list { grid-template-columns: 1fr; }
  .social-rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .btn { min-height: 48px; touch-action: manipulation; }
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    height: auto;
    padding: 5px max(5px, env(safe-area-inset-left)) max(5px, env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line);
    transform: none;
    background: rgba(15, 13, 10, .97);
  }
  .brand, .sidebar-footer { display: none; }
  .nav { display: flex; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain; padding: 0 2px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { min-width: 76px; min-height: 59px; flex: 0 0 76px; display: grid; align-content: center; justify-items: center; gap: 2px; padding: 6px 4px; font-size: .68rem; letter-spacing: 0; line-height: 1.08; scroll-snap-align: center; }
  .nav-label { display: block; max-width: 100%; }
  .nav-label-full { display: none; }
  .nav-label-mobile { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-icon { width: auto; font-size: 1.05rem; }
  .nav-count { top: 3px; right: 7px; min-width: 18px; height: 18px; padding-inline: 4px; font-size: .63rem; }
  .nav button.active { box-shadow: inset 0 2px var(--gold); }
  .main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .header { height: 64px; padding: 0 14px; }
  .header h2 { font-size: clamp(1rem, 4.5vw, 1.2rem); }
  .mobile-menu { display: none; }
  .content { padding: 14px; }
  .connection-pill { padding: 7px 9px; font-size: .74rem; }
  .connection-pill span:last-child { display: none; }
  .header-actions { gap: 6px; }
  .panic-compact { min-height: 44px; padding: 6px 9px; font-size: .66rem; }
  .panic-full { display: none; }
  .panic-mobile { display: inline; }
  .hero { padding-top: 8px; }
  .hero h1, .send-page-head h1 { font-size: clamp(2.2rem, 10vw, 3.3rem); }
  .hero p, .send-page-head p { font-size: .96rem; }
  .card { padding: 16px; border-radius: 17px; }
  .metric-card { min-height: 160px; }
  .metric-icon { width: 62px; height: 62px; border-radius: 18px; }
  .section-title { font-size: 1.55rem; }
  .send-page-head { margin-bottom: 15px; }
  .responsive-row, .pairing-form { grid-template-columns: 1fr; }
  .pairing-button { width: 100%; }
  .toolbar { align-items: stretch; }
  .search { max-width: none; width: 100%; }
  .compact-actions { width: 100%; }
  .compact-actions .btn { flex: 1 1 31%; }
  .group-list { max-height: 390px; }
  .send-footer { align-items: stretch; flex-direction: column; }
  .send-main-button { width: 100%; min-width: 0; }
  .table { min-width: 680px; }
  .modal { border-radius: 17px; padding: 15px; }
  .admin-head { flex-direction: column; }
  .process-page-head h1 { font-size: clamp(2.2rem, 10vw, 3.3rem); }
  .panic-button { width: 100%; }
  .process-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-card-head { align-items: flex-start; }
  .planned-job-item { grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-areas: "icon copy status" "icon time time"; align-items: start; }
  .planned-job-icon { grid-area: icon; }
  .planned-job-copy { grid-area: copy; }
  .planned-job-time { grid-area: time; text-align: left; }
  .planned-job-item > .badge { grid-area: status; }
  .current-send { align-items: flex-start; }
  .current-send strong { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: break-word; word-break: normal; }
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-metrics > div:last-child { grid-column: 1 / -1; }
  .final-report-head { flex-direction: column; }
  .report-finished { text-align: left; }
  .process-actions .btn { flex: 1 1 190px; }
  .delivery-columns { grid-template-columns: 1fr; }
  .delivery-list { max-height: 280px; }
  .job-details-backdrop { align-items: end; padding: 0; }
  .job-details-modal { width: 100%; max-height: calc(100dvh - 18px); border-radius: 20px 20px 0 0; padding: 16px; }
  .job-details-actions { align-items: stretch; }
  .job-details-actions .btn { width: 100%; }
  .live-detail-summary, .retry-context { align-items: stretch; flex-direction: column; }
  .retry-context .btn { width: 100%; }
  .visibility-item { grid-template-columns: 20px minmax(0, 1fr); grid-template-areas: "check text" "badge badge"; align-items: start; }
  .visibility-label { grid-column: 1 / -1; justify-self: start; white-space: nowrap; }
  .api-page-head h1 { font-size: clamp(2.2rem, 10vw, 3.3rem); }
  .api-page-head > .btn { width: 100%; }
  .api-contract-grid { grid-template-columns: 1fr; }
  .api-card-head { align-items: flex-start; }
  .api-profile-meta { grid-template-columns: 1fr; }
  .api-card-actions .btn { flex: 1 1 180px; }
  .api-example-toolbar { grid-template-columns: 1fr; }
  .api-example-toolbar .btn { width: 100%; }
  .api-code { min-height: 190px; font-size: .76rem; }
  .api-editor-group-head { align-items: stretch; flex-direction: column; }
  .api-editor-group-head .badge { align-self: flex-start; }
  .permission-page-head h1, .social-page-head h1 { font-size: clamp(2.05rem, 9.5vw, 3.1rem); }
  .permission-page-head > .btn, .social-page-head > .btn { width: 100%; }
  .permission-scan-status > div { align-items: flex-start; flex-direction: column; }
  .permission-toolbar { grid-template-columns: 1fr; }
  .permission-toolbar .badge { justify-self: start; }
  .permission-bulk-actions { align-items: stretch; flex-direction: column; }
  .permission-selection-actions, .permission-batch-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .permission-selection-actions > strong { grid-column: 1 / -1; }
  .permission-batch-actions .btn { width: 100%; }
  .permission-batch-head { align-items: stretch; flex-direction: column; }
  .permission-batch-head .btn { width: 100%; }
  .permission-batch-metrics { grid-template-columns: 1fr 1fr; }
  .permission-current-group { grid-template-columns: 1fr; gap: 3px; }
  .permission-group-item { grid-template-columns: 22px minmax(0, 1fr); grid-template-areas: "select copy" ". status" ". action"; align-items: start; }
  .permission-group-item > .badge { justify-self: start; white-space: normal; text-align: left; }
  .permission-toggle-button, .permission-readonly { width: 100%; justify-self: stretch; }
  .social-rules-grid, .social-monitor-meta { grid-template-columns: 1fr 1fr; }
  .social-card-actions .btn { flex: 1 1 155px; }
  .social-network-picker, .social-schedule-grid, .social-title-grid { grid-template-columns: 1fr; }
  .social-monitor-editor { width: 100%; max-height: calc(100dvh - 20px); }
  .qr-screen { padding: 10px; }
  .entry-screen, .loading-screen { padding: 10px; }
  .entry-card, .loading-card { padding: 20px; border-radius: 20px; }
  .entry-card h1 { font-size: clamp(2.4rem, 13vw, 4rem); }
  .loading-card h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .qr-card { padding: 16px; border-radius: 21px; gap: 22px; }
  .qr-copy h1 { font-size: clamp(2.55rem, 13vw, 4.2rem); }
  .qr-copy .lead { font-size: .98rem; }
  .step { font-size: .9rem; }
  .qr-label-row { align-items: flex-start; }
  .secure-chip { display: none; }
  .qr-box { min-height: 280px; padding: 10px; }
  .qr-box img { width: min(100%, 270px); max-height: 270px; background: #000000; }
  .pairing { padding: 15px; }
  .pairing-head { flex-direction: column; }
  .country-chip { align-self: flex-start; }
  .pairing-code { font-size: clamp(2rem, 11vw, 2.9rem); }
  .status-row { align-items: stretch; }
  .status-pill, .status-row .btn { width: 100%; justify-content: center; }
  .toast-root { left: 12px; right: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); }
  .toast { width: 100%; min-width: 0; max-width: none; }
}

@media (max-width: 430px) {
  .content { padding: 11px; }
  .header { padding-inline: 11px; }
  .panic-compact { padding-inline: 7px; }
  .process-card-head { flex-wrap: wrap; }
  .process-card-head > .badge { align-self: flex-start; }
  .process-overview > div { padding: 10px 11px; }
  .process-overview strong { font-size: 1.18rem; }
  .process-actions .btn { flex-basis: 100%; width: 100%; }
  .planned-job-item { grid-template-columns: 34px minmax(0, 1fr); grid-template-areas: "icon copy" ". time" ". status"; padding: 11px; }
  .planned-job-icon { width: 34px; height: 34px; }
  .planned-job-item > .badge { justify-self: start; }
  .delivery-item { padding-inline: 5px; }
  .qr-screen { padding: 6px; }
  .qr-card { padding: 13px; }
  .qr-box { min-height: 245px; }
  .qr-box img { width: min(100%, 235px); max-height: 235px; background: #000000; }
  .steps { margin-block: 18px; }
  .connection-help { font-size: .86rem; }
  .phone-prefix { padding-inline: 10px; }
  .pairing-code { letter-spacing: .17em; padding-left: .17em; }
  .btn { min-height: 48px; padding: 10px 12px; }
  .textarea { min-height: 150px; }
  .group-list { max-height: 345px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* v5.8.0 — catálogo persistente, listas e agendamentos recorrentes */
.saved-list-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin: 12px 0;
}

.group-lists-card {
    margin-bottom: 18px;
}

.saved-group-lists {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.saved-group-list-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg3);
}

.saved-group-list-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.saved-group-list-copy strong {
    overflow-wrap: break-word;
    word-break: normal;
}

.saved-group-list-copy span,
.schedule-last-result,
.schedule-repeat-label {
    color: var(--muted);
    font-size: 0.84rem;
}

.compact-heading {
    margin: 8px 0 10px;
}

.schedule-modal {
    width: min(920px, calc(100vw - 28px));
    max-height: min(92vh, 980px);
    overflow-y: auto;
}

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

.schedule-time-grid {
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
}

.repeat-switch-field {
    align-content: end;
}

.repeat-check {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.schedule-destinations {
    margin-top: 8px;
}

.schedule-destinations .schedule-groups,
#group-list-editor-groups {
    max-height: 330px;
    overflow-y: auto;
}

.schedule-repeat-label {
    display: inline-block;
    max-width: 260px;
    line-height: 1.35;
}

.schedule-last-result {
    margin-top: 5px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .saved-list-picker,
    .schedule-time-grid,
    .repeat-grid {
        grid-template-columns: 1fr;
    }

    .saved-group-list-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .saved-group-list-card .row {
        width: 100%;
    }

    .saved-group-list-card .row .btn {
        flex: 1;
    }
}

/* v5.8.0 — proteção contra mensagens vazias + refinamentos de UI/UX */
:where(button, input, select, textarea, a):focus-visible {
    outline: 3px solid rgba(230, 168, 28, .42);
    outline-offset: 2px;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .52;
    transform: none !important;
    box-shadow: none !important;
}

.search-wrap {
    position: relative;
    flex: 1 1 280px;
    min-width: min(280px, 100%);
    max-width: 460px;
}

.search-wrap .search {
    width: 100%;
    max-width: none;
    padding-right: 42px;
}

.search-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--dim);
    font-size: 1.25rem;
    line-height: 1;
}

.search-clear:hover {
    background: rgba(230, 168, 28, .08);
    color: var(--ink);
}

.btn.active-filter {
    border-color: rgba(230, 168, 28, .42);
    background: rgba(230, 168, 28, .11);
    color: var(--gold2);
}

.group-item:has(input:checked) {
    background: linear-gradient(90deg, rgba(230, 168, 28, .085), rgba(230, 168, 28, .018));
}

.group-item:has(input:checked) .group-name {
    color: #f2e5c7;
}

.group-list:focus-within {
    border-color: rgba(230, 168, 28, .32);
}

.sticky-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 18px -8px -8px;
    padding: 15px 8px 8px;
    border-top: 1px solid rgba(76, 65, 46, .66);
    background: linear-gradient(180deg, rgba(23, 19, 15, .72), #17130f 28%);
    backdrop-filter: blur(10px);
}

.form-status {
    max-width: 520px;
    margin-top: 5px;
    color: #d2ad68;
    font-size: .78rem;
    line-height: 1.35;
}

.form-status.ready {
    color: #91c8a5;
}

.confirmation-modal {
    width: min(680px, 100%);
}

.confirm-summary-grid,
.schedule-live-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.confirm-summary-grid > div,
.schedule-live-summary > div {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.016);
}

.confirm-summary-grid span,
.schedule-live-summary span,
.confirmation-preview > span,
.confirmation-groups > span {
    color: var(--dim);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.confirm-summary-grid strong,
.schedule-live-summary strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: .9rem;
}

.confirmation-preview,
.confirmation-groups {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(0,0,0,.12);
}

.confirmation-preview p {
    max-height: 150px;
    overflow: auto;
    margin: 8px 0 0;
    color: #d8d0c1;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.confirmation-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.confirmation-chips span {
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(230, 168, 28, .045);
    color: #d7ccba;
    padding: 6px 9px;
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.safety-note {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid rgba(105, 197, 138, .22);
    border-radius: 12px;
    background: rgba(105, 197, 138, .045);
    color: #add0b9;
    font-size: .8rem;
    line-height: 1.45;
}

.schedule-modal {
    overscroll-behavior: contain;
    scroll-padding-bottom: 92px;
}

.schedule-modal-head {
    position: sticky;
    top: -22px;
    z-index: 7;
    margin: -22px -22px 15px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(23, 19, 15, .96);
    backdrop-filter: blur(12px);
}

.schedule-modal-head .section-sub {
    margin-top: 5px;
}

.modal-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 12px;
}

.modal-step-title > span {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(230, 168, 28, .28);
    border-radius: 9px;
    background: rgba(230, 168, 28, .07);
    color: var(--gold2);
    font-weight: 800;
}

.modal-step-title > div {
    display: grid;
    gap: 1px;
}

.modal-step-title strong {
    color: var(--ink);
    font-size: .95rem;
}

.modal-step-title small {
    color: var(--dim);
    font-size: .76rem;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.counter-inline {
    color: var(--dim);
    font-size: .74rem;
}

.schedule-live-summary {
    margin: 18px 0 2px;
}

.sticky-modal-actions {
    position: sticky;
    bottom: -22px;
    z-index: 8;
    margin: 18px -22px -22px;
    padding: 14px 22px max(16px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(23, 19, 15, .96);
    backdrop-filter: blur(12px);
}

@media (max-width: 760px) {
    .group-toolbar {
        align-items: stretch;
    }

    .search-wrap {
        min-width: 100%;
        max-width: none;
    }

    .compact-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-actions .btn {
        width: 100%;
    }

    .sticky-action-bar {
        margin-inline: -3px;
        padding-inline: 3px;
    }

    .confirm-summary-grid,
    .schedule-live-summary {
        grid-template-columns: 1fr;
    }

    .confirmation-modal {
        max-height: calc(100dvh - 18px);
    }

    .schedule-modal-head {
        top: -15px;
        margin: -15px -15px 14px;
        padding: 15px;
    }

    .sticky-modal-actions {
        bottom: -15px;
        margin: 16px -15px -15px;
        padding: 12px 15px max(14px, env(safe-area-inset-bottom));
    }

    .sticky-modal-actions .btn {
        flex: 1 1 0;
    }

    /* A agenda deixa de ser uma tabela horizontal e vira cartões legíveis. */
    .schedule-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .schedule-table-wrap .table {
        min-width: 0;
        display: block;
    }

    .schedule-table-wrap thead {
        display: none;
    }

    .schedule-table-wrap tbody {
        display: grid;
        gap: 12px;
    }

    .schedule-table-wrap tr {
        display: grid;
        gap: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 15px;
        background: rgba(255,255,255,.012);
    }

    .schedule-table-wrap td {
        display: grid;
        grid-template-columns: minmax(105px, .42fr) minmax(0, .58fr);
        gap: 12px;
        align-items: start;
        padding: 11px 13px;
        border-bottom: 1px solid var(--line);
    }

    .schedule-table-wrap td::before {
        content: attr(data-label);
        color: var(--dim);
        font: 700 .72rem var(--cond);
        letter-spacing: .07em;
        text-transform: uppercase;
    }

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

    .schedule-table-wrap td[data-label="Ações"] .row {
        justify-content: flex-end;
    }

    .schedule-table-wrap td.empty {
        display: block;
        text-align: center;
    }

    .schedule-table-wrap td.empty::before {
        display: none;
    }

    .schedule-message {
        max-width: none;
    }
}

@media (max-width: 430px) {
    .compact-actions {
        grid-template-columns: 1fr 1fr;
    }

    .modal-step-title {
        margin-top: 18px;
    }

    .confirmation-chips span {
        max-width: 100%;
    }
}


/* v5.8.1 — tipografia previsível + responsividade baseada na área útil */
/*
 * A v5.8.0 usava Inter sem carregá-la e fontes como Impact/Arial Narrow que
 * normalmente não existem no Ubuntu. Isso mudava métricas e podia alterar
 * quebras, larguras e a sensação de escala entre computadores.
 *
 * Os ajustes abaixo não dependem de Google Fonts/CDN e usam o tamanho real
 * disponível dentro do painel (container queries), não apenas a largura total
 * da tela. Assim zoom do navegador, escala do SO e a própria sidebar deixam de
 * enganar os breakpoints do conteúdo principal.
 */

/* Títulos acompanham a largura útil do painel quando container units existem. */
.hero h1 {
  font-size: clamp(2.35rem, 4cqi, 4.2rem);
}

.send-page-head h1,
.process-page-head h1,
.api-page-head h1 {
  font-size: clamp(2.15rem, 3.35cqi, 3.55rem);
}

.permission-page-head h1,
.social-page-head h1 {
  font-size: clamp(2.05rem, 3.15cqi, 3.4rem);
}

.metric-big {
  font-size: clamp(3.7rem, 6cqi, 5.5rem);
}

/* Evita que monitores largos estiquem demais os cartões em notebooks. */
.content {
  max-width: 1380px;
}

/* Primeiro estágio: o conteúdo reage à largura que SOBROU depois da sidebar. */
@container dashboard-main (max-width: 1180px) {
  .grid.two,
  .dashboard-grid,
  .compact-metrics {
    grid-template-columns: 1fr;
  }

  .send-page-head,
  .process-page-head,
  .api-page-head,
  .permission-page-head,
  .social-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .developer-api-list,
  .social-monitor-list {
    grid-template-columns: 1fr;
  }

  .api-contract-grid,
  .social-rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Segundo estágio: notebook/zoom alto. Reduz densidade antes de qualquer corte. */
@container dashboard-main (max-width: 980px) {
  .content {
    padding: 20px;
  }

  .header {
    height: 68px;
    padding-inline: 20px;
  }

  .hero {
    padding-top: 8px;
    padding-bottom: 20px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 5.4cqi, 3.35rem);
  }

  .send-page-head h1,
  .process-page-head h1,
  .api-page-head h1,
  .permission-page-head h1,
  .social-page-head h1 {
    font-size: clamp(2rem, 4.8cqi, 3rem);
  }

  .card {
    padding: 19px;
  }

  .textarea {
    min-height: 150px;
  }

  .group-list {
    max-height: min(46dvh, 420px);
  }

  .schedule-time-grid,
  .repeat-grid {
    grid-template-columns: 1fr;
  }

  .schedule-time-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(190px, .65fr);
  }
}

/* Terceiro estágio: a área útil já é de tablet, mesmo que a tela física seja 1080p. */
@container dashboard-main (max-width: 760px) {
  .content {
    padding: 15px;
  }

  .api-contract-grid,
  .social-rules-grid,
  .social-monitor-meta,
  .confirm-summary-grid,
  .schedule-live-summary {
    grid-template-columns: 1fr;
  }

  .responsive-row,
  .pairing-form,
  .saved-list-picker,
  .schedule-time-grid,
  .repeat-grid,
  .social-network-picker,
  .social-schedule-grid,
  .social-title-grid {
    grid-template-columns: 1fr;
  }

  .send-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .send-main-button {
    width: 100%;
    min-width: 0;
  }
}

/* Compactação vertical para navegadores de notebook com pouca altura útil. */
@media (min-width: 761px) and (max-height: 900px) {
  .sidebar {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand {
    padding-bottom: 14px;
  }

  .nav {
    gap: 5px;
  }

  .nav button {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .header {
    height: 66px;
  }

  .content {
    padding-top: 18px;
    padding-bottom: 22px;
  }

  .hero {
    padding-top: 6px;
    padding-bottom: 18px;
  }

  .send-page-head {
    margin-bottom: 16px;
  }

  .textarea {
    min-height: 145px;
  }

  .group-list {
    max-height: min(45dvh, 390px);
  }
}

/* ========================================================================== */
/* v5.9.0 — sistema visual, navegação clara e fluxos com menor carga cognitiva */
/* ========================================================================== */

:root {
  --surface: #18140f;
  --surface-raised: #211b14;
  --surface-soft: #15120e;
  --line-strong: #514532;
  --text-secondary: #bbb3a4;
  --nav-width: 260px;
}

body {
  color: var(--ink);
  font-size: 1rem;
}

.ui-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  overflow: visible;
}

.brand-icon { width: 1.5rem; height: 1.5rem; }
.full-width { width: 100%; }

.skip-link {
  position: fixed;
  z-index: 500;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  border-radius: 10px;
  background: var(--gold2);
  color: #171006;
  padding: 10px 14px;
  font-weight: 800;
}

.skip-link:focus { transform: translateY(0); }

.icon-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  color: var(--text-secondary);
  padding: 0;
}

.icon-button:hover { border-color: var(--line-strong); color: var(--ink); background: rgba(230, 168, 28, .06); }
.btn.small { min-height: 44px; }
.btn .ui-icon { width: 1.1rem; height: 1.1rem; }
.solid-danger { background: #a83e3e !important; border-color: #c95959 !important; color: #fff !important; }

/* Navegação: rótulos permanecem visíveis; ícones reforçam, não substituem. */
.app-shell { grid-template-columns: var(--nav-width) minmax(0, 1fr); }
.sidebar { width: var(--nav-width); padding: 18px 14px; }
.brand { padding: 4px 8px 18px; }
.brand h1 { font-size: 1.18rem; letter-spacing: 0; text-transform: none; }
.brand-text span { font-size: .8rem; }
.desktop-nav { display: block; flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
.nav-section { display: grid; gap: 3px; margin-bottom: 15px; }
.nav-section-label {
  padding: 0 11px 5px;
  color: #8f8779;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.nav button {
  min-height: 44px;
  gap: 12px;
  padding: 9px 11px;
  color: var(--text-secondary);
  font-size: .9rem;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}
.nav button.active { background: rgba(230, 168, 28, .095); box-shadow: inset 3px 0 var(--gold); }
.nav-icon { width: 22px; height: 22px; display: grid; place-items: center; }
.nav-icon .ui-icon { width: 20px; height: 20px; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { margin-left: auto; }
.sidebar-footer { padding: 8px 7px 2px; }
.sidebar-account { display: flex; align-items: center; gap: 10px; min-width: 0; padding-top: 13px; border-top: 1px solid var(--line); }
.sidebar-account > .ui-icon { color: var(--gold); }
.sidebar-account div { min-width: 0; display: grid; }
.sidebar-account strong { overflow: hidden; color: var(--ink); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account span { color: var(--dim); font-size: .72rem; }
.mobile-primary-nav, .mobile-more-backdrop { display: none; }

.header { height: 66px; padding-inline: clamp(18px, 2.5vw, 30px); }
.header h2 { font-size: 1.06rem; font-weight: 750; letter-spacing: 0; text-transform: none; }
.content { max-width: 1320px; padding: clamp(20px, 2.5vw, 32px); }

/* Hierarquia comum a todas as áreas. */
.page-heading,
.send-page-head,
.process-page-head,
.api-page-head,
.permission-page-head,
.social-page-head,
.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 22px;
  padding: 2px 0;
}
.page-heading > div:first-child { min-width: 0; }
.page-heading h1,
.send-page-head h1,
.process-page-head h1,
.api-page-head h1,
.permission-page-head h1,
.social-page-head h1,
.admin-head h1 {
  margin: 0;
  color: var(--ink);
  font: 800 clamp(1.85rem, 3cqi, 2.85rem)/1.06 var(--display);
  letter-spacing: -.025em;
  text-transform: none;
}
.page-heading p,
.send-page-head p,
.process-page-head p,
.api-page-head p,
.permission-page-head p,
.social-page-head p,
.admin-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: .96rem;
  line-height: 1.55;
}
.section-title { font-size: clamp(1.25rem, 2cqi, 1.65rem); line-height: 1.2; letter-spacing: -.01em; text-transform: none; }
.eyebrow { margin-bottom: 7px; font-size: .76rem; letter-spacing: .11em; }
.card { background: linear-gradient(145deg, rgba(33, 27, 20, .96), rgba(23, 19, 15, .96)); box-shadow: 0 10px 28px rgba(0, 0, 0, .16); }

/* Visão geral operacional. */
.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.overview-stat { min-width: 0; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .018); padding: 15px; }
.overview-stat-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: rgba(230, 168, 28, .08); color: var(--gold2); }
.overview-stat-icon.ok { background: rgba(105, 197, 138, .08); color: var(--ok); }
.overview-stat > div { min-width: 0; display: grid; gap: 2px; }
.overview-stat > div > span { color: var(--dim); font-size: .78rem; }
.overview-stat strong { min-width: 0; overflow: hidden; color: var(--ink); font-size: 1.08rem; text-overflow: ellipsis; white-space: nowrap; }
.overview-stat strong small { color: var(--dim); font-size: .76rem; font-weight: 600; }
.home-workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 18px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.card-heading h2, .account-panel-head h2, .data-storage-card h2, .danger-zone h2 { margin: 0; font-size: 1.28rem; line-height: 1.25; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-action { min-height: 74px; min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.018); color: var(--ink); padding: 12px; text-align: left; }
.quick-action:hover { border-color: rgba(230,168,28,.5); background: rgba(230,168,28,.05); }
.quick-action > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(230,168,28,.08); color: var(--gold2); }
.quick-action div { min-width: 0; display: grid; gap: 2px; }
.quick-action strong { font-size: .92rem; }
.quick-action small { overflow: hidden; color: var(--dim); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.quick-action .quick-chevron { width: 18px; height: 18px; color: var(--dim); }
.summary-list { margin: 0 0 16px; }
.summary-list > div { display: grid; grid-template-columns: minmax(90px, .45fr) minmax(0, .55fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.summary-list dt { color: var(--dim); }
.summary-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 700; text-align: right; }
.privacy-storage-note { align-items: center; }
.privacy-storage-icon .ui-icon { width: 17px; height: 17px; }
.text-button { flex: 0 0 auto; min-height: 44px; border: 0; background: transparent; color: var(--gold2); padding: 8px; font-weight: 750; }
.compact-note { margin-bottom: 18px; }

/* Fluxo de envio e ajuda sob demanda. */
.workflow-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 18px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); list-style: none; }
.workflow-strip li { min-width: 0; display: flex; align-items: center; gap: 10px; background: var(--surface-soft); padding: 10px 13px; }
.workflow-strip li > span { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--dim); font-size: .75rem; font-weight: 800; }
.workflow-strip li.current { background: rgba(230,168,28,.07); }
.workflow-strip li.current > span { border-color: var(--gold); background: var(--gold); color: #171006; }
.workflow-strip li div { min-width: 0; display: grid; }
.workflow-strip strong { font-size: .84rem; }
.workflow-strip small { color: var(--dim); font-size: .72rem; }
.context-help, .data-inventory, .overflow-actions, .format-advanced { border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.016); }
.context-help > summary, .data-inventory > summary, .overflow-actions > summary, .format-advanced > summary { min-height: 44px; display: flex; align-items: center; gap: 9px; color: var(--text-secondary); padding: 10px 13px; font-weight: 750; cursor: pointer; }
.context-help > summary::before, .data-inventory > summary::before, .format-advanced > summary::before { content: '+'; width: 20px; color: var(--gold); font-size: 1.15rem; }
.context-help[open] > summary::before, .data-inventory[open] > summary::before, .format-advanced[open] > summary::before { content: '−'; }
.context-help > :not(summary), .data-inventory > :not(summary) { margin-inline: 13px; }
.context-help > :last-child, .data-inventory > :last-child { margin-bottom: 13px; }

/* Confirmações consistentes e explicação da consequência antes da ação. */
.confirm-action-modal { width: min(500px, 100%); overflow: visible; text-align: center; }
.confirm-action-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 15px; background: rgba(230,168,28,.09); color: var(--gold2); }
.confirm-action-icon.danger { background: rgba(223,108,108,.1); color: #f59b9b; }
.confirm-action-copy h2 { margin: 0; font-size: 1.4rem; }
.confirm-action-copy p { margin: 9px 0 0; color: var(--text-secondary); }
.confirm-action-detail { font-size: .84rem; }
.confirm-action-buttons { display: grid; grid-template-columns: 1fr 1fr; }

/* Monitores: ações principais visíveis e configuração em quatro etapas. */
.social-card-actions { align-items: center; }
.overflow-actions { position: relative; margin-left: auto; border: 0; background: transparent; }
.overflow-actions > summary { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; list-style: none; }
.overflow-actions > summary::-webkit-details-marker { display: none; }
.overflow-actions-panel { position: absolute; z-index: 12; right: 0; bottom: calc(100% + 7px); width: min(250px, calc(100vw - 34px)); display: grid; gap: 6px; border: 1px solid var(--line-strong); border-radius: 14px; background: #211b14; padding: 8px; box-shadow: var(--shadow); }
.overflow-actions-panel .btn { width: 100%; justify-content: flex-start; }
.social-monitor-editor { width: min(1080px, calc(100vw - 28px)); max-height: min(94dvh, 940px); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; padding: 0; }
.social-editor-head { align-items: flex-start; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.social-editor-head h2 { margin: 0; font-size: 1.5rem; }
.social-editor-head p { margin: 5px 0 0; color: var(--dim); font-size: .88rem; }
.social-monitor-editor form { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; margin: 0; overflow: hidden; }
.social-editor-layout { min-height: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.social-stepper { min-height: 0; display: flex; flex-direction: column; gap: 5px; overflow: auto; border-right: 1px solid var(--line); background: rgba(0,0,0,.12); padding: 14px; }
.social-stepper button { min-height: 56px; display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 10px; align-items: center; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--dim); padding: 8px 9px; text-align: left; }
.social-stepper button > span { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: .76rem; font-weight: 850; }
.social-stepper button div { min-width: 0; display: grid; }
.social-stepper button strong { color: inherit; font-size: .86rem; }
.social-stepper button small { color: #8f8779; font-size: .7rem; }
.social-stepper button.active { border-color: rgba(230,168,28,.33); background: rgba(230,168,28,.08); color: var(--ink); }
.social-stepper button.active > span { border-color: var(--gold); background: var(--gold); color: #171006; }
.social-stepper button.complete > span { border-color: rgba(105,197,138,.5); color: var(--ok); }
.social-wizard-summary { display: grid; gap: 4px; margin-top: auto; border-top: 1px solid var(--line); padding: 14px 7px 2px; }
.social-wizard-summary span { color: var(--gold); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.social-wizard-summary strong { font-size: .84rem; }
.social-wizard-summary small { color: var(--dim); font-size: .72rem; line-height: 1.45; }
.social-step-content { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 22px; scroll-padding-top: 20px; }
.social-step-panel { max-width: 730px; margin: 0 auto; }
.wizard-panel-head { margin-bottom: 21px; }
.wizard-panel-head > span { color: var(--gold); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.wizard-panel-head h3 { margin: 4px 0 6px; font-size: 1.42rem; line-height: 1.2; }
.wizard-panel-head p { margin: 0; color: var(--text-secondary); }
.field-hint { display: block; margin: -3px 0 8px; color: var(--dim); font-size: .8rem; line-height: 1.4; }
.field-group { margin: 0 0 18px; border: 0; padding: 0; }
.field-group legend, .format-choice legend { margin-bottom: 2px; color: #c5bdaa; font-size: .9rem; font-weight: 750; }
.feature-toggle { min-width: 0; display: grid; grid-template-columns: auto 38px minmax(0,1fr); align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.015); padding: 12px; cursor: pointer; }
.feature-toggle:has(input:checked) { border-color: rgba(230,168,28,.4); background: rgba(230,168,28,.055); }
.feature-toggle input, .format-choice input { width: 18px; height: 18px; accent-color: var(--gold); }
.feature-toggle-icon, .source-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(230,168,28,.08); color: var(--gold2); }
.feature-toggle > span:last-child { min-width: 0; display: grid; }
.feature-toggle small { color: var(--dim); font-size: .76rem; line-height: 1.35; }
.standalone-toggle { margin-top: 8px; }
.source-panel, .format-network-panel { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(0,0,0,.1); padding: 16px; }
.source-panel-head, .format-network-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.source-panel-head h4, .format-network-head h4 { margin: 0; font-size: 1rem; }
.source-panel-head p, .format-network-head p { margin: 2px 0 0; color: var(--dim); font-size: .78rem; }
.compact-number-field { max-width: 300px; }
.input-with-suffix { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #110f0d; }
.input-with-suffix .input { border: 0; box-shadow: none; }
.input-with-suffix span { padding-right: 13px; color: var(--dim); font-size: .82rem; }
.schedule-window-note { display: flex; align-items: center; gap: 8px; margin: -4px 0 18px; color: var(--dim); font-size: .8rem; }
.schedule-window-note .ui-icon { width: 16px; height: 16px; }
.format-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 15px; border: 0; padding: 0; }
.format-choice legend { grid-column: 1 / -1; }
.format-choice label { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 13px; cursor: pointer; }
.format-choice label:has(input:checked) { border-color: rgba(230,168,28,.45); background: rgba(230,168,28,.055); }
.format-choice label span { min-width: 0; display: grid; }
.format-choice small { color: var(--dim); font-size: .76rem; line-height: 1.4; }
.format-default-preview { display: flex; align-items: flex-start; gap: 11px; border: 1px solid rgba(105,197,138,.25); border-radius: 14px; background: rgba(105,197,138,.045); padding: 14px; }
.format-default-preview p { margin: 3px 0 0; color: var(--dim); font-size: .82rem; }
.format-preview-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: rgba(105,197,138,.1); color: var(--ok); }
.format-advanced { margin-top: 14px; }
.format-advanced > :not(summary) { margin-inline: 13px; }
.format-advanced > :last-child { margin-bottom: 13px; }
.form-error-summary { display: grid; gap: 2px; margin-bottom: 16px; border: 1px solid rgba(223,108,108,.45); border-left: 4px solid var(--danger); border-radius: 12px; background: rgba(223,108,108,.07); padding: 11px 13px; }
.form-error-summary span { color: #edb2b2; font-size: .84rem; }
.input-error { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(223,108,108,.1) !important; }
.social-wizard-actions { position: static; margin: 0; padding: 12px 18px max(12px, env(safe-area-inset-bottom)); background: #17130f; }
.social-wizard-actions > span { color: var(--dim); font-size: .78rem; }
.social-wizard-actions > div { display: flex; gap: 8px; }

/* Conta: áreas separadas por intenção e mapa de armazenamento legível. */
.identity-chip { max-width: 280px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.018); padding: 10px 13px; }
.identity-chip > .ui-icon { color: var(--gold); }
.identity-chip div { min-width: 0; display: grid; }
.identity-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-chip span { color: var(--dim); font-size: .76rem; }
.account-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.account-panel { min-width: 0; padding: 18px; }
.account-panel-head { display: flex; align-items: flex-start; gap: 11px; min-height: 61px; margin-bottom: 13px; }
.account-panel-head p { margin: 3px 0 0; color: var(--dim); font-size: .8rem; line-height: 1.4; }
.panel-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: rgba(230,168,28,.08); color: var(--gold2); }
.account-action-list { display: grid; gap: 7px; }
.account-action { width: 100%; min-height: 62px; min-width: 0; display: grid; grid-template-columns: 32px minmax(0,1fr) 18px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.015); color: var(--ink); padding: 9px 10px; text-align: left; }
.account-action:hover { border-color: rgba(230,168,28,.4); background: rgba(230,168,28,.04); }
.account-action > span { display: grid; place-items: center; color: var(--gold2); }
.account-action div { min-width: 0; display: grid; }
.account-action strong { font-size: .86rem; }
.account-action small { color: var(--dim); font-size: .72rem; line-height: 1.35; }
.account-action > .ui-icon:last-child { width: 16px; color: var(--dim); }
.connection-summary { min-height: 62px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.015); padding: 10px 12px; margin-bottom: 9px; }
.connection-summary div { min-width: 0; display: grid; }
.connection-summary strong { font-size: .87rem; }
.connection-summary small { color: var(--dim); font-size: .72rem; line-height: 1.35; }
.action-consequence { margin: 8px 2px 0; color: var(--dim); font-size: .72rem; line-height: 1.4; }
.data-storage-card { margin-bottom: 18px; }
.data-zone-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.data-zone { min-width: 0; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.014); padding: 13px; }
.data-zone > span { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; }
.data-zone.protected > span { background: rgba(105,197,138,.08); color: var(--ok); }
.data-zone.temporary > span { background: rgba(230,168,28,.08); color: var(--gold2); }
.data-zone.external > span { background: rgba(231,183,93,.07); color: var(--warn); }
.data-zone div { min-width: 0; }
.data-zone strong { font-size: .88rem; }
.data-zone p { margin: 4px 0 0; color: var(--dim); font-size: .78rem; line-height: 1.45; }
.data-inventory { margin-top: 13px; }
.data-summary-list { margin-bottom: 13px !important; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-color: rgba(223,108,108,.22); background: rgba(116,43,43,.035); }
.danger-zone p { margin: 4px 0 0; color: var(--dim); }
.danger-zone-actions { flex: 0 0 auto; display: flex; gap: 9px; }

/* Ajustes de conteúdo recorrentes. */
.api-risk-warning > span, .permission-warning > span, .process-safety-icon { display: grid; place-items: center; }
.api-risk-warning .ui-icon, .permission-warning .ui-icon, .process-safety-icon .ui-icon { width: 18px; height: 18px; }
.api-contract-card { padding: 0; }
.api-contract-card > summary { padding: 14px 17px; }
.api-contract-card > summary::before { content: '+'; }
.api-contract-card[open] > summary::before { content: '−'; }
.api-contract-grid { margin-top: 12px; }
.api-contract-card .api-contract-grid, .api-contract-card .api-storage-note { margin-inline: 0; }
.api-contract-card .api-contract-grid { margin-bottom: 12px; }
.api-contract-card .api-contract-grid + p { margin-bottom: 17px; }
.schedule-list-card { padding-top: 16px; }
.group-name { font-size: .93rem; line-height: 1.35; overflow-wrap: anywhere; word-break: normal; }
.visibility-item { grid-template-columns: 22px minmax(0,1fr) auto; }
.group-visibility-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; }
.visibility-sync-state { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: .78rem; font-weight: 750; }
.visibility-sync-state .ui-icon { width: 15px; height: 15px; }
.visibility-sync-state.syncing { color: var(--warn); }
.visibility-sync-state.syncing .ui-icon { animation: visibility-spin 1.1s linear infinite; }
.visibility-sync-state.error { color: var(--danger); }
@keyframes visibility-spin { to { transform: rotate(360deg); } }

/* Tablet: a barra lateral continua textual até virar navegação móvel. */
@media (min-width: 901px) and (max-width: 1120px) {
  :root { --nav-width: 224px; }
  .app-shell { grid-template-columns: var(--nav-width) minmax(0, 1fr); }
  .sidebar { width: var(--nav-width); padding-inline: 10px; }
  .brand { justify-content: flex-start; padding-inline: 7px; }
  .brand-text, .nav-label, .sidebar-account { display: flex; }
  .brand-text { display: block; }
  .nav button { justify-content: flex-start; padding-inline: 10px; }
  .nav-count { position: static; margin-left: auto; }
  .overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-workspace, .account-action-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  body.mobile-more-open { overflow: hidden; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .mobile-primary-nav {
    position: fixed;
    z-index: 80;
    inset: auto 0 0;
    height: calc(70px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    align-items: start;
    border-top: 1px solid var(--line-strong);
    background: rgba(15,13,10,.97);
    padding: 4px max(4px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px,env(safe-area-inset-left));
    box-shadow: 0 -12px 32px rgba(0,0,0,.28);
    backdrop-filter: blur(16px);
  }
  .mobile-primary-nav button { position: relative; min-width: 0; min-height: 62px; display: grid; grid-template-rows: 25px auto; place-items: center; gap: 2px; border: 0; border-radius: 11px; background: transparent; color: #aaa294; padding: 7px 3px 5px; }
  .mobile-primary-nav button.active { background: rgba(230,168,28,.09); color: var(--gold2); }
  .mobile-primary-nav .nav-icon { width: 24px; height: 24px; }
  .mobile-primary-nav .nav-icon .ui-icon { width: 21px; height: 21px; }
  .mobile-primary-nav .nav-label { display: block; max-width: 100%; overflow: hidden; font-size: .69rem; font-weight: 750; letter-spacing: 0; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
  .mobile-primary-nav .nav-count { position: absolute; top: 3px; right: max(9px,calc(50% - 27px)); margin: 0; }
  .mobile-more-backdrop { position: fixed; z-index: 120; inset: 0; display: flex; align-items: flex-end; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
  .mobile-more-sheet { width: 100%; max-height: min(82dvh,680px); overflow: auto; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 22px 22px 0 0; background: #191510; padding: 18px 16px max(18px,env(safe-area-inset-bottom)); box-shadow: 0 -18px 60px rgba(0,0,0,.5); }
  .mobile-more-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .mobile-more-head h2 { margin: 0; font-size: 1.35rem; }
  .mobile-more-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .mobile-more-list button { position: relative; min-width: 0; min-height: 62px; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); color: var(--text-secondary); padding: 10px; text-align: left; }
  .mobile-more-list button.active { border-color: rgba(230,168,28,.45); background: rgba(230,168,28,.07); color: var(--ink); }
  .mobile-more-list .nav-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(230,168,28,.07); color: var(--gold2); }
  .mobile-more-list .nav-label { display: block; white-space: normal; }
  .mobile-more-list .nav-count { position: absolute; top: 7px; right: 7px; }
  .mobile-more-account { display: grid; margin-top: 13px; border-top: 1px solid var(--line); padding: 13px 2px 0; }
  .mobile-more-account small { color: var(--dim); }
  .header { height: 60px; padding-inline: 14px; }
  .header h2 { font-size: .98rem; }
  .connection-pill { min-width: 44px; min-height: 44px; justify-content: center; padding: 8px; }
  .connection-pill span:last-child { display: none; }
  .content { padding: 17px 14px 24px; }
  .page-heading, .send-page-head, .process-page-head, .api-page-head, .permission-page-head, .social-page-head, .admin-head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-heading > .btn, .send-page-head > .btn, .process-page-head > .btn, .api-page-head > .btn, .permission-page-head > .btn, .social-page-head > .btn, .admin-head > .btn { width: 100%; }
  .page-heading h1, .send-page-head h1, .process-page-head h1, .api-page-head h1, .permission-page-head h1, .social-page-head h1, .admin-head h1 { font-size: clamp(1.75rem,7.8vw,2.35rem); }
  .overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-workspace, .account-action-grid, .data-zone-grid { grid-template-columns: 1fr; }
  .workflow-strip small { display: none; }
  .social-monitor-editor { width: 100%; max-height: calc(100dvh - 10px); border-radius: 20px 20px 0 0; }
  .confirm-action-backdrop, #social-monitor-editor { align-items: end; padding: 0; }
  .social-editor-head { padding: 15px; }
  .social-editor-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .social-stepper { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .social-stepper button { min-height: 51px; grid-template-columns: 1fr; justify-items: center; gap: 3px; padding: 5px 2px; text-align: center; }
  .social-stepper button > span { width: 25px; height: 25px; }
  .social-stepper button strong { font-size: .68rem; line-height: 1.15; }
  .social-stepper button small, .social-wizard-summary { display: none; }
  .social-step-content { padding: 16px 14px; }
  .social-wizard-actions { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; padding-inline: 12px; }
  .social-wizard-actions > span { display: none; }
  .social-wizard-actions > div { justify-content: flex-end; }
  .format-choice, .social-network-picker, .social-schedule-grid, .social-title-grid { grid-template-columns: 1fr; }
  .overflow-actions { margin-left: 0; }
  .overflow-actions-panel { right: auto; left: 0; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .danger-zone-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .content { padding-inline: 12px; }
  .page-heading { margin-bottom: 17px; }
  .overview-grid { gap: 8px; }
  .overview-stat { align-items: flex-start; flex-direction: column; gap: 8px; padding: 12px; }
  .overview-stat-icon { width: 36px; height: 36px; }
  .quick-actions-grid { grid-template-columns: 1fr; }
  .quick-action small { white-space: normal; }
  .workflow-strip li { justify-content: center; padding: 9px 5px; }
  .workflow-strip li div { display: none; }
  .workflow-strip li::after { content: attr(data-label); }
  .workflow-strip li::after { color: var(--text-secondary); font-size: .68rem; font-weight: 750; }
  .privacy-storage-note { align-items: flex-start; flex-wrap: wrap; }
  .privacy-storage-note .text-button { width: 100%; justify-self: stretch; text-align: left; }
  .identity-chip { width: 100%; max-width: none; }
  .confirm-action-modal { border-radius: 20px 20px 0 0; padding: 19px 15px max(16px,env(safe-area-inset-bottom)); }
  .confirm-action-buttons { grid-template-columns: 1fr; }
  .confirm-action-buttons #confirm-action-accept { grid-row: 1; }
  .social-card-actions > .btn { flex: 1 1 44%; }
  .overflow-actions { width: 100%; }
  .overflow-actions > summary { justify-content: center; }
  .overflow-actions-panel { position: static; width: 100%; margin-top: 7px; }
  .social-editor-head p { display: none; }
  .social-step-content { padding-inline: 12px; }
  .wizard-panel-head h3 { font-size: 1.2rem; }
  .source-panel, .format-network-panel { padding: 13px; }
  .social-wizard-actions { grid-template-columns: 1fr; }
  .social-wizard-actions > #cancel-social-editor { display: none; }
  .social-wizard-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .social-wizard-actions .btn { width: 100%; }
  .danger-zone-actions { grid-template-columns: 1fr; }
  .data-zone { padding: 12px; }
  .visibility-item { grid-template-columns: 22px minmax(0,1fr); grid-template-areas: 'check text' 'badge badge'; }
  .visibility-label { grid-column: 1 / -1; justify-self: start; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
