/* Estilo do app e da plataforma (entrar, área do cliente, painel). A landing e a página de vídeos têm o próprio estilo.
   Layout: no celular, barra de abas embaixo como app; no computador, menu lateral fixo. */
:root {
  --yellow: #FFD400;
  --yellow-ink: #7A6100;
  --ink: #101216;
  --bg: #F4F3EE;
  --surface: #FFFFFF;
  --surface-2: #FAF9F5;
  --fg: #15171B;
  --muted: #62656D;
  --line: #E4E2D9;
  --field: #FBFAF6;
  --ok: #1F7A3A;
  --ok-bg: #E3F4E8;
  --warn: #B4231B;
  --warn-bg: #FBE7E5;
  --wait-bg: #FFF4BF;
  --shadow: 0 10px 30px rgba(16, 18, 22, .08);
  --display: "Montserrat", "Arial Black", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --side: 248px;
  --tab: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0D0E11; --surface: #17191E; --surface-2: #1C1F25; --fg: #F2F2F4; --muted: #A2A4AC; --line: #2A2D34; --field: #1D2026; --yellow-ink: #FFD400; --ok: #5BD07E; --ok-bg: #16301F; --warn: #FF7A70; --warn-bg: #3A1A18; --wait-bg: #3A3210; --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0D0E11; --surface: #17191E; --surface-2: #1C1F25; --fg: #F2F2F4; --muted: #A2A4AC; --line: #2A2D34; --field: #1D2026; --yellow-ink: #FFD400; --ok: #5BD07E; --ok-bg: #16301F; --warn: #FF7A70; --warn-bg: #3A1A18; --wait-bg: #3A3210; --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--body); -webkit-tap-highlight-color: transparent; }
img, video, iframe { max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

h1 { font-family: var(--display); font-weight: 900; font-size: clamp(24px, 3.6vw, 32px); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-family: var(--display); font-weight: 800; font-size: 18px; margin: 0; }
h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.lead { color: var(--muted); margin: 6px 0 0; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font: 800 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------------------------------------------------------------- casca do app */
.shell { min-height: 100vh; }
.side { display: none; }
.main { min-width: 0; padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom, 0px) + 24px); }
.appbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--ink); color: #fff; }
body.app::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--ink); }
.appbar-in { display: flex; align-items: center; gap: 12px; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; }
.logo img { width: 32px; height: 32px; }
.logo span { line-height: 1; font-size: 14px; }
.logo span b { display: block; font-weight: 500; }
.logo span i { display: block; font-family: var(--display); font-weight: 900; }
.appbar .sp { flex: 1; }
.appbar .who { text-align: right; line-height: 1.25; font-size: 12px; color: #C9CAD0; min-width: 0; }
.appbar .who b { display: block; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: grid; place-items: center; font: 900 15px var(--display); flex: none; overflow: hidden; border: 0; padding: 0; cursor: pointer; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tabbar a, .side nav a { position: relative; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700; display: grid; justify-items: center; gap: 3px; padding: 9px 4px 8px; height: var(--tab); }
.tabbar a svg.i { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--fg); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 4px 4px; background: var(--yellow); }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--warn); color: #fff; font: 800 11px/18px var(--body); text-align: center; }

