/* BrainMCH v2 — brand palette mirrors brainmch.com.br (v1, produção).
   primary  #EDFF00  (neon yellow-green CTA)
   secondary #460F74  (deep purple, brand mark / panels-on-dark)
   accent    #61CE70  (soft green, success / live indicator)
   bg        #060109  (almost-black, very dark purple tint) */
:root {
  --bg: #060109;
  --bg-deep: #000000;
  --panel: #110a1a;        /* sidebar / cards on the dark canvas */
  --panel-2: #1a0f29;      /* nested inputs, sub-cards */
  --border: #2a1542;
  --text: #f4f4f6;
  --muted: #9b8fa8;
  --primary: #EDFF00;      /* neon CTA — same as v1 Elementor --e-global-color-primary */
  --primary-ink: #060109;  /* text on top of primary */
  --secondary: #460F74;    /* deep purple, v1 brand mark */
  --secondary-2: #3f0c6d;  /* slightly darker purple used in v1 custom.css */
  --accent: #61CE70;       /* soft green — v1 Elementor --e-global-color-accent */
  --success: #22c55e;      /* gradient endpoints from v1 custom.css */
  --success-2: #16a34a;
  --danger-bg: #4a0d18;
  --danger-fg: #fecaca;
  --user-bubble: linear-gradient(135deg, #460F74 0%, #3f0c6d 100%);
  --bot-bubble: #110a1a;
  /* accent used as TEXT (yellow is unreadable on white, so light mode swaps to purple) */
  --accent-text: var(--primary);
  --sidebar-bg: linear-gradient(180deg, #110a1a 0%, #060109 100%);
  --ring: rgba(237,255,0,0.18);
}

/* ===== Light theme — matches brainmch.com.br produção (white content, purple
   sidebar, neon-yellow CTAs). Toggled via data-theme on <html>. ===== */
:root[data-theme="light"] {
  --bg: #f4f3f8;
  --bg-deep: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1eef7;
  --border: #e4e0ee;
  --text: #20182f;
  --muted: #6b6b6b;        /* WCAG AA (4.8:1 on the page bg); #7A7A7A failed at 3.9:1 */
  --primary: #EDFF00;
  --primary-ink: #1a1a1a;
  --secondary: #460F74;
  --secondary-2: #3f0c6d;
  --accent: #2fa84a;
  --success: #16a34a;
  --success-2: #15803d;
  --danger-bg: #fde8e8;
  --danger-fg: #b91c1c;
  --user-bubble: linear-gradient(135deg, #460F74 0%, #3f0c6d 100%);
  --bot-bubble: #ffffff;
  --accent-text: var(--secondary);
  --sidebar-bg: linear-gradient(180deg, #4a1180 0%, #390a64 100%);
  --ring: rgba(70,15,116,0.22);
}
/* In light mode the sidebar stays deep purple, so re-scope its inner tokens to
   light-on-purple by redefining the vars on .side (they cascade to children). */
:root[data-theme="light"] .side {
  --text: #ffffff;
  --muted: #e7d8ff;
  --border: rgba(255,255,255,0.16);
  --panel-2: rgba(255,255,255,0.10);
  --accent-text: var(--primary);
  --ring: rgba(237,255,0,0.25);
  color: #fff;
}
/* Light theme: neon-yellow CTAs sit on white and barely separate from it (similar
   luminance), so give them a soft purple (BrainMCH palette) shadow + ring so they
   pop instead of looking washed out. Text-on-yellow stays the dark --primary-ink. */
:root[data-theme="light"] .btn-primary,
:root[data-theme="light"] .ch-new,
:root[data-theme="light"] .banner-btn,
:root[data-theme="light"] .reconnect-btn,
:root[data-theme="light"] .cr-advanced-toggle.open { box-shadow: 0 2px 10px rgba(70,15,116,.22); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1, h2, h3, .title { font-family: "Roboto Slab", "Roboto", serif; }
a { color: var(--accent-text); }

.app { display: grid; grid-template-columns: 320px 1fr; height: 100vh; }

/* Only two themes are offered: Escuro (the bare :root default above) and Claro
   (data-theme="light"). Extra palettes (oficial/meia-noite/neon/aurora/areia) were
   removed per UX review — too many half-tuned themes hurt contrast/consistency. */
:root[data-theme="dark"] { /* explicit alias of the :root default, so the picker value resolves */ }

.side {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary); color: var(--primary-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
  box-shadow: 0 0 0 1px #EDFF0033, 0 4px 16px rgba(237,255,0,0.18);
}
/* BrainMCH wordmark — white badge with BRAIN / MCH stacked (mirrors produção). */
.logo-mark {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  background: #ffffff; border-radius: 10px; padding: 7px 11px; line-height: 0.92;
  font-family: "Roboto Slab", serif; font-weight: 800; color: #460F74;
  letter-spacing: 0.6px; box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.logo-mark span:first-child { font-size: 15px; }
.logo-mark span:last-child { font-size: 15px; color: #1a1a1a; }
.logo-mark.lg { padding: 12px 18px; }
.logo-mark.lg span { font-size: 24px; }

/* Real BrainMCH wordmark (extracted from produção, transparent PNG with WHITE
   strokes, so it only reads on dark surfaces: the sidebar and the login card). */
.logo-img { height: 34px; width: auto; display: block; }
.logo-img.lg { height: 64px; margin: 0 auto 18px; }

/* theme toggle (sidebar footer) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 12px; cursor: pointer; font: 600 12px/1 "Roboto", sans-serif;
  width: 100%; margin-bottom: 10px;
}
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle svg { width: 15px; height: 15px; }

/* theme picker (sidebar footer) */
.theme-picker {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 10px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px;
}
.theme-picker svg { width: 16px; height: 16px; color: var(--accent-text); flex: 0 0 auto; }
.theme-picker select {
  flex: 1; width: auto; background: transparent; border: 0; color: var(--text);
  font: 600 12px/1 "Roboto", sans-serif; cursor: pointer; padding: 2px;
}
.theme-picker select:focus { outline: none; box-shadow: none; }
/* Native <select> option popups: pin readable colors PER THEME so they never go
   white-on-white. The .side light override sets --text:#fff and the OS option popup
   is white, which made the brand selector's options invisible in the Claro theme.
   Fixed values here don't inherit the .side white --text. */
select option { background: #1a0f29; color: #f4f4f6; }
:root[data-theme="light"] select option { background: #ffffff; color: #20182f; }

.title { font-weight: 700; }
.sub { color: var(--muted); font-size: 12px; }

.section-title { font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin: 8px 0 8px; }

select, input, textarea {
  width: 100%; padding: 8px 10px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
}
select:focus, input:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

.post-list { list-style: none; padding: 0; margin: 0; }
.post-item {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.post-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.badge { background: var(--secondary); color: #fff; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.badge.b-linkedin { background: #0a66c2; }
.badge.b-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.badge.b-facebook { background: #1877f2; }
.badge.b-tiktok { background: #010101; color: #fff;
  background-image: linear-gradient(135deg, #25F4EE 0%, #010101 50%, #FE2C55 100%);
}
.status { margin-left: auto; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.st-scheduled { background: var(--secondary); color: var(--primary); }
.st-posted { background: var(--success-2); color: #f0fff4; }
.st-failed { background: #7f1d1d; color: #fff; }  /* texto branco fixo: --danger-fg é vermelho escuro no tema claro e ficava ilegível (vermelho no vermelho) */
.st-uncertain { background: #7c5210; color: #fde68a; }  /* timed out — may have posted */
.st-draft, .st-approved, .st-posting { background: #2a2235; color: #cbd5e1; }
.post-text { font-size: 13px; color: #d5cde0; }
.empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
/* first-run welcome (no brand yet) */
.firstrun { display: flex; justify-content: center; padding: 48px 24px; }
.firstrun-card { max-width: 460px; text-align: center; background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px 28px; box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.firstrun-emoji { font-size: 40px; }
.firstrun-card h2 { margin: 10px 0 8px; color: var(--text); }
.firstrun-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 18px; }

/* Sidebar nav button (entrypoint to the Connections page) */
.nav-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-weight: 600; cursor: pointer;
  text-align: left; margin-top: 12px;
  transition: border-color .12s, box-shadow .12s;
}
.nav-btn:hover { border-color: var(--primary); }
.nav-btn.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(237,255,0,0.18);
}
.nav-btn svg { color: var(--accent-text); flex: 0 0 auto; }
.nav-btn .nav-count {
  margin-left: auto; background: var(--secondary); color: #fff;
  font-size: 11px; padding: 2px 7px; border-radius: 10px; min-width: 18px; text-align: center;
}
.nav-btn .nav-count:empty { display: none; }

/* ===========================================================================
   v1-style Connections page  (mirrors social.brainmch.com)
   Surfaced as a "page within the app" — click sidebar "Conectar redes sociais"
   to swap the main pane. Back arrow returns to chat.
   =========================================================================== */
.conn-page { height: 100vh; overflow-y: auto; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; padding: 0 0 64px; }
.conn-page-header {
  width: 100%; max-width: 720px; padding: 28px 28px 8px;
  display: flex; align-items: center; gap: 16px;
}
.back-btn {
  background: transparent; color: var(--muted); border: 0; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .12s, color .12s;
}
.back-btn:hover { background: var(--panel-2); color: var(--accent-text); }
.conn-page-header h1 {
  margin: 0; font-size: 20px; font-weight: 500; color: var(--text);
}
.conn-page-header h1 strong { font-weight: 800; }
.conn-page-body {
  width: 100%; max-width: 420px; padding: 24px;
  display: flex; flex-direction: column; gap: 22px;
}
.conn-row { display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* The pill button itself — deep purple, full width, centered icon + label */
.prov-pill {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px 20px;
  background: var(--secondary); color: #fff;
  border: 0; border-radius: 999px;
  font: 600 15px/1 "Roboto", sans-serif; cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, background .15s;
}
.prov-pill:hover:not(:disabled) {
  background: var(--secondary-2);
  box-shadow: 0 8px 20px rgba(70,15,116,0.45);
  transform: translateY(-1px);
}
.prov-pill:disabled { cursor: not-allowed; opacity: 0.55; }
.prov-pill-ico { display: flex; }
.prov-pill-ico svg { width: 20px; height: 20px; display: block; }
/* TikTok pill keeps the brand black with cyan/red accent dot via gradient border */
.prov-pill.pill-tiktok {
  background: #010101;
  background-image: linear-gradient(135deg, #25F4EE 0%, #010101 50%, #FE2C55 100%);
}
.prov-pill.pill-tiktok:hover:not(:disabled) { filter: brightness(1.1); }
.prov-pill.pill-linkedin { background: #0a66c2; }
.prov-pill.pill-linkedin:hover:not(:disabled) { background: #084d92; }
.prov-pill.pill-youtube { background: #ff0033; }
.prov-pill.pill-youtube:hover:not(:disabled) { background: #cc0029; }

/* When a connection exists, the pill is shown disabled-looking + the account
   chip lives below it (same shape v1 prod uses). */
.prov-pill-connected {
  background: var(--panel-2) !important;
  background-image: none !important;
  color: var(--muted);
  cursor: default;
  border: 1px solid var(--border);
}
.prov-pill-connected .prov-pill-ico svg { opacity: 0.6; }
.prov-pill-connected:hover { transform: none; box-shadow: none; filter: none; }

.prov-connected { width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.prov-account {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 4px 0;
}
.prov-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--panel-2); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-text); font-weight: 800; font-size: 18px;
  border: 2px solid var(--border);
  flex: 0 0 auto;
}
.prov-handle { font-weight: 700; color: var(--text); font-size: 15px; }
.prov-disconnect {
  margin-left: 4px;
  background: #fb7185;  /* matches v1 coral "Desconectar" — Tailwind rose-400 */
  color: #fff; border: 0; border-radius: 999px;
  padding: 8px 22px; font: 700 13px/1 "Roboto", sans-serif; cursor: pointer;
  transition: background .12s ease;
}
.prov-disconnect:hover { background: #f43f5e; /* rose-500 */ }
.prov-expiry {
  color: var(--muted); font-size: 12px;
  max-width: 360px; text-align: center; line-height: 1.4;
}

.prov-hint {
  display: flex; gap: 8px; align-items: flex-start;
  color: var(--muted); font-size: 12px; line-height: 1.45;
  max-width: 320px; padding: 0 4px;
}
.prov-hint .hint-i {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--muted); font-style: italic; font-weight: 700;
  font-family: "Roboto Slab", serif; font-size: 11px;
}

.chat { display: flex; flex-direction: row; height: 100vh; background: var(--bg); }
.chat-col { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100vh; }
header { padding: 20px 28px; border-bottom: 1px solid var(--border); }
.chat-head-row { display: flex; align-items: flex-start; gap: 12px; }
.ch-toggle { background: none; border: 1px solid var(--border); border-radius: 8px; width: 34px; height: 34px;
  cursor: pointer; color: var(--muted); font-size: 16px; flex: 0 0 auto; }

/* chat history (threads) sidebar */
.chat-history { width: 264px; flex: 0 0 264px; height: 100vh; border-right: 1px solid var(--border);
  background: var(--card, var(--bg)); display: flex; flex-direction: column; overflow: hidden; }
.ch-new { margin: 12px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--primary); color: var(--primary-ink); font-weight: 600; cursor: pointer; font-size: 14px; }
.ch-search { padding: 0 12px 8px; }
.ch-search input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 13px; }
.ch-list { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.ch-section { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 8px 4px; }
.ch-item { display: flex; align-items: center; gap: 4px; padding: 8px 8px; border-radius: 8px; cursor: pointer; }
.ch-item:hover { background: var(--border); }
.ch-item.active { background: rgba(91,43,224,.12); }
.ch-item-main { flex: 1; min-width: 0; }
.ch-item-title { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-item-meta { font-size: 11px; color: var(--muted); }
.ch-item-snip { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-rename { flex: 1; min-width: 0; padding: 5px 7px; border-radius: 6px; border: 1px solid var(--primary);
  background: var(--bg); color: var(--text); font-size: 13px; }
.ch-item-actions { display: none; gap: 2px; flex: 0 0 auto; }
.ch-item:hover .ch-item-actions { display: flex; }
.ch-item-actions button { background: none; border: none; cursor: pointer; font-size: 12px; padding: 2px 3px;
  color: var(--muted); border-radius: 5px; }
.ch-item-actions button:hover { background: var(--bg); color: var(--text); }
.ch-empty { font-size: 12px; color: var(--muted); padding: 16px 10px; line-height: 1.5; }
/* phones: the threads list becomes a drawer over the chat, with a scrim */
.ch-backdrop { display: none; }
@media (max-width: 760px) {
  .chat { position: relative; }
  .chat-history { position: absolute; top: 0; bottom: 0; left: 0; z-index: 30;
    width: min(82vw, 300px); flex-basis: auto; box-shadow: 2px 0 16px rgba(0,0,0,.35); }
  .ch-backdrop { display: block; position: absolute; inset: 0; z-index: 29; background: rgba(0,0,0,.45); }
}
header h1 { margin: 0 0 4px; font-size: 22px; }
.hint { color: var(--muted); font-size: 13px; }

.log { flex: 1; overflow-y: auto; padding: 20px 28px; }
.msg { margin-bottom: 16px; max-width: 720px; }
.msg-role { font-size: 11px; color: var(--muted); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.06em; }
.msg-body {
  background: var(--bot-bubble); padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border);
  white-space: pre-wrap;
}
.msg-body code { background: rgba(127,127,127,.18); padding: 1px 5px; border-radius: 5px; font-size: .92em; }
.msg-body a { color: var(--accent-text); }
.msg-body strong { font-weight: 700; }
/* links to posts created/scheduled from the chat */
.msg-posts { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.msg-post { display: flex; flex-direction: column; gap: 6px; }
.msg-slides { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.msg-slide { height: 168px; width: 134px; flex: 0 0 auto; border-radius: 10px; border: 1px solid var(--border);
  object-fit: cover; cursor: zoom-in; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.msg-post-link { align-self: flex-start; display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--accent-text);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 6px 11px; text-decoration: none; cursor: pointer; }
.msg-post-link:hover { border-color: var(--primary); }
.msg-user .msg-body {
  background: var(--user-bubble); border-color: transparent;
  color: #fff;
}
.composer { display: flex; gap: 10px; padding: 16px 28px;
  border-top: 1px solid var(--border); background: var(--panel); }
.composer textarea {
  flex: 1; min-height: 60px; max-height: 200px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; resize: vertical;
  font: inherit;
}
.composer button {
  padding: 10px 18px; border-radius: 10px; border: 0;
  background: var(--primary); color: var(--primary-ink);
  font-weight: 800; cursor: pointer; letter-spacing: 0.02em;
  transition: transform .08s ease, box-shadow .15s ease;
}
.composer button:hover:not(:disabled) {
  box-shadow: 0 4px 18px rgba(237,255,0,0.25);
  transform: translateY(-1px);
}
.composer button:disabled { opacity: 0.4; cursor: not-allowed; }

[x-cloak] { display: none !important; }

/* login screen: V1-style dark purple gradient + dark card, so the WHITE
   wordmark PNG pops. The login renders in BOTH themes, so every color here is
   fixed on .login-* classes (never the theme tokens): the light theme's white
   panels must not leak into this screen. */
.login-wrap {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 480px at 82% -10%, rgba(237,255,0,0.07), transparent 60%),
    linear-gradient(135deg, #0b0b10 0%, #2a0a4a 55%, #7a1fa2 100%);
}
.login-card {
  width: 100%; max-width: 400px;
  background: #131318;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  padding: 36px 32px;
  text-align: center;
  color: #f4f4f6;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}
.login-logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--primary); color: var(--primary-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 28px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(237,255,0,0.22);
}
.login-card h1 { margin: 0 0 4px; font-size: 24px; color: #ffffff; }
.login-sub { color: #b9aecb; margin: 0 0 24px; font-size: 13px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-card label { font-size: 13px; color: #b9aecb; }
.login-card input {
  width: 100%; padding: 12px 14px;
  background: #1c1c24; color: #f4f4f6;
  border: 1px solid #34343f; border-radius: 12px;
  font: inherit;
}
.login-card input::placeholder { color: #8b8b98; }
.login-card input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(237,255,0,0.18);
}
.login-card button[type=submit] {
  padding: 12px; border: 0; border-radius: 999px;
  background: var(--primary); color: #1a1a1a; font-weight: 800; cursor: pointer;
  font-size: 15px; letter-spacing: 0.02em;
  transition: box-shadow .15s ease, transform .08s ease;
}
.login-card button[type=submit]:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(237,255,0,0.28); transform: translateY(-1px);
}
.login-card button[type=submit]:disabled { opacity: 0.4; cursor: not-allowed; }
.login-hint { color: #b9aecb; font-size: 12px; margin: 4px 0 0; text-align: center; }
.login-err { color: #fecaca; background: #4a0d18; border: 1px solid #7f1d1d;
  padding: 8px 12px; border-radius: 8px; font-size: 13px; margin: 4px 0 0; }
.link-btn {
  background: transparent; color: var(--muted); border: 0; cursor: pointer;
  text-decoration: underline; font-size: 13px; padding: 4px;
}
.link-btn:hover { color: var(--accent-text); }
/* the login card is always dark, so its links get fixed light colors */
.login-card .link-btn { color: #b9aecb; }
.login-card .link-btn:hover { color: #EDFF00; }
.login-card strong { color: #ffffff; }

/* user footer in sidebar */
.user-footer {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

/* small toast pinned bottom-right (used by OAuth return) */
.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--panel); border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 12px 16px; border-radius: 8px;
  font-size: 13px; color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  /* Um aviso não captura o ponteiro: senão ele fica por cima de um botão e a
     pessoa clica no nada durante os segundos em que está na tela. Só o
     "Desfazer" volta a ser clicável. */
  pointer-events: none;
  z-index: 100;
}
.toast.err { border-left-color: #ef4444; }

/* ===========================================================================
   v2 portal: sidebar nav, Agenda calendar, Análises, post modal.
   Zero-build (Alpine + this stylesheet). Tuned for a fast first paint and
   fluid month navigation. Brand palette unchanged (mirrors v1 produção).
   =========================================================================== */

.side-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.side-nav .nav-btn { margin-top: 0; }
.nav-btn.soon { opacity: 0.6; }
.nav-btn svg { width: 18px; height: 18px; }

.side-foot { margin-top: auto; padding-top: 14px; }
.conn-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--border); margin-bottom: 10px;
}
.conn-status .dot { width: 9px; height: 9px; border-radius: 50%; }
.conn-status.ok { color: var(--accent); }
.conn-status.ok .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.conn-status.off { color: var(--muted); }
.conn-status.off .dot { background: var(--muted); }

/* ---------- Agenda + Análises shared shell ---------- */
.agenda, .analytics { height: 100vh; overflow-y: auto; background: var(--bg); padding: 0 0 64px; }
.agenda-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 24px 32px 8px; gap: 16px;
}
.agenda-head .hello { color: var(--muted); font-size: 14px; }
.agenda-head h1 { margin: 2px 0 0; font-size: 26px; }

.account { position: relative; }
.account-btn {
  background: var(--primary); color: var(--primary-ink); border: 0;
  padding: 10px 18px; border-radius: 999px; font-weight: 800; cursor: pointer;
  letter-spacing: .02em; transition: box-shadow .15s ease, transform .08s ease;
}
.account-btn:hover { box-shadow: 0 6px 20px rgba(237,255,0,.28); transform: translateY(-1px); }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; min-width: 230px; box-shadow: 0 16px 40px rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 2px;
}
.account-email { font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.account-menu button {
  text-align: left; background: transparent; color: var(--text); border: 0;
  padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit;
}
.account-menu button:hover { background: var(--panel-2); color: var(--accent-text); }

/* ---------- view tabs ---------- */
.agenda-tabs { display: flex; align-items: center; gap: 8px; padding: 12px 32px 16px; flex-wrap: wrap; }
.tabs-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 6px; }
.agenda-tabs button {
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 999px; font: 600 13px/1 "Roboto", sans-serif; cursor: pointer;
  transition: all .12s ease;
}
.agenda-tabs button:hover { color: var(--text); border-color: var(--primary); }
.agenda-tabs button.active { background: var(--secondary); color: #fff; border-color: var(--secondary); }

/* ---------- calendar ---------- */
.cal-wrap { padding: 0 32px; }
.cal-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-arrow {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font-size: 20px; cursor: pointer; line-height: 1;
}
.cal-arrow:hover { border-color: var(--primary); color: var(--accent-text); }
.cal-month { font-family: "Roboto Slab", serif; font-size: 20px; font-weight: 700; min-width: 180px; }
.cal-today {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font: 600 12px/1 "Roboto", sans-serif;
}
.cal-today:hover { color: var(--accent-text); border-color: var(--primary); }
.cal-loading { color: var(--muted); font-size: 12px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  padding: 4px 6px; font-weight: 700;
}
.cal-cell {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  min-height: 104px; padding: 6px; display: flex; flex-direction: column; gap: 5px;
  overflow: hidden;
}
.cal-cell.out { opacity: 0.4; }
.cal-cell.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal-daynum { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-cell.today .cal-daynum { color: var(--accent-text); }
.cal-chips { display: flex; flex-direction: column; gap: 4px; }

.chip {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: var(--panel-2); border: 1px solid var(--border); border-left-width: 3px;
  border-radius: 7px; padding: 3px 5px; cursor: pointer; text-align: left;
  transition: transform .06s ease, border-color .12s;
}
.chip:hover { transform: translateY(-1px); border-color: var(--primary); }
.chip.st-posted { border-left-color: var(--success); }
.chip.st-scheduled { border-left-color: var(--secondary); }
.chip.st-failed { border-left-color: #ef4444; }
.chip.st-draft, .chip.st-approved, .chip.st-posting { border-left-color: #6b7280; }
.chip-thumb {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 5px;
  background: var(--secondary); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.chip-thumb svg { width: 14px; height: 14px; }
.chip-thumb.b-linkedin { background: #0a66c2; }
.chip-thumb.b-facebook { background: #1877f2; }
.chip-thumb.b-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.chip-thumb.b-youtube { background: #ff0033; }
.chip-thumb.b-tiktok { background-image: linear-gradient(135deg, #25F4EE 0%, #010101 50%, #FE2C55 100%); }
.chip-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.chip-time { font-size: 11px; font-weight: 700; color: var(--text); }
.chip-status { font-size: 10px; color: var(--muted); }

.badge.b-youtube { background: #ff0033; }

/* ---------- lista / pendentes ---------- */
.ag-list { padding: 4px 32px; display: flex; flex-direction: column; gap: 8px; }
.ag-row {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
}
.ag-row:hover { border-color: var(--primary); }
.ag-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ag-text { flex: 1; font-size: 13px; color: #d5cde0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- performance cards ---------- */
.ag-cards { padding: 4px 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

/* ---------- Análises ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 8px 32px 20px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
.kpi-v { font-family: "Roboto Slab", serif; font-size: 26px; font-weight: 700; color: var(--accent-text); }
.kpi-l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }

.panel { margin: 8px 32px 24px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.panel h2 { margin: 0 0 4px; font-size: 18px; }
.panel-sub { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

.best-slots { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.slot-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px;
}
.slot-chip.best { border-color: var(--primary); box-shadow: 0 0 0 2px var(--ring); }
.slot-rank { font-weight: 800; color: var(--accent-text); }
.slot-when { font-weight: 700; }
.slot-eng { font-size: 12px; color: var(--muted); }

.heat { overflow-x: auto; }
.heat-grid { display: grid; gap: 3px; min-width: 640px; align-items: center; }
.heat-corner { }
.heat-hour { font-size: 10px; color: var(--muted); text-align: left; }
.heat-day { font-size: 11px; color: var(--muted); font-weight: 700; padding-right: 6px; }
.heat-cell { height: 22px; border-radius: 4px; border: 1px solid rgba(255,255,255,.03); }

/* ---------- post modal ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6);
  display: flex; align-items: flex-start; justify-content: center; padding: 24px 20px;
  backdrop-filter: blur(2px);
  /* the BACKDROP scrolls too: even if a modal somehow outgrows its own
     max-height, the page is never trapped behind an unreachable area */
  overflow-y: auto;
}
.modal {
  width: 100%; max-width: 460px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
  /* tall content (e.g. a 20-photo strip) scrolls INSIDE the dialog: the whole
     popup is always reachable without zooming out (dvh = mobile-safe) */
  max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  margin: auto 0;
}
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.modal-x { margin-left: auto; background: transparent; border: 0; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.modal-x:hover { color: var(--accent-text); }
.modal-when { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
/* Fidelity over crop (Patricia): show the WHOLE image at its own aspect ratio
   on a neutral background; never let a crop suggest the upload was wrong. */
.modal-img { width: 100%; max-height: 320px; object-fit: contain; background: var(--panel-2); border-radius: 10px; margin-bottom: 12px; }
.modal-text { font-size: 14px; line-height: 1.5; color: #e6dff0; white-space: pre-wrap; }
.modal-metrics { display: flex; gap: 16px; margin: 14px 0; color: var(--muted); }
.modal-metrics strong { color: var(--text); }
.modal-actions { display: flex; gap: 10px; margin-top: 12px; }
.btn-primary { flex: 1; background: var(--primary); color: var(--primary-ink); border: 0; border-radius: 10px; padding: 11px; font-weight: 800; cursor: pointer; }
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(237,255,0,.25); }
/* Bloqueado tem que PARECER bloqueado. Só `.composer button:disabled` tinha
   opacidade, e o botão do "Novo post" não vive dentro de `.composer`: com mídia
   faltando ele ficava amarelo-vivo, aceitava o clique e não fazia nada. */
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-danger { background: var(--danger-bg); color: var(--danger-fg); border: 1px solid #7f1d1d; border-radius: 10px; padding: 11px 18px; cursor: pointer; font-weight: 700; }
.btn-danger:hover { background: #5a1018; }

/* ---------- Mídia (biblioteca) ---------- */
.account-btn.busy { opacity: .6; pointer-events: none; }
/* video quality readout (stored resolution + bitrate) */
.media-spec { font-size: 11px; color: var(--muted); padding: 3px 10px 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.media-lowq { color: #f59e0b; font-weight: 700; cursor: help; white-space: nowrap; }
.cmp-spec { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cmp-res-chip { position: absolute; bottom: 2px; left: 2px; font-size: 9px; font-weight: 800; line-height: 1;
  background: rgba(0,0,0,.6); color: #fff; padding: 2px 4px; border-radius: 4px; }
.cmp-lowq-dot { position: absolute; top: 2px; left: 2px; font-size: 11px; line-height: 1; cursor: help; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }

/* ---------- header actions + composer ---------- */
.head-actions { display: flex; align-items: center; gap: 12px; }
.head-new { padding: 10px 16px; }
.cmp-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 5px; }
.cmp-text { width: 100%; min-height: 96px; resize: vertical; font: inherit; }
.cmp-media { display: flex; gap: 8px; flex-wrap: wrap; }
.cmp-media-tile { position: relative; width: 56px; height: 56px; border-radius: 8px; background: var(--panel-2) center/cover no-repeat;
  border: 2px solid var(--border); cursor: pointer; }
.cmp-media-tile.sel { border-color: var(--primary); box-shadow: 0 0 0 2px var(--ring); }
.tile-check { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: var(--primary-ink); font-size: 12px; font-weight: 900; line-height: 20px;
  text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* image add/remove inside the post detail modal */
.modal-media { margin-bottom: 12px; }
.modal-img-wrap { position: relative; display: inline-block; width: 100%; }
.modal-img-wrap .modal-img { margin-bottom: 8px; }
.img-remove { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; border: 0; cursor: pointer; font-size: 18px; line-height: 1; }
.img-remove:hover { background: #ef4444; }
.img-toggle { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 13px; cursor: pointer; font-weight: 600; font-size: 13px; }
.img-toggle:hover { border-color: var(--primary); }
.img-toggle .ico { font-size: 15px; }
.modal-edit-text { width: 100%; min-height: 110px; resize: vertical; font: inherit; }

/* character counter under the composer textarea */
.char-count { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; }
.char-count.warn { color: #b45309; }
.char-count.over { color: #ef4444; font-weight: 700; }

/* composer media: actions, progress, preview */
.cmp-media-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.media-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 13px; cursor: pointer; font-weight: 600; font-size: 13px; }
.media-btn:hover { border-color: var(--primary); }
.media-btn.busy { opacity: .6; pointer-events: none; }
.cmp-progress { position: relative; height: 22px; background: var(--panel-2); border-radius: 7px; overflow: hidden; margin-top: 10px; }
.cmp-bar { height: 100%; background: var(--primary); transition: width .15s ease; }
.cmp-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text); }
.cmp-preview { display: flex; gap: 12px; align-items: center; }
.cmp-preview-thumb { position: relative; width: 96px; height: 96px; border-radius: 10px; background: var(--panel-2) center/cover no-repeat; border: 1px solid var(--border); flex: 0 0 auto; }
.cmp-preview-meta { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text); }
.cmp-check { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
  background: #16a34a; color: #fff; font-size: 14px; font-weight: 900; line-height: 24px; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.cmp-ok-label { color: #16a34a; font-weight: 700; }
.cc-remove { align-self: flex-start; background: var(--danger-bg); color: var(--danger-fg); border: 1px solid #7f1d1d; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; }
.cc-remove:hover { background: #5a1018; }
.play-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 34px; height: 34px;
  border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; padding-left: 3px; }
.play-badge.sm { width: 22px; height: 22px; font-size: 10px; }
.pdf-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: #b91c1c; color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; }
/* ---------- Carrosséis ---------- */
.carousel-page { height: 100vh; overflow-y: auto; background: var(--bg); padding: 0 0 64px; }
.cr-wrap { max-width: 760px; margin: 0 auto; padding: 8px 24px; }
.cr-compose select, .cr-compose input[type=text] { width: 100%; }
.cr-row { display: flex; gap: 12px; }
.cr-row > div { flex: 1; }
.cr-check { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--text); }
.cr-running { text-align: center; padding: 60px 20px; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cr-muted { color: var(--muted); font-size: 13px; }
.cr-topic { margin-top: 8px; font-style: italic; color: var(--muted); max-width: 480px; }
.cr-spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--primary); animation: cr-spin 0.9s linear infinite; }
@keyframes cr-spin { to { transform: rotate(360deg); } }
/* determinate carousel progress bar (running state): reuses .cr-train-bar/.cr-train-fill */
.cr-progress-meta { width: 100%; max-width: 480px; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.cr-running .cr-train-bar { width: 100%; max-width: 480px; }
.cr-slides { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 14px; scroll-snap-type: x mandatory; }
.cr-slide { height: 300px; width: 240px; flex: 0 0 auto; border-radius: 12px; border: 1px solid var(--border); object-fit: cover; scroll-snap-align: start; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.cr-links { display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.cr-links a { color: var(--accent-text); font-weight: 600; }
/* network targeting + page-count + schedule */
.cr-nets { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 6px 0 4px; }
.cr-net { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text); cursor: pointer; }
.cr-net-off { opacity: .45; cursor: not-allowed; }
/* carousel: "uses brand by default" note + optional disclosure */
.cr-uses-brand { margin: 14px 0 8px; padding: 10px 14px; border-radius: 10px; font-size: 13px; color: var(--text);
  background: rgba(91,43,224,.07); border: 1px solid rgba(91,43,224,.18); }
.cr-advanced-toggle { width: 100%; text-align: left; background: none; border: 1px dashed var(--border);
  border-radius: 10px; padding: 10px 12px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.cr-advanced-toggle:hover { color: var(--text); border-color: var(--primary); }
.cr-advanced-toggle.open { color: var(--text); border-style: solid; }
.cr-advanced { margin-top: 10px; padding: 4px 0 2px; border-left: 2px solid var(--border); padding-left: 14px; }
.cr-tag { font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px;
  background: var(--border); color: var(--muted); }
.cr-hint { margin: 6px 0 2px; padding: 10px 12px; border-radius: 10px; font-size: 13px;
  background: rgba(245,158,11,.12); color: #b45309; border: 1px solid rgba(245,158,11,.35); }
.cr-sched { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.cr-sched-row { display: flex; gap: 12px; align-items: center; margin: 8px 0 4px; }
.cr-sched-row input[type=datetime-local] { flex: 1; }
/* palette upload */
.cr-palette { display: flex; align-items: center; gap: 12px; margin: 4px 0; }
.cr-palette-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px;
  border: 1px dashed var(--border); cursor: pointer; font-size: 13px; color: var(--text); }
.cr-palette-btn .cr-file { display: none; }
.cr-palette-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.cr-photo-item { position: relative; display: inline-flex; }
.cr-photo-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  border: none; background: #ef4444; color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }

/* carousel sub-tabs (gerar | treinamento) */
.cr-tabs { max-width: 760px; margin: 4px auto 0; padding: 0 24px; display: flex; gap: 6px; border-bottom: 1px solid var(--border); }
.cr-tab { background: none; border: none; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cr-tab.active { color: var(--accent-text); border-bottom-color: var(--primary); }
.cr-badge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  border-radius: 50%; background: #16a34a; color: #fff; font-size: 10px; margin-left: 2px; }
.cr-style-on { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 9px 12px; border-radius: 10px;
  font-size: 13px; color: var(--text); background: rgba(91,43,224,.08); border: 1px solid rgba(91,43,224,.20); }
.btn-link { background: none; border: none; color: var(--accent-text); font-weight: 600; cursor: pointer; font-size: 13px; padding: 0; }

/* checkbox-rótulo genérico (Pexels). As abas de legenda por rede da aba
   Carrosséis saíram daqui: agora é o mesmo interruptor + lista de todas as
   redes usado no compositor e no card do chat (.cmp-switch + .pn-rede). */
.cr-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }

/* carousel schedule slots */
.cr-slot-x { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg);
  color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; flex: 0 0 auto; }
.sched-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 8px 0; }
.sched-num { width: 56px; }
.cr-sched-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 4px; flex-wrap: wrap; }

/* ---- treinamento de estilo ---- */
.cr-train { max-width: 760px; margin: 0 auto; padding: 16px 24px 40px; }
.cr-train-intro h2 { margin: 8px 0 6px; font-size: 20px; color: var(--text); }
.cr-train-upload { margin: 16px 0; }
.cr-train-drop { width: 100%; justify-content: center; padding: 18px; font-size: 14px; }
.cr-train-count { margin-top: 10px; font-size: 13px; color: var(--muted); }
.cr-train-bar { height: 6px; border-radius: 4px; background: var(--border); margin-top: 6px; overflow: hidden; }
.cr-train-fill { height: 100%; background: var(--primary); transition: width .25s ease; }
.cr-train-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; margin: 16px 0; }
.cr-train-item { position: relative; }
.cr-train-thumb { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.cr-train-pdf { width: 100%; aspect-ratio: 4/5; border-radius: 10px; border: 1px solid var(--border); background: var(--card, #fff);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 26px; color: var(--muted); }
.cr-train-pdf span { font-size: 12px; font-weight: 700; }
.cr-train-actions { margin: 12px 0; }
.cr-train-profile { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.cr-train-text { min-height: 160px; font-family: inherit; }
.cr-train-auto { margin-top: 16px; padding: 10px 14px; border-radius: 10px; font-size: 13px; color: var(--text);
  background: rgba(16,163,74,.08); border: 1px solid rgba(16,163,74,.22); }

/* carousel slide preview + download */
.cr-slide-wrap { position: relative; flex: 0 0 auto; scroll-snap-align: start; }
.cr-slide { cursor: zoom-in; }
.cr-slide-num { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800;
  background: rgba(0,0,0,.65); color: #fff; padding: 2px 7px; border-radius: 6px; pointer-events: none; }
.cr-slide-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.cr-slide-wrap:hover .cr-slide-tools { opacity: 1; }
.cr-slide-tool { width: 26px; height: 26px; border-radius: 7px; border: 0; background: rgba(0,0,0,.7); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; }
.cr-slide-tool:hover { background: var(--primary); color: var(--primary-ink); }
.cr-slide-tool.danger:hover { background: #ef4444; color: #fff; }
.cr-slide-dl { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px;
  background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 14px; opacity: 0; transition: opacity .15s; }
.cr-slide-wrap:hover .cr-slide-dl { opacity: 1; }
.brand-wcag-badge { font-size: 9px; font-weight: 800; letter-spacing: .04em; padding: 1px 5px; border-radius: 5px; margin-left: 2px; }
.brand-wcag-badge.wcag-aaa { background: rgba(16,185,129,.18); color: #059669; border: 1px solid rgba(16,185,129,.3); }
.brand-wcag-badge.wcag-aa { background: rgba(59,130,246,.18); color: #2563eb; border: 1px solid rgba(59,130,246,.3); }
.brand-wcag-badge.wcag-warn { background: rgba(245,158,11,.18); color: #d97706; border: 1px solid rgba(245,158,11,.3); }
.brand-wcag-badge.wcag-fail { background: rgba(239,68,68,.18); color: #dc2626; border: 1px solid rgba(239,68,68,.3); }
.cr-dlrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.cr-dlrow a.media-btn { text-decoration: none; }
.cr-lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.86);
  display: flex; align-items: center; justify-content: center; }
.cr-lb-img { max-width: 86vw; max-height: 84vh; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.cr-lb-close { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 24px; cursor: pointer; }
.cr-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px;
  border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 32px; cursor: pointer; border-radius: 10px; }
.cr-lb-prev { left: 16px; } .cr-lb-next { right: 16px; }
.cr-lb-bar { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 16px;
  align-items: center; color: #fff; font-size: 14px; background: rgba(0,0,0,.5); padding: 8px 16px; border-radius: 24px; }
.cr-lb-dl { color: #fff; text-decoration: none; font-weight: 600; }
.cr-lb-dl:hover { text-decoration: underline; }

/* preferred music tracks (publish reminder) */
.cr-music { margin: 14px 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(91,43,224,.05); }
.cr-music-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 14px; color: var(--text); }
.cr-music-hint { font-size: 12px; color: var(--muted); margin: 4px 0 8px; line-height: 1.5; }
.cr-music-list { display: flex; flex-direction: column; gap: 6px; }
.cr-music-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.cr-music-label { font-weight: 600; color: var(--text); }
.cr-music-open { color: var(--accent-text); font-size: 12px; text-decoration: none; }
.cr-music-open:hover { text-decoration: underline; }
.cr-music-x { margin-left: auto; border: none; background: none; color: #ef4444; cursor: pointer; font-size: 16px; }
.cr-music-empty { font-size: 12px; color: var(--muted); }
.cr-music-add { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.cr-music-add input { flex: 1; min-width: 140px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 13px; }

/* regenerate with feedback */
.cr-regen { margin: 14px 0; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--border);
  background: var(--bg); }
.cr-regen .cmp-text { min-height: 52px; }
.cr-regen-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* LinkedIn (PDF) separate publish block */
.cr-linkedin { margin: 16px 0; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(10,102,194,.35); background: rgba(10,102,194,.06); }
.cr-li-head { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.cr-li-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* Pexels stock-photo search modal */
.pexels-modal { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.pexels-box { width: min(880px, 96vw); max-height: 88vh; display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.pexels-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--text); }
.pexels-search { display: flex; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.pexels-search input { flex: 1; }
.pexels-search select { width: 130px; flex: 0 0 auto; }
.pexels-search .btn-primary { flex: 0 0 auto; min-width: 90px; }
.pexels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 16px 18px; overflow-y: auto; }
.pexels-item { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; border: 1px solid var(--border); aspect-ratio: 3/4; }
.pexels-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pexels-item:hover .pexels-add { opacity: 1; }
.pexels-item.busy .pexels-add { opacity: 1; }
.pexels-add { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700;
  color: #fff; background: rgba(70,15,116,.55); opacity: 0; transition: opacity .15s; }
.pexels-credit { position: absolute; bottom: 0; left: 0; right: 0; font-size: 10px; color: #fff; padding: 3px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pexels-foot { padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.pexels-foot a { color: var(--accent-text); }
.cr-li-row a.media-btn { text-decoration: none; }

/* analytics: when engagement is refreshed */

/* news recency window selector + keyword search */
.news-head-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* Force dark text on a white field so it stays readable in every theme. */
.news-window, .news-kw { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: #1a1a1a; font-size: 13px; }
.news-window option { color: #1a1a1a; background: #fff; }
.news-kw { min-width: 240px; }
.news-kw::placeholder { color: #888; }

/* ---------- connection help (how to connect, layperson) ---------- */
.conn-help { margin: 28px auto 0; max-width: 760px; }
.conn-help-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.conn-help-q { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--primary);
  color: var(--primary-ink); font-weight: 900; display: flex; align-items: center; justify-content: center; }
.conn-help-title { margin: 0; font-size: 16px; }
.conn-help-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.help-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; overflow: hidden; background: var(--panel); }
.help-item.open { border-color: var(--primary); }
.help-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: none;
  border: 0; cursor: pointer; color: var(--text); font: inherit; }
.help-ico { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.help-ico svg { width: 18px; height: 18px; }
.help-name { font-weight: 700; flex: 1; text-align: left; }
.help-chev { color: var(--muted); }
.help-body { padding: 0 16px 14px 46px; font-size: 13px; line-height: 1.5; }
.help-row { margin: 8px 0; color: var(--text); }
.help-steps { margin: 6px 0 0; padding-left: 20px; }
.help-steps li { margin: 3px 0; }
.help-err { color: var(--muted); }
.help-err strong { color: var(--text); }

/* ---------- connection-health notifications ---------- */
/* sidebar nav warning badge */
.nav-warn { margin-left: auto; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 10px; }
.nav-warn.warn-soon { background: #f59e0b; color: #1a1300; }
.nav-warn.warn-expired { background: #ef4444; color: #fff; }
/* sidebar footer status colors */
.conn-status.warn-soon .dot { background: #f59e0b; }
.conn-status.warn-soon { color: #b45309; }
.conn-status.warn-expired .dot { background: #ef4444; }
.conn-status.warn-expired { color: #ef4444; font-weight: 700; }
/* prominent banner on the agenda */
.conn-alert-banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px;
  margin: 0 32px 14px; border: 1px solid; }
.conn-alert-banner.banner-soon { background: #fff7ed; border-color: #fdba74; color: #7c2d12; }
.conn-alert-banner.banner-expired { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }
.conn-alert-banner .banner-ico { font-size: 22px; line-height: 1.2; }
.conn-alert-banner .banner-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.conn-alert-banner .banner-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.banner-btn { background: var(--primary); color: var(--primary-ink); border: 0; border-radius: 8px; padding: 6px 12px; font-weight: 700; cursor: pointer; font-size: 12px; }
.banner-link { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 12px; align-self: center; }
/* per-connection status on the connections page */
.prov-status { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.status-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; }
.status-badge.sb-ok { background: #dcfce7; color: #166534; }
.status-badge.sb-soon { background: #ffedd5; color: #9a3412; }
.status-badge.sb-expired { background: #fee2e2; color: #991b1b; }
.reconnect-btn { background: var(--primary); color: var(--primary-ink); border: 0; border-radius: 8px; padding: 6px 12px; font-weight: 700; cursor: pointer; font-size: 12px; }
/* notification cards by severity */
.notif-card.notif-soon { border-left: 4px solid #f59e0b; }
.notif-card.notif-expired { border-left: 4px solid #ef4444; }
.notif-card.notif-soon .notif-ico, .notif-card.notif-expired .notif-ico { font-size: 22px; display: flex; align-items: center; justify-content: center; }

/* multi-day scheduling in the composer */
.sched-list { display: flex; flex-direction: column; gap: 6px; }
.sched-row { display: flex; gap: 8px; align-items: center; }
.sched-row input[type="datetime-local"] { flex: 1; }
.sched-del { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.sched-del:hover { border-color: #ef4444; color: #ef4444; }
.sched-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.sched-repeat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.sched-repeat select { padding: 6px 8px; }
.sched-num { width: 56px; padding: 6px 8px; }

/* "Horário por rede": compact per-network time override rows */
.pnt-row { display: flex; align-items: center; gap: 8px; min-height: 36px; flex-wrap: wrap; }
.pnt-name { font-size: 13px; min-width: 78px; }
.pnt-time { width: auto; flex: 0 0 auto; padding: 6px 8px; }
/* data + hora da rede: com UMA data comum cada rede escolhe o instante inteiro
   (a Patricia pediu "datas e horários específicos", não só a hora) */
.pnt-when { width: auto; flex: 0 1 auto; min-width: 0; max-width: 100%; padding: 6px 8px; }
.pnt-hint { font-size: 12px; color: var(--muted); }

.modal-resched { margin: 12px 0 4px; }
.resched-row { display: flex; gap: 8px; }
.resched-row input { flex: 1; }

/* ---------- mic button (voz) ---------- */
.mic-btn { width: 44px; flex: 0 0 44px; border: 1px solid var(--border); background: var(--panel-2);
  color: var(--text); border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mic-btn:hover { border-color: var(--primary); color: var(--accent-text); }
.mic-btn svg { width: 18px; height: 18px; }
.mic-btn.rec { background: #ef4444; color: #fff; border-color: #ef4444; animation: micpulse 1.1s ease-in-out infinite; }
@keyframes micpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); } 50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } }

/* ---------- tooltip instantâneo ----------
   Uso: <el class="tip" data-tip="explicação curta">…</el>
   Aparece IMEDIATAMENTE no hover (e no foco de teclado), ao contrário do
   title nativo (delay de ~1s e visual apagado). Bolha escura fixa: legível
   nos dois temas. Alinhada à direita para não estourar a viewport nos
   botões da borda direita (composer). Reutilizável em qualquer controle. */
.tip { position: relative; }
.tip::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); right: 0;
  background: #16161d; color: #fff; border: 1px solid #3f3f4c; border-radius: 8px;
  padding: 6px 10px; font-size: 12px; font-weight: 400; line-height: 1.4; text-align: left;
  width: max-content; max-width: 260px; white-space: normal;
  opacity: 0; pointer-events: none; transform: translateY(3px);
  transition: opacity .12s ease, transform .12s ease; z-index: 70; }
.tip:hover::after, .tip:focus-visible::after { opacity: 1; transform: translateY(0); }

/* ---------- Notícias ---------- */
.news { height: 100vh; overflow-y: auto; background: var(--bg); padding: 0 0 64px; }
.news-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.news-src { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.news-badge { margin-left: auto; background: var(--panel-2); color: var(--muted); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 999px; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.news-title { display: block; font-family: "Roboto Slab", serif; font-weight: 700; font-size: 15px;
  color: var(--text); text-decoration: none; margin: 8px 0 6px; line-height: 1.3; }
.news-title:hover { color: var(--accent-text); }
.news-snip { font-size: 13px; color: var(--muted); line-height: 1.45; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.news-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.news-actions .btn-ghost { text-decoration: none; flex: 1 1 0; min-width: 0; text-align: center;
  padding-left: 6px; padding-right: 6px; white-space: nowrap; }
/* CTA principal em linha própria (largura total): na coluna estreita da grade (min 260px)
   os 4 botões não cabiam numa linha só e o "Criar conteúdo" estourava a borda direita do
   card, ficando cortado (a meia-lua amarela dos screenshots da Patricia). flex-basis 100%
   força o botão a descer para a própria linha; os botões-fantasma quebram sozinhos se preciso. */
.news-actions .btn-primary { flex: 1 0 100%; margin-left: 0; margin-top: 2px; padding: 9px 16px; text-align: center; }

/* ---------- Notificações ---------- */
.notifs { height: 100vh; overflow-y: auto; background: var(--bg); padding: 0 0 64px; }
.notif-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  border-left: 3px solid var(--primary); padding: 14px 16px;
}
.notif-ico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px;
  background: var(--panel-2); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center; }
.notif-ico svg { width: 20px; height: 20px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 700; margin-bottom: 2px; }
.notif-msg { font-size: 13px; color: var(--muted); line-height: 1.4; }
/* O que o Aceitar vai gerar (consentimento informado no card) */
.notif-accept-hint { font-size: 12px; color: var(--muted); line-height: 1.45;
  margin-top: 6px; padding: 6px 10px; border-left: 2px solid var(--accent);
  background: var(--panel-2); border-radius: 0 8px 8px 0; }
.notif-accept-hint em { font-style: italic; }
/* Modal "Sugestão aceita": intro do que mudou */
.sug-result-intro { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 8px 0 10px; }
.notif-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.notif-actions .btn-primary { padding: 8px 16px; }
.btn-ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px; cursor: pointer; font: 600 13px/1 "Roboto", sans-serif;
}
.btn-ghost:hover { color: var(--text); border-color: var(--primary); }

/* ---------- Templates ---------- */
.templates { height: 100vh; overflow-y: auto; background: var(--bg); padding: 0 0 64px; }
.tpl-form {
  margin: 0 32px 18px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.tpl-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tpl-form-row input, .tpl-form-row select { flex: 1; min-width: 140px; }
.tpl-form textarea { min-height: 90px; resize: vertical; font: inherit; }
.tpl-form .btn-primary { align-self: flex-start; padding: 10px 22px; }
.tpl-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; }
.tpl-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tpl-name { font-family: "Roboto Slab", serif; font-weight: 700; font-size: 16px; margin: 8px 0 6px; }
.tpl-brief { font-size: 13px; color: #d5cde0; line-height: 1.45; flex: 1; min-height: 56px; }
.tpl-actions { display: flex; gap: 8px; margin-top: 12px; }
.tpl-actions .btn-primary { flex: 1; padding: 9px; }
.tpl-actions .btn-danger { padding: 9px 14px; }

/* ---------- Marca (editar / criar) ---------- */
.brand-page { height: 100vh; overflow-y: auto; background: var(--bg); padding: 0 0 80px; }
.brand-wrap { max-width: 720px; margin: 0 auto; padding: 8px 24px; }
.brand-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px 18px; margin: 14px 0; }
.brand-card-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-text); margin-bottom: 6px; }
.brand-card-sub { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.brand-ta { width: 100%; min-height: 56px; resize: vertical; font: inherit; }
.brand-card input[type=text], .brand-card input[type=url] { width: 100%; }
.brand-import { border-color: var(--ring); }
.brand-import-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.brand-import-row input { flex: 1; min-width: 200px; }
.brand-palette { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.brand-swatch { position: relative; display: flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 5px 8px; }
.brand-swatch input[type=color] { width: 30px; height: 30px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.brand-hex { width: 92px; font-size: 13px; }
.brand-x { background: transparent; border: 0; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.brand-x:hover { color: #ef4444; }
.brand-primary-tag { position: absolute; top: -8px; left: 6px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--primary); color: var(--primary-ink); padding: 1px 6px; border-radius: 6px; }
.brand-handles { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.brand-handle-row input { width: 100%; }
.brand-handle-input { display: flex; gap: 6px; align-items: center; }
.brand-handle-input input { flex: 1; min-width: 0; }
.brand-connect-btn { flex: 0 0 auto; white-space: nowrap; }
.brand-connect-btn.connected { color: var(--success-2); border-color: var(--success-2); }
/* brand onboarding step + logo kit */
.brand-choose-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.brand-logos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.brand-logo-item { position: relative; width: 72px; height: 72px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel-2); display: flex; align-items: center; justify-content: center; overflow: visible; }
.brand-logo-item img { max-width: 64px; max-height: 64px; object-fit: contain; }
.brand-logo-add { width: 72px; height: 72px; justify-content: center; flex-direction: column; }
.brand-actions-bar { display: flex; gap: 10px; align-items: center; max-width: 720px; margin: 18px auto 0; padding: 0 24px; }
.brand-actions-bar .btn-primary { flex: 0 0 auto; min-width: 180px; }
.brand-actions-bar .btn-danger { margin-left: auto; }
/* sidebar brand affordances */
.brand-side-actions { display: flex; gap: 14px; margin: 7px 2px 2px; }
.brand-edit-link { background: transparent; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; }
.brand-edit-link:hover { color: var(--accent-text); text-decoration: underline; }
.brand-incomplete { margin: 6px 0 2px; padding: 7px 10px; border-radius: 9px; font-size: 12px; cursor: pointer;
  background: rgba(245,158,11,.12); color: #f59e0b; border: 1px solid rgba(245,158,11,.35); display: flex; gap: 6px; align-items: center; }
.brand-incomplete:hover { background: rgba(245,158,11,.2); }

/* ---------- Projetos (Criar Conteúdo) ---------- */
.proj-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 24px 0; }
.proj-tab { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px 9px 0 0; padding: 7px 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
.proj-tab.active { background: var(--panel); border-color: var(--primary); color: var(--accent-text); }
.proj-tab-badge { font-size: 10px; font-weight: 800; background: var(--primary); color: var(--primary-ink); border-radius: 10px; padding: 0 6px; }
.proj-config-btn { margin-left: auto; background: transparent; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; }
.proj-config-btn:hover { color: var(--accent-text); }
.proj-panel { margin: 4px 24px 8px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--primary); border-radius: 12px; }
.proj-panel input[type=text] { width: 100%; }
.proj-ta { width: 100%; min-height: 52px; resize: vertical; font: inherit; }
.proj-files { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.proj-file { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.proj-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-file-meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.proj-file-del { background: transparent; border: 0; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.proj-file-del:hover { color: #ef4444; }
.proj-upload-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.proj-usage { color: var(--muted); font-size: 12px; }

/* ===========================================================================
   Responsiveness. The AI agent can schedule by voice/text, but browsing the
   Agenda must stay fluid on phones too — sidebar collapses to a top bar, the
   calendar tightens, KPI grid and heatmap reflow.
   =========================================================================== */
@media (max-width: 980px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
}
.cal-dow .dow-abbr { display: none; }
@media (max-width: 860px) {
  /* Shell: slim top bar (logo + marca) + the view pane + bottom tab bar, all
     inside 100dvh (dvh: the iOS URL bar never covers the nav). */
  .app { display: flex; flex-direction: column; height: 100dvh; }
  .side {
    flex: 0 0 auto; flex-direction: row; align-items: center; gap: 10px;
    height: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border);
    overflow: visible;
  }
  .side .brand { margin-bottom: 0; flex: 0 0 auto; }
  .side .section-title { display: none; }
  .side select { width: auto; min-width: 0; flex: 1 1 auto; }
  .brand-side-actions { display: none; }  /* Editar/Nova marca vivem no menu "Mais" */
  .side-nav { display: none; }            /* a navegação vive na barra inferior */
  .side-foot { display: none; }           /* tema/usuário vivem no menu "Mais" */
  .brand-incomplete { margin: 0; flex: 0 0 auto; min-height: 36px; }
  .brand-incomplete span:last-child { display: none; }  /* só o chip ⚠ compacto */

  /* every view fills the space between the bars and scrolls INSIDE itself */
  .app > main { flex: 1 1 0%; min-height: 0; height: auto; overflow-y: auto; }
  main.chat { overflow: hidden; }         /* the chat scrolls in .log, not the pane */
  .chat-col, .chat-history { height: 100%; }

  /* iOS zooms into controls under 16px; keep form text at 16px on phones.
     The class list repeats every input styled with its own font elsewhere
     (font: inherit / 13px), which would beat the bare element selector. */
  input, select, textarea,
  .composer textarea, .cmp-text, .modal-edit-text, .login-card input,
  .ch-search input, .ch-rename, .cr-music-add input, .tpl-form textarea,
  .brand-ta, .proj-ta, .news-kw, .news-gen-instr,
  .lib-search, .lib-stock-search input, .lib-stock-search select,
  .lib-rename-input, .lib-move-new input { font-size: 16px; }

  .brand-handles { grid-template-columns: 1fr; }
  .agenda-head, .agenda-tabs, .cal-wrap, .ag-list, .ag-cards, .kpi-row, .news-tags, .news-tabs { padding-left: 16px; padding-right: 16px; }
  .panel, .tpl-form { margin-left: 16px; margin-right: 16px; }
  .conn-alert-banner { margin: 0 16px; }

  /* calendar: abbreviated weekday names; chips keep the TIME (status = cor).
     Chips STACK (thumb over time): a 7-col grid on a phone leaves ~40px of
     chip content, so a side-by-side time would clip mid-glyph. */
  .dow-full { display: none; }
  .cal-dow .dow-abbr { display: inline; }
  .cal-cell { min-height: 84px; }
  .cal-add { width: 28px; height: 28px; font-size: 17px; }
  .chip { flex-direction: column; align-items: center; padding: 4px 2px; gap: 3px; }
  .chip-thumb { flex-basis: 22px; width: 22px; height: 22px; }
  .chip-meta { align-items: center; }
  .chip-time { font-size: 10px; }
  .chip-status { display: none; }

  /* chat: tighter gutters so the textarea keeps its room */
  header { padding: 12px 14px; }
  .log { padding: 14px 12px; }
  .composer { padding: 10px 12px; gap: 8px; }
  .composer button { padding: 10px 14px; }
  .msg { max-width: 100%; }

  /* rows that would squeeze side-by-side on a phone now wrap */
  .cr-row { flex-wrap: wrap; }
  .cr-row > div { flex: 1 1 220px; }
  .notif-card { flex-wrap: wrap; }
  .pexels-search { flex-wrap: wrap; }
  .pexels-search input { min-width: 150px; }
}
@media (max-width: 560px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .cal-grid { gap: 3px; }
  .cal-dow { font-size: 10px; padding: 2px; }
  .cal-cell { min-height: 64px; border-radius: 7px; }
  .agenda-head h1 { font-size: 20px; }
  /* modals become bottom sheets, primary action pinned and always reachable */
  .modal-back { padding: 12px 0 0; align-items: flex-end; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; margin: auto 0 0;
    max-height: calc(100dvh - 12px); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .modal .modal-actions { position: sticky; bottom: 0; z-index: 2; background: var(--panel);
    padding: 10px 0; margin-top: 12px; box-shadow: 0 -10px 14px -12px rgba(0,0,0,.55); }
  .modal-x { padding: 6px 10px; }  /* 44px-class touch target */
}

/* ---------- mobile bottom navigation + "Mais" sheet ---------- */
.bottom-nav { display: none; }
.more-back { display: none; }
@media (max-width: 860px) {
  .bottom-nav {
    display: flex; flex: 0 0 auto; z-index: 40;
    background: var(--panel); border-top: 1px solid var(--border);
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  }
  .bn-btn {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: none; border: 0; border-radius: 10px; min-height: 52px; padding: 6px 2px;
    color: var(--muted); font: 600 10.5px/1 "Roboto", sans-serif; cursor: pointer; position: relative;
  }
  .bn-btn svg { width: 22px; height: 22px; }
  .bn-btn.active { color: var(--accent-text); }
  .bn-badge {
    position: absolute; top: 2px; left: calc(50% + 6px);
    background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 999px; padding: 1px 5px; line-height: 1.4;
  }
  .more-back {
    display: flex; position: fixed; inset: 0; z-index: 85;
    background: rgba(0,0,0,.5); align-items: flex-end;
  }
  .more-sheet {
    width: 100%; background: var(--panel); border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0; padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 60px); overflow-y: auto; overscroll-behavior: contain;
  }
  .more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .more-item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    min-height: 74px; padding: 12px 6px; border: 1px solid var(--border); border-radius: 14px;
    background: var(--panel-2); color: var(--text); font: 600 12px/1.25 "Roboto", sans-serif; text-align: center; cursor: pointer;
  }
  .more-item svg { width: 20px; height: 20px; color: var(--accent-text); }
  .more-item.active { border-color: var(--accent-text); }
  .more-badge { position: absolute; top: 6px; right: 8px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 5px; }
  .more-badge.warn { background: #f59e0b; color: #1a1a1a; }
  .more-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
  .more-theme { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
  .more-theme select { width: auto; }
  .more-user { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-width: 0; }
  .more-user span { overflow: hidden; text-overflow: ellipsis; }
}

/* ===========================================================================
   Calendar quick-add, composer multi-brain/multi-network chips, news tags.
   =========================================================================== */

/* "+" on each calendar day (hover-revealed; always visible on touch) */
.cal-cell { position: relative; cursor: pointer; }
.cal-add {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border-radius: 7px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--accent-text);
  font-size: 15px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transition: opacity .12s ease, border-color .12s ease;
}
.cal-cell:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { border-color: var(--primary); }
/* touch devices: hover-revealed affordances must be always visible */
@media (hover: none) {
  .cal-add { opacity: 1; }
  .cr-slide-wrap .cr-slide-dl { opacity: 1; }
  .ch-item-actions { display: flex; }
}

/* composer: brains (contas) + redes toggle chips */
.cmp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cmp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font: 600 13px/1 "Roboto", sans-serif;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.cmp-chip:hover { border-color: var(--primary); }
.cmp-chip.sel { background: var(--secondary); color: #fff; border-color: var(--secondary); box-shadow: 0 0 0 2px var(--ring); }
.cmp-chip-count { font-size: 11px; font-weight: 700; }
.cmp-chip.sel .cmp-chip-count { color: var(--primary); }
.cmp-chip-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.cmp-chip-note.warn { color: #d97706; }

/* link-style opt-in toggle for multi-date generation */
.cmp-repeat-toggle { display: inline-block; margin-top: 8px; padding: 4px 0; }
.cmp-repeat-toggle:hover { text-decoration: underline; }

/* secondary emphasized action ("Publicar agora") in the composer footer */
.btn-ghost.ghost-primary { color: var(--accent-text); border-color: var(--accent-text); font-weight: 700; }
.btn-ghost.ghost-primary:hover:not(:disabled) { box-shadow: 0 0 0 2px var(--ring); }
.btn-ghost:disabled { opacity: .45; cursor: not-allowed; }

/* saved keyword tags on the Noticias page (chip = span with inner buttons:
   label re-runs the search, ✕ deletes the tag after a confirm) */
.news-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 32px 10px; }
.news-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 12px; font: 600 12px/1.3 "Roboto", sans-serif;
  transition: border-color .12s ease;
}
.news-tag:hover { border-color: var(--primary); }
.news-tag.sel { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.news-tag .tag-label { background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.news-tag .tag-label:hover { color: var(--accent-text); }
.news-tag.sel .tag-label:hover { color: #fff; }
.news-tag .tag-x { background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 11px; line-height: 1; cursor: pointer; padding: 0 0 0 2px; }
.news-tag .tag-x:hover { color: #ef4444; }
.news-tag.sel .tag-x { color: rgba(255,255,255,.75); }
.news-tag.tag-add input {
  background: transparent; border: 0; outline: none; color: var(--text);
  font: inherit; width: 110px; padding: 0;
}

/* feed vs Salvas (curadoria, item 3) */
.news-tabs { display: flex; gap: 8px; padding: 0 32px 10px; }
.news-tab-btn {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 14px; font: 700 12px/1.3 "Roboto", sans-serif; cursor: pointer;
}
.news-tab-btn.sel { background: var(--secondary); color: #fff; border-color: var(--secondary); }

/* rastreabilidade (item 4): pauta que já virou conteúdo */
.news-used { display: flex; gap: 10px; align-items: center; font: 600 12px/1.3 "Roboto", sans-serif; color: var(--ok, #16a34a); margin-top: 6px; }
.news-used a { color: var(--accent-text); }

/* item 5: estado declarado da leitura da matéria no estúdio */
.news-read-state {
  margin: 8px 0 0; padding: 7px 10px; border-radius: 8px;
  font: 600 12px/1.4 "Roboto", sans-serif;
  border: 1px solid var(--border); color: var(--muted); background: var(--panel-2);
}
.news-read-state.full { color: #16a34a; border-color: rgba(22,163,74,.35); }
.news-read-state.failed { color: #d97706; border-color: rgba(217,119,6,.35); }

/* item 6: fonte primária confirmável */
.news-primary { margin-top: 8px; }
.news-primary-fields { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.news-primary-fields input { flex: 1; min-width: 180px; }
.news-primary-badge {
  margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  font: 600 10px/1.4 "Roboto", sans-serif; text-transform: none;
  border: 1px solid var(--border); color: var(--muted);
}
.news-primary-badge.verified { color: #16a34a; border-color: rgba(22,163,74,.4); }
.news-primary-badge.none { color: #d97706; border-color: rgba(217,119,6,.4); }

/* mesma pauta em +N fontes (item 2): expansão dentro do card */
.news-group { margin-top: 6px; }
.news-group-toggle {
  background: transparent; border: 0; padding: 0; cursor: pointer;
  color: var(--accent-text); font: 600 12px/1.3 "Roboto", sans-serif;
}
.news-group-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.news-group-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.news-group-src { font-weight: 600; }
.news-group-date { color: var(--muted); }
.news-group-row .btn-ghost { padding: 2px 8px; font-size: 11px; }

/* ===========================================================================
   V1 visual polish: rounded scrollbars + softer corners (produção look).
   Inputs/selects are untouched on purpose (contrast work stays as-is).
   =========================================================================== */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.panel, .modal { border-radius: 18px; }
.kpi, .news-card, .tpl-card, .notif-card, .brand-card, .firstrun-card { border-radius: 16px; }
.btn-primary, .btn-ghost, .btn-danger { border-radius: 999px; }

/* ===========================================================================
   Início (home dashboard, V1 parity): gradient hero + black stat cards with
   big neon numbers + cost counter + feature shortcuts.
   =========================================================================== */
.home { height: 100vh; overflow-y: auto; background: var(--bg); padding: 0 0 64px; }
.home-hero {
  margin: 24px 32px 22px; padding: 44px 40px; border-radius: 22px; color: #fff;
  background:
    radial-gradient(900px 420px at 85% -20%, rgba(237,255,0,0.10), transparent 60%),
    linear-gradient(135deg, #1a0533 0%, #460F74 55%, #8a1fb8 100%);
  box-shadow: 0 18px 50px rgba(70,15,116,0.35);
}
.home-hero h1 { margin: 0; font-size: 40px; line-height: 1.12; color: #fff; }
.home-hero-sub { margin: 8px 0 22px; font-size: 19px; color: #e7d8ff; }
.home-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.home-hero-actions .btn-primary { flex: 0 0 auto; padding: 12px 24px; }
.home-btn-ghost {
  background: rgba(255,255,255,0.10); color: #fff; border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px; padding: 12px 22px; font: 700 14px/1 "Roboto", sans-serif; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.home-btn-ghost:hover { background: rgba(255,255,255,0.18); border-color: #fff; }
.home-section-title { margin: 4px 32px 12px; font-family: "Roboto Slab", serif; font-size: 18px; font-weight: 700; color: var(--text); }
.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 32px; }
/* fixed near-black card + neon number in BOTH themes (that's the V1 look) */
.home-stat { background: #0b0b0e; border: 1px solid #23232b; border-radius: 18px; padding: 22px 18px; text-align: center; }
.home-stat-v { font-family: "Roboto Slab", serif; font-size: 44px; font-weight: 700; color: #EDFF00; line-height: 1.05; }
.home-stat-l { margin-top: 6px; font-size: 13px; color: #cfcfd6; }
.home-cost {
  margin: 16px 32px 0; background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 4px;
}
.home-cost-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.home-cost-v { font-family: "Roboto Slab", serif; font-size: 34px; font-weight: 700; color: var(--accent-text); }
.home-cost-sub { font-size: 13px; color: var(--muted); }
.home-cost-note { font-size: 11px; color: var(--muted); }
.home-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 0 32px; margin-top: 20px; }
.home-feature {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px;
  text-align: left; cursor: pointer; font: inherit; color: var(--text);
  transition: border-color .12s ease, transform .08s ease;
}
.home-feature:hover { border-color: var(--primary); transform: translateY(-2px); }
.home-feature-ico { font-size: 22px; }
.home-feature-name { font-family: "Roboto Slab", serif; font-weight: 700; margin: 8px 0 4px; }
.home-feature-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
@media (max-width: 980px) {
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .home-hero h1 { font-size: 30px; }
}
@media (max-width: 860px) {
  /* height comes from the flex shell (.app > main); only tighten the gutters */
  .home-hero, .home-cost { margin-left: 16px; margin-right: 16px; }
  .home-hero { padding: 28px 22px; }
  .home-stats, .home-features { padding-left: 16px; padding-right: 16px; }
  .home-section-title { margin-left: 16px; margin-right: 16px; }
}

/* ===========================================================================
   Planos: yellow price header on panel cards, purple CTAs, gradient backdrop.
   =========================================================================== */
.plans-back {
  position: fixed; inset: 0; z-index: 90; overflow-y: auto; padding: 40px 20px;
  background: linear-gradient(135deg, rgba(11,11,16,0.97) 0%, rgba(42,10,74,0.96) 55%, rgba(122,31,162,0.94) 100%);
  display: flex; align-items: flex-start; justify-content: center;
}
.plans-box { width: min(1080px, 100%); position: relative; text-align: center; color: #fff; }
.plans-box .modal-x { position: absolute; top: -10px; right: 0; color: #e7d8ff; }
.plans-box .modal-x:hover { color: #EDFF00; }
.plans-title { margin: 6px 0 4px; font-size: 32px; color: #fff; }
.plans-sub { margin: 0 0 26px; color: #e7d8ff; font-size: 15px; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; align-items: stretch; }
.plan-card {
  position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; display: flex; flex-direction: column; text-align: center; color: var(--text);
  box-shadow: 0 18px 44px rgba(0,0,0,0.28);
}
.plan-card.popular { border-color: var(--primary); box-shadow: 0 18px 44px rgba(237,255,0,0.16); }
.plan-pop {
  position: absolute; top: 10px; right: 10px; background: var(--secondary); color: #fff;
  font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; letter-spacing: .03em;
}
.plan-head { background: var(--primary); color: #1a1a1a; padding: 18px 14px 14px; }
.plan-name { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.plan-price { font-family: "Roboto Slab", serif; font-size: 30px; font-weight: 700; line-height: 1.15; }
.plan-per { font-size: 13px; font-weight: 600; min-height: 18px; }
.plan-feats {
  list-style: none; margin: 0; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px;
  flex: 1; font-size: 13.5px; color: var(--text);
}
.plan-cta {
  display: block; margin: 0 18px 18px; padding: 11px; border-radius: 999px;
  background: var(--secondary); color: #fff; font-weight: 800; text-decoration: none;
  transition: background .12s ease, box-shadow .15s ease;
}
.plan-cta:hover { background: var(--secondary-2); box-shadow: 0 8px 20px rgba(70,15,116,0.45); }
.plans-foot { margin: 22px auto 0; max-width: 640px; font-size: 12px; color: #e7d8ff; line-height: 1.5; }

/* ===========================================================================
   Notícias: sites preferidos (chips + inline add), preferred badge on cards.
   =========================================================================== */
.news-sites { margin: 0 32px 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.news-sites-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.news-sites-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.news-site-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 6px 5px 12px;
  font: 600 12px/1.3 "Roboto", sans-serif;
}
.news-site-chip button { background: transparent; border: 0; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; padding: 0 4px; }
.news-site-chip button:hover { color: #ef4444; }
.news-sites-empty { font-size: 12px; color: var(--muted); }
.news-sites-add { display: flex; gap: 8px; flex-wrap: wrap; }
.news-sites-add input { flex: 1; min-width: 200px; width: auto; }
.news-badge.preferred { margin-left: 0; background: var(--secondary); color: #fff; border-color: var(--secondary); }
@media (max-width: 860px) { .news-sites { margin-left: 16px; margin-right: 16px; } }

/* ===========================================================================
   Banco de Imagens (Pexels page — replaced the Templates tab)
   =========================================================================== */
.stock-grid { padding: 8px 0 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); overflow: visible; }
.stock-grid .pexels-item { aspect-ratio: 3/4; }
.stock-grid.ori-landscape .pexels-item { aspect-ratio: 4/3; }
.stock-grid.ori-square .pexels-item { aspect-ratio: 1/1; }

/* ===========================================================================
   Composer multi-photo strip (order = publish order) + dark-mode date picker
   =========================================================================== */
/* The browser's native calendar icon is near-black: invisible on the dark
   theme's inputs. Invert it by default (dark is the default theme) and restore
   under the light theme. */
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.6); opacity: .95; cursor: pointer;
}
:root[data-theme="light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
:root[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
:root[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none; opacity: .8;
}

.cmp-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.cmp-strip-item { width: 86px; }
.cmp-strip-thumb { position: relative; width: 86px; height: 86px; border-radius: 10px;
  background-size: cover; background-position: center; border: 1px solid var(--border); }
.cmp-strip-n { position: absolute; top: 4px; left: 4px; min-width: 20px; height: 20px;
  border-radius: 999px; background: var(--secondary); color: #fff; font: 700 11px/20px "Roboto", sans-serif;
  text-align: center; padding: 0 4px; }
.cmp-strip-ctl { display: flex; justify-content: space-between; gap: 2px; margin-top: 4px; }
.cmp-strip-ctl button { flex: 1; height: 24px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 13px; line-height: 1; }
.cmp-strip-ctl button:hover:not(:disabled) { border-color: var(--primary); }
.cmp-strip-ctl button:disabled { opacity: .35; cursor: default; }
.cmp-media-tile.sel { outline: 2px solid var(--secondary); outline-offset: -2px; }
.cmp-media-tile .cmp-check { position: absolute; right: 4px; top: 4px; }

/* ===========================================================================
   Agenda informativa (Patricia): network badge + carousel indicator on chips,
   daily summary modal, modal carousel grid, drag-reorder, LinkedIn PDF note.
   =========================================================================== */
/* network logo pinned to each calendar chip thumb (brand color background) */
.chip-thumb { position: relative; }
.chip-net { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px;
  border-radius: 5px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--bg); }
.chip-net svg { width: 10px; height: 10px; color: #fff; }
.chip-net.static { position: static; width: 22px; height: 22px; border-radius: 7px; border: 0; }
.chip-net.static svg { width: 13px; height: 13px; }
/* The network badge carries its brand color so the white glyph stays visible on
   ANY background (fixes the light-theme day-summary chips where a white icon sat
   invisibly on the light pill — Patricia). Mirrors the .chip-thumb.b-* colors. */
.chip-net.b-linkedin { background: #0a66c2; }
.chip-net.b-facebook { background: #1877f2; }
.chip-net.b-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.chip-net.b-youtube { background: #ff0033; }
.chip-net.b-tiktok { background-image: linear-gradient(135deg, #25F4EE 0%, #010101 50%, #FE2C55 100%); }
/* carousel indicator (multiple photos) */
.chip-multi { position: absolute; left: -3px; top: -3px; background: var(--secondary); color: #fff;
  font: 700 9px/1 "Roboto", sans-serif; padding: 3px 4px; border-radius: 6px; border: 1px solid var(--bg); }

/* daily summary modal */
.day-sum .day-sum-total { font: 700 15px/1.3 "Roboto", sans-serif; margin: 4px 0 10px; }
.day-sum-nets { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.day-sum-net { display: flex; align-items: center; gap: 7px; font-size: 13px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px 5px 6px; }
.day-sum-list { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; margin-bottom: 8px; }
.day-sum-list .chip { width: 100%; }

/* "Agendar em outra rede / outro perfil" reuse modal */
.reuse-src { display: flex; gap: 10px; align-items: center; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; }
.reuse-src-txt { font-size: 13px; color: var(--muted); line-height: 1.4; }
.prov-avatar-ico svg { width: 16px; height: 16px; color: #fff; }
.modal-fail { color: var(--danger-fg); background: var(--danger-bg); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; margin: 4px 0 10px; line-height: 1.45; }
.modal-fail-cat { font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  font-size: 11px; opacity: .85; margin-bottom: 4px; }
.modal-fail-exp { color: var(--text); }
.modal-fail-sug { margin-top: 6px; font-weight: 600; }
.modal-fail-tech { margin-top: 8px; }
.modal-fail-tech summary { cursor: pointer; opacity: .8; font-size: 12px; }
.modal-fail-tech code { display: block; margin-top: 4px; padding: 6px 8px; border-radius: 6px;
  background: rgba(0,0,0,.25); font-size: 11px; word-break: break-word; white-space: pre-wrap; }

/* modal carousel grid (all photos, numbered; click swaps the big preview) */
.modal-carousel { margin-bottom: 10px; }
.modal-car-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.modal-car-item { position: relative; width: 56px; height: 56px; border-radius: 8px;
  background-size: cover; background-position: center; border: 1px solid var(--border); cursor: pointer; padding: 0; }
.modal-car-item.cur { outline: 2px solid var(--secondary); outline-offset: -2px; }
.modal-car-item .cmp-strip-n { transform: scale(.85); transform-origin: top left; }

/* strip drag feedback + LinkedIn PDF advisory */
.cmp-strip-item { cursor: grab; }
.cmp-strip-item.dragging { opacity: .45; }
.cmp-li-note { margin: 8px 0 2px; padding: 10px 12px; border: 1px solid var(--border);
  border-left: 3px solid var(--secondary); border-radius: 10px; background: var(--panel-2);
  font-size: 12.5px; line-height: 1.5; color: var(--text); }

/* document tile in the composer strip (no raster preview) */
.cmp-strip-doc { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font: 700 11px/1.2 "Roboto", sans-serif; color: var(--text);
  background: var(--panel-2); border-radius: 10px; }

/* full-size image viewer (click any thumbnail; click again / Esc closes) */
.imgview { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 16px; }
.imgview img { max-width: 96vw; max-height: 92dvh; object-fit: contain; border-radius: 8px; }
.modal-img.zoomable, .cmp-strip-thumb { cursor: zoom-in; }
.cmp-strip-item { cursor: grab; }

/* estúdio de notícia (gerar / editar / regenerar antes de agendar) */
.news-gen { max-width: 560px; }
.news-gen-ref { border: 1px solid var(--border); border-left: 3px solid var(--secondary);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; background: var(--panel-2); }
.news-gen-ref .news-title.sm { font-size: 13.5px; line-height: 1.35; display: block; }
.news-gen-opts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.news-gen-opts select { flex: 1; min-width: 150px; }
.news-gen-instr { width: 100%; margin-bottom: 10px; }
.news-gen-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.news-gen-text { min-height: 180px; }
.news-gen-img-row { display: flex; align-items: center; gap: 12px; }
.news-gen-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border); cursor: zoom-in; }

/* ---------- Gerenciamento de Ads ---------- */
.ads-off { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; color: var(--muted); margin: 12px 0; }
.ads-off code { background: rgba(0,0,0,.22); padding: 1px 6px; border-radius: 6px; }
.ads-engine { margin: 6px 0 6px; }
.ads-nets { flex-wrap: wrap; }
/* Conectores de contas de anúncio (Meta Ads / Google Ads) */
.ads-connectors { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.ads-conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--muted); }
.ads-conn.on { color: var(--accent); border-color: var(--accent); }
.ads-run { margin-top: 14px; }
.ads-result { display: flex; flex-direction: column; gap: 16px; }
.ads-scorecard { display: flex; align-items: center; gap: 16px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 14px; padding: 16px; flex-wrap: wrap; }
.ads-grade { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; font-weight: 900; color: #fff; background: var(--muted); flex: 0 0 auto; }
.ads-grade.g-a { background: #16a34a; } .ads-grade.g-b { background: #65a30d; }
.ads-grade.g-c { background: #ca8a04; } .ads-grade.g-d { background: #ea580c; } .ads-grade.g-f { background: #dc2626; }
.ads-score { font-size: 30px; font-weight: 900; color: var(--text); line-height: 1; }
.ads-score small { font-size: 14px; color: var(--muted); font-weight: 600; }
.ads-summary { flex: 1 1 240px; color: var(--text); }
.ads-block { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.ads-block h3 { margin: 0 0 10px; font-size: 15px; }
.ads-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.ads-finding { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.ads-finding:first-of-type { border-top: 0; }
.ads-prio, .ads-plat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  border-radius: 6px; padding: 2px 7px; font-weight: 700; white-space: nowrap; }
.ads-prio { color: #fff; background: var(--muted); height: fit-content; }
.ads-prio.p-critical { background: #dc2626; } .ads-prio.p-high { background: #ea580c; }
.ads-prio.p-medium { background: #ca8a04; } .ads-prio.p-low { background: #6b7280; }
.ads-plat { background: var(--panel-2); color: var(--muted); }
.ads-finding-t { margin-bottom: 3px; }
.ads-reco { margin-top: 4px; color: var(--accent-text); font-size: 13px; }
.ads-actions .ads-action { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0;
  border-top: 1px solid var(--border); cursor: pointer; }
.ads-action input { margin-top: 3px; }
.ads-risk { font-size: 12px; color: var(--muted); margin-top: 3px; }
/* Params exatos que a ação aprovada executará (transparência do HITL) */
.ads-params { font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace;
  margin-top: 3px; word-break: break-all; }
.ads-creative { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); align-items: flex-start; }
.ads-creative:first-of-type { border-top: 0; }
.ads-creative img { width: 96px; height: 120px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.ads-missing { background: var(--panel-2); }
.ads-hist { display: flex; flex-direction: column; gap: 8px; }
.ads-hist-item { display: flex; gap: 12px; align-items: center; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; cursor: pointer;
  text-align: left; color: var(--text); }
.ads-hist-item:hover { border-color: var(--primary); }
.ads-hist-cmd { font-weight: 700; text-transform: capitalize; }
.ads-hist-score { color: var(--accent-text); font-weight: 700; }
.ads-hist-st { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); }
.ads-hist-st.st-done { color: #16a34a; } .ads-hist-st.st-failed { color: #dc2626; } .ads-hist-st.st-running { color: #ca8a04; }

/* ===========================================================================
   Agenda melhorias 2026-07-18 (F1): filtros compartilhados, contadores por
   dia/mês, alerta de falhas do mês, teto de 3 chips, agrupamento multi-rede
   (chip único + faixa de troca no modal), pill de Story.
   =========================================================================== */

/* barra de filtros (todas as visualizações da Agenda); quebra linha no mobile */
.ag-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 0 32px 14px; }
.agf-nets { display: flex; gap: 6px; }
.agf-chip { display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel-2); cursor: pointer; padding: 0;
  opacity: .55; transition: opacity .12s ease, border-color .12s ease, box-shadow .12s ease; }
.agf-chip:hover { opacity: 1; border-color: var(--primary); }
.agf-chip.sel { opacity: 1; border-color: var(--secondary); box-shadow: 0 0 0 2px var(--ring); }
.agf-status, .agf-period { width: auto; min-width: 130px; }
.agf-q { flex: 1 1 160px; min-width: 140px; max-width: 280px; }
.agf-clear { background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font: 600 12px/1 "Roboto", sans-serif; }
.agf-clear:hover { color: var(--accent-text); border-color: var(--primary); }
@media (max-width: 860px) { .ag-filters { padding-left: 16px; padding-right: 16px; } }
@media (max-width: 560px) { .agf-q { max-width: none; } }

/* alerta de falhas do mês visível (calendário) */
.cal-fail-alert { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--danger-bg); color: var(--danger-fg); border: 1px solid var(--border);
  border-left: 3px solid #ef4444; border-radius: 10px; padding: 9px 12px;
  margin-bottom: 12px; font: 600 13px/1.4 "Roboto", sans-serif; }
.cal-fail-alert .cfa-ico { font-size: 15px; }
.cal-fail-alert .cfa-btn { background: #ef4444; color: #fff; border: 0; border-radius: 999px;
  padding: 6px 14px; font: 700 12px/1 "Roboto", sans-serif; cursor: pointer; }
.cal-fail-alert .cfa-btn:hover { filter: brightness(1.1); }

/* contadores do mês por rede (ao lado do título) + popover por status */
.cal-mnets { display: flex; align-items: center; gap: 6px; }
.cal-mnet { position: relative; display: flex; align-items: center; gap: 5px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 9px 3px 4px; cursor: default; }
.cal-mnet .chip-net.static { width: 18px; height: 18px; border-radius: 6px; }
.cal-mnet .chip-net.static svg { width: 11px; height: 11px; }
.cal-mnet-n { font: 700 12px/1 "Roboto", sans-serif; color: var(--text); }
.cal-mnet-pop { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  min-width: 220px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; box-shadow: 0 8px 22px rgba(0,0,0,.35);
  font: 500 12px/1.5 "Roboto", sans-serif; color: var(--muted); }
.cal-mnet-pop strong { display: block; color: var(--text); margin-bottom: 2px; }
.cal-mnet:hover .cal-mnet-pop, .cal-mnet:focus-within .cal-mnet-pop,
.cal-mnet:focus .cal-mnet-pop { display: block; }
/* no toque não há hover: o tabindex=0 abre o popover no tap via :focus */
@media (max-width: 860px) { .cal-nav { flex-wrap: wrap; } .cal-mnets { flex-wrap: wrap; } }

/* cabeçalho da célula: nº do dia + contagem por rede numa linha só, sem quebrar
   (não pode roubar altura dos chips; some no mobile estreito) */
.cal-dayhead { display: flex; align-items: center; gap: 4px; min-width: 0;
  padding-right: 26px; /* não deitar sob o "+" absoluto do .cal-add */ }
@media (max-width: 860px) { .cal-dayhead { padding-right: 32px; } }  /* .cal-add cresce p/ 28px */
.cal-daynets { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap;
  overflow: hidden; min-width: 0; }
.cal-daynets .dn { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.cal-daynets .chip-net.static { width: 14px; height: 14px; border-radius: 4px; }
.cal-daynets .chip-net.static svg { width: 10px; height: 10px; }
.cal-daynets .dn-n { font: 700 10px/1 "Roboto", sans-serif; color: var(--muted); }
@media (max-width: 560px) { .cal-daynets { display: none; } }

/* "+X mais" ao estourar o teto de 3 chips (estilo Google Agenda) */
.cal-more { background: transparent; border: 0; color: var(--muted); text-align: left;
  font: 600 11px/1.2 "Roboto", sans-serif; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.cal-more:hover { color: var(--accent-text); background: var(--panel-2); }

/* chip agrupado: mini-badges das redes do grupo */
.chip-nets { display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; overflow: hidden; }
.chip-nets .chip-net.static { width: 14px; height: 14px; border-radius: 4px; }
.chip-nets .chip-net.static svg { width: 9px; height: 9px; }

/* pill "Story" (chips do calendário, resumo do dia e modal) */
.tag-story { display: inline-block; background: var(--secondary); color: #fff;
  font: 700 9px/1 "Roboto", sans-serif; letter-spacing: .05em; text-transform: uppercase;
  border-radius: 999px; padding: 3px 7px; width: fit-content; }

/* faixa de troca do modo grupo no modal de detalhe */
.grp-switch { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 0 10px; }
.grp-sib { display: flex; align-items: center; gap: 6px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px 4px 4px;
  cursor: pointer; font: 700 12px/1 "Roboto", sans-serif; color: var(--text); }
.grp-sib:hover { border-color: var(--primary); }
.grp-sib.cur { border-color: var(--secondary); box-shadow: 0 0 0 2px var(--ring); }
.grp-sib .chip-net.static { width: 18px; height: 18px; border-radius: 6px; }
.grp-sib .chip-net.static svg { width: 11px; height: 11px; }
.grp-dot { width: 8px; height: 8px; border-radius: 999px; background: #6b7280; flex: 0 0 auto; }
.grp-dot.st-posted { background: var(--success); }
.grp-dot.st-scheduled { background: var(--secondary); }
.grp-dot.st-failed { background: #ef4444; }

/* ============================================================
   Agenda melhorias 2026-07-18 (F2): composer largo (item 11),
   Story do Instagram (item 15), colaboradores IG (item 8),
   horários padrão por rede (item 10), conexão expirada (item 3)
   ============================================================ */

/* composer mais largo no desktop; SÓ o modal com .modal-wide (detalhe/dia intactos).
   Abaixo de 1100px nada muda, então o bottom-sheet mobile (560px) segue igual. */
@media (min-width: 1100px) {
  .modal.modal-wide { max-width: min(68vw, 980px); }
  .modal.modal-wide .cmp-text { min-height: 160px; }
}

/* toggle "Publicar como Story" */
.cmp-switch { display: inline-flex; align-items: center; gap: 10px; margin: 10px 0 4px;
  cursor: pointer; font: 600 13px/1.2 "Roboto", sans-serif; color: var(--text); }
.cmp-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.cmp-switch-track { position: relative; width: 38px; height: 22px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border); flex: 0 0 auto;
  transition: background .15s, border-color .15s; }
.cmp-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 999px; background: var(--muted);
  transition: transform .15s, background .15s; }
.cmp-switch input:checked + .cmp-switch-track { background: var(--secondary); border-color: var(--secondary); }
.cmp-switch input:checked + .cmp-switch-track::after { transform: translateX(16px); background: #fff; }
.cmp-switch input:focus-visible + .cmp-switch-track { box-shadow: 0 0 0 2px var(--ring); }

/* mensagens do composer: ajuda (muted), aviso (âmbar) e erro (bloqueia o envio) */
.cmp-help { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 4px 0 8px; }
.cmp-warn { font-size: 12px; font-weight: 600; color: #9a3412; background: #ffedd5;
  border-radius: 8px; padding: 6px 10px; margin: 4px 0 8px; }
.cmp-error { font-size: 12px; font-weight: 700; color: var(--danger-fg); background: var(--danger-bg);
  border-radius: 8px; padding: 6px 10px; margin: 4px 0 8px; }

/* chip-input de colaboradores do Instagram (composer + modal de detalhe) */
.collab-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 4px; }
.collab-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px;
  font: 600 13px/1.2 "Roboto", sans-serif; color: var(--text); }
.collab-x { background: transparent; border: 0; color: var(--muted); font-size: 15px;
  line-height: 1; cursor: pointer; padding: 0 2px; }
.collab-x:hover { color: var(--accent-text); }
.collab-input { flex: 1 1 140px; min-width: 120px; max-width: 220px; padding: 6px 10px; }
.modal-collabs { margin: 12px 0 4px; }

/* mini-pill do status do convite (pendente âmbar / aceito verde / recusado vermelho) */
.collab-pill { font: 700 10px/1 "Roboto", sans-serif; text-transform: uppercase;
  letter-spacing: .04em; border-radius: 999px; padding: 3px 7px; }
.collab-pill.cp-pendente { background: #ffedd5; color: #9a3412; }
.collab-pill.cp-aceito { background: #dcfce7; color: #166534; }
.collab-pill.cp-recusado { background: #fee2e2; color: #991b1b; }

/* horário padrão de publicação (card conectado em Conectar redes; o card é uma
   coluna centralizada, então a linha e a dica também centram) */
.conn-pref { display: flex; align-items: center; justify-content: center; gap: 8px;
  flex-wrap: wrap; margin-top: 6px; }
.conn-pref-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.conn-pref-time { width: auto; flex: 0 0 auto; padding: 5px 8px; }
.conn-pref-hint { flex-basis: 100%; font-size: 11px; color: var(--muted); text-align: center; }

/* engrenagem discreta na barra de abas da Agenda -> Conectar redes
   (sempre visível, sem depender de hover: alcançável no toque) */
.agenda-tabs .ag-gear { margin-left: auto; border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 16px; line-height: 1; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.agenda-tabs .ag-gear:hover, .agenda-tabs .ag-gear:focus-visible {
  color: var(--accent-text); background: var(--panel-2); border-color: var(--border); }

/* ============================================================
   Agenda melhorias 2026-07-18 (F3): Lista agrupada por dia
   (item 12), Postados em lista densa com métricas honestas
   (itens 13/14), Pendentes com falhas explicadas + ação em
   massa (itens 16 e 7)
   ============================================================ */

/* nota única de fuso no topo da visualização (substitui o sufixo por linha) */
.ag-tznote { color: var(--muted); font-size: 12px; }

/* Lista: cabeçalho do dia + linha com hora local e redes do fan-out */
.ag-day { display: flex; flex-direction: column; gap: 8px; }
.ag-day-head { font: 700 13px/1.2 "Roboto", sans-serif; color: var(--accent-text);
  margin: 10px 0 0; }
.ag-time { font: 700 13px/1 "Roboto", sans-serif; color: var(--text);
  min-width: 42px; flex: 0 0 auto; }
.ag-nets { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.ag-nets .chip-net.static { width: 18px; height: 18px; border-radius: 6px; }
.ag-nets .chip-net.static svg { width: 11px; height: 11px; }
.ag-multi { color: var(--muted); font-size: 11px; white-space: nowrap; cursor: help; }

/* ações rápidas: hover/focus no desktop; sempre visíveis no toque (padrão .cal-add) */
.ag-actions { display: flex; gap: 4px; margin-left: auto; flex: 0 0 auto;
  opacity: 0; transition: opacity .12s ease; }
.ag-row:hover .ag-actions, .ag-row:focus-within .ag-actions { opacity: 1; }
@media (hover: none) { .ag-actions { opacity: 1; } }
.ag-act { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: 13px; line-height: 1; color: var(--text); padding: 0; }
.ag-act:hover, .ag-act:focus-visible { border-color: var(--primary); }

/* Postados: controles (nota de fuso + ordenação) e lista densa em grade */
.pt-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pt-sort { width: auto; min-width: 170px; }
.pt-list { display: flex; flex-direction: column; gap: 6px; }
.pt-head, .pt-row { display: grid; align-items: center; gap: 8px;
  grid-template-columns: 26px 92px minmax(0, 1fr) repeat(5, 64px) 56px; }
.pt-head { padding: 0 14px; color: var(--muted); font: 700 11px/1.2 "Roboto", sans-serif;
  text-transform: uppercase; letter-spacing: .04em; }
.pt-row { background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; }
.pt-row .chip-net.static { width: 20px; height: 20px; border-radius: 6px; }
.pt-row .chip-net.static svg { width: 12px; height: 12px; }
.pt-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pt-text { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pt-text-t { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-num { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text); }
.pt-head .pt-num { font-size: 11px; color: var(--muted); }
/* item 14 (honestidade): sem métricas = célula única atravessando as colunas, nunca zeros */
.pt-nd { grid-column: span 5; color: var(--muted); font-size: 12px; text-align: center; }
.pt-c-open { text-align: right; }
.pt-open { color: var(--accent-text); font-size: 12px; font-weight: 600;
  text-decoration: none; white-space: nowrap; }
.pt-open:hover { text-decoration: underline; }

/* story publicado há 24h+ já sumiu da rede */
.tag-expired { display: inline-block; background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--border); font: 700 9px/1 "Roboto", sans-serif;
  letter-spacing: .05em; text-transform: uppercase; border-radius: 999px;
  padding: 3px 7px; width: fit-content; }

/* Pendentes: seções + falhas com peso visual (borda vermelha) */
.st-approved { background: var(--panel-2); color: var(--accent-text); }
.pend-sec { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pend-sec-head { font: 800 14px/1.2 "Roboto", sans-serif; color: var(--text); margin: 6px 0 0; }
.pend-sec-fail { color: #ef4444; }
.pend-grp { display: flex; flex-direction: column; gap: 8px; }
.pend-fail { border-left: 3px solid #ef4444; align-items: flex-start; }
.pend-fail .chip-net.static { margin-top: 2px; flex: 0 0 auto; }
.pend-fail-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.pend-fail-when { color: var(--muted); font-size: 12px; }
.pend-fail-cause { color: var(--danger-fg); font-size: 12px; font-weight: 600; }
.pend-fail-btn { margin-left: auto; flex: 0 0 auto; }
.pend-fail-btn .btn-ghost { white-space: nowrap; padding: 8px 12px; }

/* 16.4: cabeçalho de grupo com ação em massa (sempre manual, item 7) */
.pend-mass { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid var(--border);
  border-left: 3px solid #ef4444; border-radius: 10px; padding: 9px 12px; }
.pend-mass-t { font: 700 13px/1.3 "Roboto", sans-serif; color: var(--text); }
.pend-mass-conn { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pend-mass .btn-ghost { padding: 7px 12px; font-size: 12px; }
.pend-mass .btn-primary { flex: 0 0 auto; margin-left: auto; padding: 8px 14px; font-size: 12px; }
.pend-mass .btn-primary:disabled { opacity: .6; cursor: default; }
.pend-hint { color: var(--muted); font-size: 11px; }

/* mobile: a tabela dos Postados vira linhas empilhadas, sem scroll horizontal */
@media (max-width: 860px) {
  .pt-head { display: none; }
  .pt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .pt-c-open { order: 1; margin-left: auto; }
  .pt-text { order: 2; flex: 1 1 100%; }
  .pt-num, .pt-nd { order: 3; text-align: left; }
  .pt-nd { flex: 1 1 100%; }
  /* sem o cabeçalho, cada número ganha o ícone da métrica (mesma língua do perf-metrics) */
  .pt-num::before { color: var(--muted); margin-right: 3px; font-size: 11px; }
  .pt-likes::before { content: '♥'; }
  .pt-comments::before { content: '💬'; }
  .pt-shares::before { content: '↗'; }
  .pt-reach::before { content: '👁'; }
  .pt-views::before { content: '▶'; }
  .pt-controls { flex-wrap: wrap; }
  .pend-fail { flex-wrap: wrap; }
  .pend-fail-btn { margin-left: 0; flex-basis: 100%; }
  .pend-mass .btn-primary { margin-left: 0; }
}

/* ===========================================================================
   Fixes do smoke test 2026-07-18: o raio do bottom-sheet (@560px acima) era
   sobrescrito pelo `.panel, .modal { border-radius: 18px }` que vem depois no
   arquivo (mesma especificidade, ordem vence). Reafirmado aqui no fim. */
@media (max-width: 560px) {
  .modal { border-radius: 18px 18px 0 0; }
}

/* ===================================================================
   BIBLIOTECA (2026-07-27, revisão da Patricia)
   Uma peça, não N arquivos: o carrossel de 7 slides virou UM card com
   pilha atrás. Rail de coleções à esquerda, grade agrupada por mês com
   cabeçalho pegajoso, painel de detalhe à direita sem trocar de rota.
   Nenhum gatilho destrutivo visível sem hover.
   =================================================================== */
.library { height: 100vh; overflow: hidden; background: var(--bg); }
.lib-shell { display: flex; height: 100%; min-height: 0; position: relative; }

/* --- rail de coleções --- */
.lib-rail { width: 232px; flex: none; display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border-right: 1px solid var(--border); padding: 18px 10px 10px; }
.lib-rail-head { padding: 0 8px; }
.lib-rail h3 { margin: 0 0 3px; font-size: 17px; letter-spacing: -.2px; }
.lib-rail-sub { margin: 0 0 14px; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.lib-rail-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.lib-col { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none;
  text-align: left; padding: 9px; border-radius: 9px; font-size: 13px; color: var(--text);
  margin-bottom: 1px; cursor: pointer; font-family: inherit; }
.lib-col:hover { background: var(--panel-2); }
.lib-col.on { background: var(--panel-2); font-weight: 700; color: var(--accent-text);
  box-shadow: inset 2px 0 0 var(--accent-text); }
.lib-col-ic { width: 17px; text-align: center; flex: none; display: inline-flex;
  align-items: center; justify-content: center; }
.lib-col-n { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 400; }
.lib-col-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-col-new { color: var(--muted); }
.lib-rail-label { font-size: 9.5px; letter-spacing: 1.2px; color: var(--muted); margin: 14px 0 6px 9px; }
.lib-losango { background: var(--accent-text); border-radius: 2px; transform: rotate(45deg);
  width: 7px; height: 7px; flex: none; display: inline-block; }
/* Espaço usado é informação de sistema: vai para o rodapé, não para o topo. */
.lib-space { flex: 0 0 auto; padding: 10px 9px 0; border-top: 1px solid var(--border); }
.lib-space small { font-size: 10.5px; color: var(--muted); display: block; }
.lib-space-bar { height: 5px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin: 7px 0 5px; }
.lib-space-bar i { display: block; height: 100%; background: var(--accent-text); transition: width .2s ease; }
.lib-rail-back { display: none; }
.lib-rail-btn { display: none; }

/* --- palco --- */
.lib-stage { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; position: relative; }
.lib-topbar { display: flex; align-items: center; gap: 9px; padding: 12px 18px;
  border-bottom: 1px solid var(--border); background: var(--panel); flex-wrap: wrap; }
.lib-search { flex: 1 1 200px; min-width: 150px; background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; font-size: 13px;
  font-family: inherit; outline: none; }
.lib-search:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--ring); }
.lib-search::placeholder { color: var(--muted); }
.lib-upload { flex: none; }
.lib-filters { display: flex; align-items: center; gap: 7px; padding: 10px 18px;
  border-bottom: 1px solid var(--border); background: var(--panel); flex-wrap: wrap; }
.lib-filters-label { font-size: 10px; letter-spacing: 1px; color: var(--muted); margin-right: 2px; }
.lib-filters-gap { flex: 1 1 auto; }
.lib-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border);
  background: var(--bg-deep); border-radius: 999px; padding: 7px 13px; font-size: 12.5px;
  color: var(--muted); cursor: pointer; font-family: inherit; white-space: nowrap; }
.lib-chip:hover { border-color: var(--accent-text); color: var(--text); }
.lib-chip.on { background: var(--secondary); border-color: var(--secondary); color: #fff; font-weight: 700; }
.lib-clear { color: var(--accent-text); border-color: var(--accent-text); }

.lib-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 18px 96px; }
.lib-body.has-detail { padding-right: 18px; }
.lib-loading, .lib-empty { padding: 56px 20px; text-align: center; color: var(--muted);
  font-size: 13.5px; line-height: 1.7; }
.lib-note { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--panel); color: var(--muted); font-size: 13px; }
.lib-note-inline { margin: 0; border: 0; background: none; padding: 6px 0; }

/* --- Banco de imagens embutido (absorveu a aba e o botão Pexels) --- */
.lib-stockbar { padding-top: 14px; }
.lib-stock-search { display: flex; gap: 8px; flex-wrap: wrap; }
.lib-stock-search input { flex: 1 1 260px; min-width: 180px; background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; font-size: 13px; font-family: inherit; }
.lib-stock-search select { background: var(--bg-deep); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 10px; font-size: 13px; font-family: inherit; }
.lib-stock-search .btn-primary { flex: 0 0 auto; padding: 10px 20px; }
.lib-stock-more { display: flex; justify-content: center; padding: 4px 0 14px; }

/* --- faixa de identidade da marca --- */
.lib-identity { border: 1px solid var(--border); border-radius: 14px; padding: 13px 15px;
  margin: 16px 0 4px; background: var(--panel); }
.lib-identity-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; flex-wrap: wrap; }
.lib-identity-head b { font-size: 13px; }
.lib-identity-hint { font-size: 11.5px; color: var(--muted); }
.lib-identity-head .link-btn { margin-left: auto; }
.lib-identity-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.lib-ident-item { width: 86px; flex: none; border: 0; background: none; padding: 0; cursor: pointer;
  font-family: inherit; }
.lib-ident-frame { display: block; height: 86px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel-2) center/cover no-repeat; }
.lib-ident-item small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 5px;
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- cabeçalho de mês pegajoso --- */
.lib-month { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 18px 2px 9px;
  font-size: 12px; font-weight: 700; letter-spacing: .2px; color: var(--muted); }

/* --- grade e card --- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
.lib-piece { position: relative; cursor: pointer; }
.lib-thumb-wrap { position: relative; }
/* pilha atrás = quantas páginas a peça tem, sem precisar ler nada */
.lib-piece.stack .lib-thumb-wrap { padding: 0 8px 8px 0; }
.lib-piece.stack .lib-thumb-wrap::before,
.lib-piece.stack .lib-thumb-wrap::after { content: ""; position: absolute; inset: 0 8px 8px 0;
  border-radius: 11px; border: 1px solid var(--border); background: var(--panel-2); z-index: 0; }
.lib-piece.stack .lib-thumb-wrap::before { transform: translate(4px, 4px); }
.lib-piece.stack .lib-thumb-wrap::after { transform: translate(8px, 8px); opacity: .55; }
.lib-thumb { position: relative; z-index: 1; aspect-ratio: 4/5; border-radius: 11px;
  border: 1px solid var(--border); background: var(--panel-2) center/cover no-repeat;
  transition: transform .12s ease, box-shadow .12s ease; }
.lib-piece:hover .lib-thumb { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(10, 6, 20, .28); }
.lib-piece.sel .lib-thumb { outline: 2.5px solid var(--accent-text); outline-offset: 2px; }
.lib-thumb.empty { display: grid; place-items: center; }
.lib-thumb-fallback { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .4px; }
.lib-badge { position: absolute; left: 8px; top: 8px; z-index: 2; background: rgba(10, 6, 16, .74);
  color: #fff; border-radius: 6px; padding: 3px 7px; font-size: 9.5px; font-weight: 700; }
.lib-play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  font-size: 26px; color: #fff; opacity: .85; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.lib-dur { position: absolute; right: 8px; bottom: 8px; z-index: 2; background: rgba(10, 6, 16, .74);
  color: #fff; border-radius: 6px; padding: 2px 6px; font-size: 9.5px; }
.lib-trash-tag { position: absolute; right: 8px; top: 8px; z-index: 2; background: #C2410C; color: #fff;
  border-radius: 6px; padding: 3px 7px; font-size: 9.5px; font-weight: 700; }
/* Seleção e ⋯ só no hover: nada de cem gatilhos destrutivos permanentes na tela. */
.lib-check { position: absolute; left: 7px; top: 7px; z-index: 3; width: 22px; height: 22px;
  border-radius: 6px; border: 1.5px solid #fff; background: rgba(10, 6, 16, .45); color: #fff;
  font-size: 12px; line-height: 1; opacity: 0; cursor: pointer; display: grid; place-items: center;
  transition: opacity .12s ease; padding: 0; }
.lib-more { position: absolute; right: 7px; top: 7px; z-index: 3; width: 24px; height: 24px;
  border-radius: 6px; border: 0; background: rgba(10, 6, 16, .58); color: #fff; font-size: 14px;
  line-height: 1; opacity: 0; cursor: pointer; transition: opacity .12s ease; padding: 0; }
.lib-piece:hover .lib-check, .lib-piece:hover .lib-more,
.lib-piece.sel .lib-check, .lib-check:focus-visible, .lib-more:focus-visible { opacity: 1; }
.lib-piece.sel .lib-check { background: var(--secondary); border-color: var(--secondary); }
.lib-label { margin-top: 8px; }
.lib-label b { display: block; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-label small { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted);
  margin-top: 3px; flex-wrap: wrap; }
.lib-origin { display: inline-flex; align-items: center; }

/* --- barra flutuante de seleção múltipla --- */
.lib-selbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 20;
  background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 12px;
  padding: 9px 12px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  box-shadow: 0 16px 40px rgba(10, 6, 20, .35); max-width: calc(100% - 24px); }
.lib-selbar b { font-size: 12.5px; margin-right: 5px; padding-left: 5px; }
.lib-selbar button { border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  border-radius: 8px; padding: 8px 13px; font-size: 12px; cursor: pointer; font-family: inherit; }
.lib-selbar button:hover { border-color: var(--accent-text); }
.lib-selbar button.strong { background: var(--primary); color: var(--primary-ink); border-color: var(--primary);
  font-weight: 800; }
.lib-selbar button.danger { color: var(--danger-fg); }
.lib-selbar button.danger:hover { background: var(--danger-bg); border-color: var(--danger-fg); }

/* --- painel de detalhe (nada tira você do contexto) --- */
.lib-detail-back { display: none; }
.lib-detail { position: absolute; right: 0; top: 0; bottom: 0; width: 330px; z-index: 25;
  background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column;
  animation: lib-slide-in .18s ease; }
@keyframes lib-slide-in { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.lib-detail-inner { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.lib-detail-head { display: flex; align-items: center; gap: 8px; padding: 13px 15px;
  border-bottom: 1px solid var(--border); }
.lib-detail-head b { font-size: 13px; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.lib-detail-x { border: 0; background: none; font-size: 17px; color: var(--muted); cursor: pointer;
  padding: 4px 8px; }
.lib-detail-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 15px; }
.lib-viewer { display: flex; align-items: center; gap: 8px; justify-content: center; }
.lib-arrow { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font-size: 13px; cursor: pointer; }
.lib-viewer-frame { width: 180px; aspect-ratio: 4/5; border-radius: 10px; overflow: hidden;
  background: var(--panel-2); display: grid; place-items: center; }
.lib-viewer-frame img { width: 100%; height: 100%; object-fit: contain; }
.lib-viewer-none { font-size: 12px; font-weight: 700; color: var(--muted); }
.lib-minis { display: flex; gap: 5px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.lib-mini { width: 24px; height: 30px; border-radius: 4px; background: var(--panel-2);
  border: 2px solid transparent; font-size: 9.5px; color: var(--accent-text); font-weight: 700;
  cursor: pointer; padding: 0; }
.lib-mini.on { border-color: var(--accent-text); }
.lib-sheet { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.lib-sheet div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 7px 0; }
.lib-sheet div span:first-child { color: var(--muted); }
.lib-sheet div span:last-child { text-align: right; }
.lib-detail-foot { flex: 0 0 auto; padding: 12px 15px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); }
.lib-detail-acts { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.lib-detail-acts button { border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  border-radius: 8px; padding: 8px 12px; font-size: 12px; cursor: pointer; font-family: inherit; }
.lib-detail-acts button.strong { background: var(--primary); color: var(--primary-ink);
  border-color: var(--primary); font-weight: 800; }
.lib-detail-acts button.danger { color: var(--danger-fg); border-color: var(--danger-fg); margin-left: auto; }
.lib-detail-note { font-size: 11.5px; color: var(--muted); }

/* --- menu ⋯ --- */
.lib-menu-back { position: fixed; inset: 0; z-index: 78; }
.lib-menu { position: fixed; z-index: 79; min-width: 196px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 44px rgba(10, 6, 20, .38); }
.lib-menu button { display: block; width: 100%; text-align: left; border: 0; background: none;
  color: var(--text); padding: 9px 11px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; }
.lib-menu button:hover { background: var(--panel-2); }
.lib-menu button.danger { color: var(--danger-fg); }

/* --- renomear / mover --- */
.lib-rename-input { width: 100%; background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 11px 12px; font-size: 14px;
  font-family: inherit; margin-top: 6px; }
.lib-move-list { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.lib-move-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; border: 1px solid var(--border); background: var(--panel-2);
  color: var(--text); border-radius: 9px; padding: 11px 13px; font-size: 13px; cursor: pointer;
  font-family: inherit; }
.lib-move-opt:hover { border-color: var(--accent-text); }
.lib-move-del { font-size: 11px; color: var(--muted); }
.lib-move-del:hover { color: var(--danger-fg); text-decoration: underline; }
.lib-move-new { display: flex; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.lib-move-new input { flex: 1 1 auto; background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; font-size: 13px;
  font-family: inherit; }

/* --- aviso com Desfazer --- */
.toast-undo { border: 0; background: none; color: var(--accent-text); font-weight: 800;
  font-size: 12.5px; cursor: pointer; margin-left: 12px; font-family: inherit;
  pointer-events: auto; }

/* Sem hover (touch): as affordances do card ficam sempre visíveis, senão o
   usuário de celular nunca alcança a seleção nem o menu. Como a caixa de seleção
   deixa de ser efêmera, o selo de páginas sai de baixo dela: a contagem é a
   informação principal do card e não pode ficar coberta. */
@media (hover: none) {
  .lib-check, .lib-more { opacity: 1; }
  .lib-badge { left: 36px; }
  .lib-trash-tag { right: 36px; }
}
/* Mesmo no desktop, enquanto a caixa está visível (hover ou selecionado) o selo
   se desloca, senão o ✓ tapa o "7 páginas" exatamente quando você mira o card.
   O mesmo vale para o prazo da lixeira, que divide o canto com o ⋯. */
.lib-piece:hover .lib-badge, .lib-piece.sel .lib-badge { left: 36px; }
.lib-piece:hover .lib-trash-tag, .lib-piece.sel .lib-trash-tag { right: 36px; }
/* Um toque longo seleciona: sem isso o navegador oferece "copiar" e atrapalha. */
.lib-piece { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* Com o painel de detalhe aberto em tela larga, a grade cede espaço em vez de
   ficar escondida atrás dele. */
@media (min-width: 861px) {
  .lib-body.has-detail { padding-right: 348px; }
}

/* --- mobile: rail vira menu suspenso, grade 2 colunas, detalhe em folha --- */
@media (max-width: 860px) {
  .library { height: auto; overflow: visible; }
  .lib-shell { display: block; height: auto; }
  .lib-rail-btn { display: inline-flex; align-items: center; gap: 6px; order: -1;
    border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
    border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 700; min-height: 44px;
    cursor: pointer; font-family: inherit; max-width: 62%; }
  .lib-rail-btn span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lib-rail-caret { color: var(--muted); }
  .lib-rail-back { display: block; position: fixed; inset: 0; z-index: 84; background: rgba(0, 0, 0, .5); }
  .lib-rail { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 85; width: auto;
    max-height: calc(100dvh - 60px); border-right: 0; border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0; padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
    transform: translateY(101%); transition: transform .2s ease; }
  .lib-rail.open { transform: none; }
  .lib-col { min-height: 44px; font-size: 14px; }
  .lib-stage { display: block; }
  .lib-topbar, .lib-filters { padding-left: 16px; padding-right: 16px; }
  .lib-body { padding: 0 16px 120px; overflow: visible; }
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lib-month { top: 0; }
  .lib-upload { min-height: 44px; }
  .lib-chip { min-height: 40px; }
  /* Painel de detalhe vira folha de baixo para cima. */
  .lib-detail-back { display: block; position: fixed; inset: 0; z-index: 84; background: rgba(0, 0, 0, .5); }
  .lib-detail { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; z-index: 85;
    max-height: 88dvh; border-left: 0; border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0; animation: lib-sheet-up .2s ease; }
  @keyframes lib-sheet-up { from { transform: translateY(18px); opacity: .5; } to { transform: none; opacity: 1; } }
  /* .bottom-nav é ~56px + safe-area e vive em z-index 40: a barra de seleção
     precisa passar por cima dela, e acima dela na pilha. */
  .lib-selbar { position: fixed; left: 8px; right: 8px; z-index: 45; transform: none; max-width: none;
    bottom: calc(64px + env(safe-area-inset-bottom)); justify-content: center; }
  .lib-selbar button { min-height: 40px; }
  .lib-identity-strip { margin: 0 -16px; padding: 0 16px 4px; }
}
@media (max-width: 380px) {
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lib-label b { font-size: 11.5px; }
}
.lib-space-trash { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.lib-trashbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 16px 0 4px; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--panel); font-size: 12.5px; color: var(--muted); }
.lib-trashbar span { flex: 1 1 260px; }

/* ===================================================================
   ANÁLISES (2026-07-27, revisão da Patricia)
   Todo número declara sobre quantas publicações foi calculado. Filtros
   no topo recalculam a página inteira; horários avisam quando a amostra
   é pequena; o mapa distingue "nunca publicou" de "engajou pouco".
   =================================================================== */
.analytics { height: 100vh; overflow-y: auto; background: var(--bg); padding: 0 0 64px; }
.an-head { padding: 22px 32px 0; }
.an-head h1 { margin: 0 0 12px; font-size: 26px; letter-spacing: -.4px; }
.an-filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding-bottom: 14px; }
.an-flabel { font-size: 9.5px; letter-spacing: 1.1px; color: var(--muted); margin-right: 2px; }
.an-fsep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.an-fq { opacity: .7; font-size: 10.5px; }
/* Rede sem número não some nem engana: fica desabilitada, com o motivo no title. */
.lib-chip.off, .lib-chip:disabled { opacity: .45; cursor: not-allowed; }
.lib-chip.off:hover, .lib-chip:disabled:hover { border-color: var(--border); color: var(--muted); }

/* faixa de cobertura */
.an-coverage { display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin: 0 32px; padding: 10px 14px; border-radius: 10px;
  background: rgba(212, 160, 23, .13); border: 1px solid rgba(212, 160, 23, .38);
  font-size: 12.5px; color: var(--text); line-height: 1.5; }
.an-cov-ico { color: var(--warn-ink); flex: none; }
.an-coverage b { font-weight: 800; }
.an-cov-why { margin-left: auto; border: 0; background: none; font-size: 11.5px;
  color: var(--accent-text); text-decoration: underline; cursor: pointer; flex: none;
  font-family: inherit; padding: 4px; }
.an-coverage-detail { margin: 6px 32px 0; padding: 12px 15px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--border); font-size: 12.5px;
  color: var(--muted); line-height: 1.6; }
.an-coverage-detail p { margin: 0 0 6px; }
.an-coverage-detail p:last-child { margin-bottom: 0; }
.an-coverage-detail b { color: var(--text); }

.an-body { padding: 16px 32px 0; }
.an-empty { padding: 34px 10px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* KPIs */
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.an-kpi { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); padding: 14px 16px; }
.an-kpi-name { font-size: 10px; letter-spacing: .9px; color: var(--muted); text-transform: uppercase; }
.an-kpi-value { font-size: 27px; font-weight: 800; letter-spacing: -1px; margin-top: 5px; line-height: 1; }
.an-kpi-line2 { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 11px; min-height: 15px; }
.an-delta { font-weight: 700; }
.an-delta.up { color: var(--success); }
.an-delta.down { color: var(--danger-fg); }
.an-delta.flat { color: var(--muted); }
.an-kpi-prev { color: var(--muted); }
/* A base de cálculo é obrigatória: é ela que impede o número de mentir. */
.an-kpi-base { font-size: 10.5px; color: var(--muted); margin-top: 5px; line-height: 1.4; }
.an-kpi-extra { display: flex; gap: 10px; margin-top: 7px; font-size: 11px; color: var(--muted); }
.an-spark { height: 22px; margin-top: 8px; }
.an-spark svg { width: 100%; height: 100%; display: block; }

/* blocos */
.an-block { border: 1px solid var(--border); border-radius: 16px; background: var(--panel);
  padding: 18px 20px; margin-top: 16px; }
.an-block h2 { margin: 0; font-size: 15px; letter-spacing: -.2px; }
.an-block-sub { margin: 5px 0 14px; font-size: 12px; color: var(--muted); line-height: 1.5; }

.an-warn { display: flex; gap: 9px; align-items: flex-start; border-radius: 10px; padding: 10px 13px;
  font-size: 12px; line-height: 1.5; margin-bottom: 14px;
  background: rgba(192, 57, 43, .12); border: 1px solid rgba(192, 57, 43, .34); color: var(--text); }
.an-warn.soft { background: rgba(212, 160, 23, .13); border-color: rgba(212, 160, 23, .38); }

/* ranking */
.an-rank { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--border); }
.an-rank:first-of-type { border-top: 0; }
.an-pos { width: 20px; flex: none; text-align: center; font-size: 13px; font-weight: 800; color: var(--muted); }
.an-pos.top { color: var(--accent-text); }
.an-mini { width: 40px; height: 50px; flex: none; border-radius: 6px;
  background: var(--panel-2) center/cover no-repeat; border: 1px solid var(--border); }
.an-mini.sm { width: 30px; height: 38px; }
.an-mini.empty { background: var(--panel-2); }
.an-rank-txt { flex: 1 1 auto; min-width: 0; }
.an-rank-txt b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.an-rank-txt small { display: flex; align-items: center; gap: 7px; margin-top: 5px;
  font-size: 10.5px; color: var(--muted); flex-wrap: wrap; }
.an-nums { display: flex; gap: 16px; flex: none; }
.an-num { text-align: right; }
.an-num b { display: block; font-size: 13.5px; font-weight: 700; }
.an-num small { font-size: 9.5px; color: var(--muted); }
.an-open, .an-td-open a { border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  border-radius: 7px; padding: 6px 11px; font-size: 11px; flex: none; text-decoration: none; white-space: nowrap; }
.an-open:hover, .an-td-open a:hover { border-color: var(--accent-text); }

/* melhores horários */
.an-slots { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.an-slot { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px;
  font-size: 12px; background: var(--panel-2); }
.an-slot.top { border-color: var(--accent-text); border-width: 2px; padding: 7px 11px; }
.an-slot small { color: var(--muted); margin-left: 6px; font-size: 10.5px; }
/* Média sustentada por 2 publicações ou menos: sinalizada, não escondida. O tom
   âmbar do tema claro precisa ser mais escuro para passar em contraste, e o
   aviso não pode depender só de cor. */
.an-slot small.thin { color: var(--warn-ink); font-weight: 700; }
:root { --warn-ink: #D4A017; }
:root[data-theme="light"] { --warn-ink: #8A6100; }

.an-heat { overflow-x: auto; padding-bottom: 4px; }
.an-heat-grid { display: grid; grid-template-columns: 42px repeat(24, minmax(14px, 1fr));
  gap: 2px; min-width: 560px; }
.an-heat-corner { }
.an-heat-hour { font-size: 9px; color: var(--muted); text-align: center; padding-bottom: 3px; }
.an-heat-day { font-size: 10.5px; color: var(--muted); display: flex; align-items: center; }
.an-heat-cell { height: 19px; border-radius: 3px; background: var(--panel-2); }
.an-heat-cell.v1 { background: rgba(124, 0, 255, .16); }
.an-heat-cell.v2 { background: rgba(124, 0, 255, .34); }
.an-heat-cell.v3 { background: rgba(124, 0, 255, .55); }
.an-heat-cell.v4 { background: rgba(124, 0, 255, .76); }
.an-heat-cell.v5 { background: rgba(124, 0, 255, .96); }
/* Hachura = nunca publicou. Antes era igual a "publicou e não engajou", que é o oposto. */
.an-heat-cell.never { background: repeating-linear-gradient(45deg,
  transparent, transparent 3px, var(--border) 3px, var(--border) 6px); }
.an-heat-cell:hover { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.an-heat-key { display: flex; align-items: center; gap: 7px; margin-top: 11px;
  font-size: 10.5px; color: var(--muted); flex-wrap: wrap; }
.an-key { width: 16px; height: 11px; border-radius: 3px; display: inline-block; }
.an-key.v1 { background: rgba(124, 0, 255, .16); }
.an-key.v2 { background: rgba(124, 0, 255, .34); }
.an-key.v3 { background: rgba(124, 0, 255, .55); }
.an-key.v4 { background: rgba(124, 0, 255, .76); }
.an-key.v5 { background: rgba(124, 0, 255, .96); }
.an-key.never { background: repeating-linear-gradient(45deg,
  transparent, transparent 3px, var(--border) 3px, var(--border) 6px); border: 1px solid var(--border); }
.an-key-sep { width: 1px; height: 12px; background: var(--border); margin: 0 4px; }

/* tabela */
.an-table-wrap { overflow-x: auto; }
.an-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.an-table th { text-align: left; font-size: 10px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border);
  white-space: nowrap; }
.an-table th.sortable { cursor: pointer; user-select: none; }
.an-table th.sortable:hover { color: var(--text); }
.an-table th.sort-desc::after { content: " ↓"; color: var(--accent-text); }
.an-table th.sort-asc::after { content: " ↑"; color: var(--accent-text); }
.an-th-num { text-align: right; }
.an-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.an-td-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-td-post { display: flex; align-items: center; gap: 9px; min-width: 220px; }
.an-td-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35; }
.an-td-open { text-align: right; }

/* dobra das publicações sem métrica */
.an-fold { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.an-fold-btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 0; background: none; color: var(--text); font-size: 12.5px; font-weight: 600;
  padding: 8px 2px; cursor: pointer; font-family: inherit; }
.an-fold-body { padding: 4px 0 0; }
.an-fold-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px;
  border-top: 1px solid var(--border); font-size: 12px; flex-wrap: wrap; }
.an-fold-txt { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-fold-when { color: var(--muted); font-size: 11px; }
.an-fold-row a { color: var(--accent-text); font-size: 11.5px; text-decoration: none; white-space: nowrap; }
.an-fold-why { flex: 1 1 100%; font-size: 11px; color: var(--muted); line-height: 1.5; }
.an-sortbar { display: none; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }

@media (max-width: 860px) {
  .analytics { height: auto; overflow: visible; }
  .an-head { padding: 16px 16px 0; }
  .an-head h1 { font-size: 21px; }
  /* Filtros em rolagem horizontal: no celular eles não podem empurrar a página. */
  .an-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 14px;
    scrollbar-width: none; }
  .an-filters::-webkit-scrollbar { display: none; }
  .an-filters .lib-chip { min-height: 44px; flex: none; }
  .an-coverage, .an-coverage-detail { margin-left: 16px; margin-right: 16px; }
  .an-body { padding: 14px 16px 0; }
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-kpi-value { font-size: 22px; }
  .an-block { padding: 15px 14px; }
  .an-rank { flex-wrap: wrap; }
  .an-rank-txt { flex-basis: calc(100% - 84px); }
  .an-nums { width: 100%; justify-content: space-between; gap: 8px; }
  .an-open { margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; }
  /* A tabela vira lista de cards: números em linha, com o rótulo à esquerda. */
  .an-table, .an-table tbody, .an-table tr, .an-table td { display: block; width: 100%; }
  .an-table thead { display: none; }
  .an-table tr { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
  .an-table td { border: 0; padding: 4px 0; display: flex; align-items: center;
    justify-content: space-between; gap: 10px; }
  .an-table td[data-l]::before { content: attr(data-l); font-size: 10.5px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .6px; }
  .an-td-post { display: flex; padding-bottom: 8px; justify-content: flex-start; }
  .an-td-post .an-td-text { flex: 1 1 auto; min-width: 0; }
  .an-td-open { justify-content: flex-end; }
  .an-td-open a { min-height: 44px; display: inline-flex; align-items: center; }
  .an-fold-row a { min-height: 44px; display: inline-flex; align-items: center; }
  /* O cabecalho da tabela some no celular: a ordenacao ganha chips proprios. */
  .an-sortbar { display: flex; }
  .an-hint-desk { display: none; }
  .an-sortbar .lib-chip { min-height: 44px; }
  .an-cov-why { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; }
  .an-fold-btn { min-height: 44px; }
  .an-fold-row { min-height: 44px; }
  /* legenda do mapa fica fixa; só a grade rola de lado */
  .an-heat { margin: 0 -14px; padding: 0 14px 4px; }
}
@media (max-width: 560px) {
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .an-nums { flex-wrap: wrap; }
}

/* Selo de rede COM texto. O .chip-net é um ícone de 22px: colocar o nome
   dentro dele fazia o glifo e a palavra se sobreporem. */
.an-net { display: inline-flex; align-items: center; border-radius: 5px; padding: 2px 7px;
  font-size: 9.5px; font-weight: 700; color: #fff; white-space: nowrap; letter-spacing: .2px; }
.an-net.b-linkedin { background: #0a66c2; }
.an-net.b-facebook { background: #1877f2; }
.an-net.b-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.an-net.b-youtube { background: #ff0033; }
.an-net.b-tiktok { background-image: linear-gradient(135deg, #25F4EE 0%, #111 50%, #FE2C55 100%); }

/* ===================================================================
   CRIAR CONTEÚDO v4 (2026-07-27, especificação da Patricia)
   O asterisco saiu: o losango é a marca. As fileiras de O QUE FAZER /
   TOM / ÂNGULO viraram duas escolhas no compositor mais perguntas
   dentro da conversa. O resultado é manipulado no próprio balão.
   =================================================================== */

/* O losango da Brain. Nunca ao lado de outro ícone decorativo na mesma
   linha: ele é a marca, não um enfeite. */
.losango { display: inline-block; width: 11px; height: 11px; border-radius: 2px;
  background: #7C00FF; transform: rotate(45deg); flex: none; }
.losango-lg { width: 22px; height: 22px; border-radius: 4px; }

/* --- cabeçalho de uma linha --- */
.cc-top { display: flex; align-items: center; gap: 10px; min-height: 56px; flex: 0 0 auto;
  padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--panel); }
.cc-top-txt { flex: 1 1 auto; min-width: 0; }
.cc-top-txt h2 { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-link-proj { border: 0; background: none; color: var(--muted); font-size: 11.5px;
  cursor: pointer; padding: 2px 0; font-family: inherit; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-link-proj:hover { color: var(--accent-text); }
.cc-pill { display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  border-radius: 999px; padding: 6px 12px; font-size: 11.5px; cursor: pointer; font-family: inherit; }
.cc-pill:hover { border-color: var(--accent-text); }
.cc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex: none; }
.cc-icon { flex: none; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font-size: 15px; cursor: pointer; }

/* --- estado vazio --- */
.ce-hello { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ce-hello h2 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.8px; }
.ce-sub { margin: 0 0 22px; font-size: 15px; color: var(--muted); }
.ce-shortcuts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.ce-shortcut { border: 1px solid var(--border); background: var(--panel); color: var(--text);
  border-radius: 10px; padding: 9px 14px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.ce-shortcut:hover { border-color: var(--accent-text); color: var(--accent-text); }
.ce-nets { margin: 22px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.6; }

/* --- compositor --- */
.cc-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.cc-bar-gap { flex: 1 1 auto; }
.cc-plus { flex: none; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font-size: 17px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.cc-plus:hover { border-color: var(--accent-text); }
.cc-plus.busy { opacity: .5; pointer-events: none; }
.cc-seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; gap: 2px; flex: none; }
.cc-seg button { border: 0; background: none; color: var(--muted); font-size: 12.5px;
  padding: 6px 14px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.cc-seg button.on { background: var(--panel); color: var(--text); font-weight: 700;
  box-shadow: 0 1px 3px rgba(10, 6, 20, .18); }
.cc-depth { display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted);
  border-radius: 9px; padding: 6px 10px; font-size: 12px; cursor: pointer; font-family: inherit; }
.cc-depth:hover { border-color: var(--accent-text); color: var(--text); }
.cc-mic { flex: none; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; }
.cc-mic svg { width: 15px; height: 15px; }
.cc-mic.rec { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-fg); }
/* O ÚNICO botão amarelo da tela. */
.cc-send { flex: none; margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: var(--primary); color: var(--primary-ink); font-size: 15px; font-weight: 700;
  cursor: pointer; }
.cc-send:disabled { opacity: .45; cursor: not-allowed; }
.cc-under { display: flex; align-items: center; gap: 12px; justify-content: center;
  margin: 10px 0 14px; flex-wrap: wrap; }

/* --- fileiras de resposta --- */
.cc-choices { margin: -2px 0 14px; }
.cc-choices-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-choice { border: 1px solid var(--border); background: var(--panel); color: var(--accent-text);
  border-radius: 10px; padding: 9px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; }
.cc-choice:hover { border-color: var(--accent-text); background: var(--panel-2); }
/* Respondida: o histórico continua legível, mas não dá para responder duas vezes. */
.cc-choices.spent .cc-choice { opacity: .45; pointer-events: none; }
.cc-choices.spent .cc-choice.picked { opacity: .75; border-color: var(--accent-text); font-weight: 700; }
.cc-choice-select { background: var(--bg-deep); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; font-size: 12.5px; font-family: inherit; }

/* --- visor dentro do balão --- */
.cc-viewer { border: 1px solid var(--border); border-radius: 14px; background: var(--panel);
  padding: 12px; margin: 8px 0 10px; }
.cc-viewer-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cc-viewer-name { font-size: 12px; font-weight: 700; }
.cc-viewer-count { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.cc-stage { display: flex; align-items: center; gap: 10px; justify-content: center; }
.cc-arrow { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font-size: 14px; cursor: pointer; }
.cc-arrow:hover { border-color: var(--accent-text); }
.cc-screen { width: 224px; border-radius: 12px; display: block; background: var(--panel-2);
  transition: width .18s ease; }
.cc-viewer.big .cc-screen { width: min(340px, 72vw); }
.cc-thumbs { display: flex; gap: 6px; justify-content: center; margin-top: 11px; flex-wrap: wrap; }
.cc-thumb { width: 30px; height: 38px; border-radius: 5px; background: var(--panel-2);
  border: 2px solid transparent; font-size: 9px; color: var(--accent-text); font-weight: 700;
  cursor: pointer; padding: 0; }
.cc-thumb.on { border-color: #7C00FF; }
.cc-viewer-foot { display: flex; gap: 7px; margin-top: 11px; justify-content: center; flex-wrap: wrap; }
.cc-mini-btn { border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  border-radius: 8px; padding: 6px 11px; font-size: 11.5px; cursor: pointer; font-family: inherit; }
.cc-mini-btn:hover { border-color: var(--accent-text); }
.cc-mini-btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- duas fileiras de ação, pesos diferentes de propósito --- */
.cc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.cc-act { border: 1px solid var(--border); background: var(--panel); color: var(--text);
  border-radius: 9px; padding: 8px 13px; font-size: 12px; cursor: pointer; font-family: inherit; }
.cc-act:hover { border-color: var(--accent-text); }
.cc-act.strong { background: var(--primary); border-color: var(--primary); color: var(--primary-ink);
  font-weight: 700; }
.cc-adjust-label { margin: 12px 2px 6px; font-size: 11px; color: var(--muted); }
.cc-adjusts { display: flex; gap: 7px; flex-wrap: wrap; }
.cc-adjust { border: 0; background: var(--panel-2); color: var(--muted); border-radius: 999px;
  padding: 7px 12px; font-size: 11.5px; cursor: pointer; font-family: inherit; }
.cc-adjust:hover { background: var(--panel); color: var(--accent-text); }

/* --- popovers --- */
.cc-menu-back { position: fixed; inset: 0; z-index: 68; }
.cc-menu { position: fixed; z-index: 69; width: 250px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 46px rgba(10, 6, 20, .38); }
.cc-menu-depth { width: 264px; }
.cc-menu-wide { width: 280px; }
.cc-menu-title { font-size: 10px; letter-spacing: .9px; text-transform: uppercase;
  color: var(--muted); padding: 7px 10px 4px; }
.cc-op { display: block; width: 100%; text-align: left; border: 0; background: none;
  color: var(--text); padding: 9px 11px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.cc-op:hover, .cc-op.on { background: var(--panel-2); }
.cc-op.on b { color: var(--accent-text); }
.cc-op b { display: block; font-size: 12.5px; font-weight: 650; }
.cc-op small { display: block; color: var(--muted); font-size: 10.5px; font-weight: 400;
  margin-top: 2px; line-height: 1.45; }
.cc-op.danger b { color: var(--danger-fg); }
.cc-menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.cc-style-row { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px;
  padding: 6px 11px; color: var(--muted); }
.cc-style-row span:last-child { color: var(--text); }

/* --- histórico em árvore --- */
.ch-tree { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 12px; }
.ch-group { margin-bottom: 1px; }
.ch-group-head { display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px;
  border-radius: 8px; font-size: 11.5px; font-weight: 650; color: var(--muted); cursor: pointer; }
.ch-group-head:hover { background: var(--panel-2); color: var(--text); }
.ch-group-head.hasactive { color: var(--text); }
.ch-chev { width: 11px; font-size: 9px; color: var(--muted); transition: transform .15s ease;
  display: inline-block; flex: none; }
.ch-group-head.open .ch-chev { transform: rotate(90deg); }
.ch-group-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; text-align: left; }
.ch-qtd { font-size: 9.5px; color: var(--muted); background: var(--panel-2); border-radius: 999px;
  padding: 1px 6px; flex: none; }
.ch-group-new { opacity: 0; border: 0; background: none; color: var(--muted); font-size: 15px;
  width: 18px; line-height: 1; cursor: pointer; flex: none; padding: 0; }
.ch-group-head:hover .ch-group-new { opacity: 1; }
/* Filete vertical marcando a hierarquia, recuo de 12px. */
.ch-group-list { margin: 2px 0 6px 12px; padding-left: 7px; border-left: 1px solid var(--border); }
.ch-empty-sm { font-size: 11px; padding: 6px 8px; }
.ch-new-proj { flex: 0 0 auto; margin-top: 8px; border: 1px dashed var(--border); background: none;
  color: var(--muted); border-radius: 9px; padding: 8px; font-size: 11.5px; cursor: pointer;
  font-family: inherit; }
.ch-new-proj:hover { border-color: var(--accent-text); color: var(--accent-text); }
.ch-item-snip { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 860px) {
  .cc-top { padding: 6px 12px; }
  .ce-hello h2 { font-size: 24px; }
  .cc-seg button, .cc-depth, .cc-plus, .cc-mic, .cc-send { min-height: 44px; }
  .cc-plus, .cc-mic { width: 44px; }
  .cc-send { width: 44px; height: 44px; }
  .cc-choice, .cc-act, .cc-adjust, .cc-mini-btn, .cc-arrow { min-height: 44px; }
  .cc-arrow { width: 44px; }
  .cc-thumb { min-height: 44px; width: 34px; }
  .cc-screen { width: min(210px, 56vw); }
  .cc-viewer.big .cc-screen { width: min(300px, 80vw); }
  .cc-under { justify-content: flex-start; }
  .cc-menu { width: min(280px, calc(100vw - 16px)); }
}

/* No estado vazio o compositor é o centro da tela, não um rodapé: a pessoa
   ainda não tem conversa nenhuma para ancorar embaixo. É o MESMO componente,
   só reposicionado (spec §2: "muda só a posição"). */
.composer-block.centered { max-width: 720px; margin: 0 auto 10px; width: calc(100% - 40px); }
.chat-col:has(.composer-block.centered) .log { display: flex; flex-direction: column;
  justify-content: flex-end; }
.chat-col:has(.composer-block.centered) .chat-empty { flex: 1 1 auto; justify-content: flex-end;
  padding-bottom: 8px; }
.composer-block.centered + .cc-under { max-width: 720px; margin-left: auto; margin-right: auto; }
/* Estado vazio: o cabeçalho fica só com o ☰, sem borda, para não virar uma
   faixa vazia atravessando a tela. */
.cc-top.bare { min-height: 0; border-bottom: 0; background: none; padding: 8px 12px; }

/* ===================================================================
   Criar conteúdo: coluna de conversa CENTRALIZADA e mais larga.
   As mensagens tinham max-width 720px mas sem margem automática: ficavam
   coladas na esquerda com um vão morto de ~270px à direita, e o
   compositor ia até a borda (960px), com uma largura diferente da das
   mensagens. Uma medida só, no meio da tela, para os dois.
   =================================================================== */
.chat-col { --cc-col: 860px; }
/* .chat-col na frente porque o <style> inline do template vem depois do
   app.css e ganharia no desempate por ordem. */
.log > .msg,
.log > .chat-empty,
.chat-col .chat-attach-strip,
.chat-col .composer-block,
.chat-col .cc-under { max-width: var(--cc-col); margin-left: auto; margin-right: auto; }
.log > .msg { margin-bottom: 18px; width: 100%; }
.chat-col .composer-block { width: calc(100% - 56px); margin-bottom: 16px; }
.chat-col .composer-block.centered { width: calc(100% - 56px); max-width: var(--cc-col); }
.chat-col .composer-block.centered + .cc-under { max-width: var(--cc-col); }
.chat-col .chat-attach-strip { width: calc(100% - 56px); }
/* Texto um pouco maior junto com a coluna: coluna larga com letra miúda
   fica pior, não melhor. */
.msg-body { font-size: 15px; line-height: 1.62; }
.log { padding: 24px 28px; }

@media (max-width: 900px) {
  .chat-col { --cc-col: 100%; }
  .chat-col .composer-block, .chat-col .composer-block.centered,
  .chat-col .chat-attach-strip { width: calc(100% - 32px); }
  .log { padding: 16px; }
  .msg-body { font-size: 15px; }
}

/* Balão da pessoa: se ajusta ao conteúdo e encosta à direita, como no protótipo
   da Patricia (`.balao.meu { margin-left:auto; max-width:78% }`). Antes ele
   ocupava a coluna inteira, então um "Sim, cria" virava uma barra roxa de 860px. */
.msg-user .msg-body { margin-left: auto; max-width: 78%; width: fit-content; }
.msg-user .msg-role { text-align: right; }
@media (max-width: 560px) {
  .msg-user .msg-body { max-width: 88%; }
}

/* ---------------------------------------------- passos para ligar um conector
   O chip "não conectado" dizia só o nome da variável de ambiente. Quem liga a
   conta de anúncio é outra pessoa, então o passo a passo mora ao lado do chip. */
.ads-steps { margin: 10px 0 0; padding: 12px 14px 12px 30px; border-radius: 10px;
             background: var(--card); border: 1px solid var(--line);
             font-size: 13px; line-height: 1.6; color: var(--ink); max-width: 760px; }
.ads-steps li + li { margin-top: 6px; }
.ads-steps .ads-steps-t { list-style: none; margin-left: -16px; font-weight: 600;
                          margin-bottom: 8px; color: var(--muted); }
.ads-conn .link-btn { margin-left: 6px; font-size: 12px; }

/* ------------------------------------------- seletor de Página do Facebook
   A conta pode administrar várias Páginas e a marca é UMA. O layout espelha o
   que a pessoa já viu em outras ferramentas: Página à esquerda, Instagram
   vinculado à direita, filtro por nome. */
.modal.fbpick { max-width: 760px; }
.fbpick-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.fbpick-q { width: 100%; margin: 12px 0; padding: 10px 12px; font-size: 15px;
            border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
            color: var(--ink); }
.fbpick-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line);
               border-radius: 10px; }
.fbpick-row { display: grid; grid-template-columns: 18px 1fr 1fr; gap: 12px;
              align-items: center; padding: 10px 14px; cursor: pointer;
              border-bottom: 1px solid var(--line); }
.fbpick-row:last-child { border-bottom: 0; }
.fbpick-row:hover { background: var(--hover); }
.fbpick-row.on { background: var(--sel, rgba(124,58,237,.08)); }
.fbpick-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fbpick-side b, .fbpick-side small { overflow: hidden; text-overflow: ellipsis;
                                     white-space: nowrap; display: block; }
.fbpick-side small { color: var(--muted); font-size: 12px; }
.fbpick-avwrap { position: relative; flex: none; line-height: 0; }
.fbpick-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
             background: var(--line); display: block; }
/* O selo da rede fica NO CANTO do avatar, como no app do Facebook. Solto no
   flex ele virava um losango no meio do nome. */
.fbpick-net { position: absolute; right: -3px; bottom: -3px;
              width: 16px; height: 16px; border-radius: 50%;
              display: grid; place-items: center; font-size: 9px; font-weight: 700;
              color: #fff; border: 2px solid var(--card); box-sizing: content-box; }
.fbpick-ig-txt { min-width: 0; }
.fbpick-noig { color: var(--muted); font-size: 12px; }
/* As cores de rede do app moram acopladas (.badge.b-facebook, .chip-net.b-...),
   então o selo daqui precisa das suas. */
.fbpick-net.b-facebook  { background: #1877f2; }
.fbpick-net.b-instagram { background: #d62976; }
.fbpick-ig { display: flex; align-items: center; justify-content: flex-start;
             gap: 8px; margin-top: 12px; width: 100%; align-self: flex-start;
             font-size: 14px; line-height: 1.3; text-align: left; }
/* Regra global do modal dá width:100% a input: a caixinha comia os 718px e o
   texto ao lado quebrava uma palavra por linha. */
.fbpick-ig input[type="checkbox"] { flex: none; width: auto; margin: 0; }
.fbpick-foot { display: flex; justify-content: space-between; align-items: center;
               gap: 16px; margin-top: 14px; }
.fbpick-foot small { color: var(--muted); font-size: 12px; max-width: 46ch; }
.fbpick-foot > div { display: flex; gap: 8px; }
@media (max-width: 640px) {
  .fbpick-row { grid-template-columns: 18px 1fr; }
  .fbpick-row .fbpick-side + .fbpick-side { grid-column: 2; margin-top: -4px; }
  .fbpick-foot { flex-direction: column; align-items: stretch; }
}

/* ------------------------------------------------- ajustar por rede (painel)
   Um conteúdo, N redes: cada rede pode ter a sua legenda e o seu horário. São
   DOIS interruptores independentes, cada um colado ao campo comum que ele
   substitui: o da legenda ao lado do campo de texto, o do horário ao lado do
   campo de data. Desligados (padrão), nada disto ocupa espaço nenhum. O painel
   é o mesmo no card do chat, no compositor da Agenda, na aba Carrosséis e no
   "Agendar em outra rede". */
.pn-panel { margin: 8px 0 4px; padding: 10px 12px; border: 1px solid var(--line);
            border-radius: 10px; background: var(--bg); }
.pn-own { color: #f5d90a; font-size: 15px; line-height: 1; }
.pn-panel textarea { width: 100%; box-sizing: border-box; }
/* interruptor mais discreto dentro do balão do chat */
.cmp-switch.sm { font-size: 12px; margin: 8px 0 2px; }
.cmp-switch.sm .cmp-switch-track { width: 32px; height: 19px; }
.cmp-switch.sm input:checked + .cmp-switch-track::after { transform: translateX(13px); }
.cmp-switch.sm .cmp-switch-track::after { width: 13px; height: 13px; }
.pn-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 8px; }
.pn-foot .char-count { margin: 0; }
.pn-time { display: flex; align-items: center; gap: 8px; }
.pn-resumo { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* Uma linha por rede, todas visíveis. A versão com abas escondia o recurso: as
   abas tinham a mesma aparência dos chips de seleção de rede logo acima, e só
   uma legenda aparecia por vez, então lia-se como "a legenda é compartilhada". */
.pn-rede { padding: 10px 0; border-top: 1px solid var(--line); }
.pn-rede:first-of-type { border-top: 0; padding-top: 4px; }
.pn-rede-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.pn-rede-cab .pnt-name { font-weight: 600; }
.pn-rede textarea { width: 100%; box-sizing: border-box; }
.pn-rede .pn-own { color: var(--brand, #7c3aed); font-size: 12px; font-weight: 600; }
.pn-hora { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }

/* ===========================================================================
   Sessão expirada (2026-08-08). O cookie morre e a tela segue parecendo logada:
   os dados velhos continuam desenhados e toda chamada nova volta 401 em
   silêncio. Foi assim que "subi a foto e o aviso de mídia continuou" aconteceu.
   O aviso é criado em JS puro (window.sessaoExpirou), fora do Alpine, para
   funcionar mesmo se a tela estiver em qualquer estado.
   =========================================================================== */
.sess-back {
  position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center;
  justify-content: center; padding: 20px; background: rgba(0,0,0,.62);
}
.sess-box {
  width: min(460px, 100%); background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 16px; padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.sess-box h3 { margin: 0 0 10px; font-size: 18px; }
.sess-box p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
.sess-box .sess-dica { color: var(--muted); font-size: 13px; }
.sess-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.sess-acoes button {
  border-radius: 999px; padding: 10px 18px; font-weight: 800; cursor: pointer;
  border: 1px solid var(--border); font-size: 14px;
}
.sess-acoes .sess-ok { background: var(--primary); color: var(--primary-ink); border: 0; }
.sess-acoes .sess-ghost { background: transparent; color: var(--text); font-weight: 600; }

/* Fica depois de fechar o aviso: a tela nunca mais finge que está salvando. */
.sess-tarja {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3999;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap; padding: 10px 16px; font-size: 13px; font-weight: 700;
  background: var(--danger-bg); color: var(--danger-fg);
  border-top: 1px solid rgba(255,255,255,.12);
}
.sess-tarja button {
  border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 800;
  background: var(--primary); color: var(--primary-ink); cursor: pointer; font-size: 13px;
}
