/* Portal do assistente de marketing.
   Ideia visual: uma "mesa de criação". O compositor é o protagonista; o resto é calmo.
   --brand vem do .env (BRAND_COLOR) e é aplicado pelo app.js. */

:root {
  --ink: #10231B;          /* grafite: texto e barra lateral */
  --ink-soft: #3B5247;
  --ink-faint: #7A9086;
  --canvas: #EEF5F1;       /* fundo da mesa (gelo esverdeado) */
  --paper: #FFFFFF;
  --line: #D5E6DD;
  --brand: #5FD3A0;
  --brand-ink: #10231B;
  --brand-text: #0B5D40;   /* verde profundo para texto em fundo claro */
  --brand-line: #2E8B62;   /* contornos em fundo claro */
  --brand-soft: color-mix(in srgb, var(--brand) 12%, white);
  --sun: #FFB800;          /* destaque quente: avisos e marca padrão */
  --ok: #1F9D6B;
  --bad: #C2412D;

  --font-display: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Outfit', 'Segoe UI', system-ui, sans-serif;

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 9px;
  --shadow-desk: 0 1px 0 var(--line), 0 18px 40px -24px rgba(16, 35, 27, .35);
  --nav-w: 232px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-text, #0B5D40); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand-line); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- botões e campos */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: 999px; padding: .7rem 1.25rem; cursor: pointer;
  font-weight: 600; background: var(--ink); color: #fff; text-decoration: none;
  transition: transform .12s ease, background .2s ease;
}
.btn:hover { background: #1E3A2E; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.brand { background: var(--brand); color: var(--brand-ink); }
.btn.brand:hover { background: color-mix(in srgb, var(--brand) 85%, black); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
.btn.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 35%, white); }
.btn.small { padding: .45rem .9rem; font-size: .875rem; }

label.field { display: grid; gap: .35rem; font-weight: 600; font-size: .925rem; }
.field > span:first-child { font-weight: 600; font-size: .925rem; }
.field .hint { margin-left: .4rem; }
label.field .hint { font-weight: 400; color: var(--ink-soft); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--paper);
  border-radius: var(--r-sm); padding: .65rem .8rem; font-weight: 400;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand-line); outline: none; box-shadow: 0 0 0 4px var(--brand-soft); }
textarea { resize: vertical; min-height: 5rem; }
.form { display: grid; gap: 1rem; }
.form .row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.error-text { color: var(--bad); font-weight: 600; font-size: .925rem; }

