/* =========================================================
   Flowpost — UI tokens + estilos base
   Primary  #5B5BD6 · Secondary #7C3AED · Accent #A78BFA
   ========================================================= */
:root{
  --primary:#5B5BD6;
  --secondary:#7C3AED;
  --accent:#A78BFA;
  --bg:#0b0b14;
  --bg-soft:#11111c;
  --surface:#ffffff;
  --surface-2:#f7f7fb;
  --border:#e6e6ef;
  --text:#0f1226;
  --muted:#6b6f86;
  --danger:#ef4444;
  --ok:#10b981;
  --warn:#f59e0b;
  --shadow: 0 10px 30px -10px rgba(91,91,214,.25);
  --radius:14px;
  --radius-sm:10px;
  --grad: linear-gradient(135deg,#5B5BD6 0%,#7C3AED 60%,#A78BFA 100%);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; color:var(--text); background:var(--surface-2); }
a{ color:var(--primary); text-decoration:none; }
a:hover{ text-decoration:underline; }
.container{ max-width:1180px; margin:0 auto; padding:0 24px; }
.muted{ color:var(--muted); }
.center{ text-align:center; }
.right{ text-align:right; }

/* ========== Buttons ========== */
.btn{ display:inline-flex; align-items:center; gap:8px; padding:10px 16px;
  border-radius:10px; border:1px solid transparent; font-weight:600; font-size:14px;
  cursor:pointer; transition:all .15s ease; background:#fff; color:var(--text); text-decoration:none; }
.btn:hover{ text-decoration:none; transform:translateY(-1px); }
.btn-primary{ background:var(--grad); color:#fff; box-shadow:var(--shadow); }
.btn-accent{ background:var(--accent); color:#1a1340; }
.btn-ghost{ background:transparent; border-color:var(--border); }
.btn-ghost:hover{ background:#fff; }
.btn-lg{ padding:14px 22px; font-size:16px; }
.btn-sm{ padding:6px 12px; font-size:12.5px; }
.btn-block{ width:100%; justify-content:center; }

/* ========== Public landing ========== */
body.public{ background:#fff; color:var(--text); }
.public-header{ position:sticky; top:0; backdrop-filter:saturate(180%) blur(8px);
  background:rgba(255,255,255,.85); border-bottom:1px solid var(--border); z-index:50; }
.public-nav{ display:flex; align-items:center; justify-content:space-between; padding:14px 24px; gap:24px; }
.public-nav nav{ display:flex; gap:24px; }
.public-nav nav a{ color:var(--text); font-weight:500; font-size:14px; }
.public-nav .brand img{ display:block; }

.hero{ position:relative; padding:80px 0 60px; overflow:hidden; }
.hero::before{ content:''; position:absolute; inset:-20% -10% auto auto; width:60%; height:120%;
  background: radial-gradient(closest-side, rgba(124,58,237,.18), transparent 70%); z-index:0; }
.hero-grid{ position:relative; display:grid; grid-template-columns:1.05fr .95fr; gap:60px; align-items:center; z-index:1; }
.eyebrow{ display:inline-block; padding:6px 12px; background:#f0eeff; color:var(--secondary);
  border-radius:999px; font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; }
.hero h1{ font-size:56px; line-height:1.05; letter-spacing:-.02em; margin:18px 0 18px; font-weight:800; }
.grad{ background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.lead{ font-size:18px; line-height:1.55; color:#444a66; max-width:560px; }
.hero-cta{ display:flex; gap:12px; margin:28px 0 18px; flex-wrap:wrap; }
.hero-pills{ list-style:none; padding:0; display:flex; gap:18px; color:var(--muted); font-size:14px; }
.hero-pills li{ display:flex; align-items:center; gap:8px; }
.dot{ width:10px; height:10px; border-radius:50%; }
.dot-ig{ background:linear-gradient(45deg,#f58529,#dd2a7b,#8134af); }
.dot-fb{ background:#1877F2; }
.dot-yt{ background:#FF0000; }
.dot-rgb{ width:10px; height:10px; border-radius:50%; background:var(--grad); }

.hero-visual{ position:relative; min-height:420px; }
.mock-card{ background:#fff; border:1px solid var(--border); border-radius:16px;
  padding:18px; box-shadow:0 30px 60px -30px rgba(15,18,38,.25); }
.mock-1{ position:absolute; top:0; right:0; width:78%; }
.mock-2{ position:absolute; bottom:0; left:0; width:70%; }
.mock-head{ display:flex; align-items:center; gap:8px; font-weight:600; margin-bottom:12px; color:#111; }
.mock-row{ display:flex; justify-content:space-between; padding:10px 0; border-top:1px dashed var(--border); font-size:14px; }
.mock-row span{ color:var(--muted); }
.mock-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.mock-stats div{ background:var(--surface-2); border-radius:10px; padding:12px; text-align:center; }
.mock-stats b{ display:block; font-size:20px; }
.mock-stats small{ color:var(--muted); }

.section{ padding:80px 0; }
.section-alt{ background:#faf9ff; }
.section-title{ font-size:36px; letter-spacing:-.01em; margin:0 0 8px; text-align:center; font-weight:800; }
.section-sub{ text-align:center; color:var(--muted); max-width:640px; margin:0 auto 40px; }
.features-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.feature-card{ background:#fff; border:1px solid var(--border); border-radius:14px; padding:24px; transition:all .2s; }
.feature-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow); border-color:transparent; }
.feature-ico{ width:44px; height:44px; border-radius:12px; background:var(--grad); display:flex;
  align-items:center; justify-content:center; font-size:22px; margin-bottom:14px; }
.feature-card h3{ margin:0 0 8px; font-size:18px; }
.feature-card p{ color:var(--muted); margin:0; font-size:14.5px; line-height:1.55; }

.steps{ list-style:none; padding:0; display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.steps li{ background:#fff; border:1px solid var(--border); border-radius:14px; padding:24px; }
.steps span{ display:inline-flex; width:32px; height:32px; align-items:center; justify-content:center;
  background:var(--grad); color:#fff; border-radius:50%; font-weight:700; margin-bottom:10px; }

.cta-card{ background:var(--grad); color:#fff; border-radius:20px; padding:36px 40px;
  display:flex; justify-content:space-between; align-items:center; gap:24px; }
.cta-card h2{ margin:0 0 6px; font-size:28px; }
.cta-card .muted{ color:rgba(255,255,255,.85); margin:0; }
.cta-card .btn-primary{ background:#fff; color:var(--primary); }

.public-footer{ background:#0b0b14; color:#cbd0e6; padding:48px 0 24px; margin-top:40px; }
.public-footer h4{ color:#fff; font-size:14px; text-transform:uppercase; letter-spacing:.06em; margin:0 0 12px; }
.public-footer .footer-logo{ filter:brightness(0) invert(1); margin-bottom:10px; opacity:.95; }
.public-footer a{ display:block; color:#cbd0e6; padding:4px 0; font-size:14px; }
.footer-grid{ display:grid; grid-template-columns:2fr 1fr 1fr; gap:32px; padding-bottom:32px; border-bottom:1px solid #1f2237; }
.footer-bottom{ padding-top:20px; color:#7a8099; }

/* ========== Auth ========== */
.auth-shell{ min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background: radial-gradient(1200px 600px at 50% -20%, rgba(124,58,237,.15), transparent 60%), var(--surface-2); padding:24px; }
.auth-brand{ margin-bottom:24px; }
.auth-card{ background:#fff; border-radius:18px; padding:36px; width:100%; max-width:420px;
  box-shadow:0 20px 50px -20px rgba(15,18,38,.18); border:1px solid var(--border); }
.auth-card h1{ margin:0 0 6px; font-size:24px; }
.auth-card form{ display:grid; gap:14px; margin-top:18px; }
.auth-card label{ display:block; font-size:13px; font-weight:600; color:#3a3f5c; }
.input{ width:100%; padding:11px 13px; border:1px solid var(--border); border-radius:10px;
  font-size:14px; font-family:inherit; background:#fff; transition:border-color .15s, box-shadow .15s; margin-top:6px; }
.input:focus{ outline:none; border-color:var(--primary); box-shadow:0 0 0 4px rgba(91,91,214,.12); }
.check{ display:flex; align-items:center; gap:8px; font-weight:500 !important; }

/* ========== App shell ========== */
body.app{ background:var(--surface-2); }
.app-shell{ display:grid; grid-template-columns:260px 1fr; min-height:100vh; }
.sidebar{ background:#fff; border-right:1px solid var(--border); padding:20px 14px; display:flex; flex-direction:column; gap:18px; position:sticky; top:0; height:100vh; }
.sidebar-brand{ display:flex; align-items:center; gap:10px; padding:10px 8px 6px; }
.sidebar-brand img{ display:block; max-width:100%; height:auto; }
.sidebar-nav{ display:flex; flex-direction:column; gap:2px; }
.sidebar-nav a{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; color:#3a3f5c; font-weight:500; font-size:14px; }
.sidebar-nav a:hover{ background:var(--surface-2); text-decoration:none; }
.sidebar-nav a.active{ background:linear-gradient(135deg, rgba(91,91,214,.12), rgba(124,58,237,.10)); color:var(--primary); }
.sidebar-nav .ico{ width:22px; text-align:center; }
.sidebar-foot{ margin-top:auto; padding-top:14px; border-top:1px solid var(--border); display:grid; gap:10px; }
.user-chip{ display:flex; gap:10px; align-items:center; padding:6px; }
.user-chip strong{ display:block; font-size:13px; }
.user-chip small{ color:var(--muted); font-size:12px; }
.avatar{ width:36px; height:36px; border-radius:50%; background:var(--grad); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; }

.app-main{ display:flex; flex-direction:column; }
.topbar{ display:flex; justify-content:space-between; align-items:center; padding:18px 28px; background:#fff; border-bottom:1px solid var(--border); }
.topbar-title{ margin:0; font-size:20px; }
.app-content{ padding:24px 28px; display:flex; flex-direction:column; gap:18px; }

/* ========== Cards / KPIs ========== */
.card{ background:#fff; border:1px solid var(--border); border-radius:14px; padding:20px; }
.card-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.card-head h3{ margin:0; font-size:16px; }
.empty{ text-align:center; padding:40px; }
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.kpi{ background:#fff; border:1px solid var(--border); border-radius:14px; padding:18px 20px; }
.kpi span{ display:block; color:var(--muted); font-size:13px; }
.kpi strong{ font-size:28px; }

.list-clean{ list-style:none; padding:0; margin:0; }
.list-clean li{ display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-top:1px solid var(--border); }
.list-clean li:first-child{ border-top:none; }

/* ========== Table ========== */
.table{ width:100%; border-collapse:collapse; font-size:14px; }
.table th, .table td{ text-align:left; padding:12px; border-bottom:1px solid var(--border); }
.table th{ color:var(--muted); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; }

/* ========== Badges / Pills / Chips ========== */
.badge{ display:inline-block; padding:3px 8px; border-radius:6px; font-size:11.5px; font-weight:600; margin-right:4px; color:#fff; }
.badge-instagram{ background:linear-gradient(45deg,#f58529,#dd2a7b,#8134af); }
.badge-facebook{ background:#1877F2; }
.badge-youtube{ background:#FF0000; }
.pill{ display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600; background:#eef0f7; color:#3a3f5c; }
.pill-ok{ background:#dcfce7; color:#166534; }
.pill-published{ background:#dcfce7; color:#166534; }
.pill-scheduled{ background:#e0e7ff; color:#3730a3; }
.pill-draft{ background:#f1f5f9; color:#475569; }
.pill-failed{ background:#fee2e2; color:#991b1b; }
.pill-publishing{ background:#fef3c7; color:#92400e; }
.chip{ display:inline-block; padding:6px 12px; border-radius:999px; background:#fff; border:1px solid var(--border); color:#3a3f5c; font-size:13px; margin-right:6px; }
.chip.active{ background:var(--grad); color:#fff; border-color:transparent; }
.filters{ display:flex; flex-wrap:wrap; gap:6px; }

/* ========== Connect cards ========== */
.connect-card{ display:flex; flex-direction:column; gap:8px; padding:24px; border-radius:14px; color:#fff;
  text-decoration:none; min-height:160px; justify-content:space-between; }
.connect-card:hover{ text-decoration:none; transform:translateY(-2px); }
.connect-card h3{ margin:0; font-size:20px; }
.connect-card p{ font-size:13px; opacity:.9; margin:0; }
.connect-card .btn{ align-self:flex-start; }
.connect-ig{ background:linear-gradient(135deg,#f58529,#dd2a7b,#8134af); }
.connect-fb{ background:linear-gradient(135deg,#1877F2,#0a4ea3); }
.connect-yt{ background:linear-gradient(135deg,#FF0000,#a40000); }
.connect-card .btn-primary{ background:#fff; color:var(--text); }

/* ========== Editor ========== */
.editor-grid{ display:grid; grid-template-columns:1.5fr .9fr; gap:18px; }
.editor-side{ display:flex; flex-direction:column; gap:18px; }
.editor label{ display:block; font-size:13px; font-weight:600; color:#3a3f5c; margin-bottom:12px; }
.collapse{ background:var(--surface-2); border-radius:10px; padding:10px 14px; margin-bottom:12px; }
.collapse summary{ cursor:pointer; font-weight:600; }
.media-uploader h4{ margin:6px 0 10px; }
.media-list{ display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
.media-thumb{ width:90px; height:90px; border-radius:10px; background:var(--surface-2); position:relative; overflow:hidden; border:1px solid var(--border); }
.media-thumb img{ width:100%; height:100%; object-fit:cover; }
.media-thumb .vid{ display:flex; width:100%; height:100%; align-items:center; justify-content:center; font-size:24px; color:var(--muted); }
.media-thumb .rm{ position:absolute; top:4px; right:4px; width:22px; height:22px; border-radius:50%; border:none; background:rgba(0,0,0,.6); color:#fff; cursor:pointer; }
.accounts-pick{ display:flex; flex-direction:column; gap:8px; }
.account-pick{ display:flex !important; align-items:center; gap:10px; padding:8px; border:1px solid var(--border); border-radius:10px; cursor:pointer; }
.account-pick input{ accent-color:var(--primary); }
.actions{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.preview-mock{ border:1px solid var(--border); border-radius:12px; padding:14px; }
.preview-head{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.preview-body{ background:var(--surface-2); border-radius:8px; padding:12px; min-height:100px; white-space:pre-wrap; font-size:14px; }

/* ========== Flash ========== */
.flash{ padding:12px 14px; border-radius:10px; font-size:14px; margin-bottom:8px; border:1px solid transparent; }
.flash-success{ background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.flash-danger{ background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.flash-warning{ background:#fef3c7; color:#92400e; border-color:#fde68a; }
.flash-info{ background:#e0e7ff; color:#3730a3; border-color:#c7d2fe; }

.link{ color:var(--primary); font-size:13px; font-weight:600; }
.prose{ max-width:760px; margin:0 auto; }
.prose h1{ font-size:32px; }
.prose p{ color:#3a3f5c; line-height:1.7; }

/* ========== Responsive ========== */
@media (max-width: 980px){
  .hero-grid, .editor-grid, .grid-2, .grid-3, .features-grid, .steps, .footer-grid{ grid-template-columns:1fr; }
  .hero h1{ font-size:38px; }
  .hero-visual{ min-height:260px; }
  .mock-1, .mock-2{ position:relative; width:100%; margin-bottom:14px; }
  .app-shell{ grid-template-columns:1fr; }
  .sidebar{ position:static; height:auto; flex-direction:row; flex-wrap:wrap; }
  .sidebar-foot{ margin-left:auto; }
  .cta-card{ flex-direction:column; text-align:center; }
}