.view { padding-block: 20px 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1180px; margin: 0 auto; display: grid; gap: 22px; }
.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; padding: 22px 16px; }
  .side .logo img { width: 36px; height: 36px; }
  .side .logo span { font-size: 16px; }
  .side nav { display: grid; gap: 4px; }
  .side nav a { display: flex; align-items: center; gap: 12px; height: auto; padding: 11px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: #C9CAD0; justify-items: start; }
  .side nav a:hover { background: #1C1F25; color: #fff; }
  .side nav a[aria-current="page"] { background: var(--yellow); color: var(--ink); }
  .side nav a .badge { position: static; margin-left: auto; }
  .side nav a[aria-current="page"] .badge { background: var(--ink); color: var(--yellow); }
  .side .foot { margin-top: auto; display: grid; gap: 8px; font-size: 13px; color: #A2A4AC; }
  .side .foot .card-mini { background: #1C1F25; border-radius: 14px; padding: 12px; }
  .side .foot .card-mini b { color: #fff; display: block; }
  .tabbar { display: none; }
  .appbar { position: static; background: transparent; color: var(--fg); }
  body.app::before { display: none; }
  .appbar .logo { display: none; }
  .appbar .who { color: var(--muted); }
  .appbar .who b { color: var(--fg); max-width: none; }
  .main { padding-bottom: 40px; }
  .appbar-in { max-width: 1180px; margin: 0 auto; padding-top: 18px; }
}

/* ---------------------------------------------------------------- componentes */
.btn { appearance: none; border: 0; border-radius: 12px; padding: 11px 16px; font: 700 14px/1.2 var(--body); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--yellow); color: var(--ink); white-space: nowrap; }
.btn:hover { filter: brightness(.96); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.dark { background: var(--fg); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--line); }
.btn.ghost-w { background: transparent; color: #fff; border: 1.5px solid #3A3D44; padding: 8px 12px; font-size: 13px; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.danger { background: transparent; color: var(--warn); border: 1.5px solid var(--line); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.full { width: 100%; }
.btn svg.i { width: 18px; height: 18px; }
.icon-btn { appearance: none; border: 0; background: transparent; color: inherit; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.card.pad-l { padding: 22px; }
.sec { display: grid; gap: 12px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-head a, .sec-head button.link { font-size: 13px; font-weight: 700; color: var(--fg); background: none; border: 0; cursor: pointer; padding: 0; }

.f { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.f label, .f .q { font-weight: 600; font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=date], input[type=search], input[type=number], select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--field); color: var(--fg); border-radius: 12px; padding: 11px 13px; font: 15px/1.4 var(--body);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--fg); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.err { color: var(--warn); background: var(--warn-bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.okmsg { color: var(--ok); background: var(--ok-bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; }

.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 99px; padding: 8px 14px; font: 600 14px var(--body); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.seg .c { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: var(--yellow); color: var(--ink); font-size: 12px; }

.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.aguardando, .pill.novo { background: var(--wait-bg); color: var(--yellow-ink); }
.pill.aprovado, .pill.pronto, .pill.fechou { background: var(--ok-bg); color: var(--ok); }
.pill.ajuste, .pill.perdido { background: var(--warn-bg); color: var(--warn); }
.pill.em_producao, .pill.conversando { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); }
.chip { display: inline-block; border-radius: 6px; padding: 3px 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; background: var(--ink); color: var(--yellow); }

/* cartão do plano */
.plan { background: var(--ink); color: #fff; border-radius: 22px; padding: 20px; display: grid; gap: 16px; position: relative; overflow: hidden; }
.plan::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 212, 0, .28), rgba(255, 212, 0, 0) 70%); }
.plan .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.plan .nm { font: 900 22px/1.1 var(--display); }
.plan .nm small { display: block; font: 700 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); margin-bottom: 6px; }
.plan .papel { color: #D6D7DC; font-size: 14px; margin-top: 4px; }
.plan .tag { background: var(--yellow); color: var(--ink); font: 800 12px var(--body); border-radius: 99px; padding: 5px 10px; white-space: nowrap; }
.bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 16px; }
.bar { display: grid; gap: 5px; font-size: 12px; color: #C9CAD0; }
.bar b { color: #fff; font-variant-numeric: tabular-nums; }
.bar .track { height: 6px; border-radius: 9px; background: #2A2D34; overflow: hidden; }
.bar .track i { display: block; height: 100%; border-radius: 9px; background: var(--yellow); }

/* grade de conteúdos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ent { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.thumb { position: relative; background: #0B0C0F; aspect-ratio: 4 / 5; display: block; width: 100%; border: 0; padding: 0; cursor: pointer; overflow: hidden; }
.thumb img, .thumb video, .thumb iframe { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; border: 0; display: block; pointer-events: none; }
.thumb .ov { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.thumb .play span { width: 54px; height: 54px; border-radius: 50%; background: rgba(16, 18, 22, .7); display: grid; place-items: center; backdrop-filter: blur(4px); }
.thumb .play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.thumb .file { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-align: center; padding: 16px; font-size: 14px; }
.ent .body { padding: 14px; display: grid; gap: 8px; flex: 1; align-content: start; }
.ent .meta { font-size: 12.5px; color: var(--muted); }
.ent .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.ent .acts .btn { flex: 1 1 auto; }
.coment { font-size: 13px; border-left: 3px solid var(--warn); padding: 2px 10px; }

/* faixa horizontal (início) */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }

/* lista (próximas postagens, briefings, leads) */
.list { display: grid; gap: 8px; }
.li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.li .mini { width: 48px; height: 60px; border-radius: 10px; background: #0B0C0F center / cover no-repeat; border: 0; padding: 0; cursor: pointer; }
.li .tt { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .st { font-size: 12.5px; color: var(--muted); }
.date { width: 50px; text-align: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 6px 0; line-height: 1.1; }
.date b { display: block; font: 900 18px var(--display); }
.date span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 2px; text-align: left; font: inherit; color: inherit; cursor: default; }
button.stat { cursor: pointer; }
button.stat:hover { border-color: var(--fg); }
.stat b { font: 900 26px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat.alert { border-color: var(--warn); }
.stat.alert b { color: var(--warn); }

.empty { text-align: center; padding: 32px 20px; border: 1.5px dashed var(--line); border-radius: 18px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty b { color: var(--fg); font-size: 16px; }

.note { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.note svg.i { color: var(--yellow-ink); margin-top: 2px; }

/* calendário */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-head b { font: 800 17px var(--display); text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grid .wd { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.day { appearance: none; border: 1px solid transparent; background: var(--surface-2); color: var(--fg); border-radius: 12px; min-height: 58px; padding: 6px 4px; display: grid; align-content: start; justify-items: center; gap: 4px; cursor: pointer; font: 700 13px var(--body); }
.day.out { background: transparent; color: var(--muted); opacity: .45; }
.day.today { border-color: var(--fg); }
.day[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
.dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--fg); }
.dots i.aguardando { background: #E2B800; }
.dots i.aprovado { background: var(--ok); }
.dots i.ajuste { background: var(--warn); }
.day[aria-pressed="true"] .dots i { background: var(--ink); }
@media (min-width: 700px) { .day { min-height: 76px; } }

/* visualizador em tela cheia */
dialog { border: 0; border-radius: 20px; padding: 0; max-width: min(560px, calc(100vw - 32px)); width: 100%; background: var(--surface); color: var(--fg); }
dialog::backdrop { background: rgba(10, 11, 14, .66); }
dialog .in { padding: 22px; }
dialog .acts { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
dialog.viewer { max-width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: hidden; }
.viewer-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); max-height: calc(100vh - 24px); }
.viewer .media { background: #0B0C0F; display: grid; place-items: center; min-height: 300px; }
.viewer .media img, .viewer .media video, .viewer .media iframe { width: 100%; max-height: calc(100vh - 24px); object-fit: contain; border: 0; display: block; }
.viewer .media iframe { aspect-ratio: 9 / 16; height: auto; }
.viewer .info { padding: 18px; display: grid; gap: 12px; align-content: start; overflow-y: auto; }
.viewer .media.multi { display: flex; flex-direction: column; overflow-y: auto; max-height: calc(100vh - 24px); place-items: initial; gap: 4px; }
.viewer .media.multi img { max-height: none; }
.viewer .x { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(16, 18, 22, .7); color: #fff; }
.leg { font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; }
@media (max-width: 760px) {
  dialog.viewer { max-width: 100vw; width: 100vw; max-height: 100vh; height: 100%; border-radius: 0; margin: 0; }
  .viewer-in { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 100%; max-height: 100vh; overflow-y: auto; }
  .viewer .media { min-height: 0; padding-top: env(safe-area-inset-top, 0px); }
  .viewer .media img, .viewer .media video { max-height: 62vh; }
  .viewer .info { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .viewer .x { top: calc(10px + env(safe-area-inset-top, 0px)); }
}

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 8px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.scroll { overflow-x: auto; }

#demo-bar { background: var(--yellow); color: var(--ink); font-size: 13px; padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; text-align: center; position: relative; z-index: 40; }
#demo-bar button { border: 1.5px solid var(--ink); background: transparent; border-radius: 8px; padding: 4px 10px; font: 600 12px var(--body); cursor: pointer; color: var(--ink); }

#toast { position: fixed; left: 50%; bottom: calc(var(--tab) + 16px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.erro { background: var(--warn); color: #fff; }
@media (min-width: 960px) { #toast { bottom: 24px; } }

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