:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --text: #17201c;
  --muted: #5f6d66;
  --border: #dde4e0;
  --primary: #128c5e;
  --primary-text: #ffffff;
  --danger: #c0392b;
  --warn-bg: #fff4d6;
  --warn-text: #7a5a00;
  --bubble-me: #d9fdd3;
  --bubble-them: #ffffff;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1412;
    --surface: #171e1b;
    --surface-2: #1f2824;
    --text: #e6ece9;
    --muted: #93a39b;
    --border: #2a3530;
    --primary: #25b37c;
    --primary-text: #06130d;
    --danger: #e5675a;
    --warn-bg: #3a3014;
    --warn-text: #f3d77a;
    --bubble-me: #1f4a37;
    --bubble-them: #222b27;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 10px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); min-height: 1.2em; margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; min-width: 0; }
.brand.big { font-size: 26px; justify-content: center; }
.logo {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--primary); color: var(--primary-text); font-weight: 800;
}
.logo.small { width: 28px; height: 28px; font-size: 14px; }

/* ---------- Layout com menu lateral ---------- */
#app:not(.hidden) { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
#app.side-mini { grid-template-columns: 68px 1fr; }
.content { min-width: 0; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border); overflow: hidden; z-index: 20;
}
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 10px; }
.icon-btn {
  background: none; border: 1px solid transparent; color: var(--muted); font-size: 18px; line-height: 1;
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
#tabs { flex: 1; overflow-y: auto; padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  padding: 14px 10px 4px; white-space: nowrap;
}
#tabs button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: 0; color: var(--muted); padding: 9px 10px; border-radius: 10px;
  cursor: pointer; font: inherit; white-space: nowrap; position: relative;
}
#tabs button:hover { background: var(--surface-2); color: var(--text); }
#tabs button.active { background: var(--surface-2); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
#tabs .ni { width: 22px; text-align: center; flex: none; font-size: 17px; }
#tabs .side-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
#tabs .badge { flex: none; }
.side-foot { border-top: 1px solid var(--border); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-foot .btn { display: inline-flex; align-items: center; gap: 6px; }

/* Menu recolhido (só ícones) */
#app.side-mini .side-text, #app.side-mini .nav-label { display: none; }
#app.side-mini .side-top { flex-direction: column; padding: 12px 8px; }
#app.side-mini #tabs { padding: 4px 8px; }
#app.side-mini #tabs button { justify-content: center; padding: 10px 0; }
#app.side-mini #tabs .badge { position: absolute; top: 2px; right: 4px; }
#app.side-mini .side-foot { flex-direction: column; padding: 10px 6px; }
#app.side-mini #sideCollapse { transform: rotate(180deg); }

.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.page-title { flex: 1; font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-backdrop { display: none; }
.only-desktop { display: inline-block; }

main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; min-width: 0;
}
.grid { display: grid; gap: 16px; }
/* Mídias (despertador / bom dia) */
.media-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.media-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px; border: 1px solid var(--border, #ddd); border-radius: 10px; }
.media-item audio { height: 34px; max-width: 100%; flex: 1; min-width: 200px; }
.media-list.images { flex-direction: row; flex-wrap: wrap; }
.media-item.img { position: relative; padding: 0; overflow: hidden; width: 110px; height: 110px; }
.media-item.img img { width: 100%; height: 100%; object-fit: cover; }
.media-item.img [data-del] { position: absolute; top: 4px; right: 4px; }

.ntfy-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ntfy-box img { width: 180px; height: 180px; border-radius: 8px; background: #fff; }
.ntfy-box > div { flex: 1; min-width: 240px; }
.ntfy-box code { word-break: break-all; }

/* Anti-ban */
.switch-line { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; cursor: pointer; }
.ab-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.ab-presets .btn { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; padding: 6px 12px; }
.ab-presets .btn small { font-size: 11px; opacity: .75; font-weight: 400; }
.ab-preview { background: rgba(37, 211, 102, .08); border: 1px solid rgba(37, 211, 102, .35); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.ab-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; transition: opacity .2s; }
.ab-step { border: 1px solid var(--border, #ddd); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ab-step h3 { margin: 0; font-size: 15px; }
.ab-step p { margin: 0; }
.ab-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; transition: opacity .2s; }
.ab-pair label, .ab-step label { margin: 0; }
.dim { opacity: .45; }
#abWarnings { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.warn.bad { border-color: #d93025; color: #d93025; }

/* Grupos do WhatsApp */
.wg-stats { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.wg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.wg-card { border-left: 4px solid #bbb; display: flex; flex-direction: column; gap: 10px; }
.wg-card.on { border-left-color: #25d366; }
.wg-card.paused { border-left-color: #f0a400; }
.wg-card.off { opacity: .8; }
.wg-head { display: flex; align-items: center; gap: 10px; }
.wg-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wg-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-chip.on { background: rgba(37, 211, 102, .15); }
.wg-chip.paused { background: rgba(240, 164, 0, .18); }
.wg-body { display: flex; flex-direction: column; gap: 8px; }
.wg-body label { margin: 0; }
.wg-more summary { cursor: pointer; font-size: 13px; }
.switch { position: relative; width: 44px; height: 24px; flex: none; cursor: pointer; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #bbb; border-radius: 999px; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: #25d366; }
.switch input:checked + span::before { transform: translateX(20px); }
@media (max-width: 420px) { .wg-list { grid-template-columns: 1fr; } }

/* Assistente da API oficial */
.meta-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-summary .chip.ok { background: rgba(37, 211, 102, .15); }
.step h2 { display: flex; align-items: center; gap: 8px; }
.step .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--border, #ddd); font-size: 14px; }
.step.ok .n { background: #25d366; color: #fff; }
.step.ok .n::after { content: ''; }
.step ol { padding-left: 18px; line-height: 1.6; }
.step .out { margin-top: 10px; font-size: 14px; line-height: 1.6; }
.step .out.good { color: inherit; }
.step .out.bad { color: #d93025; }
.step tr.sel td { background: rgba(37, 211, 102, .08); }
.step .add-number { margin-top: 12px; }
.step .add-number summary { cursor: pointer; font-weight: 600; }
.row.wrap { flex-wrap: wrap; }
.days-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.days-pick label { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--border, #ccc); border-radius: 999px; cursor: pointer; font-size: 13px; margin: 0; }
.days-pick label:has(input:checked) { background: var(--accent, #25d366); color: #fff; border-color: transparent; }
.days-pick input { display: none; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; }
.row.space { justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.row.gap { gap: 8px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
label.inline { flex-direction: row; align-items: center; gap: 8px; margin: 0; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%;
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
textarea { resize: vertical; }
.row.gap input { flex: 1; min-width: 160px; width: auto; }
.row.gap select { width: auto; }

.btn {
  font: inherit; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600;
}
.btn:hover { filter: brightness(0.97); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: none; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.icon { padding: 3px 8px; font-size: 13px; }

.status-line { font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--primary); }
.dot.wait { background: #e0a100; }
.qr-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.qr-box img { width: 240px; height: 240px; background: #fff; border-radius: 8px; padding: 6px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 12px; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted); }
.warn { background: var(--warn-bg); color: var(--warn-text); padding: 10px 12px; border-radius: 8px; }

.group-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.group-head input[name="name"] { flex: 1; min-width: 180px; font-weight: 700; width: auto; }
.features { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.chip.on { background: var(--primary); color: var(--primary-text); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.in { color: var(--primary); } .out { color: var(--danger); }
tr.off td { opacity: 0.5; }

.chat {
  display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow-y: auto;
  background: var(--surface-2); border-radius: 10px; padding: 10px; margin: 10px 0;
}
.small-chat { max-height: 300px; min-height: 120px; }
.bubble { max-width: 85%; padding: 6px 10px; border-radius: 10px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.user { align-self: flex-start; background: var(--bubble-them); border: 1px solid var(--border); }
.bubble.assistant { align-self: flex-end; background: var(--bubble-me); }
.bubble.system { align-self: center; font-size: 12px; color: var(--muted); background: none; max-width: 100%; }
.bubble .meta { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.bubble-pre { white-space: pre-wrap; background: var(--surface-2); padding: 12px; border-radius: 10px; margin: 0; font-family: inherit; }

.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; text-align: center; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 20;
  max-width: calc(100% - 32px);
}

/* ---------- Ao vivo / badges ---------- */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live .dot { animation: pulse 2s infinite; }
.live.off .dot { animation: none; background: var(--muted); }
@keyframes pulse { 50% { opacity: 0.35; } }
.badge {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; font-size: 11px; line-height: 18px;
  text-align: center; background: var(--primary); color: var(--primary-text); font-weight: 700; margin-left: 4px;
}
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12px; word-break: break-all; }
.info { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; color: var(--text); line-height: 1.6; }
.info ol { margin: 6px 0 10px; padding-left: 20px; }
.hint { display: block; font-size: 12px; color: var(--muted); }
.save-bar { position: sticky; bottom: 12px; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }

/* ---------- Painel: últimas mensagens ---------- */
.recent { display: flex; flex-direction: column; }
.recent-item { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--border); cursor: pointer; border-radius: 8px; }
.recent-item:hover { background: var(--surface-2); }
.recent-item .txt { flex: 1; min-width: 0; }
.recent-item .txt div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Conversas (estilo WhatsApp Web) ---------- */
.wa {
  display: grid; grid-template-columns: 330px 1fr; height: calc(100vh - 80px); min-height: 480px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.wa-side { display: flex; flex-direction: column; border-right: 1px solid var(--border); min-width: 0; }
.wa-side > input { margin: 10px; width: auto; }
.conv-list { overflow-y: auto; flex: 1; }
.conv {
  display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border);
}
.conv:hover { background: var(--surface-2); }
.conv.sel { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--primary); }
.conv .txt { flex: 1; min-width: 0; }
.conv .top { display: flex; justify-content: space-between; gap: 8px; }
.conv .top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.conv .prev { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .tags { display: flex; gap: 4px; margin-top: 2px; flex-wrap: wrap; }
.avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  color: #fff; font-size: 16px;
}
.chip.warn-chip { background: var(--warn-bg); color: var(--warn-text); }
.chip.ok { background: var(--primary); color: var(--primary-text); }
.chip.bad { background: var(--danger); color: #fff; }

.wa-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wa-empty { flex: 1; display: grid; place-items: center; font-size: 15px; }
.wa-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.wa-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.wa-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-head label.check { margin: 0; }
.wa-msgs {
  flex: 1; overflow-y: auto; padding: 14px 6%; display: flex; flex-direction: column; gap: 4px;
  background: var(--surface-2);
}
.wa-msgs .bubble { max-width: 75%; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06); }
.wa-msgs .bubble .meta { text-align: right; }
.day-sep { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface); padding: 2px 10px; border-radius: 8px; margin: 8px 0; }
.tool { align-self: center; max-width: 90%; font-size: 12px; color: var(--muted); }
.tool summary { cursor: pointer; list-style: none; background: var(--surface); padding: 2px 10px; border-radius: 8px; border: 1px dashed var(--border); }
.tool pre { white-space: pre-wrap; word-break: break-word; margin: 4px 0; font-size: 11px; }
.sys { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface); padding: 2px 10px; border-radius: 8px; max-width: 90%; text-align: center; }
.sys.err { color: var(--danger); }
.wa-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); }
.wa-compose select { width: auto; max-width: 190px; }
.wa-compose textarea { flex: 1; min-height: 40px; max-height: 140px; resize: none; }
.wa-compose label.btn { margin: 0; }
.wa-pane .hint { padding: 0 12px 8px; margin: 0; background: var(--surface); }
.only-mobile { display: none; }
.typing-dots { align-self: flex-end; font-size: 12px; color: var(--muted); font-style: italic; }

/* Status dos recados */
.st { white-space: nowrap; }

/* Celular / tela estreita: menu lateral vira gaveta que abre pelo ☰ */
@media (max-width: 900px) {
  #app:not(.hidden), #app.side-mini { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 270px; max-width: 85vw;
    transform: translateX(-105%); transition: transform .22s ease; box-shadow: 0 0 30px rgba(0, 0, 0, .25);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 15; }
  #app.side-mini .side-text { display: initial; }
  #app.side-mini .nav-label { display: block; }
  #app.side-mini .side-top, #app.side-mini .side-foot { flex-direction: row; padding: 14px; }
  #app.side-mini #tabs button { justify-content: flex-start; padding: 9px 10px; }
  #app.side-mini #tabs .badge { position: static; }
  .topbar.only-mobile { display: flex; }
  .only-desktop { display: none; }
  .icon-btn.only-mobile { display: inline-block; }
}

@media (max-width: 640px) {
  main { padding: 16px 12px 60px; }
  .wa { grid-template-columns: 1fr; height: calc(100vh - 120px); }
  .wa.open .wa-side { display: none; }
  .wa:not(.open) .wa-main { display: none; }
  .only-mobile { display: inline-block; }
  .wa-msgs { padding: 10px; }
  .wa-compose { flex-wrap: wrap; }
  .wa-compose select { max-width: 100%; flex-basis: 100%; }
  .wa-msgs .bubble { max-width: 88%; }
}

/* ---------- Modo ausente ---------- */
.aw-state.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.aw-state-text p { margin: 4px 0; }
.aw-form { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 6px; }
.aw-form .row label { margin: 0; }
.aw-bubble {
  background: var(--bubble-me); color: #17201c; border-radius: 10px; padding: 8px 12px;
  white-space: pre-wrap; font-size: 14px; max-width: 420px; margin: 4px 0;
}
.aw-preview { display: flex; flex-direction: column; gap: 2px; }
.aw-checks { display: flex; flex-direction: column; gap: 6px; }
.aw-log { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.aw-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: start; padding: 8px; border-radius: 10px; background: var(--surface-2); }
.aw-item.resposta { background: transparent; padding: 2px 8px 2px 44px; grid-template-columns: 0 1fr auto; }
.aw-item.resposta .aw-ico { display: none; }
.aw-item.urgente { background: var(--warn-bg); }
.aw-item .small { word-break: break-word; }
.aw-ico { font-size: 18px; line-height: 1.2; }
.aw-pre { white-space: pre-wrap; font: inherit; background: var(--surface-2); padding: 10px; border-radius: 10px; }
.aw-history { display: flex; flex-direction: column; gap: 4px; }
.aw-vip-form { margin: 8px 0; }
.aw-vips { display: flex; flex-wrap: wrap; gap: 8px; }
.aw-vip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 4px 4px 4px 12px; }
.aw-vip .btn { padding: 2px 8px; border-radius: 999px; }
.aw-item.vip { background: var(--bubble-me); color: #17201c; }
.aw-samples { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
textarea.mono-sm { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.45; }
.ok-note { background: var(--surface-2); border-left: 3px solid var(--primary); padding: 8px 10px; border-radius: 8px; margin: 0; }

/* ---------- Clientes (assinaturas) ---------- */
.cli-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.cli-stat { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.cli-stat b { font-size: 20px; }
.cli-stat span { color: var(--muted); font-size: 12px; }
.cli-stat.warn { background: var(--warn-bg); }
.cli-stat.bad b { color: var(--danger); }
.cli-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 600px) { .cli-list { grid-template-columns: 1fr; } }
.cli-card.vencido, .cli-card.bloqueado { border-color: var(--danger); }
.cli-card.vencendo { border-color: var(--warn-text); }
.cli-head { display: flex; align-items: center; gap: 10px; }
.cli-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cli-title a { color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: var(--muted); }
.cli-actions { margin-top: 10px; align-items: flex-start; }
.cli-more summary { list-style: none; cursor: pointer; }
.cli-more summary::-webkit-details-marker { display: none; }
.cli-slug { display: flex; align-items: center; gap: 4px; }
.cli-slug input { flex: 1; min-width: 60px; }
.chip.bad { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.warn-text { color: var(--warn-text); }
