﻿:root {
  /* Vanguard Vision: preto e branco; ciano sÃ³ na marca e nos status */
  --bg: #0a0a0a;
  --surface: #0a0a0a;
  --surface-2: #141414;
  --border: #1f1f1f;
  --border-2: #2e2e2e;
  --text: #ededed;
  --muted: #8a8a8a;
  --brand: #00e5ff;
  --primary: #ededed;
  --primary-hover: #ffffff;
  --primary-soft: rgba(255, 255, 255, .06);
  --accent: #ededed;
  --grad: #ededed;
  --on-primary: #0a0a0a;
  --ok: #00e5ff;
  --ok-soft: rgba(0, 229, 255, .10);
  --warn: #f5a524;
  --warn-soft: rgba(245, 165, 36, .10);
  --err: #f04452;
  --err-soft: rgba(240, 68, 82, .10);
  --radius: 6px;
  --shadow: none;
  --sidebar: 228px;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  -webkit-font-smoothing: antialiased;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg);
}
h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
code, .mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 12.5px; }
.hidden { display: none !important; }
.right { text-align: right; }
.error-text { color: var(--err); font-size: 13px; margin: 0; min-height: 0; }
p { margin: 0; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 12px;
}
.brand { display: flex; flex-direction: column; gap: 4px; padding: 4px 10px 24px; }
.brand img { width: 150px; height: auto; filter: drop-shadow(0 0 12px rgba(0, 229, 255, .35)); }
.brand span { font-size: 11px; letter-spacing: .38em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.login-box .brand { align-items: center; padding: 0 0 8px; }
.login-box .brand img { width: 220px; }
.account-switch { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.account-switch select { text-transform: none; letter-spacing: 0; font-size: 13px; padding: 7px 10px; }
.howto { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.howto b { color: var(--text); font-weight: 600; }
.howto ul { margin: 6px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.howto code { font-size: 12px; }
.conn-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.conn-head h2 { margin-right: auto; }
.logo { font-weight: 800; font-size: 19px; padding: 0 10px 20px; letter-spacing: -.02em; }
.logo span { color: var(--primary); margin-left: 4px; font-weight: 700; text-shadow: 0 0 16px rgba(0, 229, 255, .45); }
nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: var(--muted); cursor: pointer; font-weight: 500; user-select: none;
}
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); box-shadow: inset 2px 0 0 var(--primary); }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.account { font-size: 12.5px; color: var(--muted); word-break: break-word; }
.account b { color: var(--text); display: block; font-size: 13px; }

main { margin-left: var(--sidebar); flex: 1; padding: 28px 32px 120px; max-width: 1400px; min-width: 0; }
.view { display: none; }
.view.active { display: block; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- controles ---------- */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.head-actions select, .head-actions input { width: auto; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.field-label { font-size: 13px; font-weight: 500; margin: 14px 0 6px; }
.inline-check { flex-direction: row; align-items: center; gap: 8px; margin-top: 12px; font-weight: 400; }
.inline-check input { width: auto; }

.btn {
  font: inherit; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 16px; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow);
  border-radius: 999px; transition: background .15s, border-color .15s, color .15s;
}
.btn:not(.primary):hover { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; box-shadow: 0 0 18px rgba(0, 229, 255, .25); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { color: var(--err); }
.btn.dashed { border-style: dashed; background: transparent; box-shadow: none; color: var(--muted); }
.btn.dashed:hover { color: var(--primary); border-color: var(--primary); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; font-size: 16px; line-height: 1; }
.icon-btn:hover { background: var(--surface-2); color: var(--err); }

.segmented { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; gap: 2px; }
.segmented button { font: inherit; font-size: 13px; border: 0; background: none; color: var(--muted); padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.segmented button.selected { background: var(--primary); color: var(--on-primary); font-weight: 600; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.choice-grid button {
  font: inherit; text-align: left; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
}
.choice-grid button small { color: var(--muted); font-size: 12px; }
.choice-grid button:hover { border-color: var(--primary); }
.choice-grid button.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-head.pad { padding: 16px 20px 0; }
.card-head > .btn { margin-left: auto; }
details.card > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { margin-bottom: 16px; }
.step { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 12.5px; display: grid; place-items: center; flex: none; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 4px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.span-2 { grid-column: span 2; }
.grid-2 > .card { margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }

.sub-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: var(--surface); }
.sub-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sub-card-head input { font-weight: 600; max-width: 320px; }
.sub-card-head .icon-btn { margin-left: auto; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .value { color: var(--text); font-size: 21px; font-weight: 700; margin-top: 2px; letter-spacing: -.01em; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; vertical-align: middle; }
th { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.empty { text-align: center; color: var(--muted); padding: 40px; white-space: normal; }
.col-toggle { width: 36px; padding-right: 0; }
.name-cell { white-space: normal; min-width: 240px; max-width: 420px; }
.name-cell small { display: block; color: var(--muted); font-size: 12px; }
.tree-table tr.level-1 td { background: var(--surface-2); }
.tree-table tr.level-1 .name-cell { padding-left: 30px; }
.tree-table tr.level-2 td { background: var(--bg); }
.tree-table tr.level-2 .name-cell { padding-left: 52px; }
.expander { background: none; border: 0; color: var(--muted); cursor: pointer; width: 24px; height: 24px; border-radius: 6px; transition: transform .15s; }
.expander:hover { background: var(--surface-2); }
.expander.open { transform: rotate(90deg); }
.row-click { cursor: pointer; }
.thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--surface-2); display: inline-block; vertical-align: middle; margin-right: 10px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.error { background: var(--err-soft); color: var(--err); }
.badge.muted { background: var(--surface-2); color: var(--muted); }

.switch { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 20px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { background: var(--on-primary); }
.switch input:checked + span::before { transform: translateX(14px); }
.switch input:disabled + span { opacity: .5; cursor: wait; }
.status-cell { display: flex; align-items: center; gap: 8px; }

.budget-edit { display: inline-flex; align-items: center; gap: 4px; }
.budget-edit input { width: 90px; padding: 4px 8px; text-align: right; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }

/* ---------- criaÃ§Ã£o ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: var(--primary); padding: 3px 4px 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; }
.chip button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; }
.suggest { position: relative; }
.suggest-list { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin-top: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.6); max-height: 240px; overflow: auto; }
.suggest-list button { display: flex; justify-content: space-between; width: 100%; text-align: left; font: inherit; background: none; border: 0; padding: 8px 12px; cursor: pointer; color: var(--text); }
.suggest-list button:hover { background: var(--surface-2); }
.suggest-list small { color: var(--muted); }

.ad-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
.media-drop {
  border: 1.5px dashed var(--border); border-radius: 10px; min-height: 200px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; text-align: center; cursor: pointer; padding: 12px;
  color: var(--muted); font-size: 13px; overflow: hidden; position: relative; background: var(--surface-2);
}
.media-drop:hover, .media-drop.drag { border-color: var(--primary); color: var(--primary); }
.media-drop img, .media-drop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-drop .media-status { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; }
.media-drop .media-status .badge { background: var(--surface); box-shadow: var(--shadow); }

.dropzone {
  border: 1.5px dashed var(--border); border-radius: 10px; padding: 28px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; cursor: pointer; margin: 14px 0 10px; font-weight: 400; background: var(--surface-2);
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); }
.row-actions { display: flex; gap: 8px; }

.action-bar {
  position: fixed; left: var(--sidebar); right: 0; bottom: 0; z-index: 10;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 32px; flex-wrap: wrap;
}
.summary { color: var(--muted); font-size: 13px; }
.summary b { color: var(--text); }

/* resultado */
.result-card { border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 16px; }
.result-card.ok { border-color: var(--ok); }
.result-card.error { border-color: var(--err); }
.result-card h3 { margin: 0 0 10px; font-size: 15px; }
.tree { list-style: none; margin: 0; padding: 0; }
.tree ul { list-style: none; margin: 4px 0 4px 8px; padding-left: 14px; border-left: 1px solid var(--border); }
.tree li { padding: 3px 0; }
.tree .c { font-weight: 600; }
.tree .d { color: var(--muted); }
.tree .money { color: var(--ok); margin-left: 8px; font-size: 12.5px; }
.errors { margin: 0 0 10px; padding-left: 18px; color: var(--err); }

/* templates */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cards .card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cards .card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }

details.log summary { cursor: pointer; color: var(--primary); }
details.log pre { max-width: 640px; max-height: 320px; overflow: auto; background: var(--surface-2); padding: 10px; border-radius: 8px; white-space: pre-wrap; font-size: 12px; }

/* login */
.login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); padding: 16px; }
.login-box { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 0 60px rgba(0, 229, 255, .08); }
.login-box .logo { padding: 0; font-size: 24px; }

/* toast */
.toast {
  position: fixed; bottom: 84px; right: 24px; z-index: 200; max-width: 420px;
  background: var(--text); color: var(--surface); padding: 12px 16px; border-radius: 10px;
  opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; font-weight: 500;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--err); color: #fff; }
.toast.ok { background: var(--primary); color: var(--on-primary); }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  :root { --sidebar: 0px; }
  .sidebar { position: static; width: auto; flex-direction: row; align-items: center; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; gap: 12px; }
  .app { flex-direction: column; }
  .brand { padding: 0; }
  .brand img { width: 110px; }
  .brand span, .sidebar-foot .nav-item { display: none; }
  .account-switch { font-size: 0; gap: 0; }
  nav { flex-direction: row; }
  .sidebar-foot { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; align-items: center; }
  .account { display: none; }
  main { margin-left: 0; padding: 20px 16px 120px; }
  .grid-2, .grid-3, .grid-4, .ad-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .action-bar { left: 0; padding: 12px 16px; }
}

/* ---------- catÃ¡logo: abas internas e listas de seleÃ§Ã£o ---------- */
.subtabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--border);
}

.subtab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  padding: 10px 16px;
}

