:root {
  --bg: #f3fbf0;
  --surface: #ffffff;
  --surface-2: #f9fbf5;
  --text: #142015;
  --muted: #66715d;
  --green: #1a7a42;
  --green-2: #22a058;
  --gold: #f5c542;
  --gold-soft: #fff3b8;
  --ember: #e5481f;
  --border: #ded7ad;
  --shadow: 0 14px 36px rgba(20, 32, 21, .10);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: linear-gradient(135deg, #07100b 0%, #16351f 58%, #5b2118 100%);
  border-bottom: 1px solid rgba(245, 197, 66, .65);
}
.brand img { width: 260px; max-height: 56px; object-fit: contain; display: block; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(245,197,66,.55);
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(0,0,0,.28);
  font-size: 13px;
  font-weight: 700;
}

.shell { min-height: calc(100vh - 76px); }
.hidden { display: none !important; }

.auth-view {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 28px;
}
.auth-panel {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.auth-copy {
  padding: 42px;
  background: linear-gradient(135deg, #0f1f13, #1f4d2d 62%, #7f2b18);
  color: #fff7cf;
}
.auth-icon { width: 116px; height: 116px; object-fit: contain; margin-bottom: 28px; }
.auth-copy h1 { margin: 0 0 10px; font-size: 34px; letter-spacing: 0; }
.auth-copy p { margin: 0; max-width: 460px; color: #fff0ad; line-height: 1.55; }

.form, .panel, .content, .sidebar {
  background: var(--surface);
}
.form { padding: 42px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.tab, button {
  font: inherit;
}
.tab {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  min-height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}
.tab.active { background: var(--green); border-color: var(--green); color: white; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field span { font-size: 12px; color: var(--muted); font-weight: 800; text-transform: uppercase; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}
input, select { min-height: 42px; }
textarea { min-height: 96px; padding-top: 10px; resize: vertical; font: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(26,122,66,.12); }

.primary, .secondary, .ghost {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}
.primary { background: linear-gradient(135deg, var(--green), var(--green-2)); color: white; }
.secondary { background: #172018; color: var(--gold-soft); }
.ghost { background: rgba(255,255,255,.12); color: var(--gold-soft); border: 1px solid rgba(245,197,66,.45); }
.message { min-height: 20px; margin: 12px 0 0; color: var(--ember); font-size: 13px; }
.message.ok { color: var(--green); }

.app-view {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 76px);
}
.sidebar {
  border-right: 1px solid var(--border);
  padding: 18px;
}
.account-card {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
  margin-bottom: 18px;
}
.account-card span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #1b1300;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #fff1a1);
}
nav { display: grid; gap: 8px; }
.nav {
  text-align: left;
  min-height: 40px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 800;
}
.nav.active { background: #edf7ed; border-color: #cfe7cf; color: var(--green); }

.content { padding: 22px; }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
h2, h3 { margin: 0; letter-spacing: 0; }
.toolbar p { margin: 4px 0 0; color: var(--muted); }
.panel, .view {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(20,32,21,.05);
}
.panel { margin-bottom: 16px; }
.inline-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 12px;
  align-items: end;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  border: 1px solid #e7dfb9;
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-2);
}
.metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.metric strong { display: block; margin-top: 8px; color: var(--green); font-size: 28px; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.span-2 { grid-column: span 2; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 11px 8px; font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.soft-panel { background: #fbfff6; }
.assistant-box, .manual-doc, .compact-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
  margin: 14px 0;
}
.assistant-box { min-height: 92px; color: var(--muted); line-height: 1.5; }
.manual-doc { line-height: 1.65; white-space: pre-wrap; }
.manual-doc h3 { margin-top: 18px; color: var(--green); }
.compact-list { display: grid; gap: 8px; }
.compact-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(222,215,173,.7);
  padding-bottom: 8px;
}
.compact-item:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-button {
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

@media (max-width: 820px) {
  .topbar { padding: 0 14px; }
  .brand img { width: 190px; }
  .auth-panel, .app-view { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--border); }
  .inline-form, .metric-grid, .settings-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .toolbar { align-items: stretch; flex-direction: column; }
}

.sales-page {
  background: #f7f4e7;
}

.sales-hero {
  min-height: 78vh;
  color: #fff8cf;
  background:
    linear-gradient(135deg, rgba(7,16,11,.96), rgba(24,53,32,.88) 55%, rgba(111,36,20,.82)),
    url("/assets/flowinsta-logo-quadrado.png") right 8% center / min(42vw, 520px) no-repeat;
  padding: 20px clamp(18px, 5vw, 70px) 56px;
  display: grid;
  align-content: space-between;
  border-bottom: 1px solid rgba(245, 197, 66, .55);
}

.sales-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.sales-nav img {
  width: min(320px, 62vw);
  max-height: 76px;
  object-fit: contain;
}

.sales-login,
.sales-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.sales-login {
  color: var(--gold-soft);
  border: 1px solid rgba(245,197,66,.5);
  background: rgba(0,0,0,.24);
}

.sales-copy {
  width: min(680px, 100%);
  padding-top: 80px;
}
.sales-badge {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--gold-soft);
  border: 1px solid rgba(245,197,66,.45);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
  padding: 8px 12px;
  font-weight: 800;
}

.sales-icon {
  width: 94px;
  height: 94px;
  object-fit: contain;
  margin-bottom: 18px;
}

.sales-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: .92;
  letter-spacing: 0;
}

.sales-copy p {
  margin: 0;
  max-width: 580px;
  color: #fff1af;
  font-size: 19px;
  line-height: 1.55;
}

.sales-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.sales-actions.center { justify-content: center; }

.sales-cta {
  min-width: 156px;
}

.sales-main {
  padding: 24px clamp(18px, 5vw, 70px) 54px;
}

.sales-section {
  padding: 38px 0;
}

.sales-section.band {
  margin-left: calc(clamp(18px, 5vw, 70px) * -1);
  margin-right: calc(clamp(18px, 5vw, 70px) * -1);
  padding-left: clamp(18px, 5vw, 70px);
  padding-right: clamp(18px, 5vw, 70px);
  background: #fffaf0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  max-width: 840px;
  margin-bottom: 18px;
}

.section-title span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-title h2 {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.sales-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sales-grid article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(20,32,21,.06);
}

.sales-grid strong,
.sales-grid span {
  display: block;
}

.sales-grid strong {
  color: var(--green);
  font-size: 17px;
  margin-bottom: 7px;
}

.sales-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.trust-row span {
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(245,197,66,.36);
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 800;
}

.steps-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.steps-grid article,
.price-card,
.manual-preview,
.guarantee {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 8px 22px rgba(20,32,21,.06);
}

.steps-grid b {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  margin-bottom: 12px;
}

.steps-grid strong,
.steps-grid span {
  display: block;
}

.steps-grid strong {
  color: var(--text);
  margin-bottom: 6px;
}

.steps-grid span,
.price-card p,
.manual-preview,
.guarantee p {
  color: var(--muted);
  line-height: 1.55;
}

.pricing-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
}

.price-card.highlighted {
  border-color: var(--gold);
  box-shadow: 0 14px 34px rgba(125, 67, 19, .14);
}

.price-card .tag {
  display: inline-flex;
  background: var(--gold-soft);
  color: #644100;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.price-card h3 {
  margin: 18px 0 8px;
  font-size: 28px;
  color: var(--green);
}

.price {
  color: var(--text);
  font-size: 36px;
  font-weight: 900;
}

.price small { font-size: 15px; color: var(--muted); }
.price-card ul { padding-left: 18px; color: var(--muted); line-height: 1.7; }

.promo-strip {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.promo-strip strong,
.promo-strip span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--border);
}

.manual-preview ol {
  margin-bottom: 0;
  line-height: 1.9;
}

.guarantee {
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}

@media (max-width: 820px) {
  .sales-hero {
    min-height: 82vh;
    background:
      linear-gradient(135deg, rgba(7,16,11,.97), rgba(24,53,32,.9) 58%, rgba(111,36,20,.86)),
      url("/assets/flowinsta-logo-quadrado.png") center bottom 16px / 76vw no-repeat;
    padding-bottom: 44vw;
  }
  .sales-copy { padding-top: 54px; }
  .sales-copy p { font-size: 16px; }
  .sales-grid, .steps-grid, .pricing-grid { grid-template-columns: 1fr; }
}
