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

:root {
  --bg-0: #faf6f0;
  --bg-1: #ffffff;
  --bg-2: #f3ece0;
  --bg-3: #ebe2d3;
  --border: #e3d6bf;
  --border-strong: #c4b094;
  --text-1: #2a1d10;
  --text-2: #6b5848;
  --text-3: #9a8970;
  --text-on-brand: #faf6f0;
  --brand: #a0826d;
  --brand-hover: #8b6f47;
  --brand-strong: #6f5535;
  --brand-dark: #4a3823;
  --brand-soft: rgba(160, 130, 109, 0.15);
  --brand-glow: rgba(200, 156, 94, 0.25);
  --accent: #c89c5e;
  --accent-2: #d4a574;
  --success: #2d8659;
  --danger: #c4534e;
  --warning: #b87b1a;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 2px 8px rgba(80, 60, 40, 0.06);
  --shadow: 0 4px 24px rgba(80, 60, 40, 0.08);
  --shadow-lg: 0 12px 40px rgba(80, 60, 40, 0.14);
  --shadow-brand: 0 8px 32px rgba(160, 130, 109, 0.28);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  letter-spacing: -0.005em;
}

a { color: var(--brand-hover); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-strong); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

input, textarea, select {
  font-family: inherit;
  font-size: 15px;
  background: var(--bg-1);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-hover);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition);
  border: 1px solid transparent;
  letter-spacing: -0.005em;
}
.btn:hover {
  background: var(--brand-strong);
  color: #fff;
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-1);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text-1); box-shadow: var(--shadow-sm); }

.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.muted { color: var(--text-2); }
.small { font-size: 13px; }
.field { margin-bottom: 16px; }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 12px; }
.alert-error { background: rgba(196, 83, 78, 0.08); color: var(--danger); border: 1px solid rgba(196, 83, 78, 0.3); }
.alert-success { background: rgba(45, 134, 89, 0.08); color: var(--success); border: 1px solid rgba(45, 134, 89, 0.3); }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 10%, rgba(200, 156, 94, 0.18), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(160, 130, 109, 0.15), transparent 50%),
    var(--bg-0);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-card .subtitle { color: var(--text-2); margin-bottom: 28px; font-size: 14px; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 24px;
  color: var(--text-1);
  letter-spacing: -0.02em;
}
.brand-mark img { width: 28px; height: 28px; display: block; }
.brand-mark .dot {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--brand-hover) 60%, var(--brand-strong));
  border-radius: 8px;
  box-shadow: var(--shadow-brand);
  position: relative;
}
.brand-mark .dot::after {
  content: ""; position: absolute; inset: 6px; border-radius: 4px;
  background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.2) 50%);
}

.app-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 22px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}
.sidebar .brand-mark { padding: 0 10px 22px; margin: 0; font-size: 16px; }

/* Minimizar / restaurar a sidebar (vira uma barra estreita so com a logo) */
.sidebar-collapse-btn {
  position: absolute;
  top: 18px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 7px;
  transition: all 120ms;
}
.sidebar-collapse-btn:hover { background: var(--bg-3); color: var(--text-1); }

/* Estado recolhido: rail de 64px com a logo no topo */
.app-shell.sidebar-collapsed { grid-template-columns: 64px 1fr; }
.app-shell.sidebar-collapsed .sidebar { padding: 22px 0; align-items: center; }
.app-shell.sidebar-collapsed .sidebar .nav-item { display: none; }
.app-shell.sidebar-collapsed .sidebar .brand-mark {
  padding: 0 0 16px;
  font-size: 0;            /* esconde o texto "SocialFlow", mantem a logo */
  gap: 0;
  justify-content: center;
}
.app-shell.sidebar-collapsed .sidebar-collapse-btn {
  position: static;
  margin-top: 4px;
}

@media (max-width: 760px) {
  /* No mobile o grid ja vira 1 coluna; o rail nao se aplica */
  .app-shell.sidebar-collapsed { grid-template-columns: 1fr; }
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: all 120ms;
  cursor: pointer;
  letter-spacing: -0.005em;
}
.nav-item:hover { background: var(--bg-3); color: var(--text-1); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }

