/* Igreja Batista Ágape — POC de demonstração */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #1f1b1a;
  --muted: #6d6662;
  --line: #e9e2d9;
  --red: #b3161d;
  --red-dark: #8c1016;
  --red-soft: #fbeeed;
  --gray: #9a9b9f;
  --gray-soft: #f1eeea;
  --green: #1c9a50;
  --green-soft: #e7f6ec;
  --amber-soft: #fdf3dc;
  --amber: #8a5a00;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 27, 26, .05), 0 8px 24px rgba(31, 27, 26, .06);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }

/* Faixa de demonstração */
.demo-strip { background: var(--ink); color: #f3ece4; font-size: 13px; text-align: center; padding: 7px 16px; }
.demo-strip b { color: #fff; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { background: var(--surface); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gray); }
.btn-whats { background: var(--green); color: #fff; }
.btn-whats:hover { background: #157c40; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.link { color: var(--red); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }

/* Cabeçalho */
.header { position: sticky; top: 0; z-index: 30; background: rgba(250, 247, 242, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand img { height: 44px; width: auto; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.1; }
.brand-tag { font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--ink); background: var(--gray-soft); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; }

/* Seções da home */
section.block { padding: 72px 0; }
.block-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.block-head h2 { font-size: clamp(28px, 3.4vw, 38px); margin-top: 8px; }

.hero { padding: 64px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); margin: 14px 0 18px; }
.hero h1 em { font-style: italic; color: var(--red); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.hero-logo { padding: 36px 40px 28px; }
.next { display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--line); background: var(--red-soft); }
.next .live { margin-left: auto; }

.datebox { flex: none; width: 58px; text-align: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); padding: 6px 0 7px; line-height: 1.1; }
.datebox b { display: block; font-family: var(--display); font-size: 24px; color: var(--red); }
.datebox span { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 20px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title h3 { font-size: 19px; }

.culto .dia { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.culto .hora { font-family: var(--display); font-size: 34px; font-weight: 600; color: var(--red); margin: 6px 0 4px; }

.estudo-band { background: var(--surface); border-block: 1px solid var(--line); }
.estudo { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.estudo h2 { font-size: clamp(30px, 3.6vw, 42px); margin: 10px 0 14px; }
.verse { border-left: 3px solid var(--red); padding: 6px 0 6px 22px; font-family: var(--display); font-size: 24px; line-height: 1.35; font-style: italic; }
.verse cite { display: block; margin-top: 12px; font-family: var(--body); font-style: normal; font-size: 14px; font-weight: 600; color: var(--red); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg.ic { width: 16px; height: 16px; }

.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--gray-soft); color: var(--muted); }
.tag.red { background: var(--red-soft); color: var(--red-dark); }
.tag.green { background: var(--green-soft); color: #136b38; }
.tag.amber { background: var(--amber-soft); color: var(--amber); }

.news { display: flex; flex-direction: column; gap: 10px; }
.news h3 { font-size: 21px; }
.news .foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }

.agenda { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.ev-list { display: flex; flex-direction: column; }
.ev { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev h4 { font-family: var(--body); font-size: 16px; font-weight: 600; }
.ev .tag { margin-left: auto; }

.missoes { background: var(--ink); color: #f5efe8; }
.missoes .eyebrow { color: #f0a8ab; }
.missoes .muted { color: #b9b0a9; }
.missoes .card { background: #2a2524; border-color: #3a3432; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat b { display: block; font-family: var(--display); font-size: 40px; font-weight: 600; line-height: 1.1; }
.stat span { font-size: 14px; color: var(--muted); }
.missoes .stat span { color: #b9b0a9; }

.cta { border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cta h3 { font-size: 26px; }
.cta.red { background: var(--red); color: #fff; border: 0; }
.cta.red .btn { background: #fff; color: var(--red-dark); }

.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 28px; margin-top: 24px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-family: var(--body); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer li { margin-bottom: 8px; font-size: 15px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer .copy { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; font-size: 13px; color: var(--muted); }

/* Entrar */
.login { min-height: calc(100vh - 34px); display: grid; place-items: center; padding: 40px 20px; }
.login-box { width: min(880px, 100%); display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.login-side { background: var(--red-soft); padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.login-form { padding: 40px; display: flex; flex-direction: column; gap: 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Formulários */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.input, select.input, textarea.input { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; }
.input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
textarea.input { resize: vertical; min-height: 110px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--red); }
.form { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > .field { flex: 1; min-width: 160px; }

/* Aplicativo (membro e pastor) */
.app-header .wrap { height: 64px; }
.user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--red-soft); color: var(--red-dark); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.gray { background: var(--gray-soft); color: var(--muted); }
.tabs { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 64px; z-index: 20; }
.tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .side a { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; }
.tabs a { padding: 14px 14px; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--red); border-color: var(--red); }
.tabs a svg.ic, .side a svg.ic { width: 18px; height: 18px; }

.view { display: none; padding: 32px 0 64px; }
.view.on { display: block; }
.view-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.view-head h1 { font-size: 30px; }
.cols-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.cols-1-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.shell { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - 34px); }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { padding: 4px 8px 18px; }
.side a { padding: 10px 12px; border-radius: 10px; }
.side a:hover { background: var(--gray-soft); color: var(--ink); }
.side a.on { background: var(--red-soft); color: var(--red-dark); font-weight: 600; }
.side .sep { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gray); padding: 16px 12px 6px; }
.side .count { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--red); color: #fff; border-radius: 999px; padding: 1px 8px; }
.side .bottom { margin-top: auto; padding-top: 16px; }
.main { padding: 0 32px; min-width: 0; }
.main .view { max-width: 1120px; }

.kpi b { display: block; font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1.15; margin-top: 6px; }
.kpi .lbl { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi .delta { font-size: 13px; color: #136b38; font-weight: 600; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; padding-bottom: 0; }
.list li:first-child { padding-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 600; font-size: 15px; }
.list .s { font-size: 13px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 4px; }
.cal .day { min-height: 92px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: #fff; font-size: 13px; }
.cal .day.off { background: transparent; border-style: dashed; }
.cal .day.today { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.cal .day .n { font-weight: 600; color: var(--muted); }
.cal .day.today .n { color: var(--red); }
.cal .pill { display: block; margin-top: 4px; padding: 2px 6px; border-radius: 6px; background: var(--red-soft); color: var(--red-dark); font-size: 11px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .pill.gray { background: var(--gray-soft); color: var(--muted); }

/* Barras simples */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding-top: 20px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font-size: 12px; color: var(--muted); }
.bar i { display: block; width: 100%; max-width: 46px; background: var(--red); border-radius: 6px 6px 2px 2px; opacity: .85; }
.bar:last-child i { opacity: 1; }
.bar b { font-size: 13px; color: var(--ink); }
.progress { height: 8px; background: var(--gray-soft); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--red); border-radius: 999px; }

/* WhatsApp */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chip small { color: var(--muted); }
.chip.on { background: var(--green-soft); border-color: var(--green); color: #136b38; }
.chip.on small { color: #136b38; }
.phone { background: #e9e2d8; border-radius: 22px; padding: 0; overflow: hidden; border: 1px solid var(--line); }
.phone-top { background: #0f6b5a; color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.phone-top .avatar { background: #fff; padding: 4px; }
.phone-body { padding: 18px 14px 22px; min-height: 260px; }
.bubble { background: #dcf8c6; border-radius: 10px 0 10px 10px; padding: 9px 12px 6px; margin-left: 36px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); }
.bubble time { display: block; text-align: right; font-size: 11px; color: #5d7a55; margin-top: 2px; }

.qr { width: 150px; height: 150px; border-radius: 12px; border: 1px solid var(--line); background:
  conic-gradient(var(--ink) 25%, #fff 0 50%, var(--ink) 0 75%, #fff 0) 0 0 / 20px 20px; flex: none; position: relative; }
.qr::after { content: "QR de exemplo"; position: absolute; inset: 50px 14px; background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 600; border-radius: 6px; text-align: center; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Responsivo */
@media (max-width: 960px) {
  .hero .wrap, .estudo, .agenda, .cols-2-1, .cols-1-1 { grid-template-columns: 1fr; gap: 28px; }
  .g4, .stats { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; padding: 12px 20px 16px; }
  .nav.open { display: flex; }
  .menu-btn { display: inline-flex; }
  .header .btn.entrar { display: none; }
  section.block { padding: 52px 0; }
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; overflow-x: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .side .brand, .side .sep, .side .bottom { display: none; }
  .main { padding: 0 20px; }
  .login-box { grid-template-columns: 1fr; }
  .login-side { display: none; }
}
@media (max-width: 560px) {
  .g2, .g4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .brand-tag, .user .nome { display: none; }
  .hero { padding-top: 40px; }
  .next { flex-wrap: wrap; }
  .cal .day { min-height: 62px; padding: 4px; }
  .cal .pill { font-size: 0; height: 6px; padding: 0; border-radius: 3px; }
  .footer .cols { grid-template-columns: 1fr; }
  .view-head h1 { font-size: 26px; }
}

/* Ajustes finos */
.news .tag, .cta .tag { align-self: flex-start; }
.nav a { white-space: nowrap; }
.nav a.so-celular { display: none; }
.side .brand img { height: 34px; }
.side .brand .brand-name { white-space: nowrap; }
@media (max-width: 1100px) { .nav a { padding-inline: 9px; font-size: 14px; } }
@media (max-width: 960px) { .nav a.so-celular { display: block; } }