.subtab:hover { color: var(--text); }

.subtab.active {
  border-bottom-color: var(--primary);
  color: var(--text);
}

.checklist {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin: 8px 0 4px;
  max-height: 260px;
  overflow-y: auto;
}

label.check {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding: 8px 10px;
}

label.check input[type="checkbox"] { margin: 0; width: auto; }

.hint {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 4px;
}

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

/* select e input dividem a linha: sem isto o select de 100% engole o campo */
.inline > select,
.inline > input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}

.inline > .btn { flex: 0 0 auto; }

.pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: inline-block;
  font-size: 12px;
  margin-top: 6px;
  padding: 3px 10px;
}

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

/* empurra os botÃµes do criativo para a direita */
.sub-card-head .grow { flex: 1; }

/* "Usar em todos": fica sob o campo de mÃ­dia, discreto */
label > .btn.ghost.sm { align-self: flex-start; margin-top: 6px; }

/* mensagens longas da Meta nÃ£o podem vazar do card */
#of-status p, #rp-status p, #st-status-box p, #qc-status p, .errors li { overflow-wrap: anywhere; }

/* ---------- campanhas: seleÃ§Ã£o, sinais, aÃ§Ãµes ---------- */
.col-check { width: 34px; padding-right: 0; }
.col-check input { width: auto; }
.row-menu { white-space: nowrap; text-align: right; }
.row-menu .icon-btn { font-size: 15px; }
.row-menu .icon-btn:hover { color: var(--primary); }
.icon-btn.danger:hover { color: var(--err); }
td.pos { color: var(--ok); }
td.neg { color: var(--err); }
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--primary-soft); border: 1px solid var(--primary); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
.bulk-bar b { margin-right: 6px; }
.dot { margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 5px; box-shadow: 0 0 10px rgba(255, 77, 94, .6); }
.nick-input { width: 120px; padding: 4px 8px; font-size: 13px; }
.token-report { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; }
.token-report > div { flex-basis: 100%; }
.pad { padding: 0 20px; }
.pad-x { padding: 0 20px; }

