/* ============================================================
   Radar SJB — App Style
   Tema escuro · Branco / Vermelho oficial / Preto
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Montserrat:wght@700;800;900&display=swap');

:root {
  /* === Paleta oficial Radar SJB === */
  --red:        #E43836;
  --red-deep:   #C8181E;
  --red-soft:   rgba(228, 56, 54, 0.12);

  /* Tema escuro */
  --bg:         #0a0a0a;
  --surface:    #161616;
  --surface-2:  #1f1f1f;
  --surface-3:  #2a2a2a;
  --line:       rgba(255, 255, 255, 0.08);
  --line-strong:rgba(255, 255, 255, 0.18);

  --text:       #f4f4f4;
  --text-muted: #a0a0a0;
  --text-dim:   #6c6c6c;

  --green:      #1d9e75;
  --amber:      #d97706;

  /* Tipografia */
  --sans:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --display:    'Montserrat', 'Inter', sans-serif;

  /* Layout */
  --radius:     14px;
  --radius-sm:  10px;
  --radius-lg:  20px;

  /* Safe areas iOS */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Bottom nav */
  --nav-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  min-height: 100dvh;
  padding-top: var(--safe-top);
  /* Espaço pro bottom nav quando ele estiver visível */
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
}
body.no-nav { padding-bottom: var(--safe-bottom); }

/* ============================================================
   Header
   ============================================================ */
.app-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: var(--safe-top);
  z-index: 30;
}
.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.brand-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-text .dot { color: var(--red); }
.brand-sub {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: 4px;
}
.header-action {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.header-action:active { transform: scale(.96); }

/* ============================================================
   Container
   ============================================================ */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 18px 24px;
}

/* ============================================================
   Typography
   ============================================================ */
h1.page-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 6px 0 4px;
  color: var(--text);
}
.kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin: 8px 0 6px;
}
.dek {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.back::before { content: '←'; font-size: 16px; }

code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SF Mono', Menlo, monospace;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: none;
  background: var(--red);
  color: white;
  cursor: pointer;
  text-decoration: none;
  transition: transform .1s ease, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn:hover { opacity: .9; }
.btn-block { width: 100%; }
/* .btn tem display próprio, que anulava o atributo hidden */
.btn[hidden] { display: none !important; }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-big {
  font-size: 15px;
  padding: 16px 22px;
}
.btn[disabled] { opacity: .35; pointer-events: none; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   Dashboard
   ============================================================ */
.greet {
  margin: 4px 0 18px;
}
.greet h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 4px;
}
.greet h1 .accent { color: var(--red); }
.greet p {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: capitalize;
  margin: 0;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-num {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.stat-num .accent { color: var(--red); }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.quick {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.quick:active { transform: scale(.98); }
.quick-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--red-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--red);
  margin-bottom: 4px;
}
.quick-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.quick-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 18px 0 10px;
}
.section-heading h2 {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text);
}
.section-heading a {
  font-size: 12px;
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
}

/* ============================================================
   Email list / queue
   ============================================================ */
