/* ============ Tokens ============ */
:root {
  --tt-black: #010101;
  --tt-cyan: #25f4ee;
  --tt-red: #fe2c55;
  --tt-red-dark: #d81e45;
  --tt-cyan-dark: #0b8f8a;

  --bg: #f1f1f2;
  --surface: #ffffff;
  --border: #e1e1e3;
  --text: #121212;
  --muted: #616166;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --radius: 12px;
  --radius-btn: 14px; /* botões: um pouco mais arredondados */
  --radius-btn-sm: 12px;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.06);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--tt-red-dark); }
:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.muted { color: var(--muted); }

/* ============ Botões ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: 8px 14px; border-radius: var(--radius-btn); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
}
.btn:hover { background: #f6f6f7; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--primary { background: var(--tt-black); border-color: var(--tt-black); color: #fff; }
.btn--primary:hover { background: #262626; }
.btn--danger { background: var(--tt-red); border-color: var(--tt-red); color: #fff; }
.btn--danger:hover { background: var(--tt-red-dark); }
.btn--danger-ghost { color: var(--tt-red-dark); }
.btn--danger-ghost:hover { background: #fff1f4; border-color: #ffc2cf; }
.btn--sm { padding: 5px 12px; font-size: 13px; border-radius: var(--radius-btn-sm); }
.btn--block { width: 100%; padding: 11px 14px; }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 16px; padding: 6px 8px; border-radius: var(--radius-btn-sm); color: var(--muted); }
.icon-btn:hover { background: #f1f1f2; }

/* ============ Formulários ============ */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-weight: 500; font-size: 14px; }
.field__hint { font-size: 12px; color: var(--muted); }
.input {
  font: inherit; padding: 10px 12px; border-radius: 8px; border: 1px solid #c9cccf;
  background: #fff; color: var(--text); width: 100%;
}
.input:hover { border-color: #8a8a8f; }
.input:focus { outline: none; border-color: var(--tt-black); box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.55); }