/* ---------- Launch: abas de conta ---------- */
.acc-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.acc-tab { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px 10px 0 0; padding: 7px 10px 7px 12px; cursor: pointer; color: var(--muted); font: inherit; font-size: 13px; max-width: 260px; }
.acc-tab span:not(.acc-dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-tab.active { color: var(--text); border-color: var(--primary); box-shadow: inset 0 2px 0 var(--primary); background: var(--surface-2); }
.acc-tab.add { border-style: dashed; border-radius: 10px; }
.acc-tab:hover { color: var(--text); }
.acc-close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 12px; }
.acc-close:hover { color: var(--err); }
.acc-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.acc-dot.ok { background: var(--ok); }
.acc-dot.off { background: var(--err); }
.pick-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 55vh; overflow: auto; }
.pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; color: var(--text); font: inherit; cursor: pointer; }
.pick:hover { border-color: var(--primary); }
.pick small { flex-basis: 100%; color: var(--muted); padding-left: 15px; }

/* ---------- Launch: lotes ---------- */
.lote { margin-bottom: 18px; }
.lote-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.lote-name { width: auto; min-width: 180px; max-width: 320px; font-weight: 600; background: transparent; border-color: transparent; }
.lote-name:hover { border-color: var(--border); }
.chip-sel { flex-direction: row; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 4px 2px 12px; }
.chip-sel select { width: auto; padding: 4px 8px; font-size: 12.5px; border-radius: 999px; }
.lote-head .pill { margin-top: 0; }
.grow { flex: 1; }
.lote-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); }
.lote-result:empty { display: none; }
.lote-table .name-cell { min-width: 300px; }
.link-btn.strong { color: var(--text); font-weight: 600; text-align: left; }
.link-btn.strong:hover { color: var(--primary); }
.pending { color: var(--warn) !important; }
.empty-state { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ---------- gaveta do editor ---------- */
body.no-scroll { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100%); background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, .5); }
.drawer-head { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px 6px; }
.dr-name { margin: 6px 0 4px; color: var(--primary); font-size: 13px; word-break: break-word; }
.drawer-panel .subtabs { padding: 0 20px; margin-bottom: 0; }
.drawer-panel.with-tree { width: min(1020px, 100%); }
.drawer-main { flex: 1; display: flex; min-height: 0; }
.dr-tree { width: 250px; flex-shrink: 0; border-right: 1px solid var(--border); overflow: auto; padding: 14px 10px 30px; font-size: 13px; }
.dr-tree .tree-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 6px 8px; }
.dr-tree label { display: flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 400; padding: 5px 6px; border-radius: 6px; cursor: pointer; min-width: 0; }
.dr-tree label:hover { background: rgba(255, 255, 255, .04); }
.dr-tree label.on { background: rgba(0, 229, 255, .08); }
.dr-tree label span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.dr-tree input { width: auto; margin: 0; flex-shrink: 0; }
.dr-tree .ads { margin-left: 18px; }
.dr-tree .edited { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.dr-tree .dim { opacity: .45; pointer-events: none; }
.scope-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--primary); border-radius: 8px; background: rgba(0, 229, 255, .06); font-size: 13px; }
#dr-tabs .subtab .tab-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--err, #ff4d4f); margin-left: 6px; vertical-align: middle; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 20px 30px; display: flex; flex-direction: column; gap: 12px; }
.drawer-body .grid-2, .drawer-body .grid-3 { margin-top: 0; }
.drawer-foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }
.token-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: -4px; }
.token { font: 12px ui-monospace, Consolas, monospace; background: var(--surface-2); color: var(--primary); border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px; cursor: pointer; }
.token:hover { border-color: var(--primary); }
.token.static { cursor: default; color: var(--muted); }
.checklist.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); max-height: none; }
.drawer-body .field-label { margin: 6px 0 0; }
.drawer-body .tree { font-size: 13px; }
.suggest-list p { margin: 0; }