.main { padding: 32px 40px; overflow: auto; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }

/* Landing */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(227, 214, 191, 0.6);
}
.landing-nav .brand-mark { margin: 0; }
.landing-nav .links { display: flex; gap: 20px; align-items: center; }
.landing-nav .links a { color: var(--text-2); font-size: 14px; font-weight: 500; }
.landing-nav .links a:hover { color: var(--text-1); }

.hero {
  padding: 80px 24px 40px;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
  letter-spacing: -0.005em;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin-bottom: 22px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, #8b6f47 0%, #c89c5e 60%, #d4a574 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead { font-size: 19px; color: var(--text-2); max-width: 640px; margin: 0 auto 32px; line-height: 1.5; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 28px; display: flex; gap: 20px; justify-content: center; color: var(--text-3); font-size: 13px; flex-wrap: wrap; }
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.hero-meta span::before { content: "✓"; color: var(--brand); font-weight: 700; }

.section { padding: 80px 24px; }
.section h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.025em; text-align: center; margin-bottom: 14px; }
.section .section-sub { text-align: center; color: var(--text-2); max-width: 600px; margin: 0 auto 48px; font-size: 17px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.feature-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.feature-card .icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-glow));
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--brand-strong);
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature-card p { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }

.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.step {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
}
.step-num {
  position: absolute;
  top: -16px;
  left: 24px;
  background: linear-gradient(135deg, var(--accent), var(--brand-strong));
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  box-shadow: var(--shadow-brand);
}
.step h3 { font-size: 16px; font-weight: 700; margin: 14px 0 8px; }
.step p { color: var(--text-2); font-size: 14px; line-height: 1.55; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.price-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); transform: scale(1.02); }
.price-card.featured::before {
  content: "Mais escolhido";
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--brand-strong));
  color: #fff; font-size: 11px; font-weight: 700; padding: 4px 14px; border-radius: 999px;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.price-card .plan-name { font-weight: 700; font-size: 17px; }
.price-card .plan-price { font-size: 32px; font-weight: 800; margin: 10px 0 4px; letter-spacing: -0.02em; }
.price-card .plan-price small { font-size: 13px; color: var(--text-2); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0; flex: 1; }
.price-card li { padding: 5px 0; font-size: 13.5px; color: var(--text-2); display: flex; gap: 8px; align-items: flex-start; }
.price-card li::before { content: "✓"; color: var(--brand); font-weight: 700; flex-shrink: 0; }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-q { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; font-size: 15px; }
.faq-a { color: var(--text-2); font-size: 14px; line-height: 1.6; margin-top: 8px; display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-q::after { content: "+"; font-size: 22px; color: var(--text-3); transition: transform var(--transition); }

.landing-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
}

/* Dashboard */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card .label { color: var(--text-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat-card .value { font-size: 32px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -0.02em; line-height: 1; }
.stat-card .sub { color: var(--text-2); font-size: 12px; }
.stat-card .spark { margin-top: 10px; height: 36px; }

.recent-row {
  background: var(--bg-1);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  transition: all var(--transition);
}
.recent-row:hover { background: var(--bg-2); border-color: var(--border-strong); transform: translateX(2px); }

.status-pill { display: inline-block; padding: 3px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; letter-spacing: -0.005em; }
.status-draft { background: var(--bg-3); color: var(--text-2); }
.status-pending_approval { background: rgba(184,123,26,0.15); color: #b87b1a; }
.status-approved { background: rgba(45,134,89,0.15); color: #2d8659; }
.status-rejected { background: rgba(196,83,78,0.15); color: #c4534e; }
.status-published { background: var(--brand-soft); color: var(--brand-strong); }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 360ms ease-out both; }
.fade-up-1 { animation-delay: 80ms; }
.fade-up-2 { animation-delay: 160ms; }
.fade-up-3 { animation-delay: 240ms; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid var(--border); background: var(--bg-0);
}

@media (max-width: 720px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 22px 18px; }
  .landing-nav { padding: 14px 18px; }
  .landing-nav .links { display: none; }
  .hero { padding: 60px 18px 30px; }
  .section { padding: 56px 18px; }
}