.queue-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 4px;
}
.queue-meta button {
  background: none;
  border: none;
  font: inherit;
  color: var(--red);
  cursor: pointer;
  padding: 0;
}
.email-item {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}
.email-from {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.email-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.email-snippet {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.email-foot {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--text-dim);
}
.email-foot .has-img::before {
  content: '◉ ';
  color: var(--red);
}

/* ============================================================
   Posts list (compartilhar publicadas)
   ============================================================ */
.post-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.post-thumb {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb.no-img::after {
  content: '◌';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--text-dim);
}
.post-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.post-date {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 3px;
}
.post-row-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: white;
  flex-shrink: 0;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.wa { background: #25d366; }
.icon-btn.ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.icon-btn.lk { background: var(--surface-3); color: var(--text); font-size: 13px; }
/* disparo: vermelho da marca, para ler como ação do Radar e não de rede social */
.icon-btn.dz { background: var(--red); }

.load-more {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  background: transparent;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
}
.load-more:active { transform: scale(.99); }
.load-more[disabled] { opacity: .4; pointer-events: none; }

/* ============================================================
   Empty / loading states
   ============================================================ */
.state {
  text-align: center;
  padding: 50px 20px;
  font-family: var(--sans);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Editor
   ============================================================ */
.editor-section { margin-bottom: 22px; }
.field-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}
.input {
  width: 100%;
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  border: none;
  border-bottom: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  padding: 4px 0 10px;
  outline: none;
  border-radius: 0;
}
.input:focus { border-color: var(--red); }
.textarea {
  width: 100%;
  min-height: 220px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 14px;
  outline: none;
  border-radius: var(--radius-sm);
  resize: vertical;
}
.textarea:focus { border-color: var(--red); }

/* Image picker */
.img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.img-pick {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-2);
}
.img-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-pick.selected {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red);
}
.img-pick .check {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text);
}
.img-pick.selected .check {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.img-pick.selected .check::before { content: '✓'; }

/* Action bar */
.action-bar {
  position: sticky;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  padding: 18px 0;
  margin-top: 16px;
}
body.no-nav .action-bar { bottom: var(--safe-bottom); }
.action-bar .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-3);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
  border: 1px solid var(--line);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.error { background: var(--red); border-color: var(--red); color: white; }
.toast.success { background: var(--green); border-color: var(--green); color: white; }

/* ============================================================
   Bottom Nav
   ============================================================ */
.bottom-nav {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 8px 2px calc(8px + var(--safe-bottom));
  display: flex;
  justify-content: space-around;
  z-index: 50;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 1px;
  text-decoration: none;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}
.nav-item.active { color: var(--red); }
.nav-item.active[href*="copa"] { color: #2ECC71; }
.nav-item:active .nav-icon { transform: scale(.9); }

/* ============================================================
   Login / boot
   ============================================================ */
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin-top: 20px;
  text-align: center;
}
.login-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
}
.login-card h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.login-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 22px;
}

/* ============================================================
   Modal (story / preview)
   ============================================================ */