/* criativos */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media-card { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.media-thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--bg); display: grid; place-items: center; color: var(--muted); font-size: 26px; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-name { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-del { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, .7); color: #fff; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.modal-box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal.wide .modal-box { width: min(980px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { flex: 1; }
.modal-body { padding: 16px 20px; overflow: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }
.modal-foot:empty { display: none; }

/* biblioteca */
.lib-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.lib-toolbar input { flex: 1; min-width: 160px; width: auto; }
.lib-upload { cursor: pointer; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 8px; }
.lib-item { text-align: left; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.lib-item:hover { border-color: var(--primary); }
.lib-item.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--primary-soft); }
.lib-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: transparent; display: grid; place-items: center; font-size: 13px; border: 1px solid var(--border); }
.lib-item.on .lib-check { background: var(--primary); color: var(--on-primary); }
.lib-badge { position: absolute; left: 6px; bottom: 6px; }

/* monitoramento */
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); }
.alert small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.alert.unseen { background: rgba(255, 77, 94, .06); box-shadow: inset 3px 0 0 var(--err); }
.rule-line { padding: 4px 0; }
.cond { margin-bottom: 6px; }
.cond select, .cond input { flex: 1; }

@media (max-width: 860px) {
  .lote-head .grow { display: none; }
  .drawer-panel { width: 100%; }
  .dr-tree { display: none; }
  .nav-item .dot { margin-left: 4px; }
}
.media-grid > p, .lib-grid > p { grid-column: 1 / -1; }
.guide details { border-top: 1px solid var(--border); padding: 10px 0; }
.guide summary { cursor: pointer; padding: 2px 0; }
.guide details[open] summary { margin-bottom: 8px; }
.guide ul.howto { list-style: disc; }