.alert { padding: 10px 12px; border-radius: 10px; font-size: 13px; border: 1px solid; }
.alert--danger { background: #fff1f4; border-color: #ffc2cf; color: #9d1033; }
.alert--success { background: #e8fffe; border-color: #98f5f1; color: #075e5a; }

/* ============ Telas públicas ============ */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr); }
.auth__hero {
  background: radial-gradient(900px 500px at 0% 0%, rgba(37, 244, 238, 0.16), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(254, 44, 85, 0.2), transparent 60%), var(--tt-black);
  color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth__byline { font-size: 18px; font-weight: 600; letter-spacing: 0.02em; color: #fff; }
.auth__pitch h2 { font-size: 34px; line-height: 1.15; max-width: 440px; letter-spacing: -0.02em; }
.auth__pitch p { margin-top: 14px; color: #c9c9cc; max-width: 420px; font-size: 15px; }
.accent-cyan { color: var(--tt-cyan); }
.accent-red { color: var(--tt-red); }
.auth__foot { color: #8d8d92; font-size: 12px; }
.auth__panel { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.auth__card {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; box-shadow: var(--shadow);
}
.auth__title { font-size: 24px; letter-spacing: -0.01em; margin-bottom: 6px; }
.auth__code { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 28px; font-weight: 700; letter-spacing: 0.4em; text-align: center; padding: 12px; }
.auth__code-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.auth__switch { margin-top: 20px; text-align: center; color: var(--muted); }
.status { text-align: center; }
.status__icon { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; margin-bottom: 16px; }
.status__icon--pending { background: #e8fffe; color: var(--tt-cyan-dark); }
.status__icon--rejected, .status__icon--blocked { background: #fff1f4; color: var(--tt-red-dark); }
.status__who { margin-top: 14px; font-weight: 600; word-break: break-all; }
.status__actions { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ============ Shell do painel (estilo Shopify Admin) ============ */
[hidden] { display: none !important; }
:root { --shell-bg: #010101; --side-text: #e3e3e3; --side-muted: #9a9a9f; --side-hover: rgba(255, 255, 255, 0.07); --side-active: rgba(255, 255, 255, 0.12); }

.shell { height: 100vh; display: flex; background: var(--shell-bg); overflow: hidden; }
.sidebar {
  width: var(--sidebar-w); flex: none; display: flex; flex-direction: column; gap: 14px;
  padding: 12px 10px 10px; color: var(--side-text); transition: width 0.15s;
  /* Brilho ciano (TikTok) no pé da lateral; o restante permanece preto. */
  background:
    radial-gradient(130% 340px at 0% 100%, rgba(37, 244, 238, 0.6), transparent 72%),
    var(--shell-bg);
}
.sidebar__top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.sidebar__logo { display: inline-flex; text-decoration: none; }
.sidebar__logo-img { display: block; width: 32px; height: 32px; border-radius: 8px; }
.sidebar__toggle {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 0;
  background: transparent; color: var(--side-muted); cursor: pointer;
}
.sidebar__toggle:hover { background: var(--side-hover); color: #fff; }

.search {
  display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 36px; border-radius: 10px;
  background: #141414; color: var(--side-muted); cursor: text; border: 1px solid #262626;
}
.search:focus-within { border-color: var(--tt-cyan); color: #fff; }
.search__input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font: inherit; height: 100%;
}
.search__input::placeholder { color: var(--side-muted); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__kbd { font: inherit; font-size: 11px; color: var(--side-muted); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-empty { padding: 8px 10px; color: var(--side-muted); font-size: 13px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none;
  color: var(--side-text); font-weight: 500; position: relative;
}
.nav-item:hover { background: var(--side-hover); }
.nav-item.is-active { background: var(--side-active); color: #fff; font-weight: 600; }
.nav-item.is-active svg { color: var(--tt-cyan); }
.nav-item.is-active::after {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tt-red);
  box-shadow: -2px 0 0 var(--tt-cyan); margin-left: auto;
}

/* Grupos do menu: só o título; as opções aparecem logo abaixo ao passar o mouse (painel fixo, não empurra o resto do menu). */
.nav-group { position: relative; }
.nav-group__header {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--side-text); font: inherit; font-weight: 500; text-align: left; cursor: pointer; transition: background 0.12s;
}
.nav-group__header:hover, .nav-group.is-open > .nav-group__header { background: var(--side-hover); color: #fff; }
.nav-group__header:focus-visible { outline: 2px solid var(--tt-cyan); outline-offset: -2px; }
.nav-group.has-active > .nav-group__header { color: #fff; font-weight: 600; }
.nav-group.has-active > .nav-group__header > svg { color: var(--tt-cyan); }
.nav-group__header .nav-item__label { flex: 1; min-width: 0; }
.nav-group__dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--tt-red); box-shadow: -2px 0 0 var(--tt-cyan); }
.nav-group__chevron { display: inline-flex; flex: none; color: var(--side-muted); transition: transform 0.15s; }
.nav-group.is-open > .nav-group__header .nav-group__chevron { transform: rotate(90deg); color: #fff; }
.nav-group__panel {
  position: fixed; z-index: 48; min-width: 190px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: #161616; border: 1px solid #2c2c2c; border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  contain: layout style; transform-origin: top left; will-change: opacity, transform;
  visibility: hidden; opacity: 0; transform: translate3d(0, -6px, 0) scale(0.97); pointer-events: none;
  /* saída rápida: o painel some sem "arrastar" */
  transition: opacity 0.11s ease-in, transform 0.11s ease-in, visibility 0s linear 0.11s;
}
.nav-group.is-open > .nav-group__panel {
  visibility: visible; opacity: 1; transform: none; pointer-events: auto;
  /* entrada suave: abre com desaceleração (começa rápido e pousa devagar) */
  transition: opacity 0.16s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}
/* Busca do menu em uso: as opções que combinam aparecem direto, em lista (sem painel). */
.nav--searching .nav-group__header { display: none; }
.nav--searching .nav-group__panel { position: static; contain: none; will-change: auto; visibility: visible; opacity: 1; transform: none; pointer-events: auto; padding: 0; min-width: 0; width: auto !important; background: none; border: 0; box-shadow: none; }
/* Menu recolhido: só o ícone do grupo; as opções abrem ao lado. */
.shell.is-collapsed .nav-group__header { justify-content: center; }
.shell.is-collapsed .nav-group__header .nav-item__label, .shell.is-collapsed .nav-group__chevron, .shell.is-collapsed .nav-group__dot { display: none; }
.shell.is-collapsed .nav-group.has-active > .nav-group__header { background: var(--side-active); }
.shell.is-collapsed .nav-group__panel { min-width: 210px; }
.shell.is-collapsed .nav-group__panel .nav-item { justify-content: flex-start; }
.shell.is-collapsed .nav-group__panel .nav-item__label { display: inline; }
.shell.is-collapsed .nav-group__panel .nav-item.is-active::after { display: block; }
@media (prefers-reduced-motion: reduce) {
  .nav-group__panel, .nav-group__chevron, .nav-group__header { transition: none !important; }
  .nav-group__panel { transform: none; }
}

.sidebar__bottom { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.account { display: flex; align-items: center; gap: 10px; padding: 4px 6px; min-width: 0; }
.account__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.account__name { font-weight: 600; font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__sub { font-size: 11px; color: #c4c4c9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px;
  background: var(--tt-cyan); color: var(--tt-black); box-shadow: 2px 2px 0 var(--tt-red); overflow: hidden; user-select: none;
}
.avatar__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--md { width: 38px; height: 38px; font-size: 14px; }
.avatar--lg { width: 112px; height: 112px; font-size: 38px; box-shadow: 4px 4px 0 var(--tt-red); }
.account__avatar { display: inline-flex; flex: none; }
.account--button { width: 100%; background: transparent; border: 0; border-radius: 10px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.account--button:hover { background: var(--side-hover); }
.account--button:focus-visible { outline: 2px solid var(--tt-cyan); outline-offset: 2px; }
.logout {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: transparent;
  border: 0; color: #f0f0f2; font: inherit; cursor: pointer; text-align: left;
}
.logout:hover { background: var(--side-hover); color: #fff; }

.shell.is-collapsed .sidebar { width: 64px; }
.shell.is-collapsed .sidebar__top { flex-direction: column; gap: 8px; }
.shell.is-collapsed .search,
.shell.is-collapsed .nav-item__label,
.shell.is-collapsed .account__text,
.shell.is-collapsed .logout__label,
.shell.is-collapsed .nav-item.is-active::after { display: none; }
.shell.is-collapsed .nav-item, .shell.is-collapsed .logout, .shell.is-collapsed .account { justify-content: center; }

.workspace { flex: 1; min-width: 0; padding: 8px 8px 8px 0; display: flex; }
.frame {
  flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); border-radius: 14px; overflow: hidden;
  border: 1px solid #1c1c1c;
}
.appbar {
  flex: none; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 20px; background: #fff;
  border-bottom: 1px solid var(--border); position: relative;
}
.appbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--tt-cyan), var(--tt-red)); opacity: 0.9;
}
.appbar__title { font-weight: 600; font-size: 14px; }
.appbar .bell { margin-left: auto; }

/* ============ Sino de notificações ============ */
.bell { position: relative; }
.bell__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; }
.bell__btn:hover, .bell__btn[aria-expanded='true'] { background: #f1f1f2; }
.bell__btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.55); }
.bell__badge { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--tt-red); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.bell__panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 520px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16); overflow: hidden; }
.bell__panel[hidden] { display: none; }
.bell__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.bell__markall { border: 0; background: transparent; padding: 4px 6px; border-radius: 8px; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.bell__markall:hover { background: #f1f1f2; color: var(--text); }
.bell__markall[hidden] { display: none; }
.bell__list { overflow-y: auto; }
.bell__empty { margin: 0; padding: 22px 14px; text-align: center; font-size: 13px; }
.bell__item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid #f0f0f1; background: #fff; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.bell__item:last-child { border-bottom: 0; }
.bell__item:hover { background: #fafafa; }
.bell__item:focus-visible { outline: none; box-shadow: inset 0 0 0 3px rgba(37, 244, 238, 0.55); }
.bell__item.is-unread { background: #f4fbfb; }
.bell__item.is-unread:hover { background: #ecf8f8; }
.bell__dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #c4c4c8; }
.bell__dot--success { background: #1fb5ad; }
.bell__dot--warning { background: #e6a100; }
.bell__dot--danger { background: var(--tt-red); }
.bell__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bell__title { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.bell__body { font-size: 13px; color: #3f3f46; white-space: pre-line; overflow-wrap: anywhere; }
.bell__meta { font-size: 12px; }

/* Administração → Notificações */
.notif-form { margin-bottom: 24px; }
.form-grid__wide { grid-column: 1 / -1; }
.notif-preview { margin-top: 16px; }
.notif-preview__label { margin: 0 0 6px; font-size: 12px; }
.notif-preview__item { width: auto; max-width: 420px; border: 1px solid var(--border); border-radius: 12px; cursor: default; }
.notif-form__actions { display: flex; justify-content: flex-start; margin-top: 14px; } /* à esquerda: o botão flutuante "Publicar campanha" fica à direita e não cobre o envio */
.notif-sent { margin-top: 8px; }

/* Assinaturas */
.billing-section { margin-top: 24px; }
.billing-debt { color: var(--tt-red-dark); font-weight: 700; }
.billing-preview { margin: 0; padding: 8px 12px; border-radius: 10px; background: #f4f4f5; font-size: 13px; }
.billing-fx { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #f4f4f5; font-size: 13px; }
.billing-fx--error { background: #fff3cf; color: #7a5200; }
.billing-rates { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.billing-rate-form__row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.billing-rate-form__row .field { flex: 0 1 200px; }
.billing-statement { display: flex; flex-direction: column; gap: 10px; }
.notif-body { max-width: 360px; white-space: pre-line; overflow-wrap: anywhere; }
.admin__audit { margin-top: 28px; }
.impersonation-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 20px; background: #fff3cd; border-bottom: 1px solid #ffe08a; color: #5c4200; font-size: 13px; }
.impersonation-bar__exit { background: #5c4200; border-color: #5c4200; color: #fff; white-space: nowrap; }
.impersonation-bar__exit:hover:not(:disabled) { background: #3f2d00; }

.main { flex: 1; min-width: 0; overflow-y: auto; padding: 24px; }
.page { max-width: 1100px; margin: 0 auto; }
.main > div { max-width: 1100px; margin: 0 auto; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 22px; letter-spacing: -0.01em; }
.page-header__actions { display: flex; gap: 8px; }

/* ============ Cards e métricas ============ */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 20px; }
.card--pad { padding: 20px; }
.card--pad > * + * { margin-top: 10px; }
.card__title { font-size: 15px; }
.grid { display: grid; gap: 16px; margin-bottom: 20px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { padding: 16px 18px; margin: 0; display: flex; flex-direction: column; gap: 6px; } /* cartões neutros: sem faixas coloridas */
.metric__label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.metric__value { font-size: 26px; letter-spacing: -0.02em; }

/* ============ Tabelas ============ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 16px; background: #fafafa; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid #eeeeef; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafafa; }
.cell-strong { font-weight: 600; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.chip { margin-left: 8px; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--tt-black); color: var(--tt-cyan); font-weight: 600; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge--neutral { background: #ececee; color: #3a3a3d; }
.badge--success { background: #d9fffd; color: #075e5a; }
.badge--warning { background: #fff3cf; color: #7a5200; }
.badge--danger { background: #ffe0e7; color: #9d1033; }
.badge--agency { background: #ece7ff; color: #4a2fb3; }

/* ============ Abas ============ */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  font: inherit; font-weight: 600; cursor: pointer; padding: 7px 12px; border-radius: var(--radius-btn); border: 1px solid transparent;
  background: transparent; color: var(--muted); display: inline-flex; gap: 8px; align-items: center;
}
.tab:hover { background: #e6e6e8; }
.tab.is-active { background: #fff; color: var(--text); border-color: var(--border); box-shadow: var(--shadow); }
.tab__count { background: #e1e1e3; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.tab__count--alert { background: var(--tt-red); color: #fff; }

/* ============ Modal, toast, vazio, loading ============ */
.overlay { position: fixed; inset: 0; background: rgba(1, 1, 1, 0.55); display: grid; place-items: center; padding: 20px; z-index: 50; }
/* Altura máxima = a da tela: o conteúdo rola DENTRO do pop-up (cabeçalho fixo), nunca vaza para fora da janela. */
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); overflow: hidden; }
.modal > .modal__header { flex: none; }
.modal > :not(.modal__header) { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.modal__header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--border); }
.modal__title { font-size: 16px; }
.modal__body { padding: 20px; margin: 0; }
.modal__footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toasts { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; }
.toast { background: var(--tt-black); color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); border-left: 4px solid var(--tt-cyan); max-width: 340px; }
.toast--danger { border-left-color: var(--tt-red); }
.empty { text-align: center; padding: 48px 20px; }
.empty__title { font-size: 16px; margin-bottom: 6px; }
.empty__text { color: var(--muted); margin-bottom: 16px; max-width: 420px; margin-left: auto; margin-right: auto; }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 40px 0; justify-content: center; }
.loading__text { font-size: 13px; }
/* Carregamento no estilo do TikTok: bolinha ciano e bolinha vermelha trocam de lado, se cruzando (escurecem onde se sobrepõem). */
.ttl { --dot: 14px; --run: 24px; position: relative; display: inline-block; flex: none; width: calc(var(--dot) + var(--run)); height: var(--dot); vertical-align: middle; }
.ttl--sm { --dot: 9px; --run: 15px; }
.ttl__dot { position: absolute; top: 0; width: var(--dot); height: var(--dot); border-radius: 50%; will-change: transform; }
.ttl__dot--cyan { left: 0; background: var(--tt-cyan); animation: ttl-cyan 0.9s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.ttl__dot--red { left: 0; background: var(--tt-red); mix-blend-mode: multiply; animation: ttl-red 0.9s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes ttl-cyan { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(var(--run)); } }
@keyframes ttl-red { 0%, 100% { transform: translateX(var(--run)); } 50% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .ttl__dot { animation: none; } .ttl__dot--red { transform: translateX(var(--run)); } }

/* ============ Integrações ============ */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.toolbar .field { min-width: 200px; }
.grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric--sm .metric__value { font-size: 20px; }
.steps { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f1f1f2; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; word-break: break-all; }
.conn { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding-top: 8px; }
.bars__col { flex: 1; min-width: 4px; background: linear-gradient(180deg, var(--tt-cyan), #0b8f8a); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars__col--empty { background: #e1e1e3; }
.bars__legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

.section-title { margin: 4px 0 10px; }
.section-note { margin-bottom: 8px; }
.section-note--lg { margin-bottom: 16px; }
.cell-note { font-weight: 400; font-size: 12px; margin-top: 2px; max-width: 320px; }

/* ============ Assistente de campanhas ============ */
.alert--info { background: #eef6ff; border-color: #bcd9ff; color: #0b3b78; }
.alert--warning { background: #fff8e1; border-color: #ffe08a; color: #6b4a00; }
.wizard { display: flex; flex-direction: column; gap: 16px; }
/* Etapas: círculos ligados por uma linha que se preenche conforme o avanço */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; }
.stepper__item { position: relative; flex: 1 1 0; min-width: 0; }
.stepper__item:not(:last-child)::after {
  content: ''; position: absolute; top: 15px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 3px; border-radius: 2px; background: #e1e1e3; transition: background 0.3s;
}
.stepper__item.is-done:not(:last-child)::after { background: var(--tt-cyan); }
.stepper__btn {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 4px; border: 0; background: transparent;
  font: inherit; color: var(--muted); cursor: pointer;
}
.stepper__btn:disabled { cursor: default; }
.stepper__btn:not(:disabled):hover .stepper__num { transform: scale(1.08); }
.stepper__num {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: #e1e1e3; color: #5a5a60; transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.stepper__label { font-weight: 600; font-size: 12px; text-align: center; line-height: 1.25; }
.stepper__item.is-current .stepper__label { color: var(--text); }
.stepper__item.is-current .stepper__num { background: var(--tt-black); color: #fff; box-shadow: 0 0 0 4px rgba(37, 244, 238, 0.4); }
.stepper__item.is-done .stepper__num { background: var(--tt-cyan); color: var(--tt-black); }
.stepper__item.is-done:not(.is-current) .stepper__label { color: var(--text); }
.wizard-card { margin: 0; }
.wizard-card__step { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tt-cyan-dark); }
.wizard-card__title { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.wizard-card__subtitle { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.wizard-form { display: flex; flex-direction: column; gap: 18px; margin-top: 16px; }
.form-section { border-top: 1px solid var(--border); padding-top: 16px; }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section__title { font-size: 14px; margin-bottom: 4px; }
.form-section__help { margin: 0 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--muted); max-width: 640px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field--wide { grid-column: 1 / -1; }
.req { color: var(--tt-red-dark); }
.field__error { color: #9d1033; font-size: 12px; font-weight: 500; }
.input--error { border-color: var(--tt-red); }
.input--filter { padding-top: 6px; padding-bottom: 6px; font-size: 13px; } /* filtros e seletores das barras de ferramentas: mais baixos, no tamanho dos botões pequenos */
.input--area { resize: vertical; min-height: 76px; }
.money { display: flex; align-items: stretch; }
.money__prefix { display: grid; place-items: center; padding: 0 12px; border: 1px solid #c9cccf; border-right: 0; border-radius: 8px 0 0 8px; background: #f6f6f7; color: var(--muted); }
.money .input { border-radius: 0 8px 8px 0; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #c9cccf; border-radius: 10px; cursor: pointer; background: #fff; }
.choice:hover { border-color: #8a8a8f; }
.choice.is-selected { border-color: var(--tt-black); box-shadow: 0 0 0 1px var(--tt-black); }
.choice:focus-within, .objective-card:focus-within { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input, .choice input, .objective-card input { accent-color: var(--tt-black); }
.objective-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.objective-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 36px 14px 14px; border: 1.5px solid var(--border); border-radius: 14px;
  cursor: pointer; background: #fff; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.objective-card input { position: absolute; opacity: 0; pointer-events: none; } /* continua focável e navegável pelas setas */
.objective-card:hover { transform: translateY(-2px); border-color: #8a8a8f; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08); }
.objective-card.is-selected { border-color: var(--tt-black); background: #f2fffe; box-shadow: 0 0 0 1px var(--tt-black), 3px 3px 0 var(--tt-cyan); }
.objective-card__check {
  position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; line-height: 1;
  border: 1.5px solid #c9cccf; background: #fff; color: transparent; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.objective-card.is-selected .objective-card__check { background: var(--tt-black); border-color: var(--tt-black); color: #fff; animation: objective-pop 0.28s ease-out; }
@keyframes objective-pop { 0% { transform: scale(0.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.objective-card__title { font-weight: 700; font-size: 14px; line-height: 1.25; }
.objective-card__text { color: var(--muted); font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .objective-card, .stepper__num, .stepper__item::after { transition: none; }
  .objective-card:hover { transform: none; }
  .objective-card.is-selected .objective-card__check { animation: none; }
}
@media (max-width: 720px) { .objective-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wizard-footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 5;
  padding: 12px 0; background: var(--bg); border-top: 1px solid var(--border);
}
.wizard-footer__side { display: flex; gap: 8px; flex-wrap: wrap; }
.review { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.review-card { margin: 0; }
.review-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.review-row { display: flex; flex-direction: column; min-width: 0; }
.review-row dt { font-size: 12px; color: var(--muted); }
.review-row dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.review-errors { margin: 6px 0 0; padding-left: 18px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--tt-red-dark); font: inherit; text-decoration: underline; cursor: pointer; }

/* ============ Biblioteca de criativos ============ */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.modal--wide { max-width: 860px; }
.modal--md { max-width: 600px; }
.toolbar--row { align-items: center; justify-content: space-between; }
.toolbar__search { max-width: 280px; padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
.meter { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.meter .progress { flex: 1; max-width: 260px; }
.progress { height: 6px; border-radius: 999px; background: #e1e1e3; overflow: hidden; }
.progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--tt-cyan), var(--tt-red)); border-radius: 999px; transition: width 0.15s; }
.progress--warn .progress__bar { background: var(--tt-red); }
.creative-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.creative-grid--picker { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.creative-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.creative-card__preview { display: block; padding: 0; border: 0; background: transparent; cursor: pointer; width: 100%; }
.creative-card__body { padding: 10px 12px 12px; min-width: 0; }
.creative-card__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creative-card__meta { font-size: 12px; }
.creative-card__tags { margin-top: 6px; }
.icon-btn--danger:hover { background: #fff1f4; color: var(--tt-red-dark); }
.thumb { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #1a1a1a; overflow: hidden; display: block; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; background: #1a1a1a; }
.thumb__badge { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; }
.thumb__placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; color: #c9c9cc; font-size: 12px; }
.thumb--missing { display: grid; place-items: center; color: #fff; font-weight: 700; }
.preview { display: grid; place-items: center; background: #000; border-radius: 12px; overflow: hidden; }
.preview .thumb { aspect-ratio: auto; max-height: 60vh; width: auto; max-width: 100%; }
.preview .thumb img, .preview .thumb video { max-height: 60vh; width: auto; max-width: 100%; height: auto; object-fit: contain; }
.preview__meta { margin-top: 10px; }
.load-more { text-align: center; margin-top: 16px; }
.uploads { margin-bottom: 14px; }
.uploads__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.uploads__item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.uploads__item.is-error { border-color: #ffc2cf; background: #fff7f9; }
.uploads__item.is-done { border-color: #98f5f1; }
.uploads__row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.uploads__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.uploads__status { margin-left: auto; font-size: 13px; }
.uploads__item.is-error .uploads__status { color: #9d1033; }
.picker { display: flex; flex-direction: column; gap: 12px; max-height: 76vh; }
.picker__toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.picker__toolbar .input { max-width: 300px; }
.picker__grid-wrap { overflow-y: auto; min-height: 160px; padding: 2px; }
.picker__footer { align-items: center; }
.picker__footer > .muted { margin-right: auto; }
.picker-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 0 8px; text-align: left; font: inherit; cursor: pointer; background: #fff; border: 2px solid var(--border); border-radius: 12px; overflow: hidden; }
.picker-card:hover { border-color: #8a8a8f; }
.picker-card.is-selected { border-color: var(--tt-black); box-shadow: 0 0 0 1px var(--tt-black), 3px 3px 0 var(--tt-cyan); }
.picker-card__name { padding: 0 10px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-card__meta { padding: 0 10px; font-size: 12px; }
.picker-card__check { position: absolute; top: 8px; left: 8px; min-width: 24px; height: 24px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--tt-black); color: #fff; font-weight: 700; font-size: 12px; box-shadow: 2px 2px 0 var(--tt-cyan); }
.creative-field { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.creative-field__list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.creative-field__item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.creative-field__item .thumb { width: 56px; flex: none; border-radius: 8px; }
.creative-field__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.creative-field__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creative-field__actions { display: flex; gap: 4px; }

/* ============ Responsivo ============ */
@media (max-width: 900px) {
  .grid--4, .grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .review-list { grid-template-columns: 1fr; }
  .stepper__label { display: none; }
  .stepper__item { min-width: 0; flex: 1; }
  .stepper__item.is-current .stepper__label { display: inline; }
  .auth { grid-template-columns: 1fr; }
  .auth__hero { padding: 24px; gap: 24px; }
  .auth__pitch h2 { font-size: 24px; }
  .shell { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  .sidebar, .shell.is-collapsed .sidebar { width: 100%; flex-direction: row; align-items: center; gap: 8px; padding: 8px 10px; overflow-x: auto; }
  .sidebar__top, .shell.is-collapsed .sidebar__top { flex-direction: row; padding: 0; }
  .sidebar__toggle, .search { display: none; }
  .nav { flex-direction: row; flex: 1; overflow: visible; }
  .nav-empty { display: none; }
  .nav-item { white-space: nowrap; }
  .nav-item.is-active::after { display: none; }
  .nav-group { display: contents; }
  .nav-group__header { display: none; }
  .nav-group__panel { display: contents; visibility: visible; pointer-events: auto; contain: none; will-change: auto; } /* a visibilidade é herdada pelas opções: precisa ficar visível */
  .sidebar__bottom { flex-direction: row; border: 0; padding: 0; }
  .account__text { display: none; }
  .shell.is-collapsed .nav-item__label, .shell.is-collapsed .logout__label { display: inline; }
  .workspace { padding: 0; }
  .frame { border-radius: 0; border: 0; }
  .main { overflow: visible; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============ Conexão por link (Business Center) ============ */
.connect__steps { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 8px; }
.connect__row { display: flex; gap: 8px; align-items: stretch; }
.connect__link { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.connect__open { margin-top: 8px; }
.connect__status { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; }
.connect__warn { margin-top: 4px; }
.connect__alt { margin-top: 14px; text-align: center; font-size: 13px; }
.connect__done p { margin-top: 4px; }

/* ============ Contas de anúncio (sub-aba) ============ */
a.tab { text-decoration: none; }
.cell-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.toolbar > select.input { width: auto; min-width: 240px; }

/* ============ Botão flutuante "Publicar campanha" ============ */
.main { padding-bottom: 96px; } /* espaço para o botão flutuante não cobrir o fim da página */
.fab {
  position: fixed; right: 28px; bottom: 28px; z-index: 40; display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px;
  color: #fff; background: var(--tt-black); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.15s, box-shadow 0.15s;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 4px 4px 0 var(--tt-cyan); }
.fab:active { transform: translateY(0); }
.fab:focus-visible { outline: 3px solid var(--tt-cyan); outline-offset: 3px; }
@media (max-width: 720px) {
  .fab { right: 16px; bottom: 16px; padding: 13px 20px; font-size: 14px; }
}

/* ============ Assistente de campanha em pop-up ============ */
body.modal-open { overflow: hidden; }
.modal--wizard { max-width: 1040px; height: min(92vh, 880px); display: flex; flex-direction: column; }
.modal--wizard .modal__header { flex: none; }
.wizard-modal { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.wizard-modal__stepper { flex: none; padding: 12px 24px 10px; background: var(--surface); border-bottom: 1px solid var(--border); }
.wizard-modal__banner { flex: none; }
.wizard-modal__banner:not(:empty) { padding: 12px 20px 0; }
.wizard-modal__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 24px; }
.wizard-modal__footer {
  flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--border);
}
.wizard-modal .wizard-card { max-width: 860px; margin: 0 auto; }
@media (max-width: 720px) {
  .modal--wizard { height: 100%; max-height: calc(100vh - 24px); }
  .wizard-modal__scroll { padding: 16px; }
  .wizard-modal .stepper__label { display: none !important; } /* só os números: o título da etapa já aparece no conteúdo */
  .wizard-modal__stepper { padding: 12px 16px; }
  .stepper__item:not(:last-child)::after { top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ============ Painel "Publicar em" (escolha das contas) ============ */
.targets { margin: 0; }
.targets__search-row { margin: 12px 0; }
.targets__search { max-width: 380px; }
.targets__list { display: flex; flex-direction: column; gap: 14px; padding: 2px; }
.targets__group { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.targets__group-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; background: #fafafa; border-bottom: 1px solid var(--border); }
.targets__group-title { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.targets__count { margin-left: auto; font-size: 12px; }
.targets__accounts { list-style: none; margin: 0; padding: 0; }
.targets__account { padding: 10px 14px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.targets__account:last-child { border-bottom: 0; }
.targets__account.is-selected { background: #f2fffe; box-shadow: inset 3px 0 0 var(--tt-cyan); }
.targets__account.is-disabled .targets__label { opacity: 0.65; cursor: not-allowed; }
.targets__label { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; flex-wrap: wrap; }
.targets__label input, .targets__group-title input { accent-color: var(--tt-black); width: 16px; height: 16px; }
.targets__name { font-weight: 600; }
.targets__currency { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #eef0f2; color: var(--muted); }
.targets__status { justify-self: end; }
.targets__error, .targets__ids, .targets__adjust-wrap { grid-column: 1 / -1; margin: 0; }
.targets__error { color: #9d1033; font-size: 12px; }
.targets__ids { font-size: 12px; }
.targets__state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.targets__state--done { color: var(--tt-cyan-dark); }
.targets__state--failed { color: #9d1033; }
.targets__adjust { margin-top: 10px; padding: 14px; border: 1px dashed #c9cccf; border-radius: 10px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.targets__summary { margin: 14px 0 6px; font-weight: 600; }
.targets__empty { padding: 14px; margin: 0; }
.targets__note { margin: 10px 0 0; padding: 10px 12px; font-size: 13px; color: var(--muted); background: #f6f6f7; border-left: 3px solid var(--tt-cyan); border-radius: 8px; }

/* ============ Proxy (Contas TikTok) ============ */
.proxy-test { font-weight: 600; font-size: 13px; }
.proxy-test--ok { color: var(--tt-cyan-dark); }
.proxy-test--fail { color: #9d1033; }

/* ============ Contas TikTok: layout central, abas segmentadas e cartões ============ */
.hub { max-width: 1100px; margin: 0 auto; }
.hub__header { text-align: center; padding: 6px 0 2px; }
.hub__title { font-size: 28px; letter-spacing: -0.02em; }
.hub__subtitle { margin: 8px auto 0; max-width: 640px; color: var(--muted); line-height: 1.5; }
.tabs--hub { display: flex; width: fit-content; max-width: 100%; margin: 0; padding: 3px; gap: 2px; background: #e4e4e7; border-radius: 12px; flex-wrap: nowrap; }
.tabs--hub .tab { padding: 5px 16px; font-size: 14px; border-radius: 10px; white-space: nowrap; }
.tabs--hub .tab:hover { background: rgba(255, 255, 255, 0.55); }
.tabs--hub .tab.is-active { background: #fff; border-color: transparent; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
/* barra única: abas à esquerda; resumo + botão principal à direita */
.hub__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 22px 0 18px; }
.hub__toolbar--solo { justify-content: center; }
.hub__side { display: flex; align-items: center; justify-content: flex-end; gap: 12px 16px; flex-wrap: wrap; }
.hub__summary { margin: 0; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--muted); background: #fff; border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; }
.hub__filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.hub__filters .toolbar__search { flex: 1 1 260px; max-width: 360px; }
.hub__filters select.input { width: auto; flex: 0 1 220px; max-width: 100%; }
.hub__filters select.input--filter { flex-basis: 170px; }
.hub__actions { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.hub__note { text-align: center; margin: 4px auto 20px; max-width: 720px; font-size: 13px; color: var(--muted); }

/* cartões de largura igual, em fila centralizada: com 1, 2 ou um cartão sobrando na última linha, tudo fica no meio */
.hub-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 20px; margin-bottom: 22px; }
.hub-grid > .hub-card { flex: 1 1 290px; max-width: 350px; } /* 3 lado a lado em telas de notebook; sobra de cartões fica centralizada */
.hub-card {
  --accent: transparent;
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px 20px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}
.hub-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.hub-card:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); transform: translateY(-1px); }
.hub-card--ok { --accent: var(--tt-cyan); }
.hub-card--error { --accent: var(--tt-red); }
.hub-card--active { --accent: linear-gradient(90deg, var(--tt-cyan), var(--tt-red)); }
.hub-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hub-card__title { font-size: 17px; line-height: 1.3; word-break: break-word; }
.hub-card__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-card__note { margin: 0; padding: 8px 10px; border-radius: 8px; font-size: 12px; line-height: 1.4; }
.hub-card__note--error { background: #fff1f4; color: #9d1033; }
.hub-card__note--muted { background: #f4f4f5; color: var(--muted); }
.hub-card__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 0; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hub-stat { min-width: 0; }
.hub-stat dt { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.hub-stat dd { margin: 4px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.hub-stat--big dd { font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.hub-stat:only-child, .hub-stat--wide { grid-column: 1 / -1; }
.code--line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-test { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hub-test__label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.hub-test__date { font-size: 12px; overflow-wrap: anywhere; }
.hub-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
.hub-card__actions .btn { width: 100%; }
.hub-card__actions > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* botão sobrando ocupa a linha toda: sempre alinhado */
.hub-card__footnote { margin: auto 0 0; padding-top: 4px; text-align: center; font-size: 13px; color: var(--muted); }

/* faixa de situação da proxy */
.hub-banner { margin: 0 auto 22px; max-width: 760px; padding: 18px 22px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.hub-banner--on { border-color: #98f5f1; background: linear-gradient(180deg, #f2fffe, #fff); }
.hub-banner__title { display: block; font-size: 16px; }
.hub-banner__line { margin: 6px 0 0; font-weight: 600; }
.hub-banner__text { margin: 6px auto 0; max-width: 620px; font-size: 13px; line-height: 1.5; color: var(--muted); }

@media (max-width: 720px) {
  .hub__title { font-size: 24px; }
  .tabs--hub { width: 100%; }
  .tabs--hub .tab { flex: 1; padding: 9px 6px; font-size: 13px; text-align: center; justify-content: center; }
  .hub__toolbar { flex-direction: column; align-items: stretch; }
  .hub__side { justify-content: space-between; }
  .hub__side > .btn { flex: 1 1 100%; }
  .hub__summary { white-space: normal; flex: 1 1 100%; text-align: center; }
  .hub__filters { flex-direction: column; align-items: stretch; }
  .hub__filters .toolbar__search, .hub__filters select.input { max-width: none; width: 100%; flex: none; }
  .hub-grid > .hub-card { flex-basis: 100%; max-width: none; }
}
.acc-name { min-width: 0; text-align: left; }
.acc-name .cell-strong { display: block; overflow-wrap: anywhere; }
.acc-id { display: block; margin-top: 2px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.hub-meta { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

/* tabela que vira lista de cartões no celular (cada linha mostra "COLUNA  valor") */
@media (max-width: 720px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .table--stack tr:last-child { border-bottom: 0; }
  .table--stack td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 5px 0; border: 0; text-align: right; }
  .table--stack td::before { content: attr(data-label); flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); text-align: left; }
  .table--stack td:first-child { font-size: 15px; padding-bottom: 8px; }
}


/* ============ Etiquetas e filtros das contas de anúncio ============ */
.acc-select { width: 16px; text-align: center; }
.acc-kind { width: auto; min-width: 130px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.acc-bulk { display: flex; align-items: center; justify-content: center; gap: 10px 14px; flex-wrap: wrap; margin: -8px 0 18px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.acc-bulk[hidden] { display: none; }
.acc-bulk__count { font-weight: 600; }
.targets__filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.targets__filters select.input { width: auto; min-width: 170px; max-width: 100%; }
.targets__filters .link-btn { margin-left: auto; }
.targets__outside { margin: 4px 0 0; }
@media (max-width: 720px) {
  .acc-kind { min-width: 0; }
  .targets__filters select.input { flex: 1 1 100%; }
  .targets__filters .link-btn { margin-left: 0; }
}

/* ============ Colaboradores ============ */
.team__areas { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.team__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ============ Cartão da conexão: Business Centers do TikTok (ID + quantas contas) e legenda dos botões ============ */
.hub-legend { max-width: 760px; margin: 4px auto 22px; padding: 14px 18px; border: 1px dashed var(--border); border-radius: 12px; background: #fff; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 24px; font-size: 13px; }
.hub-legend div { display: flex; gap: 6px; }
.hub-legend dt { font-weight: 700; white-space: nowrap; }
.hub-legend dt::after { content: ':'; }
.hub-legend dd { margin: 0; color: var(--muted); }

/* ============ Minha conta (foto e nome) e editor de foto ============ */
.profile { display: flex; flex-direction: column; gap: 16px; }
.profile .subtabs { margin: 0; }
.profile__hero { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(135deg, #f7fffe, #fff 55%); }
.profile__hero .avatar { width: 64px; height: 64px; font-size: 22px; flex: none; box-shadow: 3px 3px 0 var(--tt-red); }
.profile__who { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.profile__name-text { font-size: 17px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.profile__email { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.profile__role { margin-top: 4px; }
.profile__panel { min-height: 120px; }
.profile__section { display: flex; flex-direction: column; gap: 18px; }
.profile__label { display: block; font-size: 13px; }
.profile__block { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.profile__photo { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile__photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; flex: 1 1 200px; }
.profile__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.profile__name { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.profile__name .field { flex: 1 1 220px; margin: 0; }
.profile__subtitle { margin: 0; font-size: 16px; }

/* ---------- Meu nível (barra de gasto em anúncios): a cor muda a cada um dos 13 níveis via --lvl ---------- */
.lvl { display: flex; flex-direction: column; gap: 14px; }
.lvl__title { margin: 6px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.lvl__note { margin: 0; }
.lvl-card { --lvl: #94a3b8; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--lvl) 35%, #fff); background: color-mix(in srgb, var(--lvl) 9%, #fff); }
.lvl-card__up { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--lvl); color: #111; font-weight: 700; text-align: center; animation: lvl-pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.lvl-card__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lvl-card__badge { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 4px solid var(--lvl); background: #fff; font-size: 20px; font-weight: 800; color: var(--text); }
.lvl-card__title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 140px; }
.lvl-card__kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lvl-card__name { font-size: 20px; letter-spacing: -0.01em; }
.lvl-card__spent { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; color: var(--muted); text-align: right; }
.lvl-card__spent strong { font-size: 16px; color: var(--text); }
.lvl-card__barwrap { display: flex; flex-direction: column; gap: 6px; }
.lvl-bar { height: 16px; border-radius: 999px; background: color-mix(in srgb, var(--lvl) 20%, #fff); overflow: hidden; }
.lvl-bar__fill { display: block; height: 100%; width: 0; min-width: 16px; border-radius: 999px; background: var(--lvl); transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.lvl-card__scale { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); }
.lvl-card__percent { font-weight: 800; font-size: 12px; color: var(--text); }
.lvl-card__goal { margin: 0; font-size: 14px; }
.lvl-card__message { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid color-mix(in srgb, var(--lvl) 30%, #fff); font-size: 13px; line-height: 1.5; }
.lvl-ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.lvl-step { --lvl: #94a3b8; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: #fafafa; color: var(--muted); }
.lvl-step__n { grid-row: 1 / 3; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 800; background: #ececee; color: var(--muted); }
.lvl-step { min-width: 0; }
.lvl-step__name { font-size: 12px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.lvl-step__range { font-size: 10px; line-height: 1.2; opacity: 0.85; }
.lvl-step--done { background: color-mix(in srgb, var(--lvl) 12%, #fff); border-color: color-mix(in srgb, var(--lvl) 40%, #fff); color: var(--text); }
.lvl-step--done .lvl-step__n { background: var(--lvl); color: #111; }
.lvl-step--current { background: #fff; border: 2px solid var(--lvl); color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lvl) 25%, transparent); }
.lvl-step--current .lvl-step__n { background: var(--lvl); color: #111; }
@keyframes lvl-pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .lvl-bar__fill { transition: none; } .lvl-card__up { animation: none; } }
.photo-editor { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.photo-editor__canvas { width: 288px; max-width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; background: #fff; cursor: grab; touch-action: none; outline-offset: 3px; }
.photo-editor__canvas.is-dragging { cursor: grabbing; }
.photo-editor__zoom-row { display: flex; align-items: center; gap: 10px; width: 288px; max-width: 100%; }
.photo-editor__zoom { flex: 1; min-width: 0; accent-color: var(--tt-black); }
.photo-editor__tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.team__person { display: flex; align-items: center; gap: 12px; min-width: 0; }

/* Moeda das contas */
.field__hint--currency { color: #7a5200; background: #fff8e1; border: 1px solid #ffe08a; border-radius: 8px; padding: 6px 10px; }

/* Seletor de pixel existente */
.pixel-picker { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.pixel-picker__row { display: flex; gap: 8px; align-items: center; }
.pixel-picker__select { flex: 1; min-width: 0; }
.pixel-picker__status { margin: 0; }

/* Escolha múltipla compacta (botões e lista suspensa com busca) e opções curtas lado a lado */
.choice-list--segmented { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.choice-list--segmented .choice { padding: 8px 14px; border-radius: 999px; flex: 0 1 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; color: var(--text); border: 1.5px solid #c9cccf; border-radius: 999px; background: #fff; font: inherit; font-size: 14px; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.chip:hover:not(:disabled) { border-color: #8a8a8f; }
.chip.is-on { background: var(--tt-black); border-color: var(--tt-black); color: #fff; }
.chip:disabled { opacity: 0.45; cursor: not-allowed; }
.chip:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.multi { position: relative; max-width: 560px; }
.multi__box { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 6px 8px; border: 1px solid #c9cccf; border-radius: 10px; background: #fff; min-height: 44px; }
.multi__chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.multi__chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: #e9fffe; border: 1px solid #b8f3ef; font-size: 13px; }
.multi__remove { border: 0; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 6px; color: var(--muted); border-radius: 50%; }
.multi__remove:hover:not(:disabled) { color: var(--text); background: rgba(0, 0, 0, 0.08); }
.multi__empty { font-size: 13px; padding-left: 4px; }
.multi__trigger { flex: none; }
.multi__panel { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #c9cccf; border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.multi__panel[hidden] { display: none; }
.multi__list { max-height: 220px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 8px; }
.multi__option { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.multi__option:hover { background: #f3f3f4; }
.multi__option input { accent-color: var(--tt-black); }
.multi__foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.multi__none { margin: 8px; }

/* Arquivos anexados (Contas TikTok) */
.files__drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; margin-bottom: 14px; border: 2px dashed #b9bcc0; border-radius: 14px; background: #fff; cursor: pointer; text-align: center; transition: border-color 0.15s, background 0.15s; }
.files__drop:hover, .files__drop.is-over { border-color: var(--tt-black); background: #f2fffe; }
.files__drop.is-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.files__drop:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: 3px; }
.files__queue { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.files__queue:empty { display: none; }
.files__item { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: #fff; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.files__item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; min-width: 0; }
.files__ok { color: var(--tt-cyan-dark); font-weight: 600; }
.files__error { color: #9d1033; font-weight: 600; text-align: right; }
.files__name { overflow-wrap: anywhere; }

/* Pop-up de convite e escolha de áreas: compacto, em duas colunas */
.invite-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.area-picker { border: 0; margin: 0 0 4px; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.area-picker legend { padding: 0; margin-bottom: 8px; }
.switch { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #b8f3ef; background: #f2fffe; border-radius: 12px; cursor: pointer; }
.switch__input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { position: relative; flex: none; width: 40px; height: 22px; border-radius: 999px; background: #c9cccf; transition: background 0.18s; }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.18s; }
.switch__input:checked + .switch__track { background: var(--tt-black); }
.switch__input:checked + .switch__track .switch__thumb { transform: translateX(18px); }
.switch__input:focus-visible + .switch__track { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.switch__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.switch__text small { font-size: 12px; line-height: 1.35; }
.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.area-card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 36px 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.area-card:hover { border-color: #8a8a8f; }
.area-card.is-on { border-color: var(--tt-black); background: #f2fffe; box-shadow: 0 0 0 1px var(--tt-black); }
.area-card__input { position: absolute; opacity: 0; pointer-events: none; }
.area-card:focus-within { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.area-card__title { font-size: 14px; }
.area-card__text { font-size: 12px; line-height: 1.35; color: var(--muted); }
.area-card__tick { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; line-height: 1; border: 1.5px solid #c9cccf; background: #fff; color: transparent; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.area-card.is-on .area-card__tick { background: var(--tt-black); border-color: var(--tt-black); color: #fff; }
.area-picker__summary { font-size: 12px; color: var(--muted); }
.modal__actions--bar { margin: 6px -20px -20px; padding: 14px 20px; border-top: 1px solid var(--border); background: #fafafa; }
@media (max-width: 560px) { .invite-fields, .area-grid { grid-template-columns: minmax(0, 1fr); } }

/* ============ Relatórios: filtros, indicadores, gráfico de linha, observações e ranking ============ */
.reports { max-width: 1180px; margin: 0 auto; padding-bottom: 76px; } /* folga para o botão flutuante "Publicar campanha" não cobrir o fim da página */
.tabs--left { margin: 2px 0 12px; }
.reports__filters { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.reports__filters select.input { width: auto; max-width: 100%; min-width: 180px; }
.reports__compare { margin-left: auto; font-size: 13px; }
.reports__content { transition: opacity 0.15s; }
.reports__content.is-loading { opacity: 0.55; pointer-events: none; }
.segmented { display: inline-flex; padding: 2px; gap: 2px; background: #e4e4e7; border-radius: var(--radius-btn); }
.segmented__btn { border: 0; background: transparent; padding: 5px 12px; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented__btn:hover { background: rgba(255, 255, 255, 0.55); }
.segmented__btn.is-on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; text-align: left; font: inherit; color: var(--text); background: #fff; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.kpi:hover { border-color: #8a8a8f; transform: translateY(-1px); }
.kpi.is-on { border-color: var(--tt-black); box-shadow: 0 0 0 1px var(--tt-black); }
.kpi:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.kpi__label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.kpi__value { font-size: 20px; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.kpi__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 30px; }
.delta { font-size: 12px; font-weight: 700; white-space: nowrap; }
.delta--good { color: #0b7a53; }
.delta--bad { color: #b4163a; }
.delta--flat { color: var(--muted); }
.spark { flex: none; }
.spark__line { stroke: #6b6b72; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reports__split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 14px; margin-bottom: 18px; align-items: stretch; }
.reports__chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.reports__chart-head p { margin: 2px 0 0; font-size: 13px; }
.reports__chart-total { font-size: 22px; letter-spacing: -0.02em; }
.chart { position: relative; width: 100%; outline-offset: 4px; border-radius: 10px; touch-action: pan-y; }
.chart__stage svg { display: block; width: 100%; height: auto; }
.chart__grid { stroke: #e6e6e8; stroke-width: 1; }
.chart__axis { fill: #8a8a8f; font-size: 11px; }
.chart__line { stroke: #111; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart__cursor { stroke: #b9bcc0; stroke-width: 1; stroke-dasharray: 3 3; }
.chart__dot { fill: #fff; stroke: #111; stroke-width: 2.4; }
.chart__tip { position: absolute; transform: translate(-50%, -100%); pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 9px; background: #111; color: #fff; border-radius: 8px; font-size: 12px; white-space: nowrap; }
.chart__tip .muted { color: #c4c4c9; font-size: 11px; }
.chart__tip[hidden] { display: none; }
.chart:focus-visible { outline: 2px solid var(--tt-cyan-dark); }
.insights { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.insights__item { padding: 9px 12px; border-radius: 10px; background: #f6f6f7; border-left: 3px solid #c9cccf; font-size: 13px; line-height: 1.45; }
.insights__item--warn { border-left-color: #e0a100; background: #fff8e1; }
.insights__item--good { border-left-color: #0b7a53; }
.reports__table-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.reports__table-head .toolbar__search { margin-left: auto; width: 240px; max-width: 100%; }
.th-sort { border: 0; background: transparent; font: inherit; color: inherit; font-weight: 600; cursor: pointer; padding: 0; white-space: nowrap; }
.th-sort:hover { color: var(--text); }
.table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.share { display: block; height: 4px; margin-top: 6px; background: #ececee; border-radius: 999px; overflow: hidden; max-width: 220px; }
.share__fill { display: block; height: 100%; background: #111; border-radius: 999px; }
.reports__internal { margin-top: 22px; }
@media (max-width: 900px) { .reports__split { grid-template-columns: minmax(0, 1fr); } .reports__compare { margin-left: 0; } }

/* ============ Início: chat com o assistente (estilo ChatGPT) ============ */
.chat { max-width: 820px; margin: 0 auto; height: calc(100vh - 118px); height: calc(100dvh - 118px); min-height: 360px; display: flex; flex-direction: column; }
/* Onde o navegador entende :has, a área do chat ocupa exatamente o que sobra da tela (sem número fixo de pixels). */
@supports selector(:has(a)) {
  .main:has(.chat) { display: flex; flex-direction: column; overflow: hidden; }
  .main > .page:has(> .chat) { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; }
  .page > .chat { flex: 1; height: auto; min-height: 0; width: 100%; }
}
.chat__top { flex: none; display: flex; align-items: center; justify-content: flex-end; min-height: 36px; }
.chat__new[hidden] { display: none; }
/* A conversa rola AQUI dentro; o campo de mensagem fica fixo embaixo e nunca cobre nada. `margin: auto` centraliza sem cortar o topo. */
.chat__body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 8px 0 12px; }
.chat__body > * { margin-top: auto; margin-bottom: auto; }
.chat__hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 0; }
.chat__title { font-size: 28px; letter-spacing: -0.02em; margin: 10px 0 0; }
.chat__subtitle { margin: 0 0 14px; max-width: 460px; }
.chat__thread { display: flex; flex-direction: column; gap: 18px; width: 100%; align-self: stretch; margin-bottom: 0; }
.chat__msg { display: flex; gap: 12px; align-items: flex-start; }
.chat__msg--user { justify-content: flex-end; }
.chat__bubble { max-width: min(640px, 85%); padding: 10px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--border); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat__msg--user .chat__bubble { background: #111; color: #fff; border-color: #111; border-bottom-right-radius: 4px; }
.chat__bubble--typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #9a9aa0; animation: chat-dot 1s infinite ease-in-out; }
.dot:nth-child(2) { animation-delay: 0.15s; }
.dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-dot { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-4px); opacity: 1; } }
.chat__actions { margin-top: 6px; }
.chat__copy { border: 0; background: transparent; padding: 0; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; text-decoration: underline; }
.chat__copy:hover { color: var(--text); }
.chat__composer { position: relative; flex: none; padding: 8px 0 4px; }
.chat__box { display: flex; align-items: flex-end; gap: 6px; padding: 7px 7px 7px 22px; background: #fff; border: 1.5px solid #c9cccf; border-radius: 999px; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07); transition: border-color 0.15s, box-shadow 0.15s; } /* 100% redondo */
.chat__box:focus-within { border-color: var(--tt-black); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.1); }
.chat__input { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; font: inherit; font-size: 15px; line-height: 1.5; padding: 8px 0; background: transparent; max-height: 160px; }
.chat__send { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #111; color: #fff; display: inline-grid; place-items: center; padding: 0; cursor: pointer; transition: opacity 0.15s, transform 0.15s; }
.chat__send:hover:not(:disabled) { transform: scale(1.06); }
.chat__send:disabled { opacity: 0.3; cursor: not-allowed; }
.chat__hint { margin: 6px 0 0; text-align: center; font-size: 12px; }
/* Celular: a página inteira rola (barra de cima + menu ocupam ~122 px e o recuo da página, 16 px); o chat tem altura própria. */
@media (max-width: 900px) { .main > .page:has(> .chat) { flex: none; } .page > .chat { flex: none; height: calc(100vh - 140px); height: calc(100dvh - 140px); min-height: 440px; } }
@media (max-width: 640px) { .chat__title { font-size: 23px; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } .kpi { transition: none; } .chat__mic.is-listening { animation: none; } }

/* ============ "+ CA": criar contas de anúncio dentro de uma Business Center ============ */
/* "+ CA" em etapas: tamanho padrão (não pula de uma etapa para outra); só a área do meio rola e o rodapé fica sempre visível. */
.create-ca { display: flex; flex-direction: column; gap: 14px; min-width: 0; height: min(620px, calc(100vh - 120px)); height: min(620px, calc(100dvh - 120px)); overflow: hidden; }
.create-ca.is-result { height: auto; max-height: calc(100dvh - 120px); overflow-y: auto; }
.create-ca__form { display: flex; flex-direction: column; gap: 14px; margin-top: 0; flex: 1; min-height: 0; }
.create-ca__steps { flex: none; }
.create-ca__pane { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 2px 4px 4px 2px; margin-right: -4px; }
.create-ca__pane > * { flex: none; } /* os blocos mantêm a altura: quem rola é a área, nada é espremido */
.create-ca__footer { flex: none; margin-top: 0; padding-top: 12px; border-top: 1px solid var(--border); }
.create-ca__section { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.create-ca__review { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.create-ca__review-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 6px 14px; border-bottom: 1px solid #eeeeef; font-size: 13px; }
.create-ca__review-row:last-child { border-bottom: 0; }
.create-ca__review-row dt { color: var(--muted); font-weight: 600; }
.create-ca__review-row dd { margin: 0; overflow-wrap: anywhere; }
.create-ca__optional { display: flex; flex-direction: column; gap: 10px; }
.create-ca .stepper__label { font-size: 11px; }
@media (max-width: 560px) { .create-ca__review-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } .create-ca .stepper__item:not(.is-current) .stepper__label { display: none; } }
.create-ca__bc { margin: 0; font-size: 13px; color: var(--muted); }
.create-ca__bc strong { color: var(--tt-black); }
.create-ca__qty { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: start; }
.create-ca__stepper { display: flex; gap: 6px; align-items: stretch; }
.create-ca__stepper .input { flex: 1; min-width: 0; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.create-ca__stepper .input::-webkit-outer-spin-button, .create-ca__stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.create-ca__stepper .btn { flex: none; width: 40px; padding: 0; font-size: 18px; line-height: 1; }
.create-ca__form > div:empty { display: none; } /* espaço do aviso de erro: só ocupa lugar quando há aviso */
.create-ca__preview { margin: 0; padding: 8px 12px; border-radius: 10px; background: #f6f6f7; font-size: 13px; overflow-wrap: anywhere; }
.create-ca__status { margin: 0; font-size: 12px; min-height: 1.2em; }
.create-ca__headline { margin: 0; font-size: 16px; font-weight: 700; }
.create-ca__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.create-ca__list li { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 560px) { .create-ca__qty { grid-template-columns: minmax(0, 1fr); } }

/* ============ Relatórios → Por hora ============ */
.kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi--static { cursor: default; }
.kpi--static:hover { border-color: var(--border); transform: none; }
.kpi--warn, .kpi--warn.kpi--static:hover { border-color: #ffe08a; background: #fffbea; }
.kpi__hint { font-size: 12px; line-height: 1.3; min-height: 1.3em; }
.reports__refresh { margin-left: auto; flex-shrink: 0; white-space: nowrap; }
.btn.is-busy { position: relative; color: transparent; } /* o texto fica no lugar (a largura não muda) e o indicador gira por cima */
.btn.is-busy::before { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #d4d4d8; border-top-color: var(--tt-red); animation: spin 0.7s linear infinite; }
.reports__chart-side { display: flex; align-items: center; gap: 10px; flex: none; }
.hours-top { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: top; }
.hours-top li { counter-increment: top; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: #f6f6f7; font-size: 13px; }
.hours-top li span::before { content: counter(top) 'º  '; font-weight: 700; color: var(--muted); }
@media (max-width: 900px) { .kpis--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .reports__refresh { margin-left: 0; } .reports__chart-head { flex-direction: column; } }

/* ============ Hook com IA ============ */
.hook { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hook__intro { margin: 0; font-size: 14px; line-height: 1.5; }
.hook__form { margin-top: 0; display: flex; flex-direction: column; gap: 12px; }
.hook__subtitle { margin: 4px 0 0; font-size: 15px; }
.hook__usage { margin: 0; font-size: 12px; }
.hook__submit { display: flex; justify-content: flex-end; }
.hook__empty { margin: 0; padding: 14px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; }
.hook-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hook-style { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.hook-style:hover { border-color: #8a8a8f; }
.hook-style.is-on { border-color: var(--tt-black); background: #f2fffe; box-shadow: 0 0 0 1px var(--tt-black); }
.hook-style:focus-within { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.hook-style__input { position: absolute; opacity: 0; pointer-events: none; }
.hook-style__title { font-size: 13px; }
.hook-style__text { font-size: 12px; line-height: 1.35; color: var(--muted); }
.hook-options { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.hook-options__item { display: flex; flex-direction: column; gap: 4px; }
.hook-list { display: flex; flex-direction: column; gap: 10px; }
.hook-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hook-item__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hook-item__status { margin: 0; font-size: 13px; }
.hook-item__percent { font-weight: 700; }
.hook-item__ready { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: start; }
.hook-item__video { width: 150px; aspect-ratio: 9 / 16; background: #000; border-radius: 10px; object-fit: cover; }
.hook-item__actions { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hook-item__buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.hook-item__done { margin: 0; font-size: 12px; color: var(--muted); }
.progress--busy { overflow: hidden; }
.progress__bar--indeterminate { width: 40%; animation: hook-slide 1.2s infinite ease-in-out; }
@keyframes hook-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (max-width: 720px) { .hook-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hook-styles { grid-template-columns: minmax(0, 1fr); } .hook-item__ready { grid-template-columns: minmax(0, 1fr); } .hook-item__video { width: 100%; max-width: 220px; } }
@media (prefers-reduced-motion: reduce) { .progress__bar--indeterminate { animation: none; width: 100%; } }

.create-ca__wide { grid-column: 1 / -1; }

/* ============ Gerenciador de arquivos dos criativos ============ */
.main > .explorer-page { max-width: 1400px; }
.explorer { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 20px; align-items: start; }
.explorer__nav { position: sticky; top: 0; max-height: calc(100vh - 140px); overflow-y: auto; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.explorer__main { min-width: 0; border-radius: var(--radius); }
body.is-file-drag .explorer__main { outline: 3px dashed var(--tt-cyan-dark); outline-offset: 8px; }
.folder-nav { display: flex; flex-direction: column; gap: 2px; }
.folder-nav__title { padding: 12px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.folder-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); text-align: left; cursor: pointer; transition: background 0.12s, box-shadow 0.12s; }
.folder-item:hover { background: #f4f4f5; }
.folder-item.is-on { background: #f2fffe; box-shadow: inset 0 0 0 1.5px var(--tt-black); }
.folder-item.is-drop, .folder-item.is-drop-files, .folder-tile.is-drop, .folder-tile.is-drop-files { background: #e8fffe; box-shadow: inset 0 0 0 2px var(--tt-cyan-dark); border-color: var(--tt-cyan-dark); }
.folder-item:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: -2px; }
.folder-item__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-item__count { flex: none; padding: 0 7px; border-radius: 999px; background: #ececee; font-size: 12px; font-weight: 700; color: var(--muted); }
.folder-item--new { margin-top: 4px; color: var(--muted); border: 1px dashed var(--border); border-radius: 10px; }
.explorer__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 6px; }
.explorer__crumbs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted); }
.crumb { display: inline-flex; align-items: center; gap: 6px; max-width: 320px; min-width: 0; }
.crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb--now { color: var(--text); font-size: 15px; }
.explorer__crumb-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.explorer__tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.explorer__tools .toolbar__search { width: 200px; }
.explorer__select { width: auto; padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
.explorer__dir { border: 1px solid var(--border); background: #fff; }
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.view-toggle .icon-btn { border-radius: 0; color: var(--muted); }
.view-toggle .icon-btn.is-on { background: var(--tt-black); color: #fff; }
.explorer__status { min-height: 20px; margin: 0 0 10px; font-size: 13px; }
.explorer__content { outline: none; }
.explorer__section { margin-bottom: 18px; }
.explorer__heading { margin: 4px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.explorer__empty { border-style: dashed; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.folder-tile { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color 0.12s, background 0.12s; }
.folder-tile:hover { border-color: #8a8a8f; }
.folder-tile__open { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; border-radius: var(--radius); background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.folder-tile__open:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: -2px; }
.folder-tile__icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #f2fffe; color: var(--tt-cyan-dark); }
.folder-tile__text { display: flex; flex-direction: column; min-width: 0; padding-right: 56px; }
.folder-tile__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-tile__text .muted { font-size: 12px; }
.creative-card, .file-row { user-select: none; -webkit-user-select: none; }
.creative-card:focus-visible, .file-row:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.file-check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; }
.file-check input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: #111; }
.creative-card .file-check { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow); opacity: 0; transition: opacity 0.12s; }
.creative-card:hover .file-check, .creative-card:focus-within .file-check, .creative-card.is-selected .file-check { opacity: 1; }
.file-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.12s; }
.creative-card .file-actions, .folder-tile .file-actions { position: absolute; top: 8px; right: 8px; }
.folder-tile .file-actions { top: 50%; transform: translateY(-50%); }
.creative-card .file-actions .icon-btn, .folder-tile .file-actions .icon-btn { background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow); padding: 5px 6px; }
.creative-card:hover .file-actions, .creative-card:focus-within .file-actions, .folder-tile:hover .file-actions, .folder-tile:focus-within .file-actions, .file-row:hover .file-actions, .file-row:focus-within .file-actions, .file-row.is-selected .file-actions { opacity: 1; }
.file-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.file-table { width: 100%; border-collapse: collapse; }
.file-table th { padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: #fafafa; border-bottom: 1px solid var(--border); white-space: nowrap; }
.file-th__btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; font: inherit; font-weight: 600; color: inherit; cursor: pointer; }
.file-th__btn:hover { color: var(--text); }
.file-th[aria-sort='ascending'], .file-th[aria-sort='descending'] { color: var(--text); }
.file-row td { padding: 8px 12px; border-bottom: 1px solid #eeeeef; vertical-align: middle; font-size: 13px; }
.file-row:last-child td { border-bottom: 0; }
.file-row:hover { background: #fafafa; }
.file-row.is-selected { background: #f2fffe; }
.file-row.is-dragging { opacity: 0.5; }
.file-row__check { width: 40px; }
.file-row__main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-row__thumb { flex: none; width: 44px; }
.file-row__thumb .thumb { border-radius: 8px; }
.file-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.file-row__text strong { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.file-row__size, .file-row__date, .file-row__kind { white-space: nowrap; color: var(--muted); }
.file-row__actions { width: 1%; white-space: nowrap; }
.file-row__actions .file-actions { justify-content: flex-end; }
.uploads__dest { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.drop-hint { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px; background: var(--tt-black); color: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); pointer-events: none; }
.drop-hint[hidden] { display: none; }
.drop-hint svg { flex: none; color: var(--tt-cyan); }
.context-menu { position: fixed; z-index: 60; min-width: 210px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22); }
.context-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; }
.context-menu__item:hover:not(:disabled), .context-menu__item:focus-visible { background: #f1f1f2; outline: none; }
.context-menu__item.is-danger { color: var(--tt-red-dark); }
.context-menu__item.is-danger:hover:not(:disabled), .context-menu__item.is-danger:focus-visible { background: #fff1f4; }
.context-menu__item:disabled { opacity: 0.45; cursor: default; }
.context-menu__noicon { width: 16px; flex: none; }
.context-menu__sep { height: 1px; margin: 4px 2px; background: var(--border); }
@media (hover: none), (max-width: 720px) { .creative-card .file-check, .file-actions { opacity: 1; } }
@media (max-width: 900px) {
  .explorer { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .explorer__nav { position: static; max-height: none; padding: 6px; overflow-x: auto; overflow-y: hidden; }
  .folder-nav { flex-direction: row; gap: 6px; }
  .folder-nav__title { display: none; }
  .folder-item { width: auto; flex: none; max-width: 220px; border: 1px solid var(--border); border-radius: 999px; }
  .folder-item.is-on { box-shadow: inset 0 0 0 1.5px var(--tt-black); }
  .folder-item--new { margin-top: 0; }
}
@media (max-width: 720px) {
  .explorer__tools { width: 100%; }
  .explorer__tools .toolbar__search { flex: 1 1 100%; width: auto; max-width: none; }
  .explorer__select { flex: 1 1 auto; }
  .file-th--kind, .file-th--date, .file-row__kind, .file-row__date, .file-row__folder { display: none; }
  .file-row__text strong { max-width: 200px; }
  .drop-hint { bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) { .folder-item, .folder-tile, .file-actions, .creative-card .file-check { transition: none; } }

/* ============ Pastas da biblioteca de criativos ============ */
.selection-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--tt-black); border-radius: 12px; background: #fff; }
.selection-bar[hidden] { display: none; }
.creative-card.is-selected { border-color: var(--tt-black); box-shadow: 0 0 0 2px var(--tt-black); }
.creative-card.is-dragging { opacity: 0.5; }
.folder-tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 8px; border-radius: 999px; background: #f0f0f1; font-size: 11px; font-weight: 600; color: var(--muted); }
.folder-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creative-card__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.picker__folder { width: auto; max-width: 200px; flex: none; }

/* ============ Saldo ============ */
.tab__count { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: #e1e1e3; font-size: 11px; font-weight: 700; color: var(--muted); }
.tab.is-active .tab__count { background: var(--tt-black); color: #fff; }
.balance__updated { font-size: 12px; }
.balance__history { margin-top: 22px; }

/* Saldo simples: três quadros coloridos + grupos "Com saldo", "Sem saldo" e "Sem informação" */
.transfer { display: flex; flex-direction: column; gap: 14px; }
.transfer__balances { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.transfer__balances div { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; background: #fafafa; }
.transfer__balances dt { font-size: 12px; color: var(--muted); }
.transfer__balances dd { margin: 2px 0 0; font-weight: 700; }
.transfer__amount-row { display: flex; gap: 10px; align-items: center; }
.transfer__amount-row .input { flex: 1; min-width: 0; }
.transfer__review { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: #f1f9f9; }
.transfer__review p { margin: 0; }
.transfer__sentence { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.transfer__ids { overflow-wrap: anywhere; font-size: 12px; }
.transfer .choice-group { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.transfer .choice { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.transfer .choice.is-on { border-color: var(--tt-black); background: #f4f4f5; }
.balance .num { white-space: nowrap; }
.input--locked { background: #f1f1f2; color: var(--muted); cursor: not-allowed; }
.create-ca__industry-search { margin-bottom: 6px; }
.create-ca__bcinfo:empty { display: none; }
.create-ca__bcline { margin: 0; padding: 8px 12px; border-radius: 10px; background: #f6f6f7; font-size: 13px; font-weight: 600; }
.create-ca__bcinfo { display: flex; flex-direction: column; gap: 8px; }
.create-ca__wide:empty { display: none; }

/* ============ Gerenciador de anúncios ============ */
.manager__toolbar { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.manager__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.manager__row .field__label { margin: 0; }
.manager { padding-bottom: 88px; } /* o botão flutuante "Publicar campanha" não cobre as últimas linhas */
.manager__main { gap: 8px 10px; }
.manager__search { flex: 1 1 260px; max-width: 380px; }
.manager__period { flex: 0 0 auto; width: auto; min-width: 140px; }
.manager__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.manager__count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--tt-black); color: #fff; font-size: 11px; font-weight: 700; }
.manager__viewlabel { font-size: 12px; font-weight: 500; color: var(--muted); }
.manager__viewname { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.manager__dirty { padding: 1px 7px; border-radius: 999px; background: #fff3cd; color: #6b4a00; font-size: 11px; font-weight: 700; }
.manager__chips { gap: 6px; }
.manager__chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: #eef0f2; font-size: 12px; font-weight: 600; }
.manager__chip-x { width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; font: inherit; font-size: 15px; line-height: 1; color: var(--muted); cursor: pointer; }
.manager__chip-x:hover { background: #dcdfe3; color: var(--text); }
.manager__linkbtn { align-self: flex-start; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; cursor: pointer; }
.manager__linkbtn:hover { color: var(--text); }
.manager__panel { display: flex; flex-direction: column; gap: 12px; padding: 14px; min-width: 260px; }
.manager__panel-field { display: flex; flex-direction: column; gap: 4px; }
.manager__panel-field .field__label { margin: 0; font-size: 12px; }
.manager__panel select.input { width: 100%; }
.manager__menu { display: flex; flex-direction: column; padding: 6px; min-width: 250px; }
.manager__menu-title { margin: 0; padding: 6px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.manager__menu-sep { width: 100%; margin: 6px 0; border: 0; border-top: 1px solid var(--border); }
.manager__menuitem { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; text-align: left; color: var(--text); cursor: pointer; overflow-wrap: anywhere; }
.manager__menuitem:hover, .manager__menuitem:focus-visible { background: #f1f1f2; outline: none; }
.manager__menuitem.is-checked { font-weight: 700; }
.manager__menuitem.is-checked::before { content: '✓ '; }
.manager__menuitem.is-danger { color: var(--tt-red-dark); }
.manager__menuitem.is-danger:hover { background: #fff1f4; }

/* Painel que abre ao clicar (Filtros, menu da visualização) */
.popover { position: relative; display: inline-flex; }
.popover__btn { gap: 8px; }
.popover__panel { position: absolute; top: calc(100% + 6px); z-index: 40; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16); max-width: calc(100vw - 24px); }
.popover__panel[hidden] { display: none; }
.popover__panel--left { left: 0; }
.popover__panel--right { right: 0; }
@media (max-width: 720px) {
  /* celular: o painel ocupa a largura da barra (nunca passa da tela) e abre logo abaixo dela */
  .manager__toolbar { position: relative; }
  .manager__toolbar .popover { position: static; }
  .manager__toolbar .popover__panel { left: 0; right: 0; max-width: none; }
  .manager__panel, .manager__menu { min-width: 0; }
}
.manager__custom { gap: 8px; }
.manager__custom .input { width: auto; }
.manager__hint { font-size: 12px; }
.manager__summary { margin: 0 0 10px; font-size: 13px; }
.manager__loading { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; text-align: center; }
.manager__table { margin-bottom: 12px; }
.manager__table .table { min-width: 860px; }
@media (min-width: 721px) { .manager .table th, .manager .table td { padding: 10px 8px; } .manager .table th:first-child, .manager .table td:first-child { padding-left: 14px; } }
.manager .table td .badge { white-space: nowrap; }
.manager .table td.manager__date { white-space: nowrap; font-size: 13px; }
.manager__th { cursor: grab; user-select: none; }
.manager__th.num { text-align: right; }
.manager__th.is-dragging { opacity: 0.45; }
.manager__th.is-drop { box-shadow: inset 3px 0 0 var(--tt-red); background: #fff6f8; }
.manager__check { width: 36px; padding-right: 0; }
.manager__check input { accent-color: var(--tt-black); }
.manager__name { max-width: 250px; }
.manager__name .acc-id { overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.manager__ad { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.manager__tabs { margin: 0 0 14px; max-width: 100%; overflow-x: auto; }
.manager__drill { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.manager__drill { text-decoration: underline dotted; text-decoration-color: #9a9aa3; text-underline-offset: 3px; }
.manager__drill:hover { text-decoration-style: solid; text-decoration-color: currentColor; }
.manager__drill:focus-visible { outline: 2px solid var(--tt-cyan, #25f4ee); outline-offset: 2px; border-radius: 4px; }
.manager__parent { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: #f1f9f9; border: 1px solid #cfeaea; font-size: 14px; }
.manager__parent span { min-width: 0; overflow-wrap: anywhere; }
.manager .table tr.is-selected { background: #f4fbfb; }
.manager .table th.num, .manager .table td.num { text-align: right; }
.manager__total td { font-weight: 700; background: #fafafa; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.manager__footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.manager__footer .manager__size { flex: 0 0 auto; width: auto; }
.manager__pager { display: flex; align-items: center; gap: 10px; }

/* Interruptor de ativar/pausar */
.switch-ad { position: relative; flex: none; width: 40px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: #c9c9cd; cursor: pointer; transition: background 0.15s; }
.switch-ad__thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.switch-ad.is-on { background: var(--tt-cyan-dark); }
.switch-ad.is-on .switch-ad__thumb { transform: translateX(18px); }
.switch-ad:disabled { opacity: 0.45; cursor: not-allowed; }
.switch-ad:focus-visible { outline: 2px solid var(--tt-black); outline-offset: 2px; }

/* Janela de colunas */
.manager-cols { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; }
.manager-cols__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; }
.manager-cols__move { display: flex; gap: 2px; }
.manager-cols__move .icon-btn:disabled { opacity: 0.3; cursor: default; }

@media (max-width: 720px) {
  .manager__actions { margin-left: 0; }
  .manager__search { flex: 1 1 100%; max-width: none; }
  .manager__period { flex: 1 1 120px; }
  .manager__viewlabel { display: none; }
  .manager__table .table { min-width: 0; }
  .manager__name { max-width: none; }
  .manager__name .acc-id { max-width: none; white-space: normal; overflow-wrap: anywhere; }
  .manager__ad { max-width: 220px; white-space: normal; }
  .manager .table--stack td.manager__check { justify-content: flex-start; font-size: 13px; }
  .manager__total td:first-child { display: none; }
  .manager__th { cursor: default; }
  .manager .table--stack td.manager__name { display: block; text-align: left; }
  .manager .table--stack td.manager__name::before { display: none; }
  .manager .table td.manager__date { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .switch-ad, .switch-ad__thumb { transition: none; } }

/* ============ Catálogo de produtos ============ */
/* O pop-up "+ Catálogo" reaproveita as classes create-ca* (etapas, miolo que rola, rodapé fixo e revisão). */
.catalog__toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.catalog__toolbar .toolbar__search { flex: 1 1 240px; max-width: 360px; }
.catalog__toolbar select.input { flex: 0 1 260px; }
.catalog__actions { text-align: right; white-space: nowrap; }
.catalog__count { margin: 10px 0 0; font-size: 13px; }
.catalog__issue { white-space: normal; font-family: inherit; max-width: 280px; }
.catalog__body { padding-bottom: 88px; } /* o botão flutuante "Publicar campanha" não cobre as últimas linhas */
.catalog-detail { padding-bottom: 88px; }
.catalog-detail .subtabs { margin: 0 0 22px; } /* espaço entre as abas e o conteúdo */
.catalog-detail__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; }
.catalog-detail__title { flex: 1 1 260px; min-width: 0; }
.catalog-detail__title .page-title { margin: 0; overflow-wrap: anywhere; }
.catalog-detail__title p { margin: 2px 0 0; }
.catalog-detail__summary { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.catalog-detail__summary .kpi { min-width: 120px; }
.catalog-detail__hint { flex: 1 1 100%; margin: 0; font-size: 13px; }
.catalog-detail__content { min-width: 0; }
.catalog-add { display: flex; flex-direction: column; gap: 18px; }
.catalog-add__intro p { margin: 0 0 6px; }
.catalog-add__intro p:last-child { margin-bottom: 0; }
.catalog-add__file-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.catalog-add__file { max-width: 100%; }
.catalog-add__errors, .catalog-add__queue { margin-top: 10px; max-height: 360px; overflow: auto; }
.catalog-add__more { margin: 8px 12px; font-size: 13px; }
.catalog-add__send { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.catalog-bulk__preview { margin: 10px 0 0; min-height: 1.4em; overflow-wrap: anywhere; }
.catalog-add__more-fields { margin: 12px 0; border: 1px dashed var(--border); border-radius: 10px; padding: 8px 12px; }
.catalog-add__more-fields summary { cursor: pointer; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.catalog-sets .form-section { margin-top: 18px; }
.catalog code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f1f1f2; border-radius: 6px; padding: 2px 6px; }
@media (max-width: 720px) {
  .catalog__toolbar select.input, .catalog__toolbar .toolbar__search { flex: 1 1 100%; max-width: none; }
  .catalog__actions { text-align: left; }
  .catalog__issue { max-width: none; }
}

/* ============ Respostas ricas do assistente (Início) ============ */
.chat__bubble--rich { white-space: normal; max-width: min(760px, 94%); }
.rich { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rich__p { margin: 0; }
.rich__h { margin: 10px 0 0; font-size: 14px; }
.rich__list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rich__list--steps { padding-left: 22px; }
.rich__list li::marker { font-weight: 700; color: var(--muted); }
.rich__note { margin: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: #f6f6f7; font-size: 13px; }
.rich__note--warn { background: #fff8e1; border-color: #ffe08a; color: #6b4a00; }
.rich__note--good { background: #d9fffd; border-color: #8ceae6; color: #075e5a; }
.rich__kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rich__kpi { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fafafa; min-width: 0; }
.rich__kpi-label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.rich__kpi-value { font-size: 17px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rich__kpi-delta { font-size: 12px; color: var(--muted); }
.rich__table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.rich__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rich__table th { text-align: left; padding: 7px 10px; background: #fafafa; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); white-space: nowrap; }
.rich__table td { padding: 7px 10px; border-bottom: 1px solid #eeeeef; overflow-wrap: anywhere; }
.rich__table tr:last-child td { border-bottom: 0; }
.rich__table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rich__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.catalog-sync { display: flex; flex-direction: column; gap: 18px; }
.catalog-sync__every { display: flex; align-items: center; gap: 8px; }
.catalog-sync__every .input { min-width: 0; }
.catalog-sync__warn { color: #9d1033; font-weight: 600; }

/* Bolinha piscando: algo está em andamento no servidor (ex.: juntando o hook ao vídeo). */
.pulse-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--tt-red); box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.55); animation: pulse-dot 1.2s ease-in-out infinite; }
.btn--primary .pulse-dot { background: var(--tt-cyan); box-shadow: 0 0 0 0 rgba(37, 244, 238, 0.6); }
.btn.is-busy:disabled { opacity: 1; cursor: progress; }
.hook-item__keep { margin: 8px 0 0; font-size: 12px; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.5); } 50% { opacity: 0.35; box-shadow: 0 0 0 6px rgba(254, 44, 85, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } }

/* Anúncio padrão do catálogo (aba "Campanha") */
.catalog-campaign { display: flex; flex-direction: column; gap: 16px; }
.catalog-campaign__status { display: flex; flex-direction: column; gap: 8px; border-left: 4px solid #ffe08a; }
.catalog-campaign__status.is-ready { border-left-color: var(--tt-cyan-dark); }
.catalog-campaign__status p { margin: 0; }
.catalog-campaign__groups { display: flex; flex-wrap: wrap; gap: 8px; }
.catalog-campaign__group { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; background: #fafafa; }
.catalog-campaign__group-title { font-weight: 600; }
.catalog-campaign__ok { color: var(--tt-cyan-dark); font-weight: 600; }
.catalog-campaign__todo { color: #9d6a00; font-weight: 600; }
.catalog-campaign__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.catalog-campaign__footer { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 6px 0 0; } /* o botão fica no fim do formulário, não flutuando */
.catalog-picker__defaults { margin-top: 6px; align-self: flex-start; }

/* ============ Catálogo: filtros, seleção e catálogos ocultos ============ */
.catalog__toolbar select.input--filter { flex: 0 1 230px; }
.catalog__toolbar .btn.is-on { background: var(--tt-black); color: #fff; border-color: var(--tt-black); }
.catalog .selection-bar { margin: 0 0 12px; }
.catalog__check { width: 40px; }
.catalog__check input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: #111; }
.catalog .table tbody tr.is-selected { background: #f2fffe; }
.catalog .table tbody tr.is-hidden-row td:not(.catalog__actions):not(.catalog__check) { opacity: 0.55; }
.catalog .cell-strong + .badge { margin-left: 6px; }
@media (max-width: 720px) {
  .catalog .table--stack td.catalog__check { justify-content: flex-start; font-size: 13px; }
  .catalog .table--stack thead { display: none; }
  .catalog__toolbar select.input--filter { flex: 1 1 100%; }
}


/* ============ Business Centers: cartões compactos e minimalistas ============ */
.bc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); align-items: stretch; gap: 12px; margin-bottom: 22px; } /* cartões da mesma linha com a mesma altura */
.bc-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); transition: border-color 0.12s; }
.bc-card:hover { border-color: #b9b9be; }
.bc-card--error { border-color: #ffc2cf; background: #fffafb; }
.bc-card__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bc-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--tt-cyan-dark); box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.28); }
.bc-dot--error { background: var(--tt-red); box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.2); }
.bc-card__name { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-count { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.bc-count strong { font-size: 17px; letter-spacing: -0.02em; color: var(--text); }
.bc-card__meta { margin: 0; font-size: 12px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.bc-card__note { margin: 0; padding: 6px 8px; border-radius: 8px; font-size: 12px; line-height: 1.4; background: #fff1f4; color: #9d1033; }
.bc-card__hint { margin: 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.bc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.bc-chips--inner { margin: 6px 0 0; }
.bc-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 4px 2px 8px; font: inherit; color: inherit; background: #f4f4f5; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.bc-chip:hover { background: #e8e8ea; }
.bc-chip--muted { cursor: default; color: var(--muted); background: transparent; border-style: dashed; }
.bc-chip--muted:hover { background: transparent; }
.bc-chip__id { font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-chip__n { flex: none; min-width: 20px; padding: 0 6px; font-size: 11px; font-weight: 700; text-align: center; background: #fff; border-radius: 999px; }
.bc-more summary { display: inline-flex; padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--tt-red-dark); cursor: pointer; border-radius: 999px; list-style: none; }
.bc-more summary::-webkit-details-marker { display: none; }
.bc-more summary:hover { background: #fff1f4; }
.bc-more[open] { flex-basis: 100%; }
.bc-card__foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; } /* os botões ficam sempre na base, alinhados entre os cartões */
.bc-more-btn { margin-left: auto; padding: 2px 9px; font-size: 18px; line-height: 1; font-weight: 700; border: 1px solid var(--border); background: #fff; }
.bc-chip:focus-visible, .bc-more summary:focus-visible, .bc-more-btn:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }


/* ============ Saldo: lista compacta (nome · ID · saldo · total gasto · depósitos) ============ */
.bal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 12px; }
.bal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bal-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); background: #fff; border: 1.5px solid var(--border); border-radius: 999px; cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.bal-chip:hover { border-color: #8a8a8f; }
.bal-chip.is-on { color: #fff; background: var(--tt-black); border-color: var(--tt-black); }
.bal-chip:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.bal-chip__n { min-width: 20px; padding: 0 6px; font-size: 11px; font-weight: 700; text-align: center; color: var(--muted); background: #ececee; border-radius: 999px; }
.bal-chip.is-on .bal-chip__n { color: var(--text); background: #fff; }
.bal-totals { display: flex; flex-wrap: wrap; gap: 8px; }
.bal-total { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.bal-total__label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.bal-total__value { font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.bal-card { overflow: visible; }
.bal-table td, .bal-table th { padding: 8px 14px; }
.bal-table td { font-size: 13px; vertical-align: middle; }
.bal-th__btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; font: inherit; font-weight: 600; color: inherit; background: none; border: 0; cursor: pointer; }
.bal-th__btn:hover { color: var(--text); }
.bal-th[aria-sort='ascending'], .bal-th[aria-sort='descending'] { color: var(--text); }
.bal-table th.bal-th--balance, .bal-table th.bal-th--spend { text-align: right; }
.bal-row td:first-child { box-shadow: inset 3px 0 0 transparent; }
.bal-row--with td:first-child { box-shadow: inset 3px 0 0 #1fb57a; }
.bal-row--without td:first-child { box-shadow: inset 3px 0 0 #e5384f; }
.bal-row--unknown td:first-child { box-shadow: inset 3px 0 0 #e6a100; }
.bal-name { display: block; max-width: 300px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bal-id { padding: 2px 6px; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: inherit; white-space: nowrap; background: #f1f1f2; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.bal-id:hover { background: #e8e8ea; }
.bal-id:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.bal-table td.num { text-align: right; white-space: nowrap; }
.bal-amount { font-size: 14px; letter-spacing: -0.01em; cursor: help; }
.bal-amount--with { color: #0a7a4a; }
.bal-amount--without { color: #b4233f; }
.bal-amount--unknown { color: #8a6a00; }
.bal-tag { margin-left: 6px; padding: 1px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); background: #f1f1f2; border-radius: 999px; cursor: help; }
.bal-flag { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; color: #8a6a00; cursor: help; }
.bal-spend { font-weight: 600; }
.bal-partial { margin-left: 2px; color: #8a6a00; cursor: help; }
.bal-loading { color: var(--muted); letter-spacing: 0.15em; animation: bal-pulse 1s ease-in-out infinite; }
@keyframes bal-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.bal-actions { text-align: right; white-space: nowrap; }
.bal-actions__row { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.bal-empty { padding: 18px; text-align: center; }
.balance .btn.is-blocked { opacity: 0.55; cursor: help; }
.balance .btn.is-blocked:hover { opacity: 0.8; }
/* janela do histórico de depósitos */
.bal-hist { display: flex; flex-direction: column; gap: 12px; }
.bal-hist__who { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 0; }
.bal-hist__filters { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.bal-hist__filters select.input { width: auto; max-width: 100%; }
.bal-hist__list { max-height: 52vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.bal-hist__list .empty { padding: 28px 16px; }
.bal-hist__table th { position: sticky; top: 0; z-index: 1; }
.bal-hist__date { white-space: nowrap; color: var(--muted); }
.bal-hist__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bal-hist__footer:empty { display: none; }
.bal-hist__note { margin: 0; font-size: 12px; }
.bal-tx { font-weight: 700; white-space: nowrap; }
.bal-tx--in { color: #0a7a4a; }
.bal-tx--out { color: #b4233f; }
@media (max-width: 720px) {
  .bal-total { flex: 1 1 100%; justify-content: space-between; }
  .bal-table td.num, .bal-actions { text-align: right; }
  .bal-name { max-width: 60vw; }
  .bal-hist__list { max-height: 46vh; }
}
@media (prefers-reduced-motion: reduce) { .bal-loading { animation: none; } }


/* ============ Catálogo: abas com explicação, estatísticas e sub-abas ============ */
.subtabs { margin: 0 0 20px; }
.tab-intro { margin: 0 0 16px; }
.tab-intro__title { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.tab-intro__text { margin: 4px 0 0; max-width: 680px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.form-section__help { margin: -2px 0 12px; font-size: 13px; color: var(--muted); }
.cat-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 18px; }
.cat-stat { display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 14px; background: #fff; border: 1px solid var(--border); border-radius: 999px; }
.cat-stat__value { font-size: 17px; letter-spacing: -0.01em; }
.cat-stat__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.cat-stat--ok .cat-stat__value { color: #0a7a4a; }
.cat-stat--wait .cat-stat__value { color: #8a6a00; }
.cat-stat--bad .cat-stat__value { color: #b4233f; }
.cat-stats__hint { flex: 1 1 100%; margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.catalog-add__panel { display: flex; flex-direction: column; gap: 14px; }
.catalog-add__lead { margin: 0; font-size: 14px; line-height: 1.5; }
.catalog-add__tips { margin: 0 0 16px; padding: 10px 14px; background: #fff; border: 1px dashed var(--border); border-radius: 12px; font-size: 13px; }
.catalog-add__tips summary { cursor: pointer; font-weight: 600; }
.catalog-add__tips ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.catalog-add__tips li { margin: 3px 0; }
.catalog-add__queue-hint { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); }
.catalog-add__queue-hint:empty { display: none; }
.catalog-products .catalog__toolbar { margin-bottom: 14px; }


/* ============ Início: marca animada, sugestões ao digitar e ditado por voz ============ */
.chat__mark { display: inline-flex; margin: 0 0 6px; }
.ttl--lg { --dot: 22px; --run: 38px; }
.ttl--lg .ttl__dot { animation-duration: 2.4s; } /* calmo: é só a marca da tela, não um aviso de espera */
.chat__kbd { padding: 1px 7px; font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); background: #fff; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; }
.chat__suggest { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 4px); z-index: 6; margin: 0; padding: 6px; list-style: none; max-height: 300px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14); }
.chat__suggest[hidden] { display: none; }
.chat__suggest-item { display: flex; flex-direction: column; gap: 1px; padding: 9px 14px; border-radius: 14px; cursor: pointer; }
.chat__suggest-item strong { font-size: 14px; }
.chat__suggest-item .muted { font-size: 13px; }
.chat__suggest-item.is-active { background: #f1f1f2; }
.chat__mic { flex: none; width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s; }
.chat__mic:hover { background: #f1f1f2; color: var(--text); }
.chat__mic:focus-visible { outline: 2px solid var(--tt-cyan-dark); outline-offset: 2px; }
.chat__mic.is-listening { color: #fff; background: var(--tt-red); animation: chat-listen 1.2s ease-in-out infinite; }
@keyframes chat-listen { 0%, 100% { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.45); } 50% { box-shadow: 0 0 0 8px rgba(254, 44, 85, 0); } }
.chat__voice { margin: 6px 0 0; text-align: center; font-size: 13px; }
.chat__voice[hidden] { display: none; }

/* ---------- Colaboradores → Atividade (quem fez o quê e quando) ---------- */
.activity { display: flex; flex-direction: column; gap: 16px; }
.activity__filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.activity__filters .field { margin: 0; min-width: 170px; flex: 1 1 170px; max-width: 260px; }
.activity__people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.activity__person { display: flex; flex-direction: column; gap: 12px; padding: 14px; text-align: left; font: inherit; color: inherit; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
button.activity__person { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
button.activity__person:hover { border-color: var(--tt-cyan-dark); }
.activity__person.is-selected { border-color: var(--tt-cyan-dark); box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.35); }
.activity__person-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.activity__person-name { display: flex; flex-direction: column; min-width: 0; }
.activity__person-name strong { overflow-wrap: anywhere; }
.activity__total { display: flex; align-items: baseline; gap: 6px; }
.activity__total strong { font-size: 24px; letter-spacing: -0.02em; }
.activity__total span { font-size: 12px; color: var(--muted); }
.activity__stats { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.activity__stats li { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--muted); }
.activity__stats strong { font-size: 15px; color: var(--text); }
.activity__feed { padding: 6px 18px 18px; }
.activity__count { margin: 12px 0 0; }
.activity__day-title { margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.activity__list { list-style: none; margin: 0; padding: 0; }
.activity__entry { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.activity__entry:last-child { border-bottom: 0; }
.activity__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.activity__what { margin: 0; overflow-wrap: anywhere; }
.activity__target { color: var(--text); font-weight: 600; }
.activity__lines { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.activity__lines > div { display: flex; gap: 5px; padding: 3px 9px; border-radius: 999px; background: #f3f3f5; font-size: 12px; max-width: 100%; }
.activity__lines dt { color: var(--muted); flex: none; }
.activity__lines dt::after { content: ':'; }
.activity__lines dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.activity__tag { font-weight: 500; }
.activity__time { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 2px; }
.activity__more { display: flex; justify-content: center; padding-top: 14px; }

/* ---------- Automação → Campanha one-click ---------- */
.oneclick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.oneclick-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; padding: 20px; font: inherit; color: var(--muted); text-align: center; cursor: pointer; background: #fff; border: 2px dashed #c9cccf; border-radius: 18px; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.oneclick-add:hover, .oneclick-add:focus-visible { border-color: var(--tt-cyan-dark); color: var(--text); background: #f7fffe; }
.oneclick-add__plus { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--tt-black); color: #fff; font-size: 30px; line-height: 1; }
.oneclick-add__label { font-size: 15px; font-weight: 700; color: var(--text); }
.oneclick-add__hint { font-size: 12px; }
.oneclick-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 220px; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.oneclick-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--tt-cyan), var(--tt-red)); }
.oneclick-card__head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 4px; }
.oneclick-card__title { padding: 0; font: inherit; font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; text-align: left; color: var(--text); background: none; border: 0; cursor: pointer; overflow-wrap: anywhere; }
.oneclick-card__title:hover, .oneclick-card__title:focus-visible { text-decoration: underline; }
.oneclick-card__facts { margin: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.oneclick-card__facts > div { display: flex; gap: 8px; min-width: 0; }
.oneclick-card__facts dt { flex: none; width: 74px; color: var(--muted); }
.oneclick-card__facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.oneclick-card__actions { display: flex; gap: 8px; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.oneclick-card__actions .btn--primary { flex: 1; }
.oneclick-card__actions .btn { padding-left: 12px; padding-right: 12px; }
.oneclick-empty { margin: 14px 0 0; }
.oneclick-publish { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.oneclick-publish__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px; }
.oneclick-publish__banner:not(:empty) { padding: 14px 20px 0; }
.oneclick-publish__footer { flex: none; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: #fafafa; }
.oneclick-publish__intro { margin: 0 0 12px; }

/* Foto da identidade personalizada (pop-up "Criar identidade") */
.identity-photo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.identity-photo__preview { display: grid; place-items: center; width: 112px; height: 112px; border: 1px dashed var(--border); border-radius: 50%; overflow: hidden; background: #fafafa; font-size: 12px; }
.identity-photo__canvas { display: block; width: 112px; height: 112px; }
.identity-photo__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.identity-photo__actions label { cursor: pointer; }

/* Vincular pixel a contas de anúncio (pop-up) */
.link-pixel { display: flex; flex-direction: column; gap: 12px; }
.link-pixel__tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.link-pixel__list { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.link-pixel__row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.link-pixel__row:last-child { border-bottom: 0; }
.link-pixel__row:hover { background: #f9f9fa; }
.link-pixel__row.is-selected { background: #f2fffe; }
.link-pixel__row:focus-within { outline: 2px solid var(--tt-cyan-dark); outline-offset: -2px; }
.link-pixel__name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.link-pixel__name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-pixel__empty { padding: 14px; text-align: center; }
.link-pixel__counter { margin: 6px 0 0; font-size: 12px; }
.link-pixel__status:empty { display: none; }