.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 150;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal-header {
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0 16px;
}
.modal-header h3 {
  color: var(--text);
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  margin: 0;
}
.modal-close {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.story-preview {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9/16;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.story-preview img { width: 100%; height: 100%; object-fit: contain; }
.story-preview .center {
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
  padding: 20px;
}
.story-actions {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.story-hint {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  max-width: 420px;
  width: 100%;
}
.story-hint strong { display: block; margin-bottom: 4px; color: var(--text); }

.debug-log {
  width: 100%;
  max-width: 420px;
  margin-top: 12px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #79c0ff;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 10px;
  line-height: 1.4;
  max-height: 140px;
  overflow-y: auto;
}
.debug-log:empty { display: none; }
.debug-log div { padding: 1px 0; }

/* ============================================================
   Weather module specific
   ============================================================ */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.weather-metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.weather-metric .lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.weather-metric .val {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.weather-metric .sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.boletim-out {
  background: #050505;
  color: #e8e6e0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
  max-height: 360px;
  overflow-y: auto;
}

.alert-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  margin: 10px 0;
  border: 1px solid;
}
.alert-box.ok    { background: rgba(29, 158, 117, 0.1);  border-color: rgba(29, 158, 117, 0.3); color: #5fd9af; }
.alert-box.warn  { background: rgba(217, 119, 6, 0.1);   border-color: rgba(217, 119, 6, 0.3);  color: #fbbf24; }
.alert-box.danger{ background: rgba(228, 56, 54, 0.1);   border-color: rgba(228, 56, 54, 0.3);  color: #fca5a5; }

/* ============================================================
   Radar Tá On generator
   ============================================================ */
.gen-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 18px;
}
.chip-btn {
  flex: 1;
  min-width: 0;
  padding: 12px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}
.chip-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.text-out {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 12px 0;
  color: var(--text);
}

/* ============================================================
   Dashboard novo
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
  margin: 4px 0 16px;
  color: white;
  position: relative;
  overflow: hidden;
}
.hero.neutral {
  background: linear-gradient(135deg, var(--surface-2) 0%, #0e0e0e 100%);
  border: 1px solid var(--line);
}
.hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.hero-period {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 6px;
}
.hero-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  max-width: 80%;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.hero.neutral .hero-btn { background: var(--red); color: white; }
.hero-btn:active { transform: scale(.97); }
.hero-date {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 10px;
  text-transform: capitalize;
}

/* Stats em linha */
.stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  text-decoration: none;
  color: var(--text);
}
.stat-line-item {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.stat-line-num {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 3px;
  color: var(--text);
}
.stat-line-num.red { color: var(--red); }
.stat-line-lbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.stat-line-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
  flex-shrink: 0;
}

/* Carrossel de postagens */
.promo-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin: 0 -18px 4px;
  padding: 4px 18px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.promo-strip::-webkit-scrollbar { display: none; }
.promo-strip-card {
  flex: 0 0 62%;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.promo-strip-card:active { transform: scale(.98); }
.promo-strip-img {
  width: 100%;
  aspect-ratio: 9/14;
  object-fit: cover;
  object-position: center top;
  display: block;
  background: var(--surface-2);
}
.promo-strip-body {
  padding: 10px 12px 12px;
}
.promo-strip-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  margin: 0 0 3px;
  letter-spacing: -0.005em;
}
.promo-strip-action {
  font-size: 10px;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Grid 2x2 atalhos secundários */
.secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.secondary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.secondary-card:active { transform: scale(.98); }
.secondary-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--red-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--red);
  flex-shrink: 0;
}
.secondary-card-text {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  min-width: 0;
}

/* Promo editor modal */
.promo-modal[hidden] { display: none !important; }
.promo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(10px);
  z-index: 150;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.promo-modal-inner {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.promo-modal-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.promo-modal-body { padding: 18px; }
.promo-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 1;
}


/* ---- atalhos no topo (IA e Config) ---- */
.header-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 16px; text-decoration: none; line-height: 1;
}
.header-icon:active { background: var(--red-soft); border-color: var(--red); }

/* ---- escolha de lista no disparo rápido ---- */
.disp-modal {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.72); display: flex; align-items: flex-end;
}
.disp-modal-caixa {
  width: 100%; background: var(--surface); border-top-left-radius: 18px;
  border-top-right-radius: 18px; padding: 22px 18px 30px;
  border-top: 1px solid var(--line);
}
.disp-modal h3 { margin: 0 0 4px; font-size: 17px; }
.disp-modal p { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); }
.disp-modal-opcoes { display: grid; gap: 9px; }
.disp-modal-opcoes button { width: 100%; text-align: left; padding: 15px 16px; }
.disp-modal-opcoes button b { display: block; font-size: 15px; }
.disp-modal-opcoes button span { font-size: 12px; color: var(--text-muted); }
.disp-modal-fechar { margin-top: 12px; width: 100%; }

/* botão de limpar a fila institucional */
#limpar-fila {
  background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text-muted); font-family: inherit; font-size: 12px;
  padding: 6px 12px; cursor: pointer; margin-left: 8px;
}
#limpar-fila:active { border-color: var(--red); color: var(--red); }
#limpar-fila[disabled] { opacity: .5; }

/* ícone do disparo na lista de ações (tela de publicado) */
.action-icon.dz { background: var(--red); }

/* aviso de conflito entre imagem anexada e prévia do link */
.disp-conflito {
  margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(245, 194, 107, .10); border: 1px solid rgba(245, 194, 107, .35);
  font-size: 12.5px; line-height: 1.5; color: #F5C26B;
}
.disp-conflito b { display: block; margin-bottom: 3px; }
.disp-conflito button {
  display: block; margin-top: 9px; background: none; border: 1px solid currentColor;
  border-radius: 7px; color: inherit; font-family: inherit; font-size: 12px;
  padding: 7px 12px; cursor: pointer;
}