/* barra de envio de mÃ­dia */
.uploads { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.upload-row { background: var(--card, #111); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.upload-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); margin: 8px 0 6px; overflow: hidden; }
.upload-fill { height: 100%; width: 0; background: var(--accent, #22d3ee); transition: width .2s; }
.upload-row.busy .upload-fill { width: 100% !important; background: linear-gradient(90deg, transparent, var(--accent, #22d3ee), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: upload-busy 1.2s linear infinite; }
@keyframes upload-busy { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.upload-row.ok .upload-fill { background: #22c55e; }
.upload-row.error .upload-fill { background: #ef4444; }
.upload-row.error .upload-note { color: #ef4444; }


/* ================= visual 2026 (estilo painel de operaÃ§Ã£o) ================= */
code, .mono { font-family: var(--mono); }
.mono-label { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow { color: var(--primary); margin-bottom: 6px; }
h1 { font-size: 26px; letter-spacing: -.02em; }
.sidebar { background: rgba(8, 11, 19, .85); backdrop-filter: blur(12px); }
.nav-item.active { background: linear-gradient(90deg, rgba(0, 229, 255, .14), rgba(124, 92, 255, .06)); color: var(--text); box-shadow: inset 2px 0 0 var(--primary); }
.nav-item.active svg { color: var(--primary); }
.card, .kpi, .sub-card { background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0)) , var(--surface); }
.card { transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: #26304a; }
.kpi { position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: .7; }
.kpi .label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.kpi.glow strong { display: block; font-size: 28px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.kpi.glow.ok strong { color: var(--ok); text-shadow: 0 0 18px rgba(46, 230, 166, .35); }
.kpi.glow.warn strong { color: var(--warn); }
.kpi.glow.bad strong { color: var(--err); }
.kpi.glow.ok::before { background: var(--ok); }
.kpi.glow.warn::before { background: var(--warn); }
.kpi.glow.bad::before { background: var(--err); }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 0 22px rgba(0, 229, 255, .25), 0 0 40px rgba(124, 92, 255, .15); }
.btn.primary:hover { filter: brightness(1.12); background: var(--grad); }
th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; background: rgba(255, 255, 255, .02); }
tbody tr:hover td { background: rgba(0, 229, 255, .025); }
.modal-back { background: rgba(2, 4, 10, .72); backdrop-filter: blur(4px); }
.modal-box { border-color: #26304a; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 229, 255, .06); }
.warn-text { color: var(--warn); }
.upload-fill { background: var(--grad); }
.upload-bar.mini { height: 4px; margin: 6px 0 0; max-width: 140px; }

/* publicaÃ§Ã£o em massa */
.multi-tools { display: flex; gap: 8px; align-items: center; margin: 12px 0 8px; }
.multi-tools input { max-width: 240px; }
.multi-list { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 4px; }
.multi-bm { display: flex; flex-direction: column; gap: 6px; }
.multi-acc { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); }
.multi-acc:has(input:checked) { border-color: rgba(0, 229, 255, .45); box-shadow: 0 0 0 1px rgba(0, 229, 255, .15), 0 0 18px rgba(0, 229, 255, .08); }
.multi-acc .check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; flex-wrap: wrap; }
.multi-acc .check input { width: auto; }
.multi-sel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.multi-sel select { font-size: 12.5px; padding: 6px 8px; }
.modal-box:has(.multi-list) { width: min(760px, 100%); }

/* painel ao vivo */
.live-panel { position: fixed; right: 16px; bottom: 16px; z-index: 70; width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow: auto;
  background: rgba(11, 15, 26, .96); backdrop-filter: blur(10px); border: 1px solid rgba(0, 229, 255, .3); border-radius: 14px; padding: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 0 30px rgba(0, 229, 255, .12); }
.live-head { display: flex; align-items: center; gap: 8px; }
.live-head .mono-label { color: var(--text); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: live-pulse 1.2s ease-in-out infinite; }
.live-dot.off { animation: none; background: var(--muted); box-shadow: none; }
@keyframes live-pulse { 50% { opacity: .35; } }
.live-sub { margin: 4px 0 10px; }
.live-rows { display: flex; flex-direction: column; gap: 10px; }
.live-row { border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: var(--surface-2); }
.live-row-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.live-row .upload-bar { margin: 8px 0 6px; }
.live-row.ok .upload-fill { background: var(--ok); }
.live-row.partial .upload-fill { background: var(--warn); }
.live-row.error .upload-fill { background: var(--err); }
.live-row.error .mono-label { color: var(--err); }
.live-row.ok .mono-label { color: var(--ok); }
.live-row.publishing .upload-fill, .live-row.copying .upload-fill { animation: live-pulse 1.2s ease-in-out infinite; }
.live-row ul.errors { margin: 6px 0 0; padding-left: 16px; color: var(--err); white-space: normal; }

@media (max-width: 720px) {
  .multi-sel { grid-template-columns: 1fr; }
}

/* ---------- menu em seÃ§Ãµes + barra superior ---------- */
.sidebar { overflow-y: auto; }
.sidebar .brand { padding-bottom: 14px; }
.new-pub { margin: 0 4px 14px; width: auto; }
.nav-sec { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #5b6680; padding: 16px 10px 6px; }
.nav-item { padding: 8px 10px; font-size: 13.5px; }
.nav-item .dot { margin-left: auto; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; margin: -28px -32px 22px; padding: 12px 32px;
  background: rgba(5, 7, 13, .78); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar .mono-label { color: var(--text); }
.topbar-acc { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; background: var(--surface); }
.topbar-bell { background: none; border: 1px solid var(--border); border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.topbar-bell:hover { color: var(--primary); border-color: var(--primary); }
.topbar-bell svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.grow { flex: 1; }

/* ---------- dashboard ---------- */
.live-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); }
.dash-list, .act-list { display: flex; flex-direction: column; }
.act-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.act-list .act-row { padding: 10px 20px; }
.act-row:last-child { border-bottom: 0; }
.act-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.act-dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.act-dot.warn { background: var(--warn); }
.act-dot.bad { background: var(--err); box-shadow: 0 0 8px var(--err); }
.flow-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.flow-step { font: inherit; color: var(--text); text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s; }
.flow-step .mono-label { color: var(--primary); }
.flow-step small { color: var(--muted); font-size: 12px; }
.flow-step:hover { border-color: rgba(0, 229, 255, .5); box-shadow: 0 0 20px rgba(0, 229, 255, .1); }
.kpi.glow strong { font-size: 24px; }

/* ---------- fila ---------- */
.queue-job .queue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }

/* ---------- biblioteca ---------- */
.ml-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ml-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; padding-bottom: 10px; }
.ml-card:hover { border-color: rgba(0, 229, 255, .4); }
.ml-thumb { position: relative; aspect-ratio: 1; background: var(--surface-2); }
.ml-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ml-type { position: absolute; left: 8px; top: 8px; background: rgba(5, 7, 13, .8); padding: 3px 7px; border-radius: 6px; color: var(--text); }
.ml-proc { position: absolute; right: 8px; top: 8px; background: var(--warn); color: #000; padding: 3px 7px; border-radius: 6px; }
.ml-name { padding: 8px 10px 2px; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-card .small { padding: 0 10px; }
.ml-grid > .empty { grid-column: 1 / -1; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }

@media (max-width: 1100px) { .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .topbar { margin: -16px -16px 16px; padding: 10px 16px; } .topbar-acc { display: none; } }
#queue-dot { min-width: 8px; width: 8px; height: 8px; padding: 0; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
@media (max-width: 860px) { .nav-sec, .new-pub { display: none; } .topbar { margin: -16px -16px 16px; } }
.sidebar { overflow-x: hidden; }
.kpi.glow strong { font-size: clamp(18px, 1.6vw, 24px); overflow-wrap: anywhere; }

/* ================= visual limpo VV ================= */
.sidebar { background: var(--bg); backdrop-filter: none; border-right: 1px solid var(--border); }
.nav-item { border-radius: 6px; }
.nav-item.active { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--primary); }
.card, .kpi, .sub-card { background: var(--surface); box-shadow: none; }
.card { border-radius: 8px; padding: 16px; }
.card:hover { border-color: var(--border); }
.eyebrow { display: none; }
h1 { font-size: 20px; letter-spacing: -.01em; }
.page-head p.muted { font-size: 13px; }

/* nÃºmeros: uma linha compacta, sem caixas grandes */
.kpis { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.kpi, .kpi.glow { flex: 1 1 140px; display: flex; flex-direction: column; gap: 2px; background: none; border: 0; border-right: 1px solid var(--border); border-radius: 0; padding: 9px 14px; overflow: visible; }
.kpi:last-child { border-right: 0; }
.kpi::before { display: none; }
.kpi .label, .kpi .mono-label { font-family: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 400; }
.kpi .value, .kpi.glow strong { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: 0; text-shadow: none; color: var(--text); }
.kpi.glow.ok strong { color: var(--text); text-shadow: none; }
.kpi.glow.warn strong { color: var(--warn); }
.kpi.glow.bad strong { color: var(--err); }

/* botÃµes e detalhes sem brilho */
.btn.primary, .btn.primary:hover { background: var(--primary); color: var(--on-primary); border: 0; box-shadow: none; filter: none; }
.btn.primary:hover { background: var(--primary-hover); }
th { font-family: inherit; font-size: 11.5px; letter-spacing: .03em; background: var(--surface-2); }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.modal-back { backdrop-filter: none; background: rgba(0, 0, 0, .7); }
.modal-box { border-color: var(--border); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.upload-fill, .live-row.ok .upload-fill { background: var(--primary); }
.dot, .act-dot.ok, .act-dot.bad, .live-dot { box-shadow: none; }
.login-box { box-shadow: none; border-radius: 10px; }
.multi-acc { border-radius: 6px; }
.multi-acc:has(input:checked) { border-color: var(--primary); box-shadow: none; }
.live-panel { background: var(--surface); backdrop-filter: none; border-color: var(--border); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }
.live-row, .sub-card, .pick, .media-card, .lib-item, .ml-card { border-radius: 6px; }
.topbar { background: var(--bg); backdrop-filter: none; padding-top: 10px; padding-bottom: 10px; }
.topbar .mono-label { font-family: inherit; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.topbar-acc { border-radius: 6px; }
.topbar-bell { border-radius: 6px; width: 32px; height: 32px; }
.nav-sec { font-family: inherit; font-size: 11px; letter-spacing: .06em; color: #666; }
.live-tag { font-family: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; }

/* =====================================================================
   DESIGN BASE (reconstruÃ­do): neutro, plano, sem brilho, sem pÃ­lulas
   ===================================================================== */
body { background: var(--bg); color: var(--text); font-size: 13.5px; }
h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 13.5px; font-weight: 600; }
.muted { color: var(--muted); }
::placeholder { color: #555; opacity: 1; }

/* marca */
.brand img, .login-box img { filter: none; }
.logo span { text-shadow: none; color: var(--brand); }

/* menu lateral */
.sidebar { background: var(--bg); border-right: 1px solid var(--border); backdrop-filter: none; }
.nav-item { color: var(--muted); border-radius: 4px; padding: 7px 10px; font-size: 13px; box-shadow: none; }
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item.active, .nav-item.active svg { color: var(--text); background: var(--surface-2); box-shadow: none; }
.nav-sec { color: #555; font-size: 11px; letter-spacing: .04em; padding: 18px 10px 4px; }
.new-pub { margin: 4px 4px 10px; }

/* barra superior */
.topbar { background: var(--bg); border-bottom: 1px solid var(--border); }
.topbar-acc, .topbar-bell { border-radius: 4px; border-color: var(--border); background: transparent; }
.topbar-bell:hover { color: var(--text); border-color: var(--border-2); }

/* botÃµes: retos, discretos; o primÃ¡rio Ã© branco sÃ³lido */
.btn { border-radius: 4px; height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); box-shadow: none; filter: none; }
.btn:hover, .btn:not(.primary):hover { background: #1c1c1c; border-color: #3a3a3a; color: var(--text); }
.btn.primary, .btn.primary:hover { background: var(--primary); border: 1px solid var(--primary); color: var(--on-primary); box-shadow: none; filter: none; font-weight: 600; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn.dashed { background: transparent; border: 1px dashed var(--border-2); color: var(--muted); }
.btn.dashed:hover { color: var(--text); border-color: #444; }
.btn.danger { color: var(--err); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.block { height: 34px; }
label.btn { display: inline-flex; align-items: center; }
.icon-btn:hover, .row-menu .icon-btn:hover, .link-btn.strong:hover { color: var(--text); }
.link-btn, details.log summary { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #444; }

/* campos */
input, select, textarea { background: #0f0f0f; border: 1px solid var(--border-2); border-radius: 4px; color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: #5a5a5a; box-shadow: none; outline: none; }

/* seletores */
.segmented { background: transparent; border: 1px solid var(--border-2); border-radius: 4px; padding: 2px; }
.segmented button { border-radius: 3px; }
.segmented button.selected { background: #262626; color: var(--text); font-weight: 500; }
.choice-grid button { border-radius: 4px; }
.choice-grid button:hover { border-color: #444; }
.choice-grid button.selected { border-color: var(--text); background: var(--surface-2); box-shadow: none; }
.switch input:checked + span { background: var(--text); }
.switch input:checked + span::before { background: var(--bg); }
.step { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2); }

/* abas */
.subtab.active { border-bottom-color: var(--text); color: var(--text); }
.acc-tab { border-radius: 4px 4px 0 0; }
.acc-tab.active { border-color: var(--border-2); box-shadow: none; background: var(--surface-2); color: var(--text); }
.acc-tab.add { border-radius: 4px; }

/* blocos: sem caixa colorida, sÃ³ uma linha fina */
.card, .sub-card, .result-card, .kpi { background: transparent; box-shadow: none; }
.card { border: 1px solid var(--border); border-radius: 6px; padding: 16px; }
.card:hover { border-color: var(--border); }
.card.flush { padding: 0; }
.sub-card, .result-card { border: 1px solid var(--border); border-radius: 6px; }
.modal-box { background: var(--bg); border: 1px solid var(--border-2); border-radius: 8px; box-shadow: 0 24px 64px rgba(0, 0, 0, .7); }
.modal-back { background: rgba(0, 0, 0, .72); backdrop-filter: none; }
.drawer-panel { background: var(--bg); }
.login-box { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; box-shadow: none; }

/* nÃºmeros em linha */
.kpis { background: transparent; border: 1px solid var(--border); border-radius: 6px; }
.kpi, .kpi.glow { border-right: 1px solid var(--border); }
.kpi .label, .kpi .mono-label { text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 12px; color: var(--muted); }
.kpi .value, .kpi.glow strong, .kpi.glow.ok strong { font-size: 16px; font-weight: 600; color: var(--text); text-shadow: none; }

/* tabelas */
th { background: transparent; color: var(--muted); font-family: inherit; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
tbody tr:hover td { background: #101010; }

/* etiquetas */
.mono-label { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; }
.badge { border-radius: 4px; padding: 1px 7px; font-weight: 500; }
.chip, .chip-sel, .chip-sel select { border-radius: 4px; }
.chip { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2); }
.token { color: var(--text); border-radius: 4px; }
.token:hover { border-color: #444; }
.dr-name { color: var(--text); }
.dr-tree label.on { background: var(--surface-2); }
.dr-tree .edited { background: var(--text); }
.scope-bar, .bulk-bar { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 4px; }
.live-tag { color: var(--muted); font-size: 12px; }

/* seleÃ§Ã£o de itens */
.pick, .lib-item, .media-card, .ml-card, .multi-acc, .live-row { border-radius: 4px; }
.pick:hover, .lib-item:hover, .ml-card:hover { border-color: #444; }
.lib-item.on, .multi-acc:has(input:checked) { border-color: var(--text); box-shadow: none; background: var(--surface-2); }
.lib-item.on .lib-check { background: var(--text); color: var(--bg); }
.media-drop, .dropzone { border-radius: 6px; border-color: var(--border-2); }
.media-drop:hover, .media-drop.drag, .dropzone:hover, .dropzone.drag { border-color: #555; color: var(--text); }

/* estados vazios: sÃ³ texto, sem caixa */
.empty, .empty-state, td.empty { color: var(--muted); padding: 28px 16px; font-size: 13px; }
.empty-state h3, .empty-state b, .empty-state strong { color: var(--text); font-weight: 500; }

/* progresso e alertas */
.upload-fill, .live-row.ok .upload-fill { background: var(--text); }
.live-panel { background: var(--bg); border: 1px solid var(--border-2); border-radius: 8px; box-shadow: 0 16px 48px rgba(0, 0, 0, .7); }
.live-dot, .dot, .act-dot, .act-dot.ok, .act-dot.bad { box-shadow: none; }
.toast { border-radius: 6px; }
.toast.ok { background: var(--text); color: var(--bg); }
.card.empty-state { border: 0; background: transparent; padding: 40px 16px; }
.sidebar > * { flex-shrink: 0; }
.new-pub { height: 34px; }
.kpi .mono-label { text-transform: lowercase; }
.kpi .mono-label::first-letter { text-transform: uppercase; }

/* ---------- erros: mensagem + como resolver ---------- */
.toast { white-space: pre-line; max-width: min(560px, calc(100vw - 32px)); line-height: 1.45; cursor: pointer; }
.error-text, .live-row ul.errors li { white-space: pre-line; }
.err-row { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.err-row:last-child { border-bottom: 0; }
.err-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.err-target { margin-left: auto; font-size: 12px; }
.err-msg { color: var(--err); font-size: 13px; word-break: break-word; }
.err-help { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--surface-2); border-radius: 4px; padding: 10px 12px; font-size: 13px; }
.err-k { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
@media (max-width: 720px) { .err-help { grid-template-columns: 1fr; } .err-target { margin-left: 0; } }

/* =====================================================================
   LOGIN, PRIMEIRO ACESSO, ASSINANTES
   ===================================================================== */
.login-box { max-width: 380px; gap: 0; padding: 28px; }
.login-box > .brand { display: flex; align-items: center; gap: 8px; padding: 0 0 22px; text-decoration: none; color: var(--muted); }
.login-box > .brand img { width: 150px; }
.auth-step { display: flex; flex-direction: column; gap: 14px; }
.auth-step.hidden { display: none; }
.auth-head h1 { font-size: 20px; margin: 0 0 6px; }
.auth-head p { margin: 0; line-height: 1.5; font-size: 13px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.auth-links a { color: var(--muted); text-decoration: none; cursor: pointer; }
.auth-links a:hover { color: var(--text); }
.auth-links .hidden, [data-code-field].hidden { display: none; }
.code-input { font-family: var(--mono); font-size: 20px; letter-spacing: .4em; text-align: center; }
.whoami { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 0 6px; }
[data-admin].hidden { display: none !important; }

.welcome { border: 1px solid var(--border-2); border-radius: 6px; padding: 18px 20px; margin-bottom: 20px; }
.welcome h2 { margin: 0 0 10px; font-size: 15px; }
.welcome ol { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.7; font-size: 13px; }
.welcome b { color: var(--text); font-weight: 500; }

.cust-form { display: grid; grid-template-columns: 2fr 1.5fr 120px auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.cust-list { margin-top: 16px; }
.cust-table { width: 100%; border-collapse: collapse; }
.cust-table td, .cust-table th { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.cust-table tr:last-child td { border-bottom: 0; }
.cust-actions { white-space: nowrap; text-align: right !important; }
.cust-actions .btn { margin-left: 4px; }
@media (max-width: 760px) {
  .cust-form { grid-template-columns: 1fr; }
  .cust-table thead { display: none; }
  .cust-table td { display: block; border: 0; padding: 4px 14px; }
  .cust-table tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .cust-actions { text-align: left !important; }
}

/* =====================================================================
   LOGIN NO VISUAL DO SITE (lado da marca + formulÃ¡rio)
   ===================================================================== */
.login { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); place-items: stretch; padding: 0; background: #060809; }
.login.hidden { display: none; }
.login-side { position: relative; display: flex; flex-direction: column; gap: 36px; padding: 40px 56px; border-right: 1px solid #1a1f22; overflow: hidden; }
.login-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #8a9196; font-size: 14px; font-weight: 500; }
.login-logo img { width: 132px; }
.login-pitch { margin-top: 0; }
.login-pitch h2 { margin: 0; font-size: clamp(34px, 3.6vw, 54px); line-height: 1; letter-spacing: -.04em; font-weight: 800; color: #eef1f2; }
.login-pitch h2 span { color: #00e5ff; }
.login-pitch p { margin: 16px 0 0; color: #8a9196; font-size: 16px; }
.login-shot { margin: 0 -120px 0 0; border: 1px solid #262c30; border-radius: 12px; overflow: hidden; aspect-ratio: 1600 / 860; }
.login-shot video { display: block; width: 100%; height: 100%; object-fit: cover; }
.login-foot { margin: auto 0 0; font-size: 12.5px; color: #535b60; }
.login-foot a { color: #8a9196; text-decoration: none; }
.login-foot a:hover { color: #eef1f2; }

.login .login-box { align-self: center; justify-self: center; width: 100%; max-width: 380px; margin: 0 auto; padding: 40px 24px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.login-mobile-logo { display: none !important; }
.login .auth-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.login .auth-head p { font-size: 14px; }
.login .auth-step { gap: 16px; }
.login .auth-step label { font-size: 13px; color: #8a9196; }
.login .auth-step input { height: 46px; font-size: 15px; background: #0b0e10; border-color: #262c30; border-radius: 6px; }
.login .auth-step input:focus { border-color: #5a6066; }
.login .auth-step .btn.primary { height: 48px; font-size: 15px; border-radius: 6px; background: #00e5ff; border-color: #00e5ff; color: #001114; }
.login .auth-step .btn.primary:hover { background: #5ff0ff; border-color: #5ff0ff; }
.login .auth-links a { font-size: 13px; }
.login .code-input { height: 56px !important; font-size: 24px !important; }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .login-mobile-logo { display: flex !important; padding-bottom: 28px !important; }
  .login-mobile-logo img { width: 130px !important; }
}

/* login: conceito "um lote → todas as contas" (linhas finas, sem vídeo) */
.login-side { justify-content: space-between; }
.login-shot { display: none; }
.concept { width: 100%; max-width: 620px; max-height: 52vh; align-self: center; overflow: visible; }
.c-grid line { stroke: #12171a; stroke-width: 1; }
.c-lines path { fill: none; stroke: #1f2629; stroke-width: 1.2; stroke-dasharray: 460; stroke-dashoffset: 460; animation: c-draw 6s cubic-bezier(.22,1,.36,1) infinite; animation-delay: var(--d); }
.c-nodes rect { fill: #0b0e10; stroke: #262c30; animation: c-node 6s ease infinite; animation-delay: var(--d); }
.c-nodes text { font: 500 11px "JetBrains Mono", Consolas, monospace; fill: #535b60; animation: c-text 6s ease infinite; animation-delay: var(--d); }
.c-src circle { fill: #060809; stroke: #eef1f2; stroke-width: 1.4; }
.c-src text { font: 600 13px Inter, sans-serif; fill: #eef1f2; }
.c-src .c-pulse { fill: none; stroke: #00e5ff; opacity: 0; transform-origin: 90px 300px; animation: c-pulse 6s ease-out infinite; }
@keyframes c-draw { 0% { stroke-dashoffset: 460; stroke: #1f2629; } 12% { stroke: #00e5ff; } 30% { stroke-dashoffset: 0; stroke: #00e5ff; } 75% { stroke-dashoffset: 0; stroke: #1f2629; } 100% { stroke-dashoffset: 0; stroke: #1f2629; opacity: 0; } }
@keyframes c-node { 0%, 22% { stroke: #262c30; } 30%, 72% { stroke: #00e5ff; } 100% { stroke: #262c30; } }
@keyframes c-text { 0%, 22% { fill: #535b60; } 30%, 72% { fill: #eef1f2; } 100% { fill: #535b60; } }
@keyframes c-pulse { 0% { opacity: .9; transform: scale(1); } 25% { opacity: 0; transform: scale(1.9); } 100% { opacity: 0; } }
.c-ticker { display: flex; gap: 22px; margin: 18px 0 0; font-family: "JetBrains Mono", Consolas, monospace; font-size: 13px; color: #8a9196; }
.c-ticker span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #00e5ff; margin-right: 8px; vertical-align: middle; }
@media (prefers-reduced-motion: reduce) { .c-lines path, .c-nodes rect, .c-nodes text, .c-pulse { animation: none; stroke-dashoffset: 0; } }
