/* Calendário Mark3 — identidade da Mark3 (marinho + dourado), em versão clara e calma. */
:root {
  color-scheme: light;
  --navy-950: #060f1c;
  --navy-900: #0a1828;
  --navy-800: #11243b;
  --navy-700: #1b3352;
  --gold: #d9a441;
  --gold-600: #b9852a;
  --gold-soft: #f6e7c6;
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #0e1726;
  --ink-2: #2a3546;
  --muted: #667185;
  --muted-2: #98a2b3;
  --line: #e7e5df;
  --line-2: #efeee9;
  --ok: #12a150;
  --ok-soft: #e3f6ea;
  --warn: #d68a00;
  --warn-soft: #fff3d6;
  --err: #d92d4b;
  --err-soft: #fde8ec;
  --info: #2f6fed;
  --info-soft: #e7efff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 23, 38, .05);
  --shadow: 0 1px 2px rgba(14, 23, 38, .04), 0 8px 24px -12px rgba(14, 23, 38, .14);
  --shadow-lg: 0 30px 80px -24px rgba(6, 15, 28, .4);
  --font-head: "Sora", system-ui, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --acc: #6d5df6;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -.02em; margin: 0; line-height: 1.2; }
p { margin: 0; }
[hidden] { display: none !important; }
.ic { flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { color: var(--muted-2); font-size: 12.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.loading { padding: 48px; text-align: center; color: var(--muted); }
.loading::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 12px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy-900); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 6px 16px -8px rgba(10,24,40,.6); }
.btn-primary:hover { background: var(--navy-700); }
.btn-primary .ic { color: var(--gold); }
.btn-soft { background: var(--gold-soft); color: #6b4a0f; }
.btn-soft:hover { background: #f1dcab; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #d6d3ca; background: var(--surface-2); }
.btn-danger { background: var(--err-soft); color: var(--err); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-ghost.is-loading::after, .btn-soft.is-loading::after { border-color: rgba(0,0,0,.15); border-top-color: var(--ink); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.icon-btn.danger:hover { background: var(--err-soft); color: var(--err); }
.icon-btn.ghost { pointer-events: none; }
.link { background: none; border: 0; padding: 0; color: var(--navy-700); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Campos ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=date], input[type=time], select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 12px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,164,65,.18); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Alertas, pílulas, status ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 11px; font-size: 13.5px; margin-bottom: 14px; }
.alert .ic { margin-top: 1px; }
.alert-erro { background: var(--err-soft); color: #9b1a32; }
.alert-ok { background: var(--ok-soft); color: #0d6b37; }
.alert-info { background: var(--info-soft); color: #1d4ba8; }
.page-alert { margin: 16px 28px 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: var(--line-2); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.pill-gold { background: var(--gold-soft); color: #7a5512; }
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-draft { background: var(--line-2); color: var(--muted); }
.status-scheduled { background: var(--info-soft); color: var(--info); }
.status-pending { background: var(--gold-soft); color: #7a5512; }
.status-publishing, .status-processing { background: var(--warn-soft); color: var(--warn); }
.status-publishing::before, .status-processing::before { animation: pulse 1.2s ease-in-out infinite; }
.status-published { background: var(--ok-soft); color: var(--ok); }
.status-failed { background: var(--err-soft); color: var(--err); }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Avatares ---------- */
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy-800); color: #fff; font-weight: 700; font-size: 13px; overflow: hidden; flex: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--acc); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 28px; height: 28px; font-size: 11.5px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.me-avatar { background: var(--gold-soft); color: #7a5512; box-shadow: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); flex: none; }

/* ---------- Login / primeiro acesso ---------- */
.auth-body { background: var(--navy-950); }
.auth-wrap { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-side { position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(120% 90% at 0% 0%, #1b3352 0%, #0a1828 50%, #060f1c 100%); }
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand strong { display: block; font-family: var(--font-head); font-size: 18px; }
.auth-brand span { font-size: 13px; color: #9fb0c6; }
.auth-pitch { position: relative; z-index: 1; max-width: 460px; }
.auth-pitch h2 { font-size: 34px; line-height: 1.15; margin-bottom: 16px; }
.auth-pitch p { color: #b8c4d4; font-size: 16px; margin-bottom: 26px; }
.auth-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-pitch li { display: flex; gap: 12px; align-items: center; color: #dfe6ef; }
.auth-pitch li .ic { color: var(--gold); }
.auth-orbs span { position: absolute; border-radius: 50%; border: 1px solid rgba(217,164,65,.22); }
.auth-orbs span:nth-child(1) { width: 520px; height: 520px; right: -200px; bottom: -220px; }
.auth-orbs span:nth-child(2) { width: 340px; height: 340px; right: -110px; bottom: -130px; border-color: rgba(217,164,65,.35); }
.auth-orbs span:nth-child(3) { width: 14px; height: 14px; right: 118px; bottom: 196px; background: var(--gold); border: 0; box-shadow: 0 0 30px 6px rgba(217,164,65,.5); }
.auth-main { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border-radius: 20px; padding: 34px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; margin: 12px 0 6px; }
.auth-card > .muted { margin-bottom: 22px; }

/* ---------- Estrutura do app ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 16px; background: var(--navy-900); color: #dfe6ef; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.brand strong { display: block; font-family: var(--font-head); font-size: 16px; color: #fff; }
.brand small { display: block; color: #8597ad; font-size: 12px; }
.btn-new { width: 100%; height: 44px; background: var(--gold); color: var(--navy-950); box-shadow: 0 8px 20px -10px rgba(217,164,65,.8); }
.btn-new:hover { background: #e4b35a; }
.btn-new .ic { color: var(--navy-950); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px; color: #a9b6c7; font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.active { background: rgba(217,164,65,.12); color: #fff; }
.nav a.active .ic { color: var(--gold); }
.side-section { padding-top: 4px; border-top: 1px solid rgba(255,255,255,.07); }
.side-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6f8197; padding: 14px 8px 8px; }
.side-accounts { display: grid; gap: 4px; }
.side-acc { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.side-acc:hover { background: rgba(255,255,255,.05); }
.side-acc input { display: none; }
.side-acc .avatar { box-shadow: 0 0 0 2px var(--navy-900), 0 0 0 3.5px var(--acc); }
.side-acc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.side-acc input:not(:checked) ~ .side-acc-name { opacity: .4; text-decoration: line-through; }
.side-acc input:not(:checked) ~ .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--acc); }
.side-acc:has(input:not(:checked)) .avatar { opacity: .4; }
.side-footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.07); }
.side-footer .icon-btn { color: #8597ad; }
.side-footer .icon-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.me-name strong { display: block; color: #fff; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-name small { color: #8597ad; font-size: 12px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 28px; background: rgba(244,243,239,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 20px; }
.topbar-slot { flex: 1; display: flex; justify-content: flex-end; gap: 10px; }
.menu-btn { display: none; }
.btn-new-top { display: none; }
.content { padding: 24px 28px 48px; }

/* ---------- Cartões ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; }
.card-title .ic { color: var(--gold-600); }
.card-title.pad { padding: 18px 18px 0; }
.empty-state { max-width: 520px; margin: 40px auto; text-align: center; padding: 44px 32px; display: grid; justify-items: center; gap: 10px; }
.empty-state h2 { font-size: 20px; }
.empty-state .btn { margin-top: 8px; }
.empty-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--gold-soft); color: var(--gold-600); }

/* ---------- Segmentado ---------- */
.segmented { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: var(--line-2); border: 1px solid var(--line); }
.segmented button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s, box-shadow .15s; }
.segmented button:hover { color: var(--ink); }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.segmented button.active .ic { color: var(--gold-600); }
.segmented.sm button { height: 30px; padding: 0 11px; font-size: 13px; }

/* ---------- Calendário ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.cal-main { padding: 0; overflow: hidden; }
.cal-toolbar { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-title { flex: 1; font-size: 18px; text-transform: capitalize; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 10px; height: 10px; border-radius: 3px; }
.lg-scheduled i { background: var(--info); }
.lg-pending i { background: var(--gold); }
.lg-published i { background: var(--ok); }
.lg-draft i { border: 1.5px dashed var(--muted-2); }
.lg-failed i { background: var(--err); }
.lg-tip { margin-left: auto; }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month .dow { padding: 10px 10px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.day { position: relative; min-height: 128px; padding: 6px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; transition: background .12s; }
.day:nth-child(7n) { border-right: 0; }
.day.out { background: #fbfaf8; }
.day.out .day-num { color: var(--muted-2); }
.day.past { background-image: linear-gradient(transparent, transparent); }
.day:hover { background: #fcfbf7; }
.day.drop { background: #fff7e6; box-shadow: inset 0 0 0 2px var(--gold); }
.day-head { display: flex; align-items: center; justify-content: space-between; }
.day-num { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.day.today .day-num { background: var(--navy-900); color: #fff; }
.day.today .day-num::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); margin-left: 4px; }
.day-add { opacity: 0; width: 24px; height: 24px; border-radius: 7px; border: 0; background: var(--gold-soft); color: var(--gold-600); display: grid; place-items: center; transition: opacity .15s; }
.day:hover .day-add { opacity: 1; }
.day-add .ic { width: 14px; height: 14px; }
.day-more { border: 0; background: none; text-align: left; padding: 2px 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.day-more:hover { color: var(--ink); }

.chip { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; padding: 4px 6px 4px 8px; border-radius: 8px; border: 0; background: color-mix(in srgb, var(--acc) 10%, white); text-align: left; font-size: 12px; cursor: grab; transition: transform .1s, box-shadow .15s; }
.chip::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; border-radius: 3px; background: var(--acc); }
.chip:hover { box-shadow: 0 2px 8px -2px rgba(14,23,38,.18); }
.chip.dragging { opacity: .4; }
.chip-time { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip-text { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-2); }
.chip .ic { width: 13px; height: 13px; color: var(--muted); }
.chip-thumb { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; flex: none; background: var(--line); }
.chip-st { width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.chip-st .ic { width: 10px; height: 10px; color: #fff; }
.chip.s-published .chip-st { background: var(--ok); }
.chip.s-failed .chip-st { background: var(--err); }
.chip.s-scheduled .chip-st { background: var(--info); }
.chip.s-publishing .chip-st, .chip.s-processing .chip-st { background: var(--warn); animation: pulse 1.2s infinite; }
.chip.s-draft { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.chip.s-draft .chip-st { background: var(--muted-2); }
.chip.s-failed { background: var(--err-soft); }
.chip.s-pending { background: var(--gold-soft); box-shadow: inset 0 0 0 1.5px var(--gold); }
.chip.s-pending .chip-st { background: var(--gold-600); }
.chip.s-published { cursor: pointer; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 560px; }
.week-col { border-right: 1px solid var(--line-2); display: flex; flex-direction: column; }
.week-col:last-child { border-right: 0; }
.week-head { padding: 12px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); text-align: center; }
.week-head small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.week-head strong { font-family: var(--font-head); font-size: 20px; }
.week-col.today .week-head strong { color: var(--gold-600); }
.week-body { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.week-body.drop { background: #fff7e6; }
.wcard { position: relative; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); cursor: grab; transition: box-shadow .15s, transform .1s; }
.wcard:hover { box-shadow: var(--shadow); }
.wcard-img { aspect-ratio: 4 / 5; background: var(--line-2) center / cover no-repeat; display: grid; place-items: center; color: var(--muted-2); }
.wcard-img video { width: 100%; height: 100%; object-fit: cover; }
.wcard-body { padding: 8px 9px 9px; border-top: 3px solid var(--acc); }
.wcard-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 700; }
.wcard-text { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; }
.week-add { border: 1.5px dashed var(--line); background: none; border-radius: 10px; height: 36px; color: var(--muted-2); display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.week-col:hover .week-add { opacity: 1; }

.agenda { padding: 6px 0; }
.agenda-day { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.agenda-date strong { display: block; font-family: var(--font-head); font-size: 22px; }
.agenda-date span { color: var(--muted); font-size: 12.5px; text-transform: capitalize; }
.agenda-items { display: grid; gap: 8px; }
.arow { display: grid; grid-template-columns: 52px 46px 1fr auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 11px; border: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.arow:hover { background: var(--surface-2); }
.arow-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.arow .thumb { width: 46px; height: 46px; }
.arow-text { min-width: 0; }
.arow-text strong { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.arow-text span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cal-side { display: grid; gap: 16px; position: sticky; top: 88px; }
.stats-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats-mini div { padding: 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); }
.stats-mini strong { display: block; font-family: var(--font-head); font-size: 22px; }
.stats-mini span { font-size: 12px; color: var(--muted); }
.stats-mini div:nth-child(1) strong { color: var(--info); }
.stats-mini div:nth-child(2) strong { color: var(--ok); }
.stats-mini div:nth-child(4) strong { color: var(--err); }
.upcoming, .drafts { display: grid; gap: 8px; }
.up-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 11px; cursor: pointer; transition: background .15s; }
.up-item:hover { background: var(--surface-2); }
.up-item .thumb { width: 40px; height: 40px; }
.up-text { min-width: 0; flex: 1; }
.up-text strong { display: block; font-size: 12.5px; }
.up-text span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-item { cursor: grab; border: 1.5px dashed var(--line); }

.thumb { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9px; overflow: hidden; background: var(--line-2); color: var(--muted-2); flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--acc); }

/* ---------- Modal (nova publicação) ---------- */
.modal, .drawer { position: fixed; inset: 0; z-index: 100; }
.modal-backdrop, .drawer-backdrop { position: absolute; inset: 0; background: rgba(6,15,28,.5); backdrop-filter: blur(3px); animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal-card { position: relative; margin: 3vh auto; width: min(1080px, calc(100% - 32px)); max-height: 94vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); animation: pop .25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 20px 20px; }
.composer-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: 0; overflow: hidden; flex: 1; }
.composer-form { padding: 20px 22px; overflow-y: auto; }
.composer-preview { padding: 20px; background: linear-gradient(180deg, #f6f4ee, #efece4); border-left: 1px solid var(--line); overflow-y: auto; }
.c-block { margin-bottom: 20px; }
.c-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.c-label.center { justify-content: center; }
.counter { letter-spacing: 0; text-transform: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--err); }
.acc-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.acc-opt { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; transition: border-color .15s, background .15s; }
.acc-opt:hover { border-color: #d6d3ca; }
.acc-opt.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 8%, white); }
.acc-opt .check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; }
.acc-opt.on .check { background: var(--acc); border-color: var(--acc); color: #fff; }
.acc-opt .check .ic { width: 11px; height: 11px; opacity: 0; }
.acc-opt.on .check .ic { opacity: 1; }
.acc-opt[disabled] { opacity: .5; cursor: not-allowed; }
#c-type { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
#c-type button { justify-content: center; height: 40px; }
#c-type-hint { margin-top: 8px; }
.dropzone { border: 1.5px dashed #d8d4c9; border-radius: 14px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--gold); background: #fffaf0; }
.dz-empty { display: grid; justify-items: center; gap: 4px; padding: 26px; text-align: center; }
.dz-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface); color: var(--gold-600); box-shadow: var(--shadow-sm); margin-bottom: 6px; }
.dropzone.has-media .dz-empty { padding: 12px; grid-template-columns: auto auto; justify-content: center; gap: 10px; }
.dropzone.has-media .dz-empty .dz-icon, .dropzone.has-media .dz-empty .hint, .dropzone.has-media .dz-empty strong { display: none; }
.media-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 12px; }
.dropzone.has-media .media-list { padding: 12px 12px 0; }
.mitem { position: relative; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--line); box-shadow: var(--shadow-sm); cursor: grab; }
.mitem img, .mitem video { width: 100%; height: 100%; object-fit: cover; }
.mitem .rm { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(6,15,28,.7); color: #fff; display: grid; place-items: center; }
.mitem .rm .ic { width: 13px; height: 13px; }
.mitem .idx { position: absolute; left: 6px; bottom: 6px; min-width: 20px; height: 20px; border-radius: 6px; background: rgba(6,15,28,.7); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.mitem .badge { position: absolute; left: 6px; top: 6px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--gold); color: var(--navy-950); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.mitem.up { display: grid; place-items: center; cursor: default; }
.mitem.up .bar { position: absolute; left: 8px; right: 8px; bottom: 10px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.6); overflow: hidden; }
.mitem.up .bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.mitem.up span { font-size: 12px; font-weight: 700; color: var(--muted); }
.mitem.dragging { opacity: .4; }
.caption-tools { display: flex; justify-content: space-between; margin-top: 6px; }
.when-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.when-row input[type=date] { width: 170px; }
.when-row input[type=time] { width: 120px; }
.quick-times { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-times button { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.quick-times button:hover { border-color: var(--gold); color: var(--gold-600); }

/* Prévia em formato de celular */
.phone { width: 300px; margin: 0 auto; border-radius: 34px; background: #fff; padding: 10px; box-shadow: 0 0 0 9px #0a1828, 0 24px 50px -20px rgba(6,15,28,.6); overflow: hidden; }
.phone + .hint { margin-top: 24px; } /* a moldura do celular é box-shadow (9px) e não ocupa espaço */
.ph-head { display: flex; align-items: center; gap: 8px; padding: 6px 4px 8px; font-size: 12.5px; font-weight: 700; }
.ph-head .avatar { width: 28px; height: 28px; font-size: 11px; box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px #e1306c; }
.ph-head .more { margin-left: auto; color: var(--muted); }
.ph-media { position: relative; aspect-ratio: 4 / 5; background: #f0eee8; border-radius: 4px; overflow: hidden; display: grid; place-items: center; color: var(--muted-2); }
.ph-media img, .ph-media video { width: 100%; height: 100%; object-fit: cover; }
.ph-media.contain img { object-fit: contain; background: #111; }
.ph-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.ph-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.6); }
.ph-dots i.on { background: #fff; }
.ph-count { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 600; }
.ph-actions { display: flex; gap: 12px; padding: 9px 4px 4px; color: var(--ink); }
.ph-actions .ic { width: 21px; height: 21px; }
.ph-actions .save { margin-left: auto; }
.ph-caption { padding: 2px 4px 8px; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow: hidden; }
.ph-caption b { margin-right: 4px; }
.ph-caption .tag { color: #00376b; }
.ph-story, .ph-reel { position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #1c1f26; display: grid; place-items: center; color: #6b7280; margin: -2px; }
.ph-story img, .ph-story video, .ph-reel video, .ph-reel img { width: 100%; height: 100%; object-fit: cover; }
.ph-story .bars { position: absolute; top: 10px; left: 10px; right: 10px; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.4); }
.ph-story .bars::after { content: ""; display: block; width: 35%; height: 100%; border-radius: 2px; background: #fff; }
.ph-overlay-user { position: absolute; top: 20px; left: 12px; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ph-overlay-user .avatar { width: 26px; height: 26px; font-size: 10px; box-shadow: 0 0 0 1.5px #fff; }
.ph-reel .ph-overlay-user { top: auto; bottom: 64px; }
.ph-reel-caption { position: absolute; left: 12px; right: 52px; bottom: 18px; color: #fff; font-size: 12px; line-height: 1.4; text-shadow: 0 1px 2px rgba(0,0,0,.5); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-reel-side { position: absolute; right: 10px; bottom: 20px; display: grid; gap: 16px; color: #fff; }
.ph-reel-side .ic { width: 22px; height: 22px; }
.ph-empty { display: grid; justify-items: center; gap: 8px; font-size: 12.5px; padding: 20px; text-align: center; }

/* ---------- Gaveta (detalhe) ---------- */
.drawer-card { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .28s var(--ease); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head > div { flex: 1; min-width: 0; }
.d-title { display: flex; align-items: center; gap: 10px; }
.d-title strong { display: block; font-size: 14.5px; }
.d-title small { color: var(--muted); font-size: 12.5px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; gap: 16px; align-content: start; } /* max-content: sem isso, quando o conteúdo passa da altura, a linha da mídia (overflow hidden) encolhe até 0 */
.d-media { border-radius: 14px; overflow: hidden; background: var(--line-2); display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; }
.d-media > * { flex: none; width: 100%; max-height: 420px; object-fit: contain; background: #111; scroll-snap-align: start; }
.d-caption { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; max-height: 200px; overflow-y: auto; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.d-section-title { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 13.5px; margin-bottom: 10px; }
.d-section-title .ic { color: var(--gold-600); }
.d-error { background: var(--err-soft); color: #9b1a32; border-radius: 12px; padding: 12px 14px; font-size: 13px; display: flex; gap: 10px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { padding: 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.metric span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.metric span .ic { width: 13px; height: 13px; }
.metric strong { display: block; font-family: var(--font-head); font-size: 20px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.metric.hl { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.metric.hl span { color: #9fb0c6; }
.metric.hl strong { color: var(--gold); }
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding-bottom: 12px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 1.5px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 10px; height: 10px; margin: 4px 0 0 3.5px; border-radius: 50%; background: var(--muted-2); }
.tl-item.ok .tl-dot { background: var(--ok); }
.tl-item.err .tl-dot { background: var(--err); }
.tl-item.info .tl-dot { background: var(--info); }
.tl-item strong { font-size: 13px; }
.tl-item span { display: block; font-size: 12px; color: var(--muted); word-break: break-word; }
.comments { display: grid; gap: 10px; }
.cmt { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; }
.cmt-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.cmt-head b { color: var(--ink); }
.cmt-replies { margin: 8px 0 0 12px; padding-left: 10px; border-left: 2px solid var(--line); display: grid; gap: 6px; }
.cmt-reply-btn { border: 0; background: none; padding: 0; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--navy-700); }
.reply-box { display: flex; gap: 8px; margin-top: 8px; }
.reply-box input { height: 36px; }

/* ---------- Tabelas e filtros ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; padding: 12px; }
.filters .search { flex: 1; min-width: 200px; }
.filters select { width: auto; min-width: 160px; }
.table-card { padding: 0; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr[data-open-post] { cursor: pointer; transition: background .12s; }
.table tbody tr[data-open-post]:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.row-post { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-post-text { min-width: 0; }
.row-post-text strong { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.row-post-text strong .ic { color: var(--muted); }
.row-post-text .muted { display: block; font-size: 12.5px; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.acc-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
form.inline { display: inline; }
form.inline select { height: 34px; width: auto; }

/* ---------- Perfis ---------- */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; margin-bottom: 18px; }
.account-card { display: grid; gap: 16px; border-top: 4px solid var(--acc); }
.account-top { display: flex; align-items: center; gap: 14px; }
.account-top > div { flex: 1; min-width: 0; }
.account-top h3 { font-size: 17px; }
.account-stats { display: grid; grid-template-columns: repeat(4, minmax(max-content, 1fr)); gap: 8px; }
.account-stats div { padding: 10px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); }
.account-stats strong { display: block; font-family: var(--font-head); font-size: 18px; }
.account-stats span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.account-meta { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.account-meta div { display: flex; align-items: center; gap: 8px; }
.account-meta .ic { color: var(--muted); }
.account-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.color-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.color-pick input { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }
.add-account { display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; border: 1.5px dashed #d8d4c9; border-top-width: 1.5px; box-shadow: none; background: transparent; min-height: 260px; transition: border-color .15s, background .15s; }
.add-account:hover { border-color: var(--gold); background: #fffaf0; }
.add-account .muted { max-width: 260px; font-size: 13px; }
.info-card .info-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 13.5px; }

/* ---------- Equipe ---------- */
.team-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.team-side { display: grid; gap: 16px; }
.roles-help { display: grid; gap: 4px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); background: var(--surface-2); }

/* ---------- Referências ---------- */
.seg-link { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.seg-link:hover { color: var(--ink); }
.seg-link.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.refs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.refs-form { border-top: 4px solid var(--acc); }
.refs-form .field small { margin-top: -2px; }
.refs-side { display: grid; gap: 16px; position: sticky; top: 16px; }
.refs-save { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.refs-cores-hint { margin: -6px 0 14px; }
input[type=color] { width: 100%; height: 42px; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.logo-slot { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.logo-prev { width: 96px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); padding: 6px; }
.logo-prev.claro { background: #fff; }
.logo-prev.escuro { background: var(--navy-900); border-color: var(--navy-900); }
.logo-prev img { max-height: 100%; object-fit: contain; }
.logo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.logo-actions strong { width: 100%; }
.usage-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.usage-row b { font-variant-numeric: tabular-nums; }
.ia-result { margin-top: 14px; display: grid; gap: 10px; font-size: 13.5px; }
.ia-result .ia-box { padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; }
.ia-result .ia-tags { color: var(--navy-700); font-weight: 600; }
.ia-result .ia-meta { color: var(--muted-2); font-size: 12px; }

/* ---------- Imagens (biblioteca) ---------- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.lib-item { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.lib-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--line-2); }
.lib-item figcaption { display: grid; gap: 4px; padding: 10px; font-size: 12.5px; }
.lib-item figcaption strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lib-item .pill { justify-self: start; height: 22px; font-size: 11px; }
.lib-item .lib-rm { position: absolute; top: 6px; right: 6px; }
.lib-item .lib-rm .icon-btn { background: rgba(255,255,255,.92); }
input[type=file] { width: 100%; font-size: 13px; }

/* ---------- Conectar perfil (assistente) ---------- */
button.add-account { font: inherit; text-align: center; cursor: pointer; width: 100%; }
.cw-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.cw-steps li { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.cw-steps li > div:last-child { display: grid; gap: 6px; justify-items: start; }
.cw-num { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--navy-900); color: var(--gold); font-weight: 700; font-size: 13px; }

/* ---------- Criar com IA ---------- */
.btn-ai { width: 100%; margin-top: 8px; }
.gen-card { width: min(560px, calc(100% - 32px)); }
.gen-body { padding: 20px 22px; overflow-y: auto; }
.gen-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; max-height: 230px; overflow-y: auto; }
.gen-imgs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--line-2); }
.gen-imgs button.on { border-color: var(--gold); }
.gen-imgs img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gen-wait { display: flex; gap: 10px; align-items: center; }
.d-ia { padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); color: #6b4a0f; font-size: 13px; display: grid; gap: 4px; }
.up-item.pending-item { box-shadow: inset 3px 0 0 var(--gold); }

/* ---------- Desempenho ---------- */
.perf-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
#perf-accounts button .dot { margin-right: 2px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { position: relative; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.kpi span { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi span .ic { color: var(--gold-600); width: 15px; height: 15px; }
.kpi strong { display: block; font-family: var(--font-head); font-size: 26px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted-2); font-size: 12px; }
.kpi.hl { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.kpi.hl span { color: #9fb0c6; }
.kpi.hl strong { color: #fff; }
.kpi.hl::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; border: 1px solid rgba(217,164,65,.35); }
.perf-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.chart { width: 100%; height: 220px; }
.chart .bar { fill: var(--navy-700); transition: fill .15s; }
.chart .bar:hover { fill: var(--gold); }
.chart .axis { fill: var(--muted-2); font-size: 10.5px; font-family: var(--font); }
.chart .grid { stroke: var(--line-2); }
.chart-tip { font-size: 12.5px; color: var(--muted); min-height: 18px; }
.top-post { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.top-post .thumb { width: 120px; height: 150px; border-radius: 12px; }
.top-post p { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0 10px; }
.top-post .mini { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.top-post .mini b { color: var(--ink); font-variant-numeric: tabular-nums; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.mcard { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.mcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.mcard-img { position: relative; aspect-ratio: 1; background: var(--line-2) center / cover no-repeat; }
.mcard-type { position: absolute; top: 8px; left: 8px; height: 24px; padding: 0 8px; border-radius: 8px; background: rgba(6,15,28,.65); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.mcard-type .ic { width: 12px; height: 12px; }
.mcard-badge { position: absolute; top: 8px; right: 8px; height: 24px; padding: 0 8px; border-radius: 8px; background: var(--gold); color: var(--navy-950); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; }
.mcard-body { padding: 12px; }
.mcard-date { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
.mcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mcard-stats div { text-align: center; padding: 6px 2px; border-radius: 9px; background: var(--surface-2); }
.mcard-stats b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.mcard-stats span { font-size: 10.5px; color: var(--muted); }
.eng { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 700; }
.ads-card { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; background: linear-gradient(120deg, #fffaf0, #fff); }
.ads-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--gold-soft); color: var(--gold-600); flex: none; }
.ads-card p { font-size: 13px; margin-top: 4px; max-width: 760px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.section-head h3 { font-size: 16px; }

/* ---------- Avisos rápidos ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 12px; background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .25s var(--ease); }
.toast .ic { color: var(--gold); }
.toast.err { background: #7a1428; }
.toast.err .ic { color: #ffb3c1; }
.toast.ok .ic { color: #7ee2a8; }

/* ---------- Confirmação ---------- */
.confirm-card { width: min(420px, calc(100% - 32px)); margin: 18vh auto 0; padding: 22px; }
.confirm-card h3 { font-size: 17px; margin-bottom: 8px; }
.confirm-card .row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1240px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-side { position: static; grid-template-columns: repeat(3, 1fr); }
  .perf-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .composer-body { grid-template-columns: 1fr; overflow-y: auto; }
  .composer-form { overflow: visible; }
  .composer-preview { border-left: 0; border-top: 1px solid var(--line); }
  .team-layout { grid-template-columns: 1fr; }
  .refs-layout { grid-template-columns: 1fr; }
  .refs-side { position: static; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 90; width: 280px; transform: translateX(-100%); transition: transform .25s var(--ease); }
  body.menu-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: inline-grid; }
  .btn-new-top { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px; }
  .page-alert { margin: 12px 16px 0; }
  .cal-side { grid-template-columns: 1fr; }
  .day { min-height: 92px; padding: 4px; }
  .chip-text, .chip-thumb { display: none; }
  .lg-tip { display: none; }
  .week { grid-template-columns: repeat(7, 160px); overflow-x: auto; }
  .accounts-grid { grid-template-columns: 1fr; }
  .account-stats { grid-template-columns: repeat(2, 1fr); }
  .table th:nth-child(3), .table td:nth-child(3), .table th:nth-child(6), .table td:nth-child(6) { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .agenda-day { grid-template-columns: 1fr; gap: 8px; }
  .arow { grid-template-columns: 46px 40px 1fr; }
  .arow .status { display: none; }
}
@media (max-width: 560px) {
  .btn-new-top span { display: none; }
  .btn-new-top { width: 40px; padding: 0; }
  .topbar h1 { font-size: 17px; }
  .cal-toolbar { flex-wrap: wrap; }
  .cal-title { order: -1; flex-basis: 100%; }
  #c-type span { display: none; }
  .modal-card { margin: 0; width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .modal-foot { flex-wrap: wrap; border-radius: 0; }
  .modal-foot .spacer { display: none; }
  .modal-foot .btn { flex: 1; }
  .field-row { grid-template-columns: 1fr; }
  .top-post { grid-template-columns: 1fr; }
}

/* ---------- Comentários ---------- */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--gold); color: var(--navy-950); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.cm-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cm-tab { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13.5px; border: 1px solid transparent; }
.cm-tab span { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); font-size: 11.5px; display: grid; place-items: center; }
.cm-tab:hover { color: var(--ink); }
.cm-tab.active { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.cm-tab.active span { background: var(--gold-soft); color: #7a5512; }
.cm-empty { display: grid; justify-items: center; gap: 6px; padding: 36px 18px; text-align: center; }
.cm-empty .empty-icon { color: var(--muted-2); }
.cm-item { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; margin-bottom: 12px; border-left: 3px solid var(--acc); }
.cm-post { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-content: start; padding-right: 16px; border-right: 1px solid var(--line-2); }
.cm-post img { width: 52px; height: 65px; object-fit: cover; border-radius: 8px; background: var(--line-2); }
.cm-post .hint { display: inline-flex; align-items: center; gap: 6px; }
.cm-post .dot { width: 7px; height: 7px; }
.cm-caption { color: var(--ink-2); margin: 4px 0; overflow-wrap: anywhere; }
.cm-link { display: inline-flex; align-items: center; gap: 4px; }
.cm-link:hover { color: var(--ink); }
.cm-body { min-width: 0; display: grid; gap: 10px; }
.cm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-head .pill { height: 22px; font-size: 11px; }
.cm-text { font-size: 14.5px; white-space: normal; overflow-wrap: anywhere; }
.cm-reply { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; }
.cm-reply .hint { display: inline-flex; align-items: center; gap: 5px; }
.cm-form { display: grid; gap: 8px; }
.cm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-note { margin: 0; padding: 8px 12px; font-size: 13px; }
.cm-err { color: var(--warn); }
.cm-mode .field > span { display: inline-flex; align-items: center; gap: 7px; }
.cm-help { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.cm-st-pendente, .cm-st-novo { background: var(--gold-soft); color: #7a5512; }
.cm-st-respondido { background: var(--ok-soft); color: #0d6b37; }
.cm-st-oculto { background: var(--err-soft); color: #9b1a32; }
.cm-cat-pedido, .cm-cat-pergunta { background: var(--info-soft); color: #1d4ba8; }
.cm-cat-reclamacao, .cm-cat-ofensa, .cm-cat-spam { background: var(--err-soft); color: #9b1a32; }
.cm-cat-elogio { background: var(--ok-soft); color: #0d6b37; }
@media (max-width: 860px) {
  .cm-item { grid-template-columns: 1fr; gap: 12px; }
  .cm-post { border-right: 0; padding-right: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
}

/* ---------- Páginas públicas (privacidade e exclusão de dados) ---------- */
.legal-body { background: var(--bg); }
.legal-wrap { width: min(760px, 100%); margin: 0 auto; padding: 0 16px; }
.legal-top { background: var(--navy-900); color: #fff; }
.legal-top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.legal-brand { display: flex; align-items: center; gap: 10px; }
.legal-brand strong { display: block; font-family: var(--font-head); font-size: 15px; }
.legal-brand small { display: block; font-size: 12px; color: #9fb0c6; }
.legal-top nav { display: flex; gap: 4px; }
.legal-top nav a { padding: 6px 10px; border-radius: 8px; color: #a9b6c7; font-weight: 600; font-size: 13px; }
.legal-top nav a:hover { color: #fff; }
.legal-top nav a.active { background: rgba(217,164,65,.14); color: #fff; }
.legal-doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 28px; margin-bottom: 20px; padding: 32px 36px; line-height: 1.7; }
.legal-doc h1 { font-size: 28px; margin-bottom: 4px; }
.legal-doc > .hint { margin-bottom: 20px; }
.legal-doc h2 { font-size: 17px; margin: 26px 0 8px; }
.legal-doc p { margin: 0 0 12px; color: var(--ink-2); }
.legal-doc ul, .legal-doc ol { margin: 0 0 12px; padding-left: 22px; color: var(--ink-2); display: grid; gap: 6px; }
.legal-doc a { color: var(--navy-700); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-foot { padding-bottom: 32px; text-align: center; }
@media (max-width: 560px) {
  .legal-doc { padding: 22px 18px; margin-top: 16px; }
  .legal-doc h1 { font-size: 23px; }
}

/* ---------- Pauta automática, referências com IA, ideias e bancos (2026-10-21) ---------- */
.refs-main { display: grid; gap: 16px; min-width: 0; }
.refs-ai { border-top: 4px solid var(--gold); }
.refs-ai-tabs { margin: 4px 0 14px; }
.refs-ai-body .field { margin-bottom: 8px; }
.refs-ai-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
textarea.ai-filled { border-color: var(--gold); background: #fffdf6; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; margin-left: auto; cursor: pointer; }
.switch input { display: none; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(16px); }
.pauta-card .card-title { gap: 8px; }
.pauta-mix { display: grid; gap: 8px; margin-bottom: 8px; }
.mix-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 32px; align-items: center; gap: 8px; }
.mix-row select { height: 36px; }
.mix-row .qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.mix-row .qty button { width: 30px; height: 34px; border: 0; background: var(--surface-2); font-size: 16px; color: var(--ink-2); }
.mix-row .qty button:hover { background: var(--gold-soft); }
.mix-row .qty b { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.pauta-opts { margin-top: 12px; }
.pauta-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.pauta-actions .btn { flex: 1; }
.pauta-status { margin-top: 12px; }
.pauta-st { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line-2); }
.pauta-st .ic { flex: none; margin-top: 2px; color: var(--gold-600); }
.pauta-st.st-rodando, .pauta-st.st-fila { background: var(--gold-soft); color: #6b4a0f; border-color: transparent; }
.pauta-st.st-feito { background: var(--ok-soft); color: #0d6b37; border-color: transparent; }
.pauta-st.st-feito .ic { color: var(--ok); }
.pauta-st.st-erro { background: var(--err-soft); color: #9b1a32; border-color: transparent; }
.pauta-st.st-erro .ic { color: var(--err); }
.pauta-errs { margin: 6px 0 0; padding-left: 18px; }
.pauta-ins { margin-top: 10px; font-size: 12.5px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line); }
.logo-profile { margin-top: 4px; }
.tag-pauta { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; background: var(--navy-900); color: var(--gold); font-size: 10.5px; font-weight: 700; vertical-align: middle; margin-left: 4px; }
.chip.from-pauta .chip-st::after { content: ""; }
.idea-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; margin: 8px 0 10px; }
.idea-form input, .idea-form select { height: 36px; }
.idea-form select { width: auto; max-width: 130px; padding: 0 8px; }
.idea-form .btn { width: 36px; padding: 0; }
.ideas { display: grid; gap: 6px; }
.idea { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.idea > .ic { color: var(--gold-600); flex: none; }
.idea.usada { opacity: .6; }
.idea.usada > .ic { color: var(--ok); }
.idea.em_uso > .ic { color: var(--warn); animation: pulse 1.2s infinite; }
.idea-text { flex: 1; min-width: 0; display: grid; }
.idea-text span { font-size: 13px; }
.idea .icon-btn { width: 28px; height: 28px; }
.jobs-list { display: grid; gap: 8px; }
.job-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--gold-soft); }
.job-row .up-text strong { color: #6b4a0f; }
.bank-card { border-top: 4px solid var(--gold); }
.bank-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.bank-search input { flex: 1; min-width: 220px; }
.bank-results { margin-top: 12px; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bank-item { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.bank-item img { width: 100%; aspect-ratio: 9 / 14; object-fit: cover; background: var(--line-2); }
.bank-item figcaption { display: grid; gap: 6px; padding: 8px; }
.bank-item .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-video { position: relative; display: block; }
.lib-item.is-video img { aspect-ratio: 9 / 14; }
.lib-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(6,15,28,.65); color: #fff; display: grid; place-items: center; pointer-events: none; }
.lib-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(6,15,28,.7); color: #fff; font-size: 11px; font-weight: 700; }
.gen-imgs button { position: relative; }
.gen-imgs button.is-video .lib-play { width: 28px; height: 28px; }
.gen-imgs button.is-video .lib-play .ic { width: 14px; height: 14px; }
.thumb-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%; background: rgba(6,15,28,.65); color: #fff; display: grid; place-items: center; }
.thumb-play .ic { width: 11px; height: 11px; }
.d-roteiro { display: grid; gap: 3px; margin: 4px 0; font-size: 12.5px; }
.d-roteiro i { color: #8a6a2a; font-style: normal; }
#g-type { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
#g-type button { justify-content: center; }
#g-type-hint { margin-top: 8px; }
@media (max-width: 560px) {
  .mix-row { grid-template-columns: minmax(0, 1fr) auto 32px; }
  .mix-row .hint { display: none; }
  .idea-form { grid-template-columns: minmax(0, 1fr) auto; }
  .idea-form select { display: none; }
}