/* ---------- tela de entrada */
.auth {
  min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.auth-art {
  background: var(--ink); color: #fff; padding: clamp(2rem, 6vw, 5rem);
  display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-art .logo { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; display: flex; align-items: center; gap: .6rem; }
.auth-art .logo { margin-bottom: clamp(1.75rem, 5vw, 3rem); }
.auth-art .logo .wordmark { height: clamp(44px, 6vw, 64px); width: auto; max-width: 100%; display: block; }
.auth-art h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); max-width: 12ch; color: #fff; }
.auth-art .lead { color: #B9D3C6; max-width: 38ch; margin-top: 1rem; font-size: 1.1rem; }
.auth-demo { margin-top: 2.5rem; display: grid; gap: .75rem; max-width: 420px; }
.auth-demo .bubble { font-size: .95rem; }
.auth-demo .bubble.me { background: var(--brand); color: var(--brand-ink); }
.auth-demo .bubble.ai { color: var(--ink); }
.auth-panel { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-card { width: min(420px, 100%); display: grid; gap: 1.5rem; }
.tabs { display: flex; gap: .25rem; background: #fff; padding: .3rem; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); }
.tabs button { flex: 1; border: 0; background: transparent; padding: .55rem 1rem; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.tabs button[aria-selected=true] { background: var(--ink); color: #fff; }

/* ---------- casca do app */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100dvh; }
.nav {
  background: var(--ink); color: #B9D3C6; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 1.75rem;
  position: sticky; top: 0; height: 100dvh;
}
.nav .logo { font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1.2rem; padding: 0 .6rem; display: flex; gap: .55rem; align-items: center; }
.nav .logo .wordmark { width: 100%; max-width: 180px; height: auto; display: block; }
.nav a.logo:hover { background: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.nav a {
  display: flex; align-items: center; gap: .75rem; padding: .65rem .75rem; border-radius: 12px;
  color: #B9D3C6; text-decoration: none; font-weight: 500;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a[aria-current=page] { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a[aria-current=page] svg { color: var(--brand); }
.nav .me { margin-top: auto; padding: .75rem; border-radius: 14px; background: rgba(255, 255, 255, .05); font-size: .9rem; }
.nav .me strong { color: #fff; display: block; }
.nav .me button { margin-top: .5rem; background: none; border: 0; color: #B9D3C6; padding: 0; cursor: pointer; text-decoration: underline; }

main { padding: clamp(1.25rem, 3vw, 2.5rem); max-width: 1100px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; justify-content: space-between; margin-bottom: 1.5rem; }
.page-head p { margin-top: .35rem; }

.banner {
  display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--sun) 28%, white); margin-bottom: 1.25rem; font-weight: 500;
}
.banner svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }

/* ---------- criar: a mesa */
.desk { display: grid; gap: 1.25rem; }
.feed { display: grid; gap: 1rem; }
.feed-empty {
  border: 2px dashed var(--line); border-radius: var(--r-lg); padding: 1.75rem; display: grid; gap: 1rem;
}
.ideas { display: flex; flex-wrap: wrap; gap: .5rem; }
.ideas button {
  border: 0; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 999px;
  padding: .45rem .9rem; cursor: pointer; font-size: .9rem; text-align: left;
}
.ideas button:hover { box-shadow: inset 0 0 0 1.5px var(--brand-line); }

.bubble { max-width: 760px; padding: .9rem 1.1rem; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { margin-left: auto; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.bubble.ai { background: var(--paper); box-shadow: var(--shadow-desk); border-bottom-left-radius: 6px; }
.bubble.ai.err { background: color-mix(in srgb, var(--bad) 8%, white); box-shadow: none; color: var(--bad); }
.bubble .meta { display: flex; gap: .75rem; align-items: center; margin-top: .75rem; white-space: normal; flex-wrap: wrap; }
.bubble .meta .tag { font-size: .8rem; color: var(--ink-faint); }
.bubble.ai.has-img { white-space: normal; width: fit-content; padding: .6rem; }
.bubble.ai.has-img .meta { margin: .6rem .3rem .2rem; }
.bubble img { border-radius: 12px; margin-top: .25rem; width: 520px; max-width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--canvas); }
.typing { display: inline-flex; gap: 5px; padding: .3rem 0; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.composer {
  position: sticky; bottom: 1rem; background: var(--paper); border-radius: var(--r-lg); padding: 1rem;
  box-shadow: 0 0 0 1.5px var(--line), 0 24px 48px -28px rgba(16, 35, 27, .5); display: grid; gap: .8rem;
}
.composer-top { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.mode { display: inline-flex; background: var(--canvas); padding: .25rem; border-radius: 999px; }
.mode button { border: 0; background: transparent; border-radius: 999px; padding: .45rem 1rem; cursor: pointer; font-weight: 600; color: var(--ink-soft); display: inline-flex; gap: .4rem; align-items: center; }
.mode button svg { width: 18px; height: 18px; }
.mode button[aria-pressed=true] { background: var(--brand); color: var(--brand-ink); }
.brand-pick { display: inline-flex; align-items: center; gap: .5rem; }
.brand-pick select { width: auto; border-radius: 999px; padding: .45rem 2rem .45rem .9rem; }
.swatches { display: inline-flex; }
.swatches i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; margin-left: -5px; display: inline-block; box-shadow: 0 0 0 1px var(--line); }
.swatches i:first-child { margin-left: 0; }
.toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 500; cursor: pointer; padding: .35rem .7rem; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); }
.toggle input { accent-color: var(--brand); }
.toggle:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--brand-line); background: var(--brand-soft); }
.toggle:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.composer textarea { border: 0; padding: .25rem .2rem; min-height: 3.2rem; max-height: 14rem; resize: none; font-size: 1.05rem; }
.composer textarea:focus { box-shadow: none; }
.composer-bottom { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.usage-line { font-size: .85rem; color: var(--ink-faint); }

/* ---------- post pronto + publicar */
.post-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start;
  background: var(--paper); border-radius: var(--r-lg); padding: 1rem; box-shadow: var(--shadow-desk); max-width: 1000px;
}
.post-media { display: grid; gap: .6rem; }
.post-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--canvas); }
.post-media .meta { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.post-media .tag { font-size: .8rem; color: var(--ink-faint); }
.publish { display: grid; gap: .6rem; }
.publish.compact { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.publish textarea { font-size: .97rem; line-height: 1.5; }
.pub-actions-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pub-box { display: grid; gap: .75rem; padding: .9rem; border-radius: var(--r-md); background: var(--canvas); }
.channels { border: 0; margin: 0; padding: 0; display: grid; gap: .45rem; }
.channels legend { margin-bottom: .35rem; }
.channel, .channel.static { display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: 12px; background: var(--paper); cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line); }
.channel.static { cursor: default; }
.channel:has(input:checked) { box-shadow: inset 0 0 0 2px var(--brand-line); }
.channel input { accent-color: var(--brand); }
.channel img, .ch-dot { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.ch-dot { display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; font-family: var(--font-display); }
.channel-list { display: grid; gap: .5rem; }
.when { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.when input[type=datetime-local] { width: auto; }
.pub-ok { font-weight: 600; color: #13633f; }
@media (max-width: 860px) { .post-card { grid-template-columns: 1fr; } }

/* ---------- marcas */
.brand-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.brand-card {
  background: var(--paper); border-radius: var(--r-md); padding: 1.1rem; display: grid; gap: .8rem;
  box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; border: 0; cursor: pointer;
}
.brand-card:hover { box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
.brand-card .top { display: flex; gap: .8rem; align-items: center; }
.logo-box { width: 56px; height: 56px; border-radius: 12px; background: var(--canvas); display: grid; place-items: center; overflow: hidden; flex: none; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink-faint); }
.logo-box img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--canvas); color: var(--ink-soft); }
.pill.sun { background: color-mix(in srgb, var(--sun) 45%, white); color: #6b4a00; }
.pill.ok { background: color-mix(in srgb, var(--ok) 15%, white); color: #13633f; }
.pill.bad { background: color-mix(in srgb, var(--bad) 12%, white); color: #8c2a1b; }
.code-inline { font-family: var(--font-body); font-weight: 600; background: var(--canvas); padding: .05rem .45rem; border-radius: 6px; }

.panel { background: var(--paper); border-radius: var(--r-lg); padding: clamp(1.1rem, 3vw, 1.75rem); box-shadow: var(--shadow-desk); }
.color-list { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.color-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .3rem .25rem .25rem; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); background: #fff; }
.color-chip input[type=color] { width: 28px; height: 28px; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
.color-chip input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-chip input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.color-chip span { font-size: .82rem; font-weight: 600; min-width: 4.6em; }
.color-chip button { border: 0; background: none; cursor: pointer; color: var(--ink-faint); padding: 0 .3rem; font-size: 1.1rem; line-height: 1; }
.logo-drop { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.logo-drop .logo-box { width: 96px; height: 96px; background-image: linear-gradient(45deg, #E3EEE8 25%, transparent 25%), linear-gradient(-45deg, #E3EEE8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #E3EEE8 75%), linear-gradient(-45deg, transparent 75%, #E3EEE8 75%); background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: space-between; }

/* ---------- histórico */
.filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.filters button { border: 0; padding: .4rem .9rem; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.filters button[aria-pressed=true] { background: var(--ink); color: #fff; box-shadow: none; }
.history { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }
.h-item { background: var(--paper); border-radius: var(--r-md); overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; }
.h-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.h-item .body { padding: .9rem 1rem 1rem; display: grid; gap: .5rem; }
.h-item .ask { font-weight: 600; }
.h-item .answer { white-space: pre-wrap; color: var(--ink-soft); font-size: .92rem; max-height: 9.5em; overflow: hidden; position: relative; }
.h-item .answer.open { max-height: none; }
.h-item .foot { display: flex; gap: .5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .82rem; color: var(--ink-faint); }

/* ---------- telegram e plano */
.split { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.big-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 8vw, 3.6rem); letter-spacing: .12em; color: var(--ink); }
.steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; }
.meter { display: grid; gap: .35rem; }
.meter .bar { height: 10px; border-radius: 999px; background: var(--canvas); overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.meter .bar i.full { background: var(--bad); }
.plans { display: grid; gap: .75rem; }
.plan-row { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; padding: .9rem 1rem; border-radius: var(--r-md); box-shadow: inset 0 0 0 1.5px var(--line); }
.plan-row.current { box-shadow: inset 0 0 0 2px var(--brand-line); background: var(--brand-soft); }
.plan-row strong { font-family: var(--font-display); font-size: 1.1rem; }
.plan-row .price { font-family: var(--font-display); font-weight: 700; }

/* ---------- admin */
.table-wrap { overflow-x: auto; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-desk); }
table { border-collapse: collapse; width: 100%; min-width: 860px; font-size: .92rem; }
th, td { padding: .7rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; color: var(--ink-soft); background: #F7FBF9; }
td select, td input { padding: .35rem .5rem; font-size: .88rem; }
td select { min-width: 8.5rem; }
td input[type=date] { min-width: 9.5rem; }
.stats { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.stat { background: var(--paper); border-radius: var(--r-md); padding: .8rem 1.1rem; box-shadow: inset 0 0 0 1.5px var(--line); min-width: 140px; }
.stat b { font-family: var(--font-display); font-size: 1.6rem; display: block; }

/* ---------- toast */
#toast {
  position: fixed; left: 50%; bottom: 1.5rem; background: var(--ink); color: #fff;
  padding: .75rem 1.2rem; border-radius: 999px; font-weight: 600; transition: transform .25s ease, visibility .25s; z-index: 50; max-width: calc(100% - 2rem);
  transform: translate(-50%, calc(100% + 3rem)); visibility: hidden;
}
#toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ---------- celular */
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: auto; padding: 2rem 1.25rem 2.5rem; }
  .auth-demo { display: none; }
  .shell { grid-template-columns: 1fr; }
  .nav {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; z-index: 20; padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom));
    flex-direction: row; gap: 0;
  }
  .nav .logo, .nav .me { display: none; }
  .nav ul { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .nav a { flex-direction: column; gap: .15rem; font-size: .72rem; padding: .45rem .2rem; text-align: center; }
  main { padding-bottom: 6.5rem; }
  .composer { position: static; box-shadow: 0 0 0 1.5px var(--line); }
  .composer-bottom .btn { flex: 1; }
  .mobile-top { display: flex !important; }
}
.mobile-top { display: none; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.mobile-top .logo { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; display: flex; gap: .5rem; align-items: center; }
.mobile-top .logo .wordmark { height: 38px; width: auto; display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- formato: feed, reels, story */
.formats { display: grid; gap: .45rem; }
.vert { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.vert-frame { width: 168px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: var(--ink); flex: none; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .55); }
.vert-frame video, .vert-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vert-loading { display: grid; place-content: center; justify-items: center; gap: .6rem; color: #fff; text-align: center; padding: 1rem; }
.vert-loading .typing span { background: #fff; }
.vert-side { display: grid; gap: .5rem; flex: 1; min-width: 160px; }
.vert-side .btn { justify-self: start; }

/* ---------- ajuste da imagem */
.ajuste { display: flex; gap: .5rem; flex-wrap: wrap; }
.ajuste input { flex: 1; min-width: 200px; padding: .45rem .75rem; border-radius: 999px; font-size: .9rem; }

/* aprovação no Telegram + agenda */
.aprovar { display: flex; gap: .65rem; align-items: flex-start; padding: .75rem .85rem; border: 1px solid var(--line, #D5E6DD); border-radius: 12px; background: color-mix(in srgb, var(--brand) 10%, white); margin: .25rem 0 .75rem; cursor: pointer; }
.aprovar input { margin-top: .2rem; accent-color: var(--brand-line); width: 18px; height: 18px; flex: none; }
.aprovar a { color: var(--brand-text); }
.agenda { display: grid; gap: .85rem; }
.ag-item { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; background: #fff; border-radius: 16px; padding: .85rem; box-shadow: 0 1px 2px rgba(16,35,27,.06); }
.ag-item img { width: 110px; height: 110px; object-fit: cover; border-radius: 12px; }
.ag-item .body { min-width: 0; display: grid; gap: .3rem; align-content: start; }
.ag-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; flex-wrap: wrap; text-transform: capitalize; }
.ag-leg { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .92rem; }
@media (max-width: 560px) { .ag-item { grid-template-columns: 76px 1fr; } .ag-item img { width: 76px; height: 76px; } }

/* foto do próprio cliente */
.foto-btn svg { width: 16px; height: 16px; margin-right: .35rem; vertical-align: -3px; }
.foto-btn { cursor: pointer; }
.foto-anexo { display: flex; align-items: center; gap: .75rem; padding: .5rem; margin: .5rem 0; border-radius: 12px; background: color-mix(in srgb, var(--brand) 10%, white); }
.foto-anexo img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; }
.foto-anexo > span { flex: 1; min-width: 0; }
.foto-anexo .btn { flex: none !important; }
.bubble img.bubble-foto { width: auto; max-width: 180px; max-height: 180px; aspect-ratio: auto; margin: 0 0 .4rem; }
.bubble-foto { display: block; max-width: 180px; max-height: 180px; border-radius: 10px; margin-bottom: .4rem; object-fit: cover; }
@media (max-width: 860px) {
  .nav ul { grid-auto-columns: minmax(50px, 1fr); overflow-x: auto; scrollbar-width: none; }
  .nav ul::-webkit-scrollbar { display: none; }
  .nav a { font-size: .66rem; padding: .45rem .1rem; }
  .composer-bottom .foto-btn { flex: none; }
}

/* publicados + números */
.pb-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.pb-tile { background: #fff; border-radius: 16px; padding: 1rem 1.1rem; display: grid; gap: .2rem; align-content: start; box-shadow: 0 1px 2px rgba(16,35,27,.06); }
.pb-tile strong { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.pb-destaque { display: grid; grid-template-columns: 180px 1fr; gap: 1.25rem; align-items: center; background: var(--ink); color: #fff; border-radius: 20px; padding: 1rem; margin-bottom: 1.25rem; }
.pb-destaque img { width: 180px; height: 180px; object-fit: cover; border-radius: 14px; }
.pb-destaque .muted { color: #B9D3C6; }
.pb-destaque .pb-leg { color: #E0EEE6; }
.pb-selo { display: inline-block; background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: .8rem; padding: .2rem .6rem; border-radius: 999px; }
.pb-hero { margin: .5rem 0 .2rem; font-size: 1rem; }
.pb-hero strong { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; margin-right: .35rem; font-variant-numeric: tabular-nums; }
.pb-ordem { margin-bottom: .85rem; }
.pb-lista { display: grid; gap: .85rem; }
.pb-item { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; background: #fff; border-radius: 16px; padding: .85rem; box-shadow: 0 1px 2px rgba(16,35,27,.06); }
.pb-item.top { box-shadow: inset 0 0 0 2px var(--brand-line); }
.pb-item img, .pb-noimg { width: 110px; height: 110px; object-fit: cover; border-radius: 12px; background: var(--canvas); }
.pb-body { min-width: 0; display: grid; gap: .35rem; align-content: start; }
.pb-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; flex-wrap: wrap; }
.pb-leg { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .92rem; }
.pb-nums { display: flex; gap: .2rem 1.1rem; flex-wrap: wrap; font-size: .9rem; color: var(--ink-soft, #3B5247); }
.pb-nums strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.pb-bar { height: 6px; background: var(--canvas); border-radius: 999px; overflow: hidden; max-width: 320px; }
.pb-bar span { display: block; height: 100%; background: var(--brand-line); border-radius: 999px; }
.pb-det summary { cursor: pointer; color: var(--brand-text); width: max-content; }
.pb-det dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .35rem .75rem; margin: .5rem 0 0; }
.pb-det dl div { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; border-bottom: 1px solid var(--line); padding: .2rem 0; }
.pb-det dt { color: var(--ink-soft, #3B5247); } .pb-det dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .pb-tiles { grid-template-columns: 1fr 1fr; } .pb-tiles .pb-tile:last-child { grid-column: 1 / -1; }
  .pb-destaque { grid-template-columns: 96px 1fr; gap: .85rem; } .pb-destaque img { width: 96px; height: 96px; }
  .pb-hero strong { font-size: 2rem; }
  .pb-item { grid-template-columns: 76px 1fr; } .pb-item img, .pb-noimg { width: 76px; height: 76px; }
}

/* vídeo próprio */
.post-media video { width: 100%; max-height: 520px; border-radius: 14px; background: var(--ink); display: block; }
.vert-frame.feed45 { width: 200px; aspect-ratio: 4 / 5; }
.barra { display: block; height: 6px; margin-top: .35rem; background: rgba(16, 35, 27, .12); border-radius: 999px; overflow: hidden; max-width: 240px; }
.barra i { display: block; height: 100%; background: var(--brand-line); border-radius: 999px; transition: width .2s; }
.foto-anexo img.hidden { display: none; }

/* agenda: automático + calendário */
.pill.brand { background: color-mix(in srgb, var(--brand) 22%, white); color: var(--brand-text); }
.pill.plan { background: transparent; color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand-line); }
.pill.off { background: var(--canvas); color: #557064; }
.auto-card, .cal, .cal-dia { background: #fff; border-radius: 20px; padding: 1.1rem 1.2rem; box-shadow: 0 1px 2px rgba(16,35,27,.06); margin-bottom: 1rem; }
.auto-card h2, .cal h2, .cal-dia h2 { font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cal-dia h2 { margin-bottom: .75rem; }
.auto-head { display: flex; justify-content: space-between; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.auto-acoes { display: flex; gap: .5rem; flex-wrap: wrap; }
.auto-resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: .5rem 0; }
.auto-resumo div { background: var(--canvas); border-radius: 12px; padding: .6rem .75rem; min-width: 0; }
.auto-resumo dt { font-size: .78rem; color: #557064; }
.auto-resumo dd { margin: .15rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.auto-form { border-top: 1px solid var(--line, #D5E6DD); margin-top: .9rem; padding-top: .9rem; display: grid; gap: .9rem; }
.modos { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.modos legend { margin-bottom: .4rem; }
.modo-op { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line, #D5E6DD); border-radius: 14px; padding: .75rem; cursor: pointer; }
.modo-op:has(input:checked) { box-shadow: inset 0 0 0 2px var(--brand-line); background: color-mix(in srgb, var(--brand) 8%, white); }
.modo-op input { accent-color: var(--brand-line); margin-top: .2rem; flex: none; }
.auto-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.auto-grid .field { display: grid; gap: .3rem; }
.cal-topo { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.cal-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-sem { font-size: .75rem; color: #557064; text-align: center; padding: .2rem 0; text-transform: capitalize; }
.cal-cel { min-height: 86px; border: 1px solid var(--line, #D5E6DD); border-radius: 10px; background: #fff; padding: .3rem; display: flex; flex-direction: column; align-items: stretch; gap: .2rem; text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.cal-cel:hover { border-color: var(--brand-line); }
.cal-cel:focus-visible { outline: 2px solid var(--brand-line); outline-offset: 1px; }
.cal-cel.vazio { border: 0; background: transparent; cursor: default; }
.cal-cel.hoje .cal-num { background: var(--ink); color: #fff; }
.cal-cel.sel { box-shadow: inset 0 0 0 2px var(--brand-line); }
.cal-num { font-size: .8rem; font-weight: 700; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 999px; }
.cal-chips { display: grid; gap: 2px; min-width: 0; }
.cal-chip { font-size: .7rem; line-height: 1.35; padding: 0 .3rem; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: .2rem; background: var(--canvas); font-variant-numeric: tabular-nums; }
.cal-chip.ok { background: var(--ink); color: #fff; }
.cal-chip.brand { background: color-mix(in srgb, var(--brand) 28%, white); color: var(--ink); }
.cal-chip.sun { background: #FFE9A8; color: var(--ink); }
.cal-chip.plan { background: transparent; box-shadow: inset 0 0 0 1px var(--brand-line); color: var(--brand-text); }
.cal-chip.off { color: #7A9086; text-decoration: line-through; }
.cal-chip.bad { background: #fde2e2; color: #8b1a1a; }
.cal-mais { font-size: .7rem; color: #557064; padding-left: .3rem; }
.cal-pontos { display: none; gap: 3px; justify-content: center; }
.cal-ponto { display: inline-block; width: 7px; height: 7px; border-radius: 999px; background: #B9D3C6; vertical-align: middle; margin-right: .3rem; }
.cal-ponto.ok { background: var(--ink); } .cal-ponto.brand { background: var(--brand-line); } .cal-ponto.sun { background: #E0A400; }
.cal-ponto.plan { background: transparent; box-shadow: inset 0 0 0 1.5px var(--brand-line); } .cal-ponto.off { background: #B9D3C6; } .cal-ponto.bad { background: #c53030; }
.cal-legenda { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .75rem 0 0; }
.ag-item.plan { background: color-mix(in srgb, var(--brand) 6%, white); border: 1px dashed var(--brand-line); }
.ag-vazio { width: 110px; height: 110px; border-radius: 12px; background: var(--canvas); display: grid; place-items: center; font-size: 1.8rem; }
@media (max-width: 760px) {
  .auto-resumo, .modos, .auto-grid { grid-template-columns: 1fr; }
  .cal { padding: .8rem .6rem; }
  .cal-cel { min-height: 52px; align-items: center; padding: .25rem 0; }
  .cal-chips { display: none; }
  .cal-pontos { display: flex; }
  .ag-vazio { width: 76px; height: 76px; }
}

/* o que a IA aprendeu + relatório */
.aprend { background: #fff; border-radius: 20px; padding: 1.1rem 1.2rem; box-shadow: 0 1px 2px rgba(16,35,27,.06); margin-bottom: 1.25rem; display: grid; gap: .6rem; }
.aprend-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.aprend h2 { font-size: 1.15rem; margin: 0; }
.aprend-resumo { font-size: 1rem; margin: 0; }
.aprend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.aprend-grid > div { background: var(--canvas); border-radius: 12px; padding: .7rem .8rem; min-width: 0; }
.aprend-grid h3 { font-size: .8rem; color: #557064; margin: 0 0 .35rem; font-weight: 600; }
.aprend-grid ul { margin: 0; padding-left: 1.1rem; font-size: .92rem; }
.rel-linha { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
@media (max-width: 640px) { .aprend-grid { grid-template-columns: 1fr; } }

.ag-top .pill { text-transform: none; }
.auto-grid { align-items: start; }
.auto-grid .field { align-content: start; }

/* música do Reels */
.musica { margin-top: .6rem; display: grid; gap: .5rem; padding: .7rem; border-radius: 12px; background: color-mix(in srgb, var(--brand) 8%, white); }
.mus-escolhida { display: flex; gap: .65rem; align-items: center; }
.mus-escolhida img, .mus-icone { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; background: var(--canvas); display: grid; place-items: center; font-size: 1.4rem; }
.musica audio { width: 100%; max-width: 360px; height: 34px; }
.mus-acoes { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.auto-mus { align-self: end; }
/* Som e animação no publicar */
.opcoes { display: grid; gap: .6rem; margin-top: .6rem; }
.op-anim { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .6rem; }
.op-som { display: grid; gap: .35rem; }
.op-som .when { flex-wrap: wrap; }
.opcoes .musica { margin-top: 0; }
/* Formatos escolhidos pela IA */
.auto-formatos { margin-top: .7rem; padding: .7rem .8rem; border-radius: 12px; background: var(--brand-soft); display: grid; gap: .45rem; }
.auto-formatos p { margin: 0; }
.barra-fmt { display: flex; height: 26px; border-radius: 8px; overflow: hidden; font-size: .78rem; font-weight: 600; }
.barra-fmt span { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; color: var(--brand-ink); min-width: 0; padding: 0 .3rem; }
.fmt-reels { background: var(--brand); } .fmt-feed { background: color-mix(in srgb, var(--brand) 55%, white); } .fmt-story { background: color-mix(in srgb, var(--brand) 25%, white); }
.auto-dica { grid-column: 1 / -1; margin: 0; }
/* Esqueci a senha */
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-ink); font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; justify-self: center; }
.link-btn:hover { color: var(--ink, inherit); }
.esqueci { margin-top: .2rem; }
.auth-titulo { margin: 0 0 .3rem; font-size: 1.3rem; }
input.codigo { letter-spacing: .5em; font-size: 1.3rem; text-align: center; font-variant-numeric: tabular-nums; }
/* Estilo da imagem e automático no Criar */
.estilo-pick select { border: 0; background: transparent; font: inherit; color: inherit; padding: 0 .2rem; max-width: 11rem; }
.estilo-info:empty { display: none; }
.auto-criar { margin-bottom: 1rem; }
.auto-criar h2 { font-size: 1.05rem; }
.auto-linha { margin: .15rem 0 0; }
.auto-mini { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .7rem .9rem; border-radius: 14px; background: var(--brand-soft); margin-bottom: 1rem; }
.auto-mini:empty { display: none; }
.est-real { background: var(--brand); } .est-desenho { background: color-mix(in srgb, var(--brand) 40%, white); }
