/* ==========================================================
   Tecermais Social — Design tokens (extraídos de tecermais.com.br)
   ========================================================== */
:root {
  --bg: #020610;
  --bg-2: #07101f;
  --panel: #0f1a2e;
  --panel-2: #142340;
  --panel-3: #1a2b4d;
  --line: #1f2f4f;
  --line-gold: rgba(214, 166, 79, .28);
  --gold: #d6a64f;
  --gold-2: #fac865;
  --gold-soft: rgba(214, 166, 79, .12);
  --cream: #fdf3e9;
  --text: #e9edf6;
  --muted: #8c95ad;
  --muted-2: #cfd6e6;
  --ok: #3ccf91;
  --warn: #fac865;
  --bad: #e5606f;
  --info: #5aa9e6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font-head: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Fira Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 600px at 85% -10%, rgba(214,166,79,.08), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(90,169,230,.06), transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--gold-2); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 600; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 9px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, #050c1a, #030812);
  border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand img { height: 30px; }
.brand small { display: block; color: var(--gold); font-family: var(--font-head); font-weight: 600; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.nav-label { color: var(--muted); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; padding: 14px 10px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--muted-2); font-weight: 500; transition: .15s;
}
.nav a:hover { background: var(--panel); color: #fff; }
.nav a.active { background: var(--gold-soft); color: var(--gold-2); box-shadow: inset 2px 0 0 var(--gold); }
.nav a .ico { width: 18px; text-align: center; opacity: .9; }
.nav a .count { margin-left: auto; background: var(--gold); color: #1a1205; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 0 7px; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.plan-card { background: linear-gradient(135deg, rgba(214,166,79,.18), rgba(214,166,79,.04)); border: 1px solid var(--line-gold); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.plan-card b { color: var(--gold-2); font-family: var(--font-head); }
.meter { height: 6px; background: var(--panel-3); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: rgba(2, 6, 16, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.search { flex: 1; max-width: 460px; position: relative; }
.search input { width: 100%; padding-left: 36px; }
.search::before { content: '⌕'; position: absolute; left: 12px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 17px; }
.topbar .spacer { flex: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-family: var(--font-head); font-size: 12px; color: #1a1205; background: linear-gradient(135deg, var(--gold-2), var(--gold)); flex-shrink: 0; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Components ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); padding: 9px 15px; border-radius: var(--radius-sm); cursor: pointer; font: 600 13px var(--font-head);
  transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--line-gold); color: var(--gold-2); }
.btn.gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1205; border-color: transparent; }
.btn.gold:hover { filter: brightness(1.07); color: #1a1205; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn.ok { background: var(--ok); color: #04160e; border-color: transparent; }
.btn.bad { background: transparent; color: var(--bad); border-color: rgba(229,96,111,.4); }

input, select, textarea {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-sm);
  padding: 9px 12px; font: 14px var(--font-body); outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { resize: vertical; min-height: 110px; width: 100%; }
label.f { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; font-weight: 500; }

.card { background: linear-gradient(180deg, var(--panel), #0c1628); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.card-head .sub { color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-21 { grid-template-columns: 2fr 1fr; }
.g-12 { grid-template-columns: 1fr 2fr; }
@media (max-width: 1200px) { .g-4 { grid-template-columns: repeat(2, 1fr); } .g-3, .g-21, .g-12 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .app { grid-template-columns: 1fr; } .sidebar { display: none; } .g-4, .g-2 { grid-template-columns: 1fr; } }

.kpi .label { color: var(--muted); font-size: 12px; font-weight: 500; display: flex; justify-content: space-between; }
.kpi .value { font: 700 28px var(--font-head); margin-top: 6px; color: #fff; }
.kpi .delta { font-size: 12px; font-weight: 600; }
.up { color: var(--ok); } .down { color: var(--bad); }
.kpi.highlight { border-color: var(--line-gold); background: linear-gradient(135deg, rgba(214,166,79,.14), var(--panel) 60%); }
.kpi.highlight .value { color: var(--gold-2); }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--panel-3); color: var(--muted-2); white-space: nowrap; }
.badge.ok { background: rgba(60,207,145,.13); color: var(--ok); }
.badge.bad { background: rgba(229,96,111,.13); color: var(--bad); }
.badge.warn { background: rgba(250,200,101,.13); color: var(--warn); }
.badge.info { background: rgba(90,169,230,.13); color: var(--info); }
.badge.gold { background: var(--gold-soft); color: var(--gold-2); }

.net { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font: 700 10px var(--font-head); color: #fff; flex-shrink: 0; }
.net.ig { background: linear-gradient(135deg, #f9a03f, #d62976 55%, #7a3fd1); }
.net.fb { background: #1877f2; }
.net.in { background: #0a66c2; }
.net.tk { background: #111; box-shadow: inset 2px 0 0 #25f4ee, inset -2px 0 0 #fe2c55; }
.net.yt { background: #ff0000; }
.net.th { background: #222; }
.net.x { background: #000; border: 1px solid #333; }
.net.gm { background: #34a853; }
.net.web { background: #6a7c99; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid rgba(31,47,79,.6); }
tr:hover td { background: rgba(20,35,64,.4); }

.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid rgba(31,47,79,.6); }
.list-item:last-child { border-bottom: 0; }
.list-item .meta { color: var(--muted); font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.gold-t { color: var(--gold-2); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabs { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px; }
.tabs button { background: transparent; border: 0; color: var(--muted-2); padding: 7px 13px; border-radius: 7px; cursor: pointer; font: 600 12.5px var(--font-head); }
.tabs button.active { background: var(--panel-3); color: var(--gold-2); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; font-size: 12.5px; color: var(--muted-2); user-select: none; }
.chip.on { border-color: var(--gold); color: var(--gold-2); background: var(--gold-soft); }
.chip .x { opacity: .6; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 380px; }
.col.drag-over { border-color: var(--gold); background: rgba(214,166,79,.05); }
.col-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font: 600 13px var(--font-head); }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 12px; margin-bottom: 10px; cursor: grab; transition: .15s; }
.kcard:hover { border-color: var(--line-gold); transform: translateY(-1px); }
.kcard.dragging { opacity: .45; }
.kcard .thumb { height: 86px; border-radius: 8px; margin-bottom: 10px; display: grid; place-items: center; font: 700 13px var(--font-head); color: rgba(255,255,255,.85); text-align: center; padding: 8px; }
.kcard .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: var(--muted); }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal .dow { background: var(--bg-2); padding: 9px; font: 600 11px var(--font-head); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; border-bottom: 1px solid var(--line); }
.cal .day { min-height: 118px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); position: relative; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: #0a1322; color: #4b5672; }
.cal .day.today { box-shadow: inset 0 0 0 1px var(--gold); }
.cal .day.today .n { background: var(--gold); color: #1a1205; border-radius: 6px; padding: 0 6px; }
.cal .n { font: 600 12px var(--font-head); display: inline-block; margin-bottom: 4px; }
.cal .ev { display: flex; align-items: center; gap: 5px; font-size: 11px; padding: 3px 5px; margin-bottom: 3px; border-radius: 6px; background: var(--panel-3); cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-left: 3px solid var(--gold); }
.cal .ev .net { width: 15px; height: 15px; font-size: 8px; border-radius: 4px; }
.cal .ev.pend { border-left-color: var(--warn); }
.cal .ev.pub { border-left-color: var(--ok); opacity: .8; }
.cal .ev.draft { border-left-color: var(--muted); }
.cal .add { position: absolute; right: 6px; top: 5px; opacity: 0; background: none; border: 0; color: var(--gold-2); cursor: pointer; font-size: 16px; }
.cal .day:hover .add { opacity: 1; }

/* ---------- Composer / previews ---------- */
.ig-preview { background: #000; border-radius: 14px; border: 1px solid #262626; overflow: hidden; max-width: 360px; margin: 0 auto; color: #f5f5f5; }
.ig-top { display: flex; align-items: center; gap: 9px; padding: 10px 12px; font-weight: 600; font-size: 13px; }
.ig-media { aspect-ratio: 4/5; display: grid; place-items: center; text-align: center; padding: 24px; font: 700 22px var(--font-head); background: linear-gradient(135deg, #0f1a2e, #1a2b4d 50%, #d6a64f); }
.ig-actions { padding: 10px 12px 2px; font-size: 20px; letter-spacing: 8px; }
.ig-cap { padding: 4px 12px 14px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.dropzone { border: 1.5px dashed var(--line-gold); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted); background: rgba(214,166,79,.03); cursor: pointer; }
.dropzone:hover { background: rgba(214,166,79,.07); }
.counter { font-size: 11.5px; color: var(--muted); text-align: right; margin-top: 4px; }
.besttime { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- AI ---------- */
.ai-wrap { display: grid; grid-template-columns: 290px 1fr; gap: 16px; min-height: 620px; }
@media (max-width: 1000px) { .ai-wrap { grid-template-columns: 1fr; } }
.ai-tool { display: flex; gap: 11px; padding: 11px; border-radius: 11px; cursor: pointer; border: 1px solid transparent; }
.ai-tool:hover { background: var(--panel-2); }
.ai-tool.active { border-color: var(--line-gold); background: var(--gold-soft); }
.ai-tool .i { width: 34px; height: 34px; border-radius: 9px; background: var(--panel-3); display: grid; place-items: center; flex-shrink: 0; font-size: 16px; }
.ai-tool small { color: var(--muted); display: block; font-size: 11.5px; }
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-log { flex: 1; overflow-y: auto; padding: 4px 4px 14px; display: flex; flex-direction: column; gap: 14px; max-height: 560px; }
.msg { max-width: 82%; padding: 12px 15px; border-radius: 14px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--panel-3); border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--line-gold); border-bottom-left-radius: 4px; }
.msg.ai .who { color: var(--gold-2); font: 600 11px var(--font-head); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.chat-input { display: flex; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.chat-input input { flex: 1; }
.typing::after { content: '▍'; animation: blink 1s infinite; color: var(--gold); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Monitor ---------- */
.mention { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); margin-bottom: 10px; }
.mention .txt { margin: 4px 0 8px; }
.mention mark { background: var(--gold-soft); color: var(--gold-2); padding: 0 3px; border-radius: 3px; }
.bar-h { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 12.5px; }
.bar-h .track { flex: 1; height: 8px; background: var(--panel-3); border-radius: 8px; overflow: hidden; }
.bar-h .track i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.alert-live { display: flex; align-items: center; gap: 8px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(60,207,145,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(60,207,145,0); } 100% { box-shadow: 0 0 0 0 rgba(60,207,145,0); } }

/* ---------- Clients ---------- */
.client-card { cursor: pointer; transition: .15s; }
.client-card:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.client-logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font: 800 16px var(--font-head); color: #fff; flex-shrink: 0; }
.health { height: 5px; border-radius: 5px; background: var(--panel-3); overflow: hidden; margin-top: 6px; }
.health i { display: block; height: 100%; }

/* ---------- Modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(1,3,9,.72); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--line-gold); border-radius: 18px; width: min(620px, 100%); max-height: 90vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-close { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--panel-2); border: 1px solid var(--line-gold); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); animation: slide .25s ease-out; max-width: 340px; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

/* ---------- Public approval page ---------- */
.public { max-width: 520px; margin: 0 auto; padding: 30px 18px 60px; }
.public .head { text-align: center; margin-bottom: 22px; }
.public .head img { height: 34px; margin-bottom: 14px; }

.svg-chart text { fill: var(--muted); font-size: 10px; font-family: var(--font-body); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.empty { text-align: center; color: var(--muted); padding: 30px; }
.switch { position: relative; width: 38px; height: 21px; background: var(--panel-3); border-radius: 21px; cursor: pointer; flex-shrink: 0; transition: .2s; }
.switch::after { content: ''; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; border-radius: 50%; background: var(--muted-2); transition: .2s; }
.switch.on { background: var(--gold); }
.switch.on::after { left: 20px; background: #1a1205; }

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .app { display: block; }
  body { background: #020610; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Notificações ---------- */
.notif-wrap { position: relative; }
.notif-wrap > .btn { position: relative; }
.notif-dot { position: absolute; top: -5px; right: -5px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 0 5px; line-height: 16px; }
.notif-panel { display: none; position: absolute; right: 0; top: calc(100% + 10px); width: 360px; background: var(--panel); border: 1px solid var(--line-gold); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; z-index: 50; }
.notif-panel.open { display: block; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.notif-item { display: flex; gap: 10px; padding: 10px 8px; border-radius: 9px; color: var(--muted-2); font-size: 13px; }
.notif-item:hover { background: var(--panel-2); color: #fff; }
.notif-item.unread { color: #fff; }
.notif-item.unread .i { background: var(--gold); color: #1a1205; }
.notif-item .i { width: 26px; height: 26px; border-radius: 7px; background: var(--panel-3); display: grid; place-items: center; flex-shrink: 0; color: var(--gold-2); font-size: 12px; }
.notif-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

/* ---------- Calendário: stories, overflow, briefing do post ---------- */
.cal .ev.story { background: rgba(90,169,230,.10); border-left-color: var(--info); }
.cal .ev.more { background: transparent; border-left-color: transparent; color: var(--gold-2); font-weight: 600; }
.net.st { background: linear-gradient(135deg, #5aa9e6, #7a3fd1); }
.meta-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 6px 12px; max-height: 260px; overflow-y: auto; }
.meta-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(31,47,79,.6); font-size: 12.5px; }
.meta-row:last-child { border-bottom: 0; }
.meta-row span { color: var(--muted); }
.sheet-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; background: var(--bg-2); }
.sheet-row.on { border-color: var(--line-gold); background: var(--gold-soft); }
.guide-table { overflow-x: auto; }
.guide-table td, .guide-table th { white-space: normal; min-width: 120px; vertical-align: top; font-size: 12.5px; }
