/* ============================================================
   FubizSocial PHP v2 — visual premium
   ============================================================ */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff5ff;
  --green: #16a34a;
  --orange: #ea580c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, .14);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
body.bare { background: linear-gradient(160deg, #eef3fb 0%, #f6f8fb 45%, #eaf0f8 100%); min-height: 100vh; }
h1, h2, h3 { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.text-link { font-weight: 600; font-size: 13px; }
.hint-inline { color: var(--muted); font-size: 12.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

/* ---------- Topo premium ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; gap: 22px;
  padding: 12px 28px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; font-weight: 800; font-size: 20px;
  display: grid; place-items: center;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .35);
  letter-spacing: .5px;
}
.brand-word strong { display: block; color: var(--text); font-size: 15px; letter-spacing: -.01em; }
.brand-word small { font-size: 11px; color: var(--muted); }
.brand-mark-lg { width: 52px; height: 52px; font-size: 26px; border-radius: 14px; }

.main-menu { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.main-menu::-webkit-scrollbar { display: none; }
.nav-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 10px;
  color: #475569; font-weight: 600; font-size: 13.5px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-item svg { opacity: .8; }
.nav-item:hover { background: #f1f5f9; color: var(--primary); text-decoration: none; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); }
.nav-item.active svg { color: var(--primary); opacity: 1; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 9px; padding: 7px 9px; cursor: pointer; color: var(--text); }

.top-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.profile-box { display: flex; flex-direction: column; line-height: 1.15; }
.profile-caption { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.profile-box select {
  border: 0; background: transparent; color: var(--text);
  font: 600 13px var(--font); cursor: pointer; max-width: 190px;
  padding: 2px 20px 0 0; outline: none;
}
.icon-btn-ghost {
  position: relative; width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--border); background: #fff; color: #475569;
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.icon-btn-ghost:hover { border-color: #cbd5e1; color: var(--primary); }
.has-dot::after {
  content: ""; position: absolute; top: 9px; right: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #f43f5e; border: 1.5px solid #fff;
}
.avatar {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff; font-weight: 800;
}
.avatar-top { width: 38px; height: 38px; border-radius: 50%; font-size: 12px; }
.btn-cta { box-shadow: 0 6px 14px rgba(37, 99, 235, .3); }

/* ---------- Botoes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 10px 16px; font: 600 13.5px var(--font);
  cursor: pointer; transition: all .16s ease; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .22); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--primary-soft); color: var(--primary); border-color: #cdddfa; }
.btn-secondary:hover { background: #dbe8fe; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: #f6f8fb; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ==CSS_B== */

/* ---------- Conteudo ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 26px 28px 70px; }
.page--bare { max-width: 760px; padding: 6vh 20px; }
.app-footer {
  text-align: center; color: var(--muted-2); font-size: 12px;
  padding: 20px 0 26px; border-top: 1px solid var(--border);
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; margin-bottom: 22px; flex-wrap: wrap;
}
.eyebrow {
  margin: 0 0 2px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
}
.page-head h1 { font-size: 25px; font-weight: 750; letter-spacing: -.02em; }
.page-sub { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.page-sub strong { color: var(--text); }
.block-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 6px; }
.block-sub { color: var(--muted); font-size: 13px; margin: -2px 0 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
}
.grid-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
}
.si-blue { background: #eff5ff; color: var(--primary); }
.si-violet { background: #f3efff; color: #7c3aed; }
.si-green { background: #eafaf0; color: var(--green); }
.si-orange { background: #fff3e8; color: var(--orange); }
.stat-card strong { display: block; font-size: 25px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat-card small { color: var(--muted); font-size: 12.5px; font-weight: 500; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; margin-bottom: 20px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.post-layout { align-items: start; }
.post-main { display: flex; flex-direction: column; gap: 18px; }
.panel-form { padding: 22px; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: #334155; margin-bottom: 6px; }
input[type="text"], input[type="search"], input[type="date"], input[type="time"],
input[type="number"], select, textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  font: 500 13.5px var(--font); color: var(--text); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.checkline { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; color: #334155; }
.checkline input { width: auto; accent-color: var(--primary); }
.checkline.small { font-size: 12px; margin-top: 7px; color: var(--muted); }
.checks { display: flex; gap: 12px; flex-wrap: wrap; }
.check-card input { display: none; }
.check-card span {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 12px; padding: 8px 16px;
  cursor: pointer; font-weight: 600; color: #475569;
  background: #fff; transition: all .15s;
}
.check-card input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.inline-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.inline-filters select { width: auto; min-width: 170px; }
.row-actions { display: flex; gap: 8px; align-items: center; }
.mini-form { margin-top: 9px; }
.mini-form select { padding: 5px 8px; font-size: 12px; border-radius: 8px; }

/* ---------- Tabelas / badges / chips ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; padding: 9px 12px; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcff; }
.cell-sub { color: var(--muted); font-size: 12px; margin-top: 2px; max-width: 330px; }
.chip {
  display: inline-block; background: #eef2f7; color: #475569;
  border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; margin: 1px 3px 1px 0;
}
.badge {
  --bc: #64748b;
  display: inline-flex; align-items: center; gap: 7px;
  background: color-mix(in srgb, var(--bc) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--bc) 24%, #fff);
  color: var(--bc);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bc); }
.badge-lg { font-size: 13px; padding: 7px 14px; }
.badge-soft::before { display: none; }
.empty {
  text-align: center; padding: 42px 18px; color: var(--muted);
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.info-list { margin: 0; padding-left: 18px; color: #475569; line-height: 1.75; font-size: 13px; }

/* ---------- Toasts / modal ---------- */
.toasts { position: fixed; top: 78px; right: 24px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: 11px; box-shadow: var(--shadow-md); padding: 12px 15px;
  font-size: 13px; animation: slideIn .25s ease;
}
.toast-success { border-left-color: var(--green); }
.toast-error { border-left-color: #ef4444; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100;
  display: grid; place-items: center; padding: 20px;
}
.modal-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 24px; max-width: 430px; width: 100%; }
.modal-card h3 { margin-bottom: 8px; font-size: 16.5px; }
.modal-card p { color: #475569; line-height: 1.55; white-space: pre-line; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 16px; }

/* ---------- Logos de redes ---------- */
.nl {
  width: 54px; height: 54px; border-radius: 15px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  font-weight: 800; font-size: 18px; overflow: hidden;
  box-shadow: 0 6px 12px rgba(15, 23, 42, .12);
}
.nl svg { width: 54%; height: 54%; }
.nl-ig { background: radial-gradient(circle at 28% 110%, #fdf497 0%, #fd5949 42%, #d6249f 60%, #285aeb 92%); }
.nl-fb { background: #1877f2; }
.nl-yt { background: #ff0000; font-size: 0; }
.nl-in { background: #0a66c2; font-size: 15px; letter-spacing: -1px; }
.nl-th { background: #111827; font-size: 22px; }
.nl-tt { background: #0f172a; font-size: 26px; }
.nl-g  { background: #fff; color: #4285f4; font-size: 26px; font-weight: 800; box-shadow: 0 0 0 1px #e2e8f0; }

/* ---------- Dashboard extras ---------- */
.mini-accounts { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.mini-account {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px;
  background: #fbfcfe;
}
.mini-account .nl { width: 42px; height: 42px; border-radius: 12px; }
.mini-info { flex: 1; min-width: 0; line-height: 1.3; }
.mini-info strong { display: block; font-size: 13.5px; }
.mini-info small { color: var(--muted); font-size: 12px; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.qa {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--border); border-radius: 12px; padding: 15px 16px;
  color: var(--text); background: #fff; transition: all .16s;
}
.qa:hover { text-decoration: none; border-color: #bfdbfe; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.qa-icon { font-size: 20px; margin-bottom: 4px; }
.qa strong { font-size: 13.5px; }
.qa small { color: var(--muted); font-size: 12px; }

/* ---------- Dropzone demo ---------- */
.dropzone.demo {
  border: 1.5px dashed #d5dce6; border-radius: 12px; padding: 20px 12px;
  text-align: center; color: var(--muted); position: relative;
  background: #fbfcfe;
}
.dropzone.demo svg { color: var(--muted-2); margin-bottom: 4px; }
.dropzone.demo p { margin: 0; font-size: 12.5px; }
.tag-demo {
  position: absolute; top: -9px; right: 12px;
  background: #fff; border: 1px solid var(--border);
  color: var(--orange); font-size: 10.5px; font-weight: 700;
  border-radius: 999px; padding: 2px 9px;
}
.status-path { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- Contas (cards principais) ---------- */
.account-hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 18px; }
.account-hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 22px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 16px;
  transition: box-shadow .2s, transform .2s;
}
.account-hero:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hero-top { display: flex; align-items: center; gap: 15px; }
.hero-top .nl { width: 64px; height: 64px; border-radius: 18px; }
.hero-top .nl svg { width: 52%; height: 52%; }
.hero-id { flex: 1; min-width: 0; }
.hero-id h3 { font-size: 17px; letter-spacing: -.01em; }
.account-handle { color: var(--muted); font-size: 13px; display: block; }
.hero-body p { color: #475569; font-size: 13px; margin-bottom: 14px; }
.hero-foot { display: flex; align-items: center; gap: 12px; }

.account-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 13px; }
.account-mini {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 15px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm);
}
.account-mini .nl { width: 42px; height: 42px; border-radius: 12px; }
.account-mini .mini-info { flex: 1; }
.summary-row { display: flex; flex-wrap: wrap; gap: 26px; }
.summary-item strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.summary-item small { color: var(--muted); font-size: 12px; }

/* ---------- Calendario ---------- */
.cal-panel { padding: 18px; }
.cal-title { font-size: 16px; font-weight: 750; margin-bottom: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 5px 0 7px; }
.cal-cell {
  min-height: 92px; border: 1px solid var(--border); border-radius: 10px;
  background: #fbfcfe; padding: 6px; display: flex; flex-direction: column; gap: 4px; overflow: hidden;
}
.cal-cell.is-muted { background: transparent; border-color: transparent; }
.cal-cell.is-today { background: #eff5ff; border-color: #bfdbfe; }
.cal-num { font-size: 11.5px; font-weight: 700; color: #475569; }
.cal-event {
  font-size: 10.5px; line-height: 1.25; background: #fff; border: 1px solid var(--border);
  border-left: 3px solid #64748b; border-radius: 6px; padding: 2px 6px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.ce-time { font-weight: 700; color: #0f172a; margin-right: 3px; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: 230px; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col {
  background: #eef1f6; border: 1px solid #e2e6ee; border-radius: 14px;
  padding: 10px; display: flex; flex-direction: column; max-height: 78vh;
}
.kanban-head {
  display: flex; align-items: center; gap: 7px; padding: 3px 4px 10px; font-size: 12.5px;
}
.kanban-head .count {
  margin-left: auto; background: #d9dfe9; border-radius: 999px;
  padding: 1px 9px; font-size: 11px; font-weight: 700; color: #475569;
}
.kanban-body { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-bottom: 4px; }
.kanban-card {
  background: #fff; border: 1px solid var(--border); border-radius: 11px;
  padding: 11px 12px; box-shadow: var(--shadow-sm); cursor: grab;
}
.kanban-card:hover { box-shadow: var(--shadow-md); }
.card-title { display: block; font-size: 12.5px; }
.card-sub { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.kanban-empty { color: var(--muted-2); font-size: 12px; text-align: center; padding: 18px 0; }

/* ---------- IA ---------- */
.ai-layout { grid-template-columns: minmax(0, 1fr) 380px; }
.suggestion-list { margin: 6px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.suggestion-list li {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 11px;
  padding: 10px 13px; display: flex; flex-direction: column; gap: 2px;
}
.suggestion-list strong { font-size: 13px; }
.suggestion-list small { color: var(--muted); font-size: 12px; }

/* ---------- Instalacao ---------- */
.install-wrap { display: grid; place-items: center; min-height: 84vh; }
.install-card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 34px; width: 100%; max-width: 560px;
}
.install-brand { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.install-brand h1 { font-size: 22px; }
.install-brand small { color: var(--primary); font-size: 12px; font-weight: 700; display: block; }
.install-brand p { color: var(--muted); margin: 4px 0 0; }
.install-checks { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.install-checks li {
  display: flex; gap: 10px; align-items: center;
  border: 1px solid var(--border); border-radius: 11px; padding: 10px 13px;
  font-size: 13.5px; color: #334155;
}
.install-checks li > span {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #f1f5f9; color: var(--muted); font-weight: 800; font-size: 12px; flex-shrink: 0;
}
.install-checks li.ok > span { background: #eafaf0; color: var(--green); }
.install-checks li.fail > span { background: #fee2e2; color: #dc2626; }
.install-checks li code { background: #f1f5f9; padding: 2px 7px; border-radius: 6px; font-size: 12px; }
.install-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.install-error { color: #dc2626; background: #fef2f2; border-radius: 10px; padding: 10px 13px; font-size: 13px; margin-top: 14px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1200px) {
  .grid-stat { grid-template-columns: repeat(2, 1fr); }
  .account-hero-grid { grid-template-columns: 1fr; }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 1020px) {
  .menu-toggle { display: block; }
  .main-menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    align-items: stretch; background: #fff; border-bottom: 1px solid var(--border);
    padding: 10px 16px; gap: 2px; display: none; box-shadow: var(--shadow-md);
  }
  .main-menu.open { display: flex; }
  .topbar-inner { flex-wrap: wrap; gap: 12px; }
  .nav-item { justify-content: flex-start; }
  .layout-2col, .ai-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar-inner { padding: 12px 16px; }
  .page { padding: 20px 16px 60px; }
  .grid-stat { grid-template-columns: 1fr; }
  .top-actions { width: 100%; order: 3; justify-content: space-between; flex-wrap: wrap; }
  .btn-cta { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 60px; }
}

/* ============================================================
   Fase 2.1 — refinamentos de presenca premium
   ============================================================ */
.topbar-inner { padding-top: 14px; padding-bottom: 14px; gap: 26px; }
.brand { padding-right: 4px; }
.main-menu { gap: 4px; }
.nav-item { padding: 11px 15px; gap: 10px; font-size: 14px; border: 1px solid transparent; }
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { background: #f4f7fb; }
.nav-item.active {
  background: linear-gradient(180deg, #f4f9ff, #eaf3ff);
  border-color: #d6e4fb;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .06), 0 2px 6px rgba(37, 99, 235, .08);
}
.nav-item.active span { color: var(--primary-dark); }
.icon-btn-ghost { text-decoration: none; }
.icon-btn-ghost:hover { text-decoration: none; }
.page-head h1 { font-size: 27px; }
.eyebrow { letter-spacing: .09em; }
.page-sub { font-size: 13.5px; }

/* Hero da pagina de contas */
.account-hero { position: relative; overflow: hidden; }
.account-hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 118px;
  border-radius: 0 0 0 18px;
}
.account-hero.is-ig::before { background: linear-gradient(120deg, #f9a8d4, #d6249f 45%, #4f46e5 90%); opacity: .16; }
.account-hero.is-fb::before { background: linear-gradient(120deg, #93c5fd, #1d4ed8); opacity: .14; }
.account-hero.is-ig { border-top: 3px solid #d6249f; }
.account-hero.is-fb { border-top: 3px solid #1877f2; }
.hero-top { position: relative; }
.hero-top .nl { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 10px 22px rgba(15, 23, 42, .16); }
.hero-id h3 { font-size: 19px; }
.hero-foot { margin-top: 2px; }
.account-card-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-round {
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border);
  background: #fff; color: #64748b; display: grid; place-items: center; cursor: pointer;
  transition: all .15s;
}
.icon-round:hover { border-color: #cbd5e1; color: var(--primary); box-shadow: var(--shadow-sm); }
.icon-round svg { width: 18px; height: 18px; }
.btn-connect-lg { padding: 12px 22px; font-size: 14px; border-radius: 12px; }

/* Calendario denso */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-navgroup { display: flex; align-items: center; gap: 10px; }
.cal-title-lg { font-size: 20px; font-weight: 800; letter-spacing: -.02em; text-transform: capitalize; }
.cal-panel { padding: 20px; }
.cal-cell { min-height: 104px; border-radius: 12px; }
.cal-num { font-size: 12px; }
.cal-event { display: flex; align-items: center; gap: 5px; padding: 3px 7px; font-size: 11px; border-radius: 7px; }
.cal-event .dot-flag { width: 5px; height: 5px; border-radius: 50%; background: var(--bc, #64748b); flex-shrink: 0; }
.cal-event .ce-client { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.ev-meta { display: flex; align-items: center; gap: 5px; min-width: 0; }

/* Preview de post + repeticao */
.repeat-options {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  background: #fafbfd; border: 1px dashed var(--border); border-radius: 12px;
  padding: 14px; margin-top: 10px;
}
.repeat-options .field { margin-bottom: 0; }
.preview-phone {
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  max-width: 300px; margin: 0 auto; background: #fff; box-shadow: var(--shadow-md);
}
.phone-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.phone-head .avatar { width: 30px; height: 30px; font-size: 12px; }
.phone-caption { padding: 12px 14px; font-size: 13px; color: #1e293b; white-space: pre-wrap; min-height: 96px; line-height: 1.55; }
.phone-date { padding: 0 14px 12px; font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; }

/* IA */
.ai-layout { grid-template-columns: minmax(0, 1fr) 430px; }
.ai-hero {
  background: linear-gradient(135deg, #eff5ff 0%, #f8f5ff 60%, #fff 100%);
  border: 1px solid #dfe9fb; border-radius: 18px; padding: 22px 24px;
  display: flex; gap: 18px; align-items: center; margin-bottom: 20px;
}
.ai-hero .spark { font-size: 30px; }
.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pills label {
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px;
  cursor: pointer; font-size: 13px; font-weight: 600; color: #475569; background: #fff;
  transition: all .15s;
}
.radio-pills input { display: none; }
.radio-pills input:checked + span { color: var(--primary); }
.radio-pills label:has(input:checked) { background: var(--primary-soft); border-color: #a9c8fa; }
.result-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.result-table th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.result-table td { padding: 10px; border-bottom: 1px solid #eef2f7; }
.result-table tbody tr:hover { background: #fafcff; }
.placeholder-note { color: var(--muted-2); font-style: italic; font-size: 12px; }

/* Filtros do calendario */
.inline-filters { align-items: flex-end; background: #fbfcfe; border: 1px solid var(--border); border-radius: 13px; padding: 12px 14px; margin-bottom: 18px; }
.inline-filters .field { margin: 0; }
.filterfield-inline label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.inline-filters select { min-width: 160px; }
.inline-filters .filter-actions { margin-left: auto; align-self: end; display: flex; gap: 8px; }

/* Preview do post */
.phone-media {
  height: 208px; background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: grid; place-items: center; color: var(--muted-2);
}
.phone-media svg { width: 40px; height: 40px; }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.phone-head strong { font-size: 13px; }
.preview-labels { display: flex; flex-wrap: wrap; gap: 6px; }

/* === Fase 3 === */
.info-strip { display: flex; gap: 14px; flex-wrap: wrap; margin: -6px 0 20px; }
.info-chip {
  display: flex; align-items: center; gap: 12px; background: #fff;
  border: 1px solid var(--border); border-radius: 14px; padding: 12px 18px;
  box-shadow: var(--shadow-sm); color: var(--text);
  transition: all .15s;
}
.info-chip:hover { border-color: #bfdbfe; box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-1px); }
.info-chip strong { font-size: 20px; line-height: 1.1; display: block; }
.info-chip small { color: var(--muted); font-size: 12px; }
.info-chip .badge { font-size: 18px; padding: 8px 10px; }

.media-zone {
  border: 1.6px dashed #cbd5e1; border-radius: 14px; padding: 26px 18px;
  text-align: center; color: var(--muted); cursor: pointer;
  background: #fbfcfe; transition: all .15s;
}
.media-zone:hover, .media-zone.drag { border-color: var(--primary); background: var(--primary-soft); }
.media-zone svg { width: 30px; height: 30px; color: var(--primary); }
.media-zone p { margin: 6px 0 2px; color: var(--text); }
.media-zone .file-name { font-size: 12px; }
.media-actions { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.media-preview { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
#media-preview .preview-phone { margin: 0 auto 8px; }
#phone-media-box img, #phone-media-box video, #pv-media img, #pv-media video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
#phone-media-box { height: 190px; padding: 0; overflow: hidden; }
#pv-media { height: 200px; overflow: hidden; padding: 0; }

.repeat-box { margin-top: 12px; }
.repeat-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.repeat-options .field { margin-bottom: 0; }
.repeat-meta { display: flex; gap: 12px; align-items: flex-end; margin-top: 12px; }
.custom-range { display: flex; gap: 12px; margin-top: 12px; }
.custom-range .field { margin-bottom: 0; flex: 1; }

.panel-plan { border-color: #e3d5fb; background: linear-gradient(180deg, #fbf9ff, #ffffff); }
.occ-row input[type="date"], .occ-row input[type="time"] { min-width: 150px; }
.plan-actions { justify-content: flex-end; }
.table-scroll { overflow-x: auto; }
.occ-flag {
  background: #ede9fe; color: #6d28d9; border-radius: 999px;
  padding: 0 7px; font-size: 10px; font-weight: 700; margin: 0 2px;
}

/* Bibliotecas de midia */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.lib-item {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  border: 1px solid var(--border); border-radius: 12px; padding: 8px;
  background: #fff; cursor: pointer; transition: all .15s;
}
.lib-item:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.lib-item img { width: 100%; height: 84px; object-fit: cover; border-radius: 8px; }
.lib-thumb { display: grid; place-items: center; width: 100%; height: 84px; border-radius: 8px; background: #eef2f7; color: #475569; }
.lib-video { background: #111; color: #fff; font-size: 20px; }
.lib-thumb.lib-big { height: 150px; font-size: 34px; }
.lib-name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-wide { max-width: 720px; }

.media-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.media-thumb { position: relative; height: 150px; background:#0f172a; }
.media-thumb img { width: 100%; height: 150px; object-fit: cover; display:block; }
.media-thumb .badge { position: absolute; top: 8px; right: 8px; }
.media-info { padding: 12px 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.media-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card .btn { margin: 0 13px 13px; }
.lib-grid-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.campaign-note { border-left: 4px solid #7c3aed; }

.campaign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.campaign-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px;
  box-shadow: var(--shadow-sm); color: var(--text); display: flex; flex-direction: column; gap: 6px;
  transition: all .15s;
}
.campaign-card:hover { border-color: #c4b5fd; box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-2px); }
.campaign-head { display: flex; justify-content: space-between; align-items: center; }
.campaign-name { font-size: 15px; }
.campaign-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; color: var(--muted); font-size: 12px; }

/* Fase 3.1 */
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.gallery img, .gallery video { width: 100%; max-height: 340px; object-fit: contain; border-radius: 12px; background: #0f172a; }
.gallery figure { position: relative; margin: 0; }
.gallery figcaption { position: absolute; bottom: 8px; right: 8px; background: rgba(15,23,42,.72); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 8px; }
.timeline { display: flex; flex-direction: column; gap: 6px; }
.tl-item { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 11px; padding: 8px 12px; color: var(--text); transition: all .15s; }
.tl-item:hover { border-color: #c7d2fe; box-shadow: var(--shadow-sm); text-decoration: none; }
.tl-occ { font-size: 14px; width: 20px; text-align: center; }
.tl-main { display: flex; flex-direction: column; }
.tl-main small { color: var(--muted); }
.radio-line { display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.radio-line:hover { background: #f6f8fb; }
.radio-line input { margin-top: 3px; accent-color: var(--primary); }
.radio-line span { display: flex; flex-direction: column; }
.radio-line small { color: var(--muted); }
.media-order { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mo-chip { display: inline-flex; align-items: center; gap: 6px; background: #eef5ff; border: 1px solid #cfdffc; color: #1e3a8a; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.mo-idx { background: var(--primary); color: #fff; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; }
.mo-chip .occ-remove { border: 0; background: none; cursor: pointer; color: #64748b; padding: 0 2px; }

/* Fase 3.2 */
.modal-xl { max-width: 920px; width: 100%; }
.lib-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.lib-toolbar input[type="search"] { min-width: 200px; }
.lib-toolbar select, .lib-toolbar input[type="date"] { width: auto; }
.lib-scroll { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fafbfd; }
.lib-grid-multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.lib-check-item { position: relative; }
.lib-check-item .lib-check {
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--border-strong); color: transparent;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; transition: all .15s;
}
.lib-check-item.sel { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.18); }
.lib-check-item.sel .lib-check { background: var(--primary); border-color: var(--primary); color: #fff; }
.lib-footer { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.lib-footer .row-actions { margin-left: auto; }
.grow { flex: 1; }
.mo-btn { border: 0; background: none; cursor: pointer; color: var(--primary); font-weight: 700; padding: 0 2px; }
.mo-btn:hover { color: var(--primary-dark); }
.mo-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-nav { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 6px 0; }
.pv-count { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.pv-dots { display: flex; gap: 4px; }
.dotp { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; }
.dotp.on { background: var(--primary); width: 14px; border-radius: 999px; }
.media-detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 18px; align-items: start; }











/* ============================================================
   AGENDAR POST PREMIUM V1 — escopo isolado
   ============================================================ */
.composer-page-head { margin-bottom: 18px; }
.composer-page-head h1 { font-size: 28px; }

.composer-form { width: 100%; }
.composer-grid {
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(360px, 1.05fr) minmax(300px, 360px);
  gap: 18px;
  align-items: start;
}
.composer-column { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.composer-card { padding: 20px; border-radius: 16px; }
.composer-sticky { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 18px; }

.composer-step { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.composer-step .step-number {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center;
  border-radius: 9px; background: var(--primary-soft); color: var(--primary);
  font-weight: 800; font-size: 12px;
}
.composer-step h2 { font-size: 16px; line-height: 1.25; margin: 1px 0 3px; }
.composer-step p { margin: 0; color: var(--muted); font-size: 12.5px; }

.composer-form .field { margin-bottom: 14px; }
.composer-form .field > label { font-size: 12px; letter-spacing: .01em; }
.composer-form input[type="text"],
.composer-form input[type="date"],
.composer-form input[type="time"],
.composer-form input[type="number"],
.composer-form select,
.composer-form textarea {
  min-height: 44px;
  border-radius: 12px;
  border-color: #dbe3ee;
  background: #fff;
  padding: 11px 13px;
}
.composer-form textarea { min-height: auto; }
.composer-form #p-caption { min-height: 210px; line-height: 1.6; }

.channel-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.channel-card { display: block; cursor: pointer; }
.channel-card input { position: absolute; opacity: 0; pointer-events: none; }
.channel-card-ui {
  min-height: 82px;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid #dbe3ee; border-radius: 14px; padding: 12px;
  background: #fff; transition: .16s ease;
}
.channel-card:hover .channel-card-ui { border-color: #bfdbfe; box-shadow: var(--shadow-sm); }
.channel-icon {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 13px; display: grid; place-items: center;
  background: #f8fafc; border: 1px solid #e2e8f0;
  font-size: 20px; color: #475569;
}
.channel-copy { min-width: 0; display: flex; flex-direction: column; }
.channel-copy strong { font-size: 14px; color: var(--text); }
.channel-copy small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.channel-check {
  margin-left: auto; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; color: transparent; background: #f1f5f9;
  font-size: 11px; font-weight: 900;
}
.channel-card input:checked + .channel-card-ui {
  border-color: #93c5fd; background: #f7fbff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.06);
}
.channel-card input:checked + .channel-card-ui .channel-check { color: #fff; background: var(--primary); }
.channel-instagram input:checked + .channel-card-ui .channel-icon {
  color: #fff; border-color: transparent;
  background: radial-gradient(circle at 28% 110%, #fdf497 0%, #fd5949 42%, #d6249f 60%, #285aeb 92%);
}
.channel-facebook input:checked + .channel-card-ui .channel-icon { color: #fff; border-color: transparent; background: #1877f2; }

.format-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.format-card { cursor: pointer; min-width: 0; }
.format-card input { position: absolute; opacity: 0; pointer-events: none; }
.format-card > span {
  min-height: 92px; border: 1px solid #dbe3ee; border-radius: 13px; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 10px 6px; text-align: center; transition: .16s ease;
}
.format-card .format-glyph { font-size: 21px; line-height: 1; color: #64748b; margin-bottom: 4px; }
.format-card strong { font-size: 12.5px; color: #334155; }
.format-card small { font-size: 10.5px; color: var(--muted); }
.format-card input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(37,99,235,.07); }
.format-card input:checked + span .format-glyph,
.format-card input:checked + span strong { color: var(--primary); }

.internal-title {
  border: 1px solid #e8edf4; border-radius: 12px; background: #fbfcfe;
  margin-bottom: 14px; padding: 0 12px;
}
.internal-title summary {
  cursor: pointer; list-style: none; padding: 10px 0; font-size: 12px; font-weight: 700; color: #475569;
}
.internal-title summary::-webkit-details-marker { display: none; }
.internal-title summary::after { content: "⌄"; float: right; color: #94a3b8; }
.internal-title[open] summary::after { transform: rotate(180deg); }
.internal-title summary span { font-weight: 500; color: var(--muted-2); margin-left: 5px; }
.internal-title .field { margin: 0 0 12px; }

.composer-subgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.composer-subgrid .field { margin-bottom: 0; }

.premium-dropzone { padding: 32px 18px; border-radius: 15px; }
.premium-dropzone .upload-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); margin: 0 auto 9px;
}
.premium-dropzone .upload-icon svg { width: 24px; height: 24px; }
.premium-dropzone p { margin: 0 0 2px; }
.premium-dropzone small { display: block; font-size: 11.5px; color: var(--muted); }
.premium-dropzone .file-name {
  display: inline-block; margin-top: 10px; border-radius: 999px; padding: 4px 9px;
  background: #eef2f7; color: #64748b;
}
.media-order-premium { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.compact-media-preview { max-width: 220px; border-radius: 14px; }
#phone-media-box { height: 150px; }

.schedule-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.schedule-row .field { margin-bottom: 8px; }

.repeat-toggle-card {
  display: flex; gap: 11px; align-items: center; cursor: pointer;
  border: 1px solid #e2e8f0; border-radius: 13px; padding: 12px; background: #fbfcfe;
  margin-top: 4px;
}
.repeat-toggle-card > input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui {
  width: 38px; height: 22px; border-radius: 999px; background: #cbd5e1;
  position: relative; flex: 0 0 38px; transition: .15s;
}
.toggle-ui::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  position: absolute; left: 3px; top: 3px; box-shadow: 0 1px 4px rgba(15,23,42,.22); transition: .15s;
}
.repeat-toggle-card > input:checked + .toggle-ui { background: var(--primary); }
.repeat-toggle-card > input:checked + .toggle-ui::after { transform: translateX(16px); }
.repeat-toggle-card strong { display: block; font-size: 12.5px; }
.repeat-toggle-card small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }

.repeat-box { border-top: 1px solid #eef2f7; margin-top: 14px; padding-top: 14px; }
.repeat-options { background: #fbfcfe; border-style: solid; }
.repeat-meta { align-items: stretch; }
.repeat-meta .field { margin-bottom: 0; }

.preview-panel-premium { padding: 16px; }
.preview-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.preview-kicker { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.preview-toolbar > div > strong { font-size: 14px; }
.preview-network-tabs { display: flex; gap: 6px; }
.preview-network {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid #dbe3ee;
  background: #fff; color: #64748b; font-weight: 800; cursor: pointer;
}
.preview-network.active { color: var(--primary); border-color: #93c5fd; background: var(--primary-soft); }

.premium-phone { max-width: 100%; border-radius: 14px; box-shadow: none; }
.premium-phone .phone-head { padding: 10px 11px; }
.premium-phone .phone-media { height: 285px; transition: height .2s ease; }
.premium-phone[data-format="story"] .phone-media,
.premium-phone[data-format="reel"] .phone-media { height: 430px; }
.premium-phone[data-format="story"] .phone-caption,
.premium-phone[data-format="reel"] .phone-caption { max-height: 120px; overflow: auto; }
.preview-social-actions {
  display: flex; align-items: center; gap: 13px; padding: 9px 11px 0; font-size: 21px; line-height: 1;
}
.preview-social-actions .save { margin-left: auto; }

.composer-actions-card { padding: 16px; }
.composer-actions-card .btn { min-height: 42px; }
.note-field { margin: 14px 0 0 !important; }
.note-field input { min-height: 40px !important; }

.composer-plan-full { margin-top: 18px; }
.composer-plan-full .occ-row input[type="date"],
.composer-plan-full .occ-row input[type="time"] { min-width: 145px; }

@media (min-width: 1500px) {
  .page { max-width: 1560px; }
  .composer-grid { grid-template-columns: minmax(350px, .95fr) minmax(400px, 1.05fr) 380px; gap: 20px; }
}
@media (max-width: 1180px) {
  .composer-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .composer-right { grid-column: 1 / -1; }
  .composer-sticky { position: static; display: grid; grid-template-columns: minmax(0,1fr) 320px; }
  .premium-phone .phone-media { height: 340px; }
}
@media (max-width: 820px) {
  .composer-grid { grid-template-columns: 1fr; }
  .composer-right { grid-column: auto; }
  .composer-sticky { display: flex; }
  .channel-selector, .composer-subgrid, .schedule-row { grid-template-columns: 1fr; }
  .format-selector { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .repeat-options { grid-template-columns: 1fr; }
  .repeat-meta, .custom-range { flex-direction: column; }
}
@media (max-width: 520px) {
  .composer-card { padding: 15px; }
  .format-selector { grid-template-columns: 1fr; }
  .format-card > span { min-height: 72px; flex-direction: row; gap: 8px; }
  .channel-card-ui { min-height: 72px; }
}


/* ============================================================
   AGENDAR POST PREMIUM V2 — compacto, sem rolagem para legenda,
   preview integral e barra fixa de ações
   ============================================================ */

/* mais conteúdo útil acima da dobra */
body { padding-bottom: 78px; }
.composer-page-head {
  margin-bottom: 12px;
}
.composer-page-head .eyebrow { margin-bottom: 0; }
.composer-page-head h1 {
  font-size: 25px;
  line-height: 1.1;
}
.composer-page-head .page-sub {
  margin-top: 3px;
  font-size: 12.5px;
}

.composer-grid {
  gap: 14px;
  grid-template-columns: minmax(330px, .95fr) minmax(370px, 1.05fr) minmax(290px, 350px);
}
.composer-column { gap: 12px; }
.composer-card {
  padding: 16px;
  border-radius: 15px;
}
.composer-step {
  gap: 9px;
  margin-bottom: 12px;
}
.composer-step .step-number {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  border-radius: 8px;
}
.composer-step h2 { font-size: 15px; }
.composer-step p { font-size: 11.5px; }

/* PERFIL: apenas seleção rápida, como solicitado */
.composer-profile-card {
  padding-bottom: 14px;
}
.composer-profile-card .composer-step p {
  display: none;
}
.composer-profile-card .field {
  margin-bottom: 10px;
}
.composer-profile-card .field > label {
  margin-bottom: 4px;
}
.composer-profile-card select {
  min-height: 40px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* canais viram seletores compactos */
.channel-selector {
  gap: 8px;
}
.channel-card-ui {
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 12px;
  gap: 9px;
}
.channel-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 10px;
  font-size: 16px;
}
.channel-copy strong { font-size: 12.5px; }
.channel-copy small { font-size: 9.8px; }
.channel-check {
  width: 19px;
  height: 19px;
  font-size: 10px;
}

/* formatos em uma linha mais baixa/compacta */
.format-selector { gap: 7px; }
.format-card > span {
  min-height: 58px;
  padding: 7px 5px;
  border-radius: 11px;
}
.format-card .format-glyph {
  font-size: 16px;
  margin-bottom: 1px;
}
.format-card strong { font-size: 11.5px; }
.format-card small { font-size: 9.5px; }

/* legenda passa a aparecer na primeira tela */
.composer-text-card {
  padding-top: 15px;
}
.composer-text-card .composer-step {
  margin-bottom: 10px;
}
.composer-text-card .internal-title {
  margin-bottom: 9px;
}
.composer-text-card .internal-title summary {
  padding: 8px 0;
}
.composer-form #p-caption {
  min-height: 160px;
  height: 160px;
  max-height: 260px;
}
.composer-subgrid {
  gap: 8px;
}
.composer-subgrid textarea {
  min-height: 64px;
  height: 64px;
}

/* mídia: mais horizontal e menos alta */
.premium-dropzone {
  padding: 23px 14px;
}
.premium-dropzone .upload-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
}
.media-actions {
  gap: 7px;
  flex-wrap: nowrap;
}
.media-actions .btn {
  padding-left: 12px;
  padding-right: 12px;
}
.media-order-premium {
  margin-top: 7px;
}

/* data/hora: compacto */
.schedule-row .field {
  margin-bottom: 4px;
}
.repeat-toggle-card {
  padding: 10px;
  margin-top: 2px;
}

/* PREVIEW: imagem sempre inteira, nunca cortada */
.preview-panel-premium {
  padding: 14px;
}
.preview-toolbar {
  margin-bottom: 9px;
}
.premium-phone .phone-media {
  height: 300px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.premium-phone .phone-media img,
.premium-phone .phone-media video,
.compact-media-preview .phone-media img,
.compact-media-preview .phone-media video,
#phone-media-box img,
#phone-media-box video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #f8fafc;
}
.premium-phone[data-format="story"] .phone-media,
.premium-phone[data-format="reel"] .phone-media {
  height: 390px;
}
.compact-media-preview {
  display: none; /* preview principal já mostra a mídia completa */
}

/* card de observação mínimo */
.composer-note-card {
  padding: 10px 14px;
}
.composer-note-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.composer-note-details summary span {
  color: var(--muted-2);
  font-weight: 500;
  margin-left: 4px;
}
.composer-note-details .field {
  margin: 9px 0 0 !important;
}

/* BARRA FIXA estilo ferramenta de social media */
.composer-fixed-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid #dbe3ee;
  box-shadow: 0 -8px 24px rgba(15,23,42,.06);
}
.composer-fixed-inner {
  max-width: 1560px;
  min-height: 66px;
  margin: 0 auto;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.composer-fixed-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  min-width: 0;
}
.composer-fixed-left span {
  white-space: nowrap;
}
.fixed-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}
.fixed-separator {
  color: #cbd5e1;
}
.composer-fixed-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.composer-fixed-actions .btn {
  min-height: 42px;
}
.fixed-schedule-btn {
  min-width: 164px;
  box-shadow: 0 7px 18px rgba(37,99,235,.25);
}
.fixed-calendar-glyph {
  font-size: 14px;
}

/* espaço para a barra não cobrir planejamento */
.composer-plan-full {
  margin-bottom: 14px;
}

/* desktop alto: tenta manter tudo na primeira dobra */
@media (min-width: 1181px) and (min-height: 760px) {
  .page {
    padding-top: 18px;
  }
  .composer-page-head {
    margin-bottom: 10px;
  }
}

/* intermediário */
@media (max-width: 1180px) {
  body { padding-bottom: 92px; }
  .composer-fixed-inner {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* mobile */
@media (max-width: 720px) {
  body { padding-bottom: 150px; }
  .composer-fixed-inner {
    min-height: 128px;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }
  .composer-fixed-left {
    justify-content: center;
  }
  .composer-fixed-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .composer-fixed-actions .fixed-schedule-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}


/* ============================================================
   AGENDAR POST PREMIUM V3 — lapidação final de UX
   ============================================================ */

/* cards esquerdos ainda mais baixos */
.composer-left .composer-card {
  padding-top: 13px;
  padding-bottom: 13px;
}
.composer-left .composer-step {
  margin-bottom: 8px;
}
.composer-profile-card .field {
  margin-bottom: 8px;
}
.composer-profile-card .field:last-child {
  margin-bottom: 0;
}
.composer-text-card .field {
  margin-bottom: 10px;
}

/* preview maior, margem lateral menor */
@media (min-width: 1181px) {
  .composer-grid {
    grid-template-columns: minmax(315px,.88fr) minmax(365px,1fr) minmax(340px,390px);
    gap: 12px;
  }
  .composer-right {
    margin-right: -6px;
  }
}
.preview-panel-premium {
  padding: 12px;
}
.premium-phone {
  border-radius: 12px;
}

/* formatos: ícones SVG consistentes */
.format-card .format-glyph {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.format-card .format-glyph svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.format-card input:checked + span {
  transform: translateY(-1px);
}
.format-card input:checked + span .format-glyph {
  color: var(--primary);
}

/* estado de canal muito mais evidente */
.channel-card-ui {
  position: relative;
}
.channel-card input:checked + .channel-card-ui {
  border-width: 1.5px;
  box-shadow: 0 0 0 3px rgba(37,99,235,.08), 0 5px 14px rgba(37,99,235,.06);
}
.channel-card input:checked + .channel-card-ui::after {
  content: "Selecionado";
  position: absolute;
  right: 8px;
  bottom: 5px;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.channel-card:not(:has(input:checked)) .channel-card-ui {
  opacity: .72;
}
.channel-card:not(:has(input:checked)):hover .channel-card-ui {
  opacity: 1;
}

/* mídia com thumbnail maior quando houver arquivo */
.media-preview[hidden] { display: none !important; }
.media-preview:not([hidden]) {
  display: block;
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  padding: 10px;
  background: #fbfcfe;
}
.media-preview:not([hidden]) .compact-media-preview {
  display: block;
  max-width: none;
  width: 100%;
  border: 0;
  box-shadow: none;
}
.media-preview:not([hidden]) #phone-media-box {
  height: 210px;
  border-radius: 10px;
  overflow: hidden;
}
.media-preview:not([hidden]) #phone-media-box img,
.media-preview:not([hidden]) #phone-media-box video {
  object-fit: contain !important;
  background: #f8fafc;
}
.media-preview:not([hidden]) #media-meta {
  margin: 7px 2px 0;
}

/* botões da mídia alinhados e mesma altura */
.media-actions-premium {
  display: grid;
  grid-template-columns: 1.25fr 1fr .85fr;
  gap: 7px;
}
.media-actions-premium .btn {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  justify-content: center;
}
.media-actions-premium .btn-icon {
  font-size: 14px;
  line-height: 1;
  opacity: .8;
}
.media-primary-action {
  font-weight: 700;
}

/* data/hora ainda mais compacto */
.composer-middle .composer-card:nth-of-type(2) {
  padding-top: 13px;
  padding-bottom: 13px;
}
.composer-middle .composer-card:nth-of-type(2) .composer-step {
  margin-bottom: 8px;
}
.schedule-row {
  gap: 8px;
}
.schedule-row input {
  min-height: 40px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}
.repeat-toggle-card {
  min-height: 46px;
}

/* preview com ícones mais fiéis */
.preview-network {
  display: grid;
  place-items: center;
}
.preview-network svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.preview-network-fb svg {
  fill: currentColor;
  stroke: none;
}
.preview-network-ig.active {
  color: #d62976;
  border-color: #f0a4c8;
  background: #fff5fa;
}
.preview-network-fb.active {
  color: #1877f2;
  border-color: #a8c9f7;
  background: #f4f8ff;
}
.preview-titleline {
  display: flex;
  align-items: center;
  gap: 7px;
}
#preview-network-label {
  font-size: 10px;
  color: var(--muted);
  background: #f1f5f9;
  border-radius: 999px;
  padding: 2px 7px;
}

.preview-social-actions {
  gap: 7px;
  padding-top: 8px;
}
.preview-social-actions button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  padding: 0;
  color: #0f172a;
}
.preview-social-actions button.save {
  margin-left: auto;
}
.preview-social-actions svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* barra fixa mais sofisticada que antigo card Finalizar */
.composer-fixed-bar {
  border-top-color: #d6deea;
}
.composer-fixed-inner {
  min-height: 62px;
}
.composer-fixed-actions .btn {
  border-radius: 11px;
  min-height: 40px;
}
.composer-fixed-actions .btn-ghost {
  color: #475569;
  background: transparent;
  border-color: transparent;
}
.composer-fixed-actions .btn-ghost:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.composer-fixed-actions .btn-secondary {
  background: #fff;
  border-color: #bfdbfe;
}
.fixed-schedule-btn {
  min-width: 174px;
  font-size: 14px;
}

/* parte inferior do Texto do post */
.caption-extras {
  border: 1px solid #e7edf5;
  border-radius: 12px;
  background: #fbfcfe;
  overflow: hidden;
}
.caption-extras summary {
  cursor: pointer;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}
.caption-extras summary::-webkit-details-marker {
  display: none;
}
.caption-extras summary::after {
  content: "⌄";
  color: #94a3b8;
  margin-left: auto;
}
.caption-extras[open] summary {
  border-bottom: 1px solid #edf2f7;
}
.caption-extras summary small {
  font-size: 10px;
  color: var(--muted-2);
  font-weight: 500;
  margin-right: auto;
}
.caption-extras .composer-subgrid {
  padding: 10px;
}
.field-minihead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.field-minihead > label {
  margin: 0 !important;
}
.mini-switch {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  margin: 0 !important;
  cursor: pointer;
  font-weight: 600 !important;
  color: var(--muted) !important;
}
.mini-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mini-switch span {
  width: 26px;
  height: 15px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: .15s;
}
.mini-switch span::after {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  left: 2px;
  top: 2px;
  transition: .15s;
  box-shadow: 0 1px 3px rgba(15,23,42,.2);
}
.mini-switch input:checked + span {
  background: var(--primary);
}
.mini-switch input:checked + span::after {
  transform: translateX(11px);
}
.mini-switch b {
  font-size: 9.5px;
  font-weight: 600;
}
.caption-extras textarea {
  height: 58px !important;
  min-height: 58px !important;
}

/* telas médias */
@media (max-width: 1180px) {
  .media-actions-premium {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .media-actions-premium {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   AGENDAR POST PREMIUM V4 — compacto como ferramenta profissional
   ============================================================ */

/* PERFIL / CANAIS / FORMATOS */
.composer-profile-card {
  padding: 12px 14px !important;
}
.composer-profile-card .composer-step {
  margin-bottom: 8px !important;
}
.composer-profile-card .composer-step p {
  display: none !important;
}
.composer-profile-card #p-client {
  min-height: 38px !important;
  height: 38px !important;
}

.publish-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}
.publish-control-row .field {
  margin-bottom: 0 !important;
}
.compact-channel-selector {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px !important;
}
.compact-channel-selector .channel-card {
  display: inline-flex !important;
  width: auto !important;
}
.compact-channel-selector .compact-channel-ui {
  min-height: 38px !important;
  height: 38px !important;
  width: auto !important;
  padding: 3px 8px 3px 4px !important;
  gap: 6px !important;
  border-radius: 11px !important;
  overflow: visible !important;
}
.compact-channel-selector .channel-icon,
.compact-channel-selector .channel-icon .nl,
.compact-channel-selector .channel-icon > .nl {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  flex-basis: 30px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.compact-channel-selector .channel-name {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}
.compact-channel-selector .channel-check {
  width: 15px !important;
  height: 15px !important;
  flex-basis: 15px !important;
  font-size: 8px !important;
  margin-left: 1px !important;
}

/* inativo = cinza; ativo = cor original */
.compact-channel-selector .channel-card:not(:has(input:checked)) .channel-icon .nl,
.compact-channel-selector .channel-card:not(:has(input:checked)) .channel-icon > .nl {
  filter: grayscale(1) saturate(0) !important;
  opacity: .38 !important;
}
.compact-channel-selector .channel-card:not(:has(input:checked)) .compact-channel-ui {
  background: #fff !important;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
}
.compact-channel-selector .channel-card:not(:has(input:checked)) .channel-name {
  color: #94a3b8 !important;
}
.compact-channel-selector .channel-card input:checked + .compact-channel-ui {
  background: #f8fbff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 2px rgba(37,99,235,.05) !important;
}
.compact-channel-selector .channel-card input:checked + .compact-channel-ui .channel-icon .nl,
.compact-channel-selector .channel-card input:checked + .compact-channel-ui .channel-icon > .nl {
  filter: none !important;
  opacity: 1 !important;
}

/* 10 canais continuam encaixando: nome some antes de apertar o layout */
@media (max-width: 1480px) {
  .compact-channel-selector .channel-name {
    display: none;
  }
  .compact-channel-selector .compact-channel-ui {
    padding-right: 4px !important;
  }
}

/* Feed / Stories / Reels ficam na MESMA LINHA, pequenos */
.compact-format-selector {
  display: flex !important;
  align-items: center;
  gap: 5px !important;
}
.compact-format-selector .format-card > span {
  min-height: 38px !important;
  height: 38px !important;
  min-width: 66px;
  padding: 4px 8px !important;
  border-radius: 10px !important;
  flex-direction: row !important;
  gap: 5px !important;
}
.compact-format-selector .format-glyph {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}
.compact-format-selector .format-glyph svg {
  width: 16px !important;
  height: 16px !important;
}
.compact-format-selector strong {
  font-size: 10.5px !important;
}
.compact-format-selector small {
  display: none !important;
}

/* PREVIEW maior e mais parecido com um preview real */
@media (min-width: 1181px) {
  .page {
    max-width: 1640px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .composer-grid {
    grid-template-columns: minmax(320px,.78fr) minmax(390px,1fr) minmax(410px,460px) !important;
    gap: 12px !important;
  }
  .composer-right {
    margin-right: 0 !important;
  }
}
.preview-panel-premium {
  padding: 10px !important;
}
.premium-phone .phone-media {
  height: 360px !important;
}
.premium-phone[data-format="story"] .phone-media,
.premium-phone[data-format="reel"] .phone-media {
  height: 500px !important;
}
.premium-phone .phone-caption {
  font-size: 12px;
  line-height: 1.45;
}

/* remove completamente o antigo campo de observação da composição */
.composer-note-card,
.composer-note-details {
  display: none !important;
}

@media (max-width: 1180px) {
  .publish-control-row {
    grid-template-columns: 1fr;
  }
  .compact-format-selector {
    justify-content: flex-start;
  }
}


/* ============================================================
   AGENDAR POST PREMIUM V5 — composer FubizSocial compacto
   (escopo: somente a tela Agendar post)
   ============================================================ */

/* ---- escopo da página ---- */
body.page-post-new {
  padding-bottom: 88px;
}
body.page-post-new .page {
  max-width: 1740px !important;
  padding-left: 22px !important;
  padding-right: 22px !important;
}
.fs-composer {
  width: 100%;
}

/* ---- grade de 3 colunas ---- */
.fs-grid {
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(340px, 1.05fr) minmax(400px, 452px);
  gap: 14px;
  align-items: stretch;
}
.fs-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fs-right {
  display: flex;
}
.fs-sticky {
  position: sticky;
  top: 84px;
  align-self: flex-start;
  width: 100%;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #dbe3ee transparent;
}
.fs-sticky::-webkit-scrollbar { width: 7px; }
.fs-sticky::-webkit-scrollbar-thumb { background: #dbe3ee; border-radius: 8px; }
.fs-sticky::-webkit-scrollbar-track { background: transparent; }

/* ---- cards e cabeçalhos de seção ---- */
.fs-card {
  padding: 13px 15px;
  border-radius: 13px;
}
.fs-step {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.fs-stepnum {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 10.5px;
}
.fs-step h2 {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.fs-card .field { margin-bottom: 10px; }
.fs-card .field > label { font-size: 11.5px; margin-bottom: 4px; }

/* ---- perfil compacto ---- */
.fs-profile-card .fs-step { margin-bottom: 8px; }
.fs-profile-card .field { margin-bottom: 8px; }
.fs-profile-card select {
  min-height: 38px;
  height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
}

/* ---- linhas de opção (Canais / Formato) ---- */
.fs-optrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}
.fs-optrow:last-child { margin-bottom: 0; }
.fs-optlabel {
  flex: 0 0 52px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

/* canais: pills baixos, preparados para 8–10 canais */
.fs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.fs-pill {
  position: relative;
  cursor: pointer;
}
.fs-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fs-pill-ui {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 3px 9px 3px 4px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.fs-pill-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
}
.fs-pill-icon .nl {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: none;
}
.fs-pill-icon .nl svg { width: 58%; height: 58%; }
.fs-pill-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}
.fs-pill-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f1f5f9;
  color: transparent;
  display: grid;
  place-items: center;
  transition: background .15s ease, color .15s ease;
}
.fs-pill-check svg { width: 9px; height: 9px; }
/* inativo: monocromático e discreto */
.fs-pill:not(:has(input:checked)) .fs-pill-icon .nl {
  filter: grayscale(1);
  opacity: .38;
}
.fs-pill:not(:has(input:checked)) .fs-pill-name { color: #94a3b8; }
.fs-pill:hover .fs-pill-ui { border-color: #cbd5e1; }
.fs-pill:not(:has(input:checked)):hover .fs-pill-icon .nl { opacity: .6; }
/* selecionado: cor original da rede */
.fs-pill input:checked + .fs-pill-ui {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .06);
}
.fs-pill input:checked + .fs-pill-ui .fs-pill-icon .nl {
  filter: none;
  opacity: 1;
}
.fs-pill input:checked + .fs-pill-ui .fs-pill-name { color: var(--text); }
.fs-pill input:checked + .fs-pill-ui .fs-pill-check {
  background: var(--primary);
  color: #fff;
}
.fs-pill.channel-instagram input:checked + .fs-pill-ui {
  border-color: #f0a4c8;
  box-shadow: 0 0 0 3px rgba(214, 41, 118, .07);
}
.fs-pill.channel-facebook input:checked + .fs-pill-ui {
  border-color: #a8c9f7;
  box-shadow: 0 0 0 3px rgba(24, 119, 242, .07);
}
.fs-pill:focus-within .fs-pill-ui,
.fs-fmt:focus-within > span,
.fs-net:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* formatos: todos na mesma linha, compactos */
.fs-formats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.fs-fmt {
  position: relative;
  cursor: pointer;
}
.fs-fmt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fs-fmt > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.fs-fmt svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #64748b;
  flex: 0 0 15px;
  transition: color .15s ease;
}
.fs-fmt b {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  transition: color .15s ease;
}
.fs-fmt:hover > span { border-color: #cbd5e1; }
.fs-fmt input:checked + span {
  background: #eff5ff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .06);
}
.fs-fmt input:checked + span svg { color: var(--primary); }
.fs-fmt input:checked + span b { color: var(--primary-dark); }

/* ---- texto do post ---- */
.fs-text-card .fs-step { margin-bottom: 8px; }
.fs-text-card .internal-title { margin-bottom: 9px; }
.fs-composer #p-caption {
  min-height: 160px;
  height: auto;
  max-height: 340px;
  resize: vertical;
  line-height: 1.6;
  border-radius: 12px;
}
.fs-card .caption-extras textarea { height: 54px; min-height: 54px; }

/* ---- mídia: dropzone compacta que encolhe com mídia ---- */
.fs-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 17px 14px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #fbfcfe;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, padding .15s ease;
}
.fs-dropzone:hover,
.fs-dropzone.drag {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.fs-drop-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  transition: all .15s ease;
}
.fs-drop-icon svg { width: 19px; height: 19px; }
.fs-drop-copy { min-width: 0; }
.fs-drop-copy strong { display: block; font-size: 12.5px; color: var(--text); }
.fs-drop-copy small { display: block; font-size: 11px; color: var(--muted); }
body.has-composer-media .fs-dropzone {
  padding: 8px 12px;
  justify-content: flex-start;
  background: #fbfcfe;
}
body.has-composer-media .fs-drop-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  background: transparent;
}
body.has-composer-media .fs-drop-icon svg { width: 14px; height: 14px; }
body.has-composer-media .fs-drop-copy strong {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}
body.has-composer-media .fs-drop-copy small { display: none; }

/* resumo da mídia carregada: thumbnail contain + nome + ordem */
#media-preview.fs-media-summary {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fbfcfe;
}
.fs-thumb {
  flex: 0 0 46%;
  min-width: 0;
  display: flex;
}
#media-preview #phone-media-box {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#media-preview #phone-media-box img,
#media-preview #phone-media-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
}
.fs-media-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fs-media-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#media-preview #media-meta {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.fs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.fs-chips .mo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 11px;
}
.fs-chips .mo-idx {
  width: 17px;
  height: 17px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}
.fs-chips .mo-btn,
.fs-chips .occ-remove {
  border: 0;
  background: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 0 1px;
  display: grid;
  place-items: center;
  transition: color .15s ease;
}
.fs-chips .mo-btn:hover { color: var(--primary); }
.fs-chips .occ-remove:hover { color: #dc2626; }
.fs-chips .mo-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

/* ações da mídia */
.fs-media-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.fs-media-actions .btn {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 12.5px;
  border-radius: 10px;
}
.fs-media-actions .btn:hover { text-decoration: none; }
.fs-media-actions svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

/* ---- data e horário compactos ---- */
.fs-schedule-card .fs-step { margin-bottom: 8px; }
.fs-schedule-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fs-schedule-row .field { margin-bottom: 6px; }
.fs-schedule-row input {
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.fs-repeat-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 2px 2px;
  user-select: none;
}
.fs-repeat-toggle > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fs-repeat-toggle > input:checked + .toggle-ui { background: var(--primary); }
.fs-repeat-toggle > input:checked + .toggle-ui::after { transform: translateX(16px); }
.fs-repeat-toggle strong { font-size: 12.5px; font-weight: 600; color: #334155; }
.repeat-box {
  margin-top: 10px;
  border-top: 1px solid #eef2f7;
  padding-top: 12px;
}
.repeat-options {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  border-style: solid;
}

/* ---- preview grande e sticky ---- */
.fs-preview-card { padding: 12px; }
.fs-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.fs-preview-head .preview-kicker { font-size: 9.5px; }
.fs-preview-head .preview-titleline strong { font-size: 13.5px; }
.fs-net-tabs {
  display: flex;
  gap: 5px;
}
.fs-net {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #94a3b8;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .15s ease;
}
.fs-net svg { width: 16px; height: 16px; }
.fs-net:hover { border-color: #cbd5e1; color: #64748b; }
.fs-net.active[data-preview-network="instagram"] {
  color: #d62976;
  border-color: #f0a4c8;
  background: #fff5fa;
}
.fs-net.active[data-preview-network="facebook"] {
  color: #1877f2;
  border-color: #a8c9f7;
  background: #f4f8ff;
}
#preview-network-label {
  font-size: 10px;
  color: var(--muted);
  background: #f1f5f9;
  border-radius: 999px;
  padding: 2px 8px;
}

.fs-phone {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.fs-phone-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}
.fs-phone-head .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 11px;
  flex: 0 0 30px;
}
.fs-phone-head strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#post-preview-frame #pv-media {
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: 440px;
  padding: 0;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: aspect-ratio .2s ease;
}
#post-preview-frame[data-format="story"] #pv-media,
#post-preview-frame[data-format="reel"] #pv-media {
  aspect-ratio: 9 / 16;
  max-height: 560px;
}
#pv-media img,
#pv-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #f8fafc;
}
#pv-media svg { color: var(--muted-2); opacity: .8; }
.fs-phone-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 0;
}
.fs-phone-actions button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  padding: 0;
  color: #0f172a;
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s ease;
}
.fs-phone-actions button:hover { background: #f1f5f9; }
.fs-phone-actions button.save { margin-left: auto; }
.fs-phone-actions svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fs-phone-caption {
  padding: 10px 12px;
  font-size: 12.5px;
  color: #1e293b;
  white-space: pre-wrap;
  line-height: 1.5;
  min-height: 60px;
  max-height: 140px;
  overflow: auto;
}
#post-preview-frame[data-format="story"] .fs-phone-caption,
#post-preview-frame[data-format="reel"] .fs-phone-caption {
  max-height: 96px;
}
.fs-phone-date {
  padding: 0 12px 12px;
  font-size: 10.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.fs-phone .pv-nav {
  padding: 6px 0 2px;
  gap: 8px;
}
.fs-phone .pv-nav .btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 8px;
  border-color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fs-phone .pv-count { font-size: 11px; }

/* ---- barra fixa inferior premium ---- */
.fs-fixed-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, .07);
}
.fs-fixed-inner {
  max-width: 1740px;
  margin: 0 auto;
  min-height: 64px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.fs-fixed-left {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #64748b;
  min-width: 0;
}
.fs-fixed-client {
  font-weight: 600;
  color: #334155;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fs-fixed-badge {
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.fs-fixed-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.fs-fixed-actions .btn {
  min-height: 40px;
  border-radius: 10px;
  font-size: 13px;
}
.fs-fixed-actions .btn-ghost {
  background: transparent;
  border-color: transparent;
  color: #475569;
}
.fs-fixed-actions .btn-ghost:hover {
  background: #f6f8fb;
  border-color: #e2e8f0;
}
.fs-fixed-actions .btn-secondary {
  background: #fff;
  border-color: #bfdbfe;
}
.fs-fixed-actions .btn-secondary:hover { background: #f4f8ff; }
.fs-fixed-actions svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}
.fs-schedule-btn {
  min-width: 172px;
  box-shadow: 0 7px 18px rgba(37, 99, 235, .25);
}
.fs-composer .composer-plan-full { margin-bottom: 6px; }

/* ---- responsivo: 2 colunas (desktop intermediário) ---- */
@media (max-width: 1220px) {
  body.page-post-new { padding-bottom: 92px; }
  .fs-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  }
  .fs-middle { grid-column: 1; grid-row: 2; }
  .fs-right { grid-column: 2; grid-row: 1 / span 2; }
  .fs-fixed-inner { padding-left: 18px; padding-right: 18px; }
}

/* ---- responsivo: 1 coluna ---- */
@media (max-width: 900px) {
  .fs-grid { grid-template-columns: 1fr; }
  .fs-middle { grid-column: auto; grid-row: auto; }
  .fs-right { grid-column: auto; grid-row: auto; }
  .fs-sticky { position: static; max-height: none; overflow: visible; }
  #post-preview-frame #pv-media { max-height: 480px; }
  #post-preview-frame[data-format="story"] #pv-media,
  #post-preview-frame[data-format="reel"] #pv-media { max-height: 560px; }
  .fs-fixed-inner { min-height: 0; }
}

/* ---- responsivo: mobile ---- */
@media (max-width: 720px) {
  body.page-post-new { padding-bottom: 158px; }
  .fs-fixed-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
  }
  .fs-fixed-left { justify-content: center; }
  .fs-fixed-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .fs-fixed-actions .fs-schedule-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .fs-media-actions { grid-template-columns: 1fr 1fr; }
  .fs-media-actions .btn:last-child { grid-column: 1 / -1; }
  .fs-optrow { align-items: flex-start; }
}

@media (max-width: 640px) {
  .fs-pill-name { display: none; }
  .fs-pill-ui { padding-right: 4px; }
  #media-preview.fs-media-summary { flex-direction: column; }
  .fs-thumb { flex: none; width: 100%; }
  #media-preview #phone-media-box { height: 170px; }
  .fs-media-actions { grid-template-columns: 1fr; }
  .fs-media-actions .btn:last-child { grid-column: auto; }
  .fs-optrow {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }
  .fs-optlabel { flex: none; }
  .fs-schedule-row { grid-template-columns: 1fr; }
  .repeat-options { grid-template-columns: 1fr; }
  .repeat-meta, .custom-range { flex-direction: column; }
}

/* ============================================================
   Correcoes 2026-10 — diagnostico Meta, guia, exclusao e tabelas
   ============================================================ */
.diag-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.diag-list li { display: flex; gap: 10px; align-items: flex-start; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.diag-icon { flex: 0 0 22px; text-align: center; font-weight: 700; }
.doc-text { white-space: pre-wrap; word-break: break-word; font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; color: #1e293b; margin: 0; }
.danger-zone { border-color: #fecaca; }
.danger-zone .block-title { color: #b91c1c; }
.data-table td .row-actions { flex-wrap: nowrap; }
@media (max-width: 720px) {
  .table-scroll { -webkit-overflow-scrolling: touch; }
  .inline-filters .filter-actions { margin-left: 0; width: 100%; }
  .inline-filters select, .inline-filters input { min-width: 0; width: 100%; }
  .inline-filters .field { flex: 1 1 100%; }
}

/* Menu principal: todos os itens sempre visiveis.
   >= 1181px: menu em linha propria abaixo da marca; <= 1180px: menu hamburguer. */
.nav-mobile-only { display: none; }
.icon-btn-ghost.active { color: var(--primary); border-color: #c7d7fe; background: var(--primary-soft); }
@media (min-width: 1181px) {
  .topbar-inner { flex-wrap: wrap; row-gap: 4px; }
  .main-menu { order: 3; flex: 1 1 100%; }
  .top-actions { margin-left: auto; }
  .nav-item { padding: 9px 14px; }
}
@media (max-width: 1180px) {
  .topbar-inner { flex-wrap: wrap; gap: 12px; position: relative; }
  .menu-toggle { display: block; margin-left: auto; }
  .main-menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    align-items: stretch; background: #fff; border-bottom: 1px solid var(--border);
    padding: 10px 16px; gap: 2px; display: none; box-shadow: var(--shadow-md);
    max-height: calc(100vh - 90px); overflow-y: auto;
  }
  .main-menu.open { display: flex; }
  .nav-item { justify-content: flex-start; }
  .top-actions { margin-left: 0; }
}
@media (max-width: 720px) {
  .nav-mobile-only { display: inline-flex; }
  .top-actions { gap: 8px; }
  .profile-box select { max-width: 150px; }
}
@media (min-width: 1181px) and (max-width: 1320px) {
  .nav-item { padding: 9px 10px; gap: 7px; font-size: 13.5px; }
}
/* Itens de grid podem encolher (tabelas largas rolam dentro de .table-scroll em vez de alargar a pagina) */
.layout-2col > *, .grid-main > *, .ai-layout > *, .media-detail-layout > *, .settings-layout > * { min-width: 0; }
.table-scroll { max-width: 100%; }
@media (max-width: 1020px) {
  .ai-layout, .layout-2col { grid-template-columns: minmax(0, 1fr); }
}
.grid-stat-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { .grid-stat-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1020px) { .media-detail-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .grid-stat-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
