[hidden] { display: none !important; }
/* Layout: fundo branco limpo, barra superior com trilha (Contas / Conta / Campanha), sem menu lateral. O azul-gelo da marca aparece em detalhes: botões, barras de lotação e seleção. Visual claro escolhido de propósito (pedido do cliente). */
:root {
  --bg: #ffffff;
  --tint: #f4f8fe;
  --tint-2: #eaf2fd;
  --line: #e2eaf4;
  --line-2: #cfdcec;
  --ink: #0a1a3a;
  --ink-2: #26385c;
  --muted: #62728f;
  --faint: #93a1b8;
  --cyan: #12c6f3;
  --blue: #1d6cf2;
  --grad: linear-gradient(135deg, #22d3ff 0%, #1d6cf2 100%);
  --sel: #e6f3ff;
  --ok: #0f8a5f; --ok-soft: #e3f7ee;
  --warn: #a35f00; --warn-soft: #fff3dc;
  --bad: #c42c45; --bad-soft: #fde8ec;
  --info: #1d6cf2; --info-soft: #e7f0ff;
  --wa-bg: #efeae2; --wa-bubble: #d9fdd3; --wa-head: #f0f2f5;
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 14px;
  --shadow: 0 1px 2px rgba(10, 26, 58, .05), 0 8px 24px -12px rgba(10, 26, 58, .12);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: 1.55rem; font-weight: 700; }
h2 { font-size: 1rem; font-weight: 700; }
h3 { font-size: .92rem; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: .86em; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.label { font-size: .68rem; text-transform: uppercase; letter-spacing: .13em; color: var(--faint); font-weight: 800; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* topo */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 18px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; cursor: pointer; flex: none; }
.wordmark { font-family: var(--display); font-weight: 800; line-height: .9; font-size: .95rem; }
.wordmark span { display: block; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); min-width: 0; flex-wrap: wrap; }
.crumbs button, .crumbs a.crumb { all: unset; cursor: pointer; padding: 4px 8px; border-radius: 8px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.crumbs a.crumb:hover { background: var(--tint); }
.crumbs .cur { font-weight: 700; color: var(--ink); padding: 4px 8px; white-space: nowrap; }
.crumbs .sep { color: var(--faint); }
.top .sp { flex: 1; }
.switcher { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px 4px 4px; background: #fff; cursor: pointer; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.switcher:hover { border-color: var(--line-2); }
.me { list-style: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; cursor: pointer; border: 0; }

.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 700; font-size: 11px; flex: none; }
.av.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 16px; }
.c1 { background: linear-gradient(135deg, #22d3ff, #1d6cf2); }
.c2 { background: linear-gradient(135deg, #0a1a3a, #2b4f8f); }
.c3 { background: linear-gradient(135deg, #ff8fa3, #c42c45); }
.c4 { background: linear-gradient(135deg, #4fd9a6, #0f8a5f); }
.c5 { background: linear-gradient(135deg, #ffc65c, #e07b00); }

main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; min-width: 0; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 22px; }
.head .eyebrow { margin-bottom: 6px; }
.head p { margin-top: 6px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 7px; border-radius: 11px; padding: 9px 16px; border: 1px solid transparent; background: var(--grad); color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap; box-shadow: 0 6px 18px -8px rgba(29, 108, 242, .6); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(29, 108, 242, .7); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-2); box-shadow: none; }
.btn.ghost:hover { border-color: var(--ink-2); }
.btn.dark { background: var(--ink); box-shadow: none; }
.btn.quiet { background: transparent; color: var(--blue); box-shadow: none; padding-inline: 6px; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f3c4cd; box-shadow: none; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn svg, .icon-btn svg { width: 16px; height: 16px; }
.icon-btn { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--tint); color: var(--ink); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.chip.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.idle { background: var(--tint-2); color: var(--ink-2); }
.chip.fold { background: var(--tint); color: var(--ink-2); border: 1px solid var(--line); font-weight: 600; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.pad { padding: 20px 22px; }
.card-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs a, .tabs button { all: unset; cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs a[aria-selected="true"], .tabs button[aria-selected="true"] { color: var(--ink); border-image: var(--grad) 1; border-bottom: 2.5px solid; }
.tabs .count { font-size: 11.5px; background: var(--tint-2); color: var(--ink-2); padding: 0 7px; border-radius: 99px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-art { background: radial-gradient(600px 400px at 20% 20%, rgba(34,211,255,.35), transparent 60%), radial-gradient(500px 500px at 90% 100%, rgba(29,108,242,.45), transparent 60%), #071534; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.login-art h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.12; font-weight: 800; max-width: 14ch; }
.login-art p { color: #b9cbec; max-width: 40ch; }
.login-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.login-art > *:not(canvas) { position: relative; }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-form form, .login-form .auth-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.btn.wide { justify-content: center; padding: 12px; }
.back-link { text-align: center; font-size: 14px; font-weight: 700; color: var(--blue); text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.label-row label { font-size: 13px; font-weight: 800; color: var(--ink); }
.label-row a { font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; }
.label-row a:hover { text-decoration: underline; }
.pw { position: relative; }
.pw .input { padding-right: 46px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pw-eye:hover { color: var(--ink); background: var(--tint); }
.pw-eye svg { width: 19px; height: 19px; }
.pw-eye span { display: grid; }
.pw-eye .i-hide, .pw-eye[aria-pressed="true"] .i-show { display: none; }
.pw-eye[aria-pressed="true"] .i-hide { display: grid; }
.input[readonly] { background: var(--tint); color: var(--ink-2); }

/* contas */
.accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.account { all: unset; box-sizing: border-box; cursor: pointer; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.account:hover { transform: translateY(-2px); border-color: #b9d6f7; box-shadow: 0 14px 34px -16px rgba(29, 108, 242, .35); }
.account-top { display: flex; gap: 14px; align-items: center; }
.account-top b { font-size: 16px; display: block; line-height: 1.25; }
.account-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 0; border-block: 1px solid var(--line); }
.account-stats b { display: block; font-family: var(--display); font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.account-stats span { font-size: 12px; color: var(--muted); }
.account-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.enter { font-weight: 800; color: var(--blue); font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.account.new { border-style: dashed; border-color: var(--line-2); box-shadow: none; align-items: center; justify-content: center; text-align: center; min-height: 230px; color: var(--muted); background: var(--tint); }
.account.new .plus { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 26px; box-shadow: 0 8px 20px -8px rgba(29,108,242,.6); }
.search { position: relative; max-width: 320px; flex: 1 1 220px; }
.search input { padding-left: 36px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
/* Numa coluna (corpo do modal), o flex da busca virava altura e a lupa descia para o meio do vazio. */
.modal-body > .search { flex: none; }

/* campanhas */
.camps { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.camp { all: unset; box-sizing: border-box; cursor: pointer; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.camp:hover { border-color: #b9d6f7; transform: translateY(-2px); }
.camp.archived { opacity: .7; }
.camp-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.camp h3 { font-size: 1rem; }
.meter { height: 8px; border-radius: 99px; background: var(--tint-2); overflow: hidden; display: flex; gap: 2px; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.meter i.full { background: #b8c8de; }
.meter i.empty { background: transparent; }
.camp-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.camp-facts b { color: var(--ink); }

/* campanha */
.linkbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 16px 20px; border-radius: 16px; background: linear-gradient(135deg, #f1f8ff, #eef4ff); border: 1px solid #d6e6fb; margin-bottom: 22px; }
.linkbar .lk { flex: 1 1 320px; min-width: 0; }
.linkbar code { display: block; font-family: var(--mono); font-size: 15px; color: var(--ink); overflow-wrap: anywhere; margin-top: 2px; }
.linkbar .now { font-size: 13px; color: var(--muted); }
.linkbar .now b { color: var(--ink); }

.groups-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.folders { padding: 10px; position: sticky; top: 80px; }
.folders .label { padding: 8px 10px 6px; display: block; }
.folder { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.folder svg { width: 17px; height: 17px; flex: none; color: var(--faint); }
.folder:hover { background: var(--tint); }
.folder[aria-current="true"] { background: var(--sel); color: var(--ink); }
.folder[aria-current="true"] svg { color: var(--blue); }
.folder .n { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.folder.add { color: var(--blue); }
.folder.add svg { color: var(--blue); }
.folder-sep { height: 1px; background: var(--line); margin: 8px 6px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 14px 14px 0 0; }
.bulk b { margin-right: 6px; }
.bulk .btn.ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 800; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfdff; }
td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.sel td { background: var(--sel); }
tbody tr:hover td { background: #f8fbff; }
tr.sel:hover td { background: var(--sel); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); width: 16px; height: 16px; }
.gname { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.gname .gi { width: 34px; height: 34px; border-radius: 10px; background: var(--tint-2); display: grid; place-items: center; color: var(--blue); flex: none; }
.gname .gi svg { width: 18px; height: 18px; }
.gname b { display: block; font-weight: 700; white-space: nowrap; }
.gname small { color: var(--muted); font-size: 12px; }
.cap { min-width: 150px; }
.cap .bar { height: 6px; background: var(--tint-2); border-radius: 99px; overflow: hidden; margin-top: 5px; }
.cap .bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.cap .bar i.full { background: #a9bbd4; }
.order { font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--muted); }

/* mensagens */
.msg-list { display: flex; flex-direction: column; }
.msg { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); align-items: center; }
.msg:last-child { border-bottom: 0; }
.when b { display: block; font-family: var(--display); font-size: .95rem; }
.when span { font-size: 12.5px; color: var(--muted); }
.msg-body { min-width: 0; }
.msg-body p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.kind { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--ink-2); background: var(--tint-2); border-radius: 6px; padding: 2px 7px; text-transform: uppercase; }
.msg-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.results { font-size: 13px; margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.r-ok { color: var(--ok); } .r-bad { color: var(--bad); } .r-warn { color: var(--warn); } .r-wait { color: var(--info); }
.msg-body .msg-note { white-space: normal; margin-top: 6px; overflow: visible; }

/* editor */
.editor { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 22px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .flabel { font-size: 13px; font-weight: 800; color: var(--ink); }
.hint { font-size: 12.5px; color: var(--muted); }
.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 11px; background: #fff; color: var(--ink); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(29,108,242,.12); }
textarea.input { min-height: 150px; resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.row > * { flex: 1 1 180px; }
.fmt { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 11px 11px 0 0; background: var(--tint); }
.fmt + textarea.input { border-radius: 0 0 11px 11px; }
.fmt button { all: unset; cursor: pointer; width: 30px; height: 28px; display: grid; place-items: center; border-radius: 7px; font-weight: 800; color: var(--ink-2); font-size: 13px; }
.fmt button:hover { background: #fff; }
.attach { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.thumb { width: 54px; height: 54px; border-radius: 9px; background: radial-gradient(circle at 75% 25%, #22d3ff, #1d4fc4 70%); color: #fff; display: grid; place-items: center; text-align: center; font: 800 8px/1.15 var(--display); flex: none; }
.seg-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.seg-choice label { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; font-size: 14px; }
.seg-choice label b { display: block; font-weight: 800; }
.seg-choice label:has(input:checked) { border-color: var(--blue); background: var(--sel); }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ink-2); font: inherit; border: 1px solid var(--line-2); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.pick:has(input:checked) { border-color: var(--blue); background: var(--sel); color: var(--ink); }
.pick input { width: 14px; height: 14px; }
.total { font-size: 13px; color: var(--muted); }
.total b { color: var(--ink); }
.phone { background: var(--wa-bg); border-radius: 28px; overflow: hidden; border: 8px solid #0a1a3a; position: sticky; top: 84px; box-shadow: 0 30px 60px -30px rgba(10, 26, 58, .45); }
.phone-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--wa-head); border-bottom: 1px solid #e1e4e8; }
.phone-body { padding: 16px 12px 22px; min-height: 380px; display: flex; flex-direction: column; gap: 8px; }
.day { align-self: center; background: #fff; border-radius: 8px; padding: 3px 10px; font-size: 11.5px; color: #54656f; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.bubble { background: var(--wa-bubble); border-radius: 9px 9px 2px 9px; padding: 4px; margin-left: auto; max-width: 88%; box-shadow: 0 1px 1px rgba(0,0,0,.08); color: #111b21; }
.bubble .img { aspect-ratio: 4 / 3; border-radius: 7px; background: radial-gradient(circle at 75% 25%, #22d3ff, #1d4fc4 60%, #0a1a3a); display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; color: #fff; }
.bubble .img span { font-size: 10.5px; letter-spacing: .2em; font-weight: 800; opacity: .85; }
.bubble .img b { font-family: var(--display); font-size: 1.3rem; line-height: 1.05; }
.bubble p { padding: 6px 6px 2px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble time { display: block; text-align: right; font-size: 11px; color: #667781; padding: 0 6px 2px; }
.bubble time i { color: #53bdeb; font-style: normal; }
.sticky-foot { position: sticky; bottom: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 8px; }
.sticky-foot .sp { flex: 1; font-size: 13px; color: var(--muted); }
/* Campo que recebe o foco (Tab, erro do formulário) não fica escondido atrás da barra de botões. */
html:has(.sticky-foot) { scroll-padding-bottom: 120px; }

/* modal */
dialog.modal { border: 0; padding: 0; color: inherit; }
dialog.modal::backdrop { background: rgba(10, 26, 58, .45); }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 80px -20px rgba(10,26,58,.5); }
.modal-head { padding: 20px 22px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 18px; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.checks label { display: flex; gap: 9px; align-items: center; font-size: 14px; font-weight: 600; }
.summary-box { background: var(--tint); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: var(--ink-2); }
.summary-box b { font-family: var(--display); }

/* whatsapp */
.conn { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px; align-items: center; }
.qr { width: 200px; height: 200px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: #fff; box-shadow: 0 0 0 6px var(--tint); max-width: 100%; }
.qr canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.facts div { background: var(--tint); border-radius: 12px; padding: 12px 14px; }
.facts b { display: block; font-family: var(--display); font-size: 1.05rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.tips li::marker { color: var(--blue); font-weight: 800; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
.step-n { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; }
.prefix { display: flex; }
.prefix span { padding: 10px 11px; background: var(--tint); border: 1px solid var(--line-2); border-right: 0; border-radius: 11px 0 0 11px; font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; }
.prefix .input { border-radius: 0 11px 11px 0; min-width: 0; }

.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; z-index: 30; max-width: calc(100% - 32px); box-shadow: 0 10px 30px -10px rgba(10,26,58,.5); }

@media (max-width: 900px) {
  .groups-layout, .editor { grid-template-columns: minmax(0, 1fr); }
  .folders { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 8px; }
  .folders .label, .folder-sep { display: none; }
  .folder { width: auto; white-space: nowrap; }
  .phone { position: static; }
  .login-wrap { grid-template-columns: minmax(0, 1fr); align-content: start; min-height: 100dvh; }
  /* No celular a arte vira uma faixa com a marca, para o formulário caber na tela. */
  .login-art { padding: 18px 24px; gap: 0; }
  .login-art > :not(.brand, canvas) { display: none; }
  .login-form { place-items: start center; padding: 28px 20px 40px; }
  .msg { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .msg-actions { justify-content: flex-start; }
  .conn { grid-template-columns: minmax(0, 1fr); }
  .top-in { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  main { padding-inline: 16px; }
  .switcher .who-name { display: none; }
}

/* extras do sistema */
.flash { margin-bottom: 18px; padding: 11px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 14px; }
.flash.err { background: var(--bad-soft); color: var(--bad); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty b { color: var(--ink); font-size: 15px; }
.gerr { color: var(--bad); font-size: 12px; display: block; }
tr[draggable="true"] { cursor: grab; }
tr.dragging td { opacity: .45; }
.drag { color: var(--faint); width: 16px; height: 16px; display: inline-block; vertical-align: middle; margin-right: 2px; }
.drag svg { width: 16px; height: 16px; }
.inline { display: inline; }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.pick-list label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.pick-list label:has(input:checked) { border-color: var(--blue); background: var(--sel); }
.pick-list small { margin-left: auto; color: var(--muted); font-weight: 500; }
.pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-list .pick-note { margin-left: 0; color: var(--warn); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.users { display: flex; flex-direction: column; gap: 10px; }
.users .u { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.users .u div { flex: 1; min-width: 0; }
.users .u .u-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.users .u .chip { vertical-align: 1px; }
.link-box { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px; border-radius: 16px; background: linear-gradient(135deg, #f1f8ff, #eef4ff); border: 1px solid #d6e6fb; }
.link-box code { display: block; font-family: var(--mono); font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; background: #fff; border: 1px solid #d6e6fb; border-radius: 10px; padding: 10px 12px; }
@media (max-width: 640px) {
  .users .u { flex-wrap: wrap; }
  .users .u .u-actions { flex-basis: 100%; justify-content: flex-start; }
  /* Topo do celular numa linha: marca, "‹ página anterior", conta e menu. */
  .top-in { flex-wrap: nowrap; gap: 8px; min-height: 56px; }
  .brand .wordmark { display: none; }
  .crumbs { flex-wrap: nowrap; overflow: hidden; }
  .crumbs .sep, .crumbs .cur, .crumbs a.crumb { display: none; }
  .crumbs a.crumb:nth-last-child(3) { display: block; max-width: 48vw; overflow: hidden; text-overflow: ellipsis; padding-left: 2px; }
  .crumbs a.crumb:nth-last-child(3)::before { content: '‹ '; color: var(--muted); }
  .hide-sm { display: none; }
}
.results-all { margin-top: 2px; }
.results-all summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--blue); width: fit-content; }
.results-all[open] summary { margin-bottom: 4px; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 210px; z-index: 6; display: flex; flex-direction: column; text-align: left; }
.menu-pop button, .menu-pop a { all: unset; box-sizing: border-box; cursor: pointer; padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.menu-pop button:hover, .menu-pop a:hover { background: var(--tint); }
.menu-pop .danger { color: var(--bad); }
/* Enquadrar a foto do grupo: a foto corre por baixo de um círculo, como no WhatsApp. */
.crop { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 10px; }
.crop-stage { position: relative; width: 200px; height: 200px; flex: none; border-radius: 14px; overflow: hidden; background: var(--ink); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; outline-offset: 3px; }
.crop-stage:active { cursor: grabbing; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; -webkit-user-drag: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 0 0 999px rgba(10,26,58,.55); pointer-events: none; }
.crop-side { flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 10px; }
.crop-zoom { display: flex; align-items: center; gap: 10px; }
.crop-zoom input { flex: 1; accent-color: var(--blue); }
/* Na tabela o menu fica preso à tela (o app.js põe na posição do botão), para a rolagem da tabela não cortar. */
.table-wrap .menu-pop { position: fixed; visibility: hidden; z-index: 40; }
.table-wrap .menu-pop.pinned { visibility: visible; }
.media-none { width: 54px; height: 54px; border-radius: 9px; background: var(--tint-2); display: grid; place-items: center; color: var(--muted); flex: none; }
.media-none svg { width: 22px; height: 22px; }
.bubble .file { display: flex; gap: 10px; align-items: center; background: rgba(0,0,0,.05); border-radius: 7px; padding: 10px; font-size: 13px; font-weight: 600; }
.bubble img.real, .bubble video.real { display: block; width: 100%; border-radius: 7px; }
.qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.public-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--tint); }

/* criar grupos e comunidades */
.creation { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 18px; margin-bottom: 18px; background: linear-gradient(135deg, #f7fbff, #f1f6ff); border-color: #d6e6fb; }
.creation.ok { background: var(--ok-soft); border-color: #bfe8d4; }
.creation.warn { background: var(--warn-soft); border-color: #f1d9a8; align-items: flex-start; }
.creation-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.creation .actions { align-items: center; }
.creation-notes { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--tint-2); border-top-color: var(--blue); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.name-qty { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; }
.check-line { display: flex; gap: 9px; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; }
.bubble .mention { color: #1fa855; font-weight: 600; }
.field .check-line { margin-top: 4px; }
.grid-2.tight { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.gname .gi.community { background: var(--ok-soft); color: var(--ok); }
.gname small .kind { font-size: 10px; padding: 1px 6px; }
textarea.input.short { min-height: 84px; }