/* ---- Feed do Instagram (posts.html) ---- */
.icon-btn.fd { background: #0b0b0d; color: #fff; border: 1px solid var(--red); }
.feed-legenda-box { margin-top: 14px; }
.feed-legenda-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.feed-legenda-head strong { font-size: 14px; }
.btn-sm {
  font-size: 12px; padding: 7px 12px; border-radius: var(--radius-sm);
  background: var(--surface-3); color: var(--text); border: 1px solid var(--line);
  cursor: pointer;
}
.btn-sm:disabled { opacity: .5; cursor: default; }
.feed-legenda {
  width: 100%; font-family: var(--sans); font-size: 14px; line-height: 1.5;
  padding: 12px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--text); resize: vertical;
  margin-bottom: 10px;
}

/* ============================================================
   v16 — Visual novo (Opção 1 no celular, menu lateral no computador)
   ============================================================ */
:root {
  --bg:         #0b0b0c;
  --surface:    #17171a;
  --surface-2:  #1e1e22;
  --surface-3:  #2a2a2f;
  --line:       rgba(255, 255, 255, 0.07);
  --line-strong:rgba(255, 255, 255, 0.16);
  --text-muted: #a3a3a9;
  --text-dim:   #808087;
  --radius:     16px;
  --radius-sm:  12px;
  --nav-h:      66px;
  --side-w:     248px;
}

.app-header { background: rgba(11, 11, 12, 0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: transparent; }
.app-header-inner { padding: 12px 18px; }
.brand { text-decoration: none; color: var(--text); }
.brand-logo { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.brand-text { font-size: 18px; }
h1.page-title { font-size: 28px; letter-spacing: -0.025em; }
.kicker { letter-spacing: 0.14em; }
.card, .cfg-section { border-radius: var(--radius); }
.btn { border-radius: 14px; }

/* barra de baixo: 4 abas */
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px 6px calc(6px + var(--safe-bottom));
  background: rgba(17, 17, 19, 0.96);
  border-top: 1px solid var(--line);
}
.nav-item { font-size: 11px; font-weight: 600; gap: 3px; padding: 6px 2px; color: var(--text-dim); border-radius: 12px; }
.nav-icon { width: 26px; height: 26px; font-size: 0; }
.nav-item.active { color: var(--red); }
.nav-item.active .nav-icon { background: var(--red-soft); border-radius: 10px; width: 46px; }

/* menu lateral (só no computador) */
.side-nav { display: none; }
@media (min-width: 1024px) {
  body.com-menu { padding-left: var(--side-w); padding-bottom: 24px; }
  body.com-menu .bottom-nav { display: none; }
  .side-nav {
    display: flex; flex-direction: column; gap: 14px;
    position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w); z-index: 60;
    box-sizing: border-box; padding: 18px 12px; overflow-y: auto;
    background: #141417; border-right: 1px solid var(--line);
  }
  .side-marca { display: flex; align-items: center; gap: 10px; padding: 2px 8px 6px; color: var(--text); text-decoration: none; }
  .side-marca img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
  .side-marca b { display: block; font-family: var(--display); font-size: 15px; }
  .side-marca small { display: block; font-size: 12px; color: var(--text-muted); }
  .side-grupo { display: flex; flex-direction: column; gap: 1px; }
  .side-titulo { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); padding: 6px 10px; }
  .side-item { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: 10px; color: #d8d8dc; text-decoration: none; font-size: 14px; }
  .side-item:hover { background: var(--surface); color: #fff; }
  .side-item.active { background: var(--red-soft); color: #ff8a87; font-weight: 600; }
  .side-rodape { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 8px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-muted); }
  .side-rodape span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-sair { width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .side-sair:hover { background: var(--surface); color: #fff; }
  .app-header { display: none; }
  .wrap { max-width: 920px; padding-top: 28px; }
  body.largo .wrap { max-width: 1280px; }
}

/* tela Mais */
.mais-sec { margin-bottom: 20px; }
.mais-sec h2 { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 8px; }
.mais-lista { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.mais-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; font: inherit; text-align: left; cursor: pointer; }
.mais-item:last-child { border-bottom: 0; }
.mais-item:active { background: var(--surface-2); }
.mais-ic { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: #e5e5e8; flex: none; }
.mais-txt { flex: 1; min-width: 0; }
.mais-txt b { display: block; font-size: 15px; font-weight: 600; }
.mais-txt small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.mais-seta { color: var(--text-dim); }
