/* ==========================================================================
   PORTO — Comunidade Cristã · sistema visual
   Laranja Porto, preto e cinzas frios. Tipografia do sistema (SF Pro),
   botões em pílula e vidro líquido sobre luz quente.
   ========================================================================== */
:root {
  --porto: #FF6624;
  --porto-ink: #D9480F;
  --porto-soft: #FFF1EA;
  --ink: #1D1D1F; --ink-2: #424245; --muted: #6E6E73; --faint: #86868B;
  --bg: #F5F5F7; --surface: #FFFFFF; --surface-2: #F5F5F7; --fill: rgba(120,120,128,.12); --fill-2: rgba(120,120,128,.08);
  --line: rgba(0,0,0,.08); --line-2: rgba(0,0,0,.05);
  --green: #1F9D55; --red: #E5372B;
  --glass: rgba(255,255,255,.62); --glass-strong: rgba(255,255,255,.8); --glass-edge: rgba(255,255,255,.7);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 -1px 0 rgba(0,0,0,.03) inset, 0 12px 40px -12px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.04);
  --card-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px -16px rgba(0,0,0,.14);
  --focus: rgba(255,102,36,.45);
  --r-xl: 28px; --r-lg: 22px; --r: 16px; --r-sm: 12px; --pill: 999px;
  --ff: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --side-w: 272px;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
  --sea: var(--ink); --beacon: var(--porto); --tide: var(--ink-2); --kelp: var(--green); --coral: var(--red); --slate: var(--muted);
}
:root[data-theme="dark"] {
  --porto-ink: #FF8A55; --porto-soft: rgba(255,102,36,.15);
  --ink: #F5F5F7; --ink-2: #D2D2D7; --muted: #A1A1A6; --faint: #8E8E93;
  --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --fill: rgba(120,120,128,.24); --fill-2: rgba(120,120,128,.16);
  --line: rgba(255,255,255,.1); --line-2: rgba(255,255,255,.06);
  --green: #30D158; --red: #FF453A;
  --glass: rgba(40,40,44,.55); --glass-strong: rgba(44,44,48,.82); --glass-edge: rgba(255,255,255,.12);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 12px 40px -12px rgba(0,0,0,.7);
  --card-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 10px 30px -16px rgba(0,0,0,.8);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --porto-ink: #FF8A55; --porto-soft: rgba(255,102,36,.15);
    --ink: #F5F5F7; --ink-2: #D2D2D7; --muted: #A1A1A6; --faint: #8E8E93;
    --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --fill: rgba(120,120,128,.24); --fill-2: rgba(120,120,128,.16);
    --line: rgba(255,255,255,.1); --line-2: rgba(255,255,255,.06);
    --green: #30D158; --red: #FF453A;
    --glass: rgba(40,40,44,.55); --glass-strong: rgba(44,44,48,.82); --glass-edge: rgba(255,255,255,.12);
    --glass-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 12px 40px -12px rgba(0,0,0,.7);
    --card-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 10px 30px -16px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.47 var(--ff); letter-spacing: -.012em; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.022em; font-weight: 600; }
p { margin: 0 0 .6em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
::selection { background: rgba(255,102,36,.25); }
.ic { flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.only-m { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Vidro líquido ---------- */
.glass, .side, .top, .tabbar, .palette-box, dialog.modal, .toast, .s-nav-in {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(185%);
  backdrop-filter: blur(28px) saturate(185%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
}
.glass { position: relative; border-radius: var(--r-lg); }
.glass::before, .side::before, .tabbar::before, .s-nav-in::before, .top::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 30%, rgba(255,255,255,0) 72%, rgba(255,255,255,.16) 100%);
  mix-blend-mode: soft-light;
}

.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .6; }
.ambient i:nth-child(1) { width: 46vmax; height: 46vmax; left: -14vmax; top: -18vmax; background: radial-gradient(circle, rgba(255,102,36,.42), transparent 65%); }
.ambient i:nth-child(2) { width: 40vmax; height: 40vmax; right: -14vmax; top: 18vh; background: radial-gradient(circle, rgba(255,160,110,.32), transparent 65%); }
.ambient i:nth-child(3) { width: 36vmax; height: 36vmax; left: 30vw; bottom: -22vmax; background: radial-gradient(circle, rgba(255,200,170,.45), transparent 65%); }
:root[data-theme="dark"] .ambient i { opacity: .3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ambient i { opacity: .3; } }

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo { height: 30px; width: auto; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; } :root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
.symbol { display: inline-block; width: 1em; height: 1.05em; background: currentColor; -webkit-mask: var(--sym) center/contain no-repeat; mask: var(--sym) center/contain no-repeat; flex: none; }
.brand-logo { border-radius: 10px; object-fit: contain; }

/* ---------- Estrutura do app ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 12px; margin: 12px 0 12px 12px; height: calc(100vh - 24px); display: flex; flex-direction: column; padding: 18px 12px 12px; border-radius: var(--r-xl); overflow: hidden; z-index: 30; }
.side .brand { padding: 4px 10px 16px; }
.side-search { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border-radius: var(--pill); border: 0; background: var(--fill); color: var(--muted); cursor: pointer; text-align: left; font-size: 14px; }
.side-search span { flex: 1; }
.side-search kbd { font: 500 11px var(--ff); color: var(--faint); }
.side-search:hover { background: var(--fill-2); }
.nav { margin-top: 8px; flex: 1; overflow-y: auto; scrollbar-width: none; margin-right: -4px; padding-right: 4px; }
.nav::-webkit-scrollbar { display: none; }
.nav-sec { margin-top: 14px; }
.nav-sec p { margin: 0 12px 4px; font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: 0; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 7px 12px; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-size: 14.5px; font-weight: 500; transition: background .15s; }
.nav a .ic { color: var(--muted); }
.nav a:hover { background: var(--fill-2); }
.nav a.on { background: var(--porto); color: #fff; box-shadow: 0 6px 16px -6px rgba(255,102,36,.65); }
.nav a.on .ic { color: #fff; }
.side-foot { display: flex; align-items: center; gap: 4px; padding: 10px 4px 0; margin-top: 8px; border-top: 1px solid var(--line-2); }
.me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 6px; border-radius: 14px; }
.me:hover { background: var(--fill-2); }
.me span { display: flex; flex-direction: column; min-width: 0; }
.me b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { font-size: 12px; color: var(--muted); }
.side-tools { display: flex; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 12px; z-index: 20; margin: 12px 12px 0 18px; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 22px; border-radius: 22px; }
.top-t { flex: 1; min-width: 0; }
.top h1 { font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
.top-t p { margin: 1px 0 0; color: var(--muted); font-size: 13.5px; }
.top-t p .link { font-weight: 500; }
.top-a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.page { padding: 22px 30px 72px 36px; max-width: 1380px; width: 100%; }
.scrim { display: none; }

.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--pill); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; transition: background .15s; }
.icon-btn:hover { background: var(--fill); color: var(--ink); }
[data-theme-toggle] .i-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .i-sun { display: block; } :root[data-theme="dark"] [data-theme-toggle] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [data-theme-toggle] .i-sun { display: block; } :root:not([data-theme="light"]) [data-theme-toggle] .i-moon { display: none; } }

/* ---------- Botões (pílula) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 18px; border-radius: var(--pill); border: 0; background: var(--porto); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease), filter .15s, background .15s; box-shadow: 0 6px 18px -8px rgba(255,102,36,.7); }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.97); }
.btn-sea, .btn-dark { background: var(--ink); color: var(--bg); box-shadow: none; }
.btn-ghost { background: var(--fill); color: var(--ink); box-shadow: none; }
.btn-ghost:hover { background: var(--fill-2); filter: none; }
.btn-glass { background: rgba(255,255,255,.22); color: #fff; -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 20px -10px rgba(0,0,0,.3); }
.btn-glass:hover { background: rgba(255,255,255,.32); filter: none; }
.btn-danger-ghost { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent); }
.btn-sm { min-height: 32px; padding: 0 13px; font-size: 13.5px; }
.btn-lg { min-height: 50px; padding: 0 26px; font-size: 17px; }
.btn-full { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link { color: var(--porto-ink); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- Cartões ---------- */
.panel { background: var(--surface); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--card-shadow); min-width: 0; position: relative; }
.panel + .panel { margin-top: 18px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-h h2 { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 700; }
.panel-h h2 .ic { color: var(--porto); }
.panel-flat { box-shadow: none; }
.panel-sea, .panel-dark { background: #111113; color: #F5F5F7; overflow: hidden; isolation: isolate; }
.panel-sea::after, .panel-dark::after { content: ""; position: absolute; z-index: -1; right: -30%; top: -60%; width: 90%; height: 160%; background: radial-gradient(closest-side, rgba(255,102,36,.45), transparent); }
.panel-sea .muted, .panel-dark .muted { color: #A1A1A6; }
.panel-sea h2, .panel-dark h2, .panel-sea h3, .panel-dark h3 { color: #fff; }
.panel-sea .panel-h h2 .ic, .panel-dark .panel-h h2 .ic { color: var(--porto); }
.panel-sea .btn-ghost, .panel-dark .btn-ghost { background: rgba(255,255,255,.12); color: #fff; }
.panel-sea .input, .panel-dark .input { background: rgba(255,255,255,.1); border-color: transparent; color: #fff; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cols-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 18px; }
.cols-2 > .panel + .panel, .cols-3 > .panel + .panel, .cols-main > .panel + .panel, .stack-lg > .panel + .panel { margin-top: 0; }
.sec-title { font-size: 26px; font-weight: 700; letter-spacing: -.035em; margin: 30px 0 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sec-title .link { font-size: 15px; letter-spacing: -.01em; }

/* ---------- Destaque laranja ---------- */
.hello { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 30px 30px 26px; border-radius: var(--r-xl); margin-bottom: 18px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #FF8A50 0%, #FF6624 38%, #E0480F 72%, #A9300A 100%); box-shadow: 0 24px 60px -30px rgba(255,102,36,.8); }
.hello::before { content: ""; position: absolute; z-index: -1; right: -30px; bottom: -60px; width: 300px; height: 300px; background: #fff; opacity: .1; -webkit-mask: var(--sym) center/contain no-repeat; mask: var(--sym) center/contain no-repeat; }
.hello h2 { font-size: 34px; font-weight: 700; letter-spacing: -.035em; color: #fff; }
.hello p { margin: 6px 0 0; color: rgba(255,255,255,.9); max-width: 58ch; }
.hello p b { color: #fff; }
.hello-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.hello-meta div { text-align: left; padding: 10px 16px; border-radius: 18px; background: rgba(255,255,255,.18); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); min-width: 120px; }
.hello-meta b { display: block; font-size: 24px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.hello-meta small { color: rgba(255,255,255,.88); font-size: 12.5px; }

/* ---------- Indicadores ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--card-shadow); text-decoration: none; display: block; transition: transform .2s var(--ease); }
a.kpi:hover { transform: translateY(-2px); }
.kpi-l { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.kpi-l .ic { color: var(--porto); }
.kpi-v { font-size: 32px; font-weight: 700; letter-spacing: -.04em; margin-top: 8px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-d { font-size: 13px; color: var(--muted); margin-top: 5px; }
.up { color: var(--green); } .down { color: var(--red); }

/* ---------- Listas ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.list li:first-child { border-top: 0; padding-top: 2px; }
.list li > div { flex: 1; min-width: 0; }
.list li > .date-chip, .list li > .av { flex: none; }
.list b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list small { display: block; color: var(--muted); font-size: 13px; }
.list a.row-link { text-decoration: none; display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.list a.row-link > div { flex: 1; min-width: 0; }
.list a.row-link:hover b { color: var(--porto-ink); }
.panel-sea .list li, .panel-dark .list li { border-color: rgba(255,255,255,.08); }
.dot-s { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.dot-s.ok { background: var(--green); } .dot-s.no { background: var(--red); }
.date-chip { flex: none; width: 48px; text-align: center; border-radius: 14px; background: var(--surface-2); padding: 6px 0 7px; line-height: 1.05; }
.date-chip b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.date-chip small { font-size: 11px; color: var(--porto-ink); font-weight: 600; }

/* ---------- Avatares e selos ---------- */
.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-weight: 600; overflow: hidden; color: #fff; letter-spacing: 0; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-sm { width: 34px; height: 34px; font-size: 12.5px; }
.av-md { width: 42px; height: 42px; font-size: 14.5px; }
.av-lg { width: 64px; height: 64px; font-size: 22px; }
.av-xl { width: 104px; height: 104px; font-size: 34px; }
.av-t0 { background: linear-gradient(145deg, #FF8A50, #E0480F); } .av-t1 { background: linear-gradient(145deg, #636366, #2C2C2E); } .av-t2 { background: linear-gradient(145deg, #FFB37A, #F07A2E); }
.av-t3 { background: linear-gradient(145deg, #8E8E93, #48484A); } .av-t4 { background: linear-gradient(145deg, #3A3A3C, #111); } .av-t5 { background: linear-gradient(145deg, #FF9C6B, #C2410C); }
.av-stack { display: flex; } .av-stack .av { box-shadow: 0 0 0 2.5px var(--surface); margin-left: -9px; } .av-stack .av:first-child { margin-left: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--fill); color: var(--ink-2); }
.b-sea { background: var(--ink); color: var(--bg); }
.b-tide { background: var(--fill); color: var(--ink); }
.b-beacon { background: var(--porto-soft); color: var(--porto-ink); }
.b-ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.b-erro { background: color-mix(in srgb, var(--red) 13%, transparent); color: var(--red); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.t th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover { background: var(--fill-2); }
.t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t .person { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.t .person b { font-weight: 600; }
.t .person small { display: block; color: var(--muted); font-size: 12.5px; }
.t .person:hover b { color: var(--porto-ink); }
code { font: 600 13px ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; }

/* ---------- Formulários ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.span-2 { grid-column: span 2; }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fld input, .fld select, .fld textarea, .input { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 13px; border: 1px solid transparent; background: var(--fill-2); transition: border-color .15s, box-shadow .15s, background .15s; -webkit-appearance: none; appearance: none; }
.fld select, select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2386868B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.fld input[type=color] { padding: 4px; height: 44px; }
.fld input[type=file] { padding: 9px 12px; }
.fld textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .input:focus { outline: 0; background-color: var(--surface); border-color: var(--porto); box-shadow: 0 0 0 4px var(--focus); }
.help { color: var(--muted); font-size: 12.5px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--porto); flex: none; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.inline-form .fld { flex: 1; min-width: 160px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .search .ic { position: absolute; left: 14px; top: 13px; color: var(--muted); }
.toolbar .search input { padding-left: 40px; border-radius: var(--pill); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--pill); background: var(--fill); flex-wrap: wrap; }
.seg a, .seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: var(--pill); font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; cursor: pointer; transition: background .2s var(--ease); }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.seg small { color: var(--muted); font-weight: 500; margin-left: 4px; }

/* ---------- Alertas e toasts ---------- */
.alert { display: flex; gap: 11px; padding: 13px 16px; border-radius: var(--r); margin-bottom: 16px; background: var(--surface); box-shadow: var(--card-shadow); align-items: flex-start; }
.alert p { margin: 0; } .alert p + p { margin-top: 4px; }
.alert .ic { margin-top: 2px; }
.alert-erro { background: color-mix(in srgb, var(--red) 10%, var(--surface)); color: var(--red); box-shadow: none; }
.alert-info .ic { color: var(--ink-2); }
.alert-beacon { background: var(--porto-soft); box-shadow: none; }
.alert-beacon .ic { color: var(--porto-ink); }
.toasts { position: fixed; z-index: 90; left: 50%; top: 18px; transform: translateX(-50%); display: grid; gap: 8px; width: max-content; max-width: min(460px, calc(100vw - 24px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: var(--pill); background: var(--glass-strong); animation: toast-in .45s var(--ease); }
.toast .ic:first-child { color: var(--green); } .toast-erro .ic:first-child { color: var(--red); } .toast-info .ic:first-child { color: var(--porto); }
.toast span { flex: 1; font-size: 14px; font-weight: 500; }
.toast-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .symbol { font-size: 34px; margin: 0 auto 12px; color: var(--faint); opacity: .4; }
.empty-t { font-weight: 600; color: var(--ink); margin: 0 0 4px; font-size: 16px; }
.empty-d { max-width: 44ch; margin: 0 auto 14px; font-size: 14px; }

/* ---------- Modal ---------- */
dialog.modal { padding: 0; border-radius: var(--r-xl); width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); color: var(--ink); background: var(--glass-strong); }
dialog.modal::backdrop { background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.modal[open] { animation: modal-in .35s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 6px; }
.modal-h h2 { font-size: 21px; font-weight: 700; }
.modal-h .icon-btn { background: var(--fill); width: 30px; height: 30px; }
.modal-b { padding: 10px 22px 22px; }
.modal .fld input, .modal .fld select, .modal .fld textarea { background-color: rgba(120,120,128,.12); }

/* ---------- Busca (Ctrl K) ---------- */
.palette { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: start center; padding-top: 12vh; }
.palette[hidden] { display: none; }
.palette-box { width: min(620px, calc(100vw - 24px)); background: var(--glass-strong); border-radius: 24px; overflow: hidden; }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-in input { flex: 1; border: 0; background: transparent; font-size: 18px; outline: 0; color: var(--ink); }
.palette-res { max-height: 50vh; overflow-y: auto; padding: 8px; }
.palette-res a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 13px; text-decoration: none; font-weight: 500; }
.palette-res a.sel, .palette-res a:hover { background: var(--porto); color: #fff; }
.palette-res a.sel small, .palette-res a:hover small { color: rgba(255,255,255,.85); }
.palette-res small { color: var(--muted); margin-left: auto; font-size: 12px; }
.palette-res .grp { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 12px 4px; }

/* ---------- Gráficos ---------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .lbl { fill: var(--muted); font-size: 11.5px; font-family: var(--ff); }
.chart .val { fill: var(--ink-2); font-size: 11px; font-weight: 600; font-family: var(--ff); }
.chart .line { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .area { opacity: .1; }
.chart .dot { stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.t-tide, .t-sea { stroke: var(--ink); fill: var(--ink); }
.t-beacon { stroke: var(--porto); fill: var(--porto); }
.t-coral { stroke: var(--red); fill: var(--red); }
.chart .line.t-tide, .chart .line.t-beacon, .chart .line.t-coral, .chart .line.t-sea { fill: none; }
.chart .bar.t-tide { fill: var(--porto); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.ring-bg { fill: none; stroke: var(--fill); stroke-width: 11; }
.ring-fg { fill: none; stroke-width: 11; stroke-linecap: round; }
.ring-v { font: 700 23px var(--ff); fill: var(--ink); letter-spacing: -.03em; }
.ring-l { font: 500 11px var(--ff); fill: var(--muted); }
.panel-sea .ring-v, .panel-dark .ring-v { fill: #fff; } .panel-sea .ring-bg, .panel-dark .ring-bg { stroke: rgba(255,255,255,.14); }
.meter { height: 8px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--porto); }
.meter .t-tide, .meter .t-sea { background: var(--ink); } .meter .t-ok { background: var(--green); }
.panel-sea .meter, .panel-dark .meter { background: rgba(255,255,255,.14); }

/* ---------- Funil de acolhimento ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(186px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.lane { background: var(--fill-2); border-radius: var(--r-lg); padding: 10px; min-height: 280px; }
.lane-h { display: flex; align-items: center; justify-content: space-between; margin: 4px 6px 10px; }
.lane-h b { font-size: 14px; }
.lane-h span { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface); padding: 1px 9px; border-radius: 99px; }
.lane.drop { background: var(--porto-soft); outline: 2px dashed var(--porto); outline-offset: -4px; }
.card { display: block; background: var(--surface); border-radius: 16px; padding: 12px; margin-bottom: 8px; cursor: grab; text-decoration: none; box-shadow: var(--card-shadow); transition: transform .2s var(--ease); }
.card:hover { transform: translateY(-2px); }
.card.dragging { opacity: .5; }
.card-top { display: flex; align-items: center; gap: 9px; }
.card-top b { font-size: 14px; font-weight: 600; line-height: 1.25; }
.card small { display: block; color: var(--muted); font-size: 12.5px; }
.card-meta { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.card-meta .badge { font-size: 11.5px; padding: 2px 8px; }

/* ---------- Perfil ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; }
.profile-head h2 { font-size: 28px; letter-spacing: -.03em; font-weight: 700; }
.profile-head .row-btns { margin-top: 10px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.facts dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 26px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: -4px; width: 2px; background: var(--fill); border-radius: 2px; }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--ink-2); }
.timeline li.sig::after { box-shadow: inset 0 0 0 3px var(--porto); }
.timeline .tl-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.timeline .tl-h b { font-size: 14.5px; }
.timeline .tl-h small { color: var(--muted); font-size: 12.5px; }
.timeline p { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; white-space: pre-line; }

/* ---------- Escalas ---------- */
.sched { display: grid; gap: 14px; }
.sched-day { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--card-shadow); }
.sched-day-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.sched-day-h b { font-size: 15px; }
.sched-row { display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--line-2); }
.sched-row:first-of-type { border-top: 0; }
.sched-row .fn { width: 160px; flex: none; font-size: 13px; color: var(--muted); font-weight: 500; line-height: 1.3; }
.sched-row .who { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; }
.sched-row .who .input { min-height: 36px; padding: 6px 34px 6px 12px; border-radius: var(--pill); }
.conflict { color: var(--red); font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.min-color { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.min-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.min-card { position: relative; display: block; background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; text-decoration: none; box-shadow: var(--card-shadow); overflow: hidden; transition: transform .2s var(--ease); }
.min-card::before { content: ""; position: absolute; left: 20px; top: 0; width: 34px; height: 4px; border-radius: 0 0 4px 4px; background: var(--c, var(--porto)); }
a.min-card:hover { transform: translateY(-3px); }
.min-card h3 { font-size: 17px; font-weight: 700; margin: 6px 0 4px; }

/* ---------- Kids ---------- */
.kid-tag { width: 100%; max-width: 340px; border-radius: 20px; padding: 18px; text-align: center; background: var(--surface-2); }
.kid-code { font: 700 44px/1 var(--ff); letter-spacing: .16em; color: var(--porto); margin: 10px 0; }
.allergy { color: var(--red); font-weight: 600; font-size: 12.5px; display: inline-flex; gap: 4px; align-items: center; }
.room-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 99px; background: var(--fill); color: var(--ink); }
.panel-sea .room-pill, .panel-dark .room-pill { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- 2FA / QR ---------- */
.totp-setup { display: grid; grid-template-columns: 190px 1fr; gap: 20px; align-items: start; margin-top: 12px; }
.qr-box { background: #fff; border-radius: 18px; padding: 8px; box-shadow: 0 0 0 1px var(--line); }
.qr-box svg { width: 100%; height: auto; }
.secret { font: 600 15px ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; background: var(--fill-2); border-radius: 14px; padding: 10px 14px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; word-break: break-all; }
.steps { margin: 0 0 6px; padding-left: 20px; color: var(--ink-2); }
.steps li { margin-bottom: 6px; }
.codes { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.codes li { font: 600 15px ui-monospace, "SF Mono", Menlo, monospace; text-align: center; padding: 9px; border-radius: 12px; background: var(--fill-2); }
.otp { display: flex; gap: 8px; justify-content: space-between; }
.otp input:not([type=hidden]) { width: 100%; max-width: 54px; height: 62px; text-align: center; font-size: 26px; font-weight: 700; border-radius: 16px; border: 1px solid transparent; background: var(--fill-2); }
.otp input:focus { outline: 0; background: var(--surface); border-color: var(--porto); box-shadow: 0 0 0 4px var(--focus); }

/* ---------- Telas de acesso ---------- */
body.auth { background: var(--bg); }
.auth { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; isolation: isolate; }
.auth-card { width: min(440px, 100%); border-radius: 32px; padding: 34px 32px 28px; }
.auth-wide { width: min(640px, 100%); }
.auth-card .brand { justify-content: center; padding: 0 0 22px; }
.auth-card .logo { height: 40px; }
.auth-h { font-size: 30px; font-weight: 700; letter-spacing: -.035em; margin-bottom: 6px; text-align: center; }
.auth-card > .muted { text-align: center; }
.auth-links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 14px; }
.auth-links a { color: var(--porto-ink); text-decoration: none; font-weight: 600; }
.auth-note { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); text-align: center; }
.auth-more { margin-top: 14px; font-size: 14px; }
.auth-more summary { cursor: pointer; color: var(--porto-ink); font-weight: 600; margin-bottom: 10px; }
.auth .toasts { position: static; transform: none; margin: 0 auto 14px; }
.reqs { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; justify-content: center; }
.reqs li { display: flex; gap: 5px; align-items: center; }
.reqs .ok { color: var(--green); } .reqs .no { color: var(--red); }
[data-show-if] { display: none; } [data-show-if].shown { display: grid; }

/* ---------- Carteirinha e PIX ---------- */
.card-id { width: 100%; max-width: 360px; aspect-ratio: 1.586; border-radius: 22px; padding: 20px 22px; color: #fff; background: linear-gradient(150deg, #2A2A2D 0%, #0D0D0F 60%, #000 100%); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 30px 60px -24px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12); isolation: isolate; }
.card-id::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.1) 45%, transparent 60%); }
.card-id::after { content: ""; position: absolute; z-index: -1; right: -30px; top: -26px; width: 130px; height: 130px; background: var(--porto); opacity: .28; -webkit-mask: var(--sym) center/contain no-repeat; mask: var(--sym) center/contain no-repeat; }
.card-id .ci-top { display: flex; align-items: center; gap: 10px; }
.card-id .ci-top .logo { height: 22px; }
.card-id .ci-name { font-size: 24px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.card-id .ci-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.card-id .ci-bottom small { display: block; color: #A1A1A6; font-size: 11px; }
.card-id .ci-qr { width: 70px; background: #fff; border-radius: 10px; padding: 3px; position: relative; z-index: 1; }
.pix-box { display: grid; grid-template-columns: 210px 1fr; gap: 22px; align-items: center; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { flex: 1; min-width: 0; font: 13px ui-monospace, "SF Mono", Menlo, monospace; border-radius: var(--pill); }
.amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.amounts button { border: 0; background: var(--fill); border-radius: var(--pill); padding: 9px 18px; font-weight: 600; cursor: pointer; transition: background .15s, transform .15s var(--ease); }
.amounts button:active { transform: scale(.96); }
.amounts button.on { background: var(--ink); color: var(--bg); }

/* ---------- Tabbar flutuante (celular) ---------- */
.tabbar { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 30px; }
.tabbar a, .tabbar button { position: relative; display: grid; justify-items: center; gap: 1px; text-decoration: none; font-size: 10.5px; font-weight: 600; color: var(--ink-2); padding: 6px 0 5px; border-radius: 24px; border: 0; background: transparent; cursor: pointer; }
.tabbar a.on { color: var(--porto-ink); background: var(--porto-soft); }

/* ---------- Calendário ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px; text-align: center; }
.cal-d { min-height: 104px; padding: 6px; border-radius: 14px; background: var(--fill-2); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-d.out { background: transparent; }
.cal-d.out .cal-n { opacity: .4; }
.cal-n { font-size: 13px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-d.today .cal-n { background: var(--porto); color: #fff; }
.cal-e { display: block; font-size: 11.5px; font-weight: 500; line-height: 1.3; padding: 3px 7px; border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 3px 0 0 var(--c, var(--porto)); }
.cal-culto { background: transparent; color: var(--muted); box-shadow: none; padding-left: 2px; }
.cal-b { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--porto-ink); font-weight: 600; margin-top: auto; }

/* ==========================================================================
   Portal: comunhão, palavra, trilha
   ========================================================================== */
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 190px; padding: 22px; border-radius: var(--r-lg); text-decoration: none; overflow: hidden; isolation: isolate; background: var(--surface); box-shadow: var(--card-shadow); transition: transform .25s var(--ease); }
a.tile:hover { transform: translateY(-3px); }
.tile h3 { font-size: 22px; font-weight: 700; letter-spacing: -.035em; }
.tile p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--porto-ink); display: flex; align-items: center; gap: 6px; }
.tile-porto { background: radial-gradient(130% 130% at 0% 0%, #FF8A50, #FF6624 45%, #C9400C); color: #fff; }
.tile-porto p, .tile-porto .eyebrow { color: rgba(255,255,255,.9); }
.tile-dark { background: linear-gradient(160deg, #2C2C2E, #0B0B0C); color: #fff; }
.tile-dark p { color: #A1A1A6; } .tile-dark .eyebrow { color: #FF8A55; }
.symbol-bg { position: absolute; z-index: -1; right: -24px; bottom: -30px; width: 160px; height: 160px; background: currentColor; opacity: .1; -webkit-mask: var(--sym) center/contain no-repeat; mask: var(--sym) center/contain no-repeat; }
.tile .btn-glass { align-self: flex-start; }
.verse { font-size: 22px; line-height: 1.32; font-weight: 600; letter-spacing: -.028em; margin: 8px 0 6px; }
.verse-ref { font-size: 13.5px; font-weight: 600; color: var(--porto-ink); }
.tile-porto .verse-ref, .tile-dark .verse-ref { color: inherit; opacity: .85; }
.prose { font-size: 17px; line-height: 1.65; color: var(--ink-2); letter-spacing: -.01em; }
.prose p { margin: 0 0 1em; }
.prose h3 { font-size: 21px; margin: 1.4em 0 .5em; color: var(--ink); letter-spacing: -.03em; }
.prose ol, .prose ul { padding-left: 1.2em; } .prose li { margin-bottom: .4em; }
.reader { max-width: 760px; margin: 0 auto; }
.reader-head { text-align: center; padding: 10px 0 26px; }
.reader-head h1 { font-size: clamp(32px, 4.6vw, 50px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; }
.reader-head p { color: var(--muted); margin-top: 10px; font-size: 16px; }
.quote { border-radius: var(--r-lg); padding: 24px 26px; background: var(--porto-soft); margin: 0 0 24px; }
.quote .verse { margin: 0 0 8px; color: var(--ink); }
.points { counter-reset: p; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.points li { counter-increment: p; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 18px; background: var(--fill-2); font-size: 16px; line-height: 1.5; }
.points li::before { content: counter(p); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--porto); color: #fff; font-weight: 700; font-size: 14px; }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--card-shadow); margin-bottom: 22px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Comunhão */
.composer { display: flex; gap: 12px; align-items: flex-start; }
.composer textarea { flex: 1; min-height: 52px; border-radius: 22px; resize: none; transition: min-height .25s var(--ease); }
.composer textarea:focus { min-height: 110px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: var(--pill); background: var(--fill); font-size: 13px; font-weight: 600; cursor: pointer; border: 0; color: var(--ink-2); text-decoration: none; transition: background .15s; }
.chip.on, .chip:has(input:checked) { background: var(--ink); color: var(--bg); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.post { padding: 18px 0; border-top: 1px solid var(--line-2); }
.post:first-child { border-top: 0; padding-top: 4px; }
.post-h { display: flex; gap: 11px; align-items: center; }
.post-h > div { flex: 1; min-width: 0; }
.post-h b { font-weight: 600; }
.post-h small { display: block; color: var(--muted); font-size: 12.5px; }
.post-body { margin: 10px 0 0 53px; font-size: 15.5px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.post-photo { margin: 12px 0 0 53px; border-radius: 18px; overflow: hidden; max-width: 520px; }
.post-photo img { width: 100%; height: auto; }
.post-actions { display: flex; gap: 6px; margin: 12px 0 0 53px; flex-wrap: wrap; align-items: center; }
.react { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--pill); background: var(--fill-2); border: 0; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: transform .15s var(--ease), background .15s; }
.react:active { transform: scale(.9); }
.react.on { background: var(--porto-soft); color: var(--porto-ink); }
.react .em { font-size: 15px; line-height: 1; }
.comments { margin: 12px 0 0 53px; display: grid; gap: 8px; }
.comment { display: flex; gap: 9px; align-items: flex-start; }
.comment-b { background: var(--fill-2); border-radius: 18px; padding: 8px 13px; font-size: 14px; }
.comment-b b { font-size: 13px; display: block; }
.comment-form { display: flex; gap: 8px; margin-top: 4px; }
.comment-form input { flex: 1; border-radius: var(--pill); min-height: 38px; padding: 8px 14px; border: 0; background: var(--fill-2); }
.kind-tag { font-size: 12px; font-weight: 600; color: var(--porto-ink); }

/* Trilha de crescimento */
.trail { display: grid; grid-template-columns: repeat(6, 1fr); position: relative; margin: 10px 0 4px; }
.trail::before { content: ""; position: absolute; left: 8.3%; right: 8.3%; top: 21px; height: 4px; border-radius: 4px; background: var(--fill); }
.trail-fill { position: absolute; left: 8.3%; top: 21px; height: 4px; border-radius: 4px; background: var(--porto); }
.trail-step { position: relative; text-align: center; padding: 0 4px; }
.trail-dot { width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: 0 0 0 4px var(--surface), inset 0 0 0 2px var(--fill); color: var(--faint); }
.trail-step.done .trail-dot { background: var(--porto); color: #fff; box-shadow: 0 0 0 4px var(--surface), 0 8px 18px -6px rgba(255,102,36,.6); }
.trail-step.next .trail-dot { box-shadow: 0 0 0 4px var(--surface), inset 0 0 0 2px var(--porto); color: var(--porto); }
.trail-step b { display: block; font-size: 13px; font-weight: 600; }
.trail-step small { font-size: 12px; color: var(--muted); }
.progress-row { display: flex; align-items: center; gap: 12px; }
.progress-row .meter { flex: 1; }
.streak { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--pill); background: var(--porto-soft); color: var(--porto-ink); font-weight: 700; font-size: 13.5px; }
.tile-porto .streak, .tile-dark .streak { background: rgba(255,255,255,.18); color: #fff; }
.week-dots { display: flex; gap: 6px; }
.week-dots span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; background: var(--fill-2); color: var(--muted); }
.week-dots span.on { background: var(--porto); color: #fff; }
.week-dots span.today { box-shadow: inset 0 0 0 2px var(--porto); }
.lesson { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 16px; text-decoration: none; transition: background .15s; }
.lesson:hover { background: var(--fill-2); }
.lesson > div { flex: 1; min-width: 0; }
.lesson b { display: block; font-weight: 600; }
.lesson small { color: var(--muted); font-size: 13px; }
.lesson-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--fill); flex: none; }
.lesson.done .lesson-n { background: var(--porto); color: #fff; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.dir-card { text-align: center; padding: 22px 16px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--card-shadow); }
.dir-card .av { margin: 0 auto 10px; }
.dir-card b { display: block; font-size: 15px; }
.dir-card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.dir-card .row-btns { justify-content: center; margin-top: 12px; }

/* ==========================================================================
   Site público
   ========================================================================== */
body.site { background: var(--bg); }
.s-nav { position: fixed; z-index: 50; top: 12px; left: 0; right: 0; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.s-nav-in { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 22px; width: min(1100px, 100%); padding: 8px 8px 8px 22px; border-radius: var(--pill); }
.s-nav .logo { height: 24px; }
.s-nav nav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; font-weight: 500; }
.s-nav nav a { text-decoration: none; color: var(--ink-2); }
.s-nav nav a:hover { color: var(--ink); }
.s-page { padding-top: 90px; }
.hero { position: relative; min-height: min(100vh, 900px); display: grid; place-items: center; text-align: center; padding: 150px 24px 90px; overflow: hidden; isolation: isolate; }
.hero-glow { position: absolute; inset: 0; z-index: -2; background: radial-gradient(60% 50% at 50% 105%, rgba(255,102,36,.4), transparent 70%), radial-gradient(40% 40% at 12% 18%, rgba(255,170,120,.3), transparent 70%), radial-gradient(35% 35% at 88% 22%, rgba(255,120,60,.22), transparent 70%); }
.hero-mark { position: relative; width: 128px; height: 128px; margin: 0 auto 34px; border-radius: 36px; display: grid; place-items: center; color: var(--porto); animation: rise 1.1s var(--ease) both; }
.hero-mark .symbol { font-size: 66px; }
.hero h1 { font-size: clamp(46px, 8vw, 104px); font-weight: 700; line-height: .98; letter-spacing: -.055em; max-width: 13ch; margin: 0 auto; animation: rise 1.1s .12s var(--ease) both; }
.hero p { font-size: clamp(18px, 1.8vw, 22px); color: var(--muted); max-width: 54ch; margin: 22px auto 30px; line-height: 1.45; animation: rise 1.1s .22s var(--ease) both; }
.hero .row-btns { justify-content: center; animation: rise 1.1s .32s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } }
.hero-next { display: inline-flex; align-items: center; gap: 14px; margin-top: 46px; padding: 10px 22px 10px 10px; border-radius: var(--pill); text-align: left; animation: rise 1.1s .42s var(--ease) both; }
.hero-next .date-chip { background: var(--porto); color: #fff; border-radius: 50%; width: 52px; height: 52px; padding: 9px 0 0; } .hero-next .date-chip small { color: rgba(255,255,255,.88); }
.hero-next small { color: var(--muted); display: block; font-size: 12.5px; }
.hero-next b { font-size: 15.5px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.s-sec { padding: 100px 0; }
.s-sec h2 { font-size: clamp(38px, 5vw, 64px); font-weight: 700; line-height: 1; letter-spacing: -.05em; margin-bottom: 16px; }
.lead { font-size: 20px; color: var(--muted); max-width: 58ch; line-height: 1.45; letter-spacing: -.015em; }
.s-center { text-align: center; } .s-center .lead { margin-left: auto; margin-right: auto; }
.s-alt { background: var(--surface); }
.s-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 38px; }
.s-card { border-radius: var(--r-xl); padding: 26px; background: var(--surface); text-decoration: none; display: block; box-shadow: var(--card-shadow); transition: transform .25s var(--ease); }
.s-alt .s-card { background: var(--bg); box-shadow: none; }
a.s-card:hover { transform: translateY(-4px); }
.s-card > .ic { color: var(--porto); }
.s-card h3 { font-size: 22px; font-weight: 700; margin: 14px 0 6px; letter-spacing: -.03em; }
.s-card p { color: var(--muted); margin: 0; }
.s-times { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.s-time { padding: 14px 20px; border-radius: 22px; background: var(--surface); box-shadow: var(--card-shadow); }
.s-time b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.s-time small { color: var(--muted); }
.s-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.pillars { display: grid; gap: 14px; }
.pillar { display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--card-shadow); }
.pillar .pil-ic { grid-row: span 2; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--porto-soft); color: var(--porto); }
.pillar b { font-size: 20px; letter-spacing: -.03em; }
.pillar p { margin: 0; color: var(--muted); }
.s-foot { background: var(--surface); color: var(--muted); padding: 60px 0 44px; font-size: 14px; }
.s-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.s-foot b { color: var(--ink); display: block; margin-bottom: 8px; }
.s-foot a { color: var(--ink-2); text-decoration: none; display: block; padding: 3px 0; }
.s-foot a:hover { color: var(--porto-ink); }
.s-foot .logo { height: 34px; margin-bottom: 14px; }
.event-cover { height: 220px; border-radius: var(--r-xl); background: var(--c, var(--porto)); position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 24px; color: #fff; isolation: isolate; }
.event-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.28), transparent 50%), linear-gradient(180deg, transparent 40%, rgba(0,0,0,.28)); }
.event-cover::after { content: ""; position: absolute; z-index: -1; right: -30px; top: -20px; width: 180px; height: 180px; background: #fff; opacity: .14; -webkit-mask: var(--sym) center/contain no-repeat; mask: var(--sym) center/contain no-repeat; }
.event-cover h1, .event-cover h3 { font-weight: 700; letter-spacing: -.04em; line-height: 1.02; }
.ticket { display: grid; grid-template-columns: 1fr 170px; gap: 18px; align-items: center; border-radius: var(--r-xl); padding: 18px; background: var(--surface); box-shadow: var(--card-shadow); }
.sermon { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; text-decoration: none; transition: background .15s; }
.sermon:hover { background: var(--fill-2); }
.sermon .play { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.beam, .auth-sea, .hero-sea, .hero-lh { display: none; }

/* ---------- Impressão ---------- */
@media print {
  .side, .top-a, .tabbar, .toasts, .row-btns, .btn, form, .ambient, .s-nav { display: none !important; }
  .shell { display: block; } .page { padding: 0; } .panel { box-shadow: none; } .top { position: static; box-shadow: none; border: 0; background: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: 1fr 1fr; }
  .cols-main, .portal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .only-m { display: revert !important; }
  .tabbar.only-m { display: grid !important; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; margin: 10px; height: auto; width: min(300px, 84vw); transform: translateX(calc(-100% - 20px)); transition: transform .35s var(--ease); background: var(--glass-strong); }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.25); }
  .side.open + .scrim { display: block; }
  .top { margin: 8px 8px 0; padding: 10px 12px; top: 8px; border-radius: 20px; }
  .top h1 { font-size: 19px; }
  .top-t p { display: none; }
  .page { padding: 16px 14px 110px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .hello { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
  .hello h2 { font-size: 28px; }
  .panel { padding: 18px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .facts { grid-template-columns: 1fr; }
  .totp-setup, .pix-box, .ticket, .s-split, .s-grid, .s-foot .wrap { grid-template-columns: 1fr; }
  .totp-setup .qr-box, .pix-box .qr-box { max-width: 230px; }
  .profile-head { flex-direction: column; align-items: flex-start; }
  .toasts { top: 10px; }
  .sched-row { flex-wrap: wrap; } .sched-row .fn { width: auto; flex: 1; }
  .s-nav nav { display: none; }
  .s-sec { padding: 68px 0; }
  .hero { padding: 120px 20px 70px; min-height: 92vh; }
  .trail { grid-template-columns: repeat(3, 1fr); row-gap: 18px; } .trail::before, .trail-fill { display: none; }
  .post-body, .post-photo, .post-actions, .comments { margin-left: 0; }
  .cal-d { min-height: 62px; padding: 3px; border-radius: 10px; } .cal-e { font-size: 0; padding: 0; height: 6px; background: var(--c, var(--porto)); box-shadow: none; } .cal-culto { display: none; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px 15px; }
  .kpi-v { font-size: 24px; }
  .top-a .btn span { display: none; }
  .top-a .btn { padding: 0 12px; }
  .auth-card { padding: 28px 20px; border-radius: 28px; }
  .hello-meta div { min-width: 0; flex: 1; }
}

/* ==========================================================================
   Canais (conversa estilo Mensagens)
   ========================================================================== */
.nav-badge, .tab-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--porto); color: #fff; font: 700 11.5px/20px var(--ff); text-align: center; font-style: normal; }
.nav a.on .nav-badge { background: #fff; color: var(--porto); }
.tab-badge { position: absolute; top: 2px; left: 54%; margin: 0; height: 18px; line-height: 18px; min-width: 18px; font-size: 10.5px; }
.chat-shell { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; height: calc(100vh - 150px); min-height: 520px; }
.ch-pane { padding: 10px; overflow-y: auto; }
.ch-list { display: grid; gap: 2px; }
.ch-item { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 16px; text-decoration: none; transition: background .15s; }
.ch-item:hover { background: var(--fill-2); }
.ch-item.on { background: var(--porto-soft); }
.ch-item > div { flex: 1; min-width: 0; }
.ch-item b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-item small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-side { display: grid; justify-items: end; gap: 4px; }
.ch-side small { font-size: 11.5px; color: var(--faint); }
.ch-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--porto); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
.ch-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; background: var(--c, var(--porto)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.chat-pane { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-empty { display: grid; place-items: center; }
.chat-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.chat-h > div { min-width: 0; } .chat-h b { display: block; font-size: 16px; } .chat-h small { color: var(--muted); font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-pin { display: flex; gap: 8px; align-items: center; padding: 9px 18px; background: var(--porto-soft); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.chat-pin .ic { color: var(--porto); } .chat-pin span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 3px; background: linear-gradient(180deg, transparent, var(--fill-2)); }
.msg-day { align-self: center; margin: 14px 0 8px; padding: 4px 12px; border-radius: 999px; background: var(--fill); font-size: 12px; font-weight: 600; color: var(--muted); }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; position: relative; margin-top: 8px; }
.msg.cont { margin-top: 0; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-av { width: 34px; flex: none; }
.bubble { position: relative; padding: 8px 12px 6px; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 1px rgba(0,0,0,.06); font-size: 15px; line-height: 1.4; min-width: 60px; }
.msg:not(.cont) .bubble { border-bottom-left-radius: 6px; }
.msg.me .bubble { background: var(--porto); color: #fff; border-bottom-left-radius: 20px; }
.msg.me:not(.cont) .bubble { border-bottom-right-radius: 6px; }
.msg.me .bubble .link { color: #fff; text-decoration: underline; }
.msg-who { display: block; font-size: 12.5px; color: var(--porto-ink); margin-bottom: 1px; }
.msg-text { white-space: normal; overflow-wrap: anywhere; }
.msg-img { max-width: 260px; max-height: 320px; border-radius: 14px; margin: 2px 0 4px; object-fit: cover; }
.msg-meta { display: inline-flex; align-items: center; gap: 3px; float: right; margin: 6px 0 0 10px; font-size: 11px; opacity: .6; }
.msg-menu { position: relative; align-self: center; opacity: 0; transition: opacity .15s; }
.msg:hover .msg-menu, .msg-menu[open] { opacity: 1; }
.msg-menu summary { list-style: none; width: 28px; height: 28px; }
.msg-menu > div { position: absolute; z-index: 5; bottom: 100%; right: 0; padding: 6px; display: grid; gap: 2px; min-width: 150px; border-radius: 14px; }
.msg.me .msg-menu > div { right: auto; left: 0; }
.msg-menu button { width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.msg-menu button:hover { background: var(--fill); } .msg-menu .danger { color: var(--red); }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-2); }
.chat-compose textarea { flex: 1; resize: none; border: 0; background: var(--fill-2); border-radius: 20px; padding: 10px 14px; min-height: 40px; max-height: 140px; line-height: 1.35; outline: 0; }
.chat-compose textarea:focus { box-shadow: 0 0 0 3px var(--focus); }
.chat-compose .send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--porto); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .15s var(--ease); }
.chat-compose .send:active { transform: scale(.9); }
.chat-compose label.has-file { color: var(--porto); background: var(--porto-soft); }
.chat-ro { margin: 0; padding: 14px 18px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 13.5px; display: flex; gap: 8px; align-items: center; }

/* Programação semanal */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-col { display: grid; align-content: start; gap: 8px; }
.week-d { font-size: 13px; font-weight: 700; padding: 6px 4px; color: var(--muted); }
.week-col.today .week-d { color: var(--porto-ink); }
.week-it { padding: 12px; border-radius: 16px; background: var(--fill-2); display: grid; gap: 2px; }
.week-it b { font-size: 18px; letter-spacing: -.03em; }
.week-it span { font-weight: 600; font-size: 14px; line-height: 1.25; }
.week-it small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.week-it.culto { background: var(--porto); color: #fff; box-shadow: 0 10px 24px -14px rgba(255,102,36,.9); }
.week-it.culto small { color: rgba(255,255,255,.85); }
.week-free { color: var(--faint); padding: 4px; font-size: 13px; }

/* Atendimentos */
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { display: grid; gap: 1px; text-align: left; border: 0; background: var(--fill-2); border-radius: 14px; padding: 9px 14px; cursor: pointer; transition: background .15s, transform .15s var(--ease); }
.slot:hover { background: var(--porto-soft); } .slot:active { transform: scale(.96); }
.slot b { font-size: 12.5px; color: var(--muted); font-weight: 600; } .slot span { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }

/* Fotos */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.album { position: relative; aspect-ratio: 4/3; border-radius: var(--r-lg); overflow: hidden; display: block; box-shadow: var(--card-shadow); background: var(--fill); }
.album img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.album:hover img { transform: scale(1.04); }
.album-ph { display: grid; place-items: center; height: 100%; color: var(--porto); } .album-ph .symbol { font-size: 60px; opacity: .5; }
.album-cap { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 10px 14px; border-radius: 16px; text-decoration: none; }
.album-cap b { display: block; font-size: 15px; } .album-cap small { color: var(--muted); font-size: 12.5px; }
.masonry { columns: 4 240px; column-gap: 12px; }
.masonry figure { position: relative; margin: 0 0 12px; break-inside: avoid; border-radius: 16px; overflow: hidden; }
.masonry img { width: 100%; height: auto; }
.masonry .dl { position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.masonry .rm { position: absolute; right: 8px; top: 8px; } .masonry .rm .icon-btn { border-radius: 50%; }

/* Ao vivo */
.live-off { display: flex; gap: 22px; align-items: center; padding: 34px; border-radius: var(--r-xl); background: linear-gradient(160deg, #2C2C2E, #0B0B0C); color: #fff; }
.live-off .symbol { font-size: 80px; color: var(--porto); }
.live-off h2 { font-size: 30px; font-weight: 700; letter-spacing: -.04em; margin: 6px 0; color: #fff; }
.live-off .eyebrow { color: #FF8A55; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #FF3B30; display: inline-block; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.vid-tile { overflow: hidden; }
.vid-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16/9; background: linear-gradient(160deg, #2C2C2E, #0B0B0C); color: var(--porto); }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.vid-thumb .symbol { font-size: 44px; }
.vid-thumb i { position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.22); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

@media (min-width: 901px) { .only-d { display: revert; } }
@media (max-width: 900px) {
  .only-d { display: none !important; }
  .chat-shell { grid-template-columns: 1fr; height: calc(100vh - 200px); gap: 0; }
  .chat-shell .ch-pane:not(.only-d) { height: auto; }
  .msg { max-width: 88%; }
  .week { grid-template-columns: 1fr; } .week-col { grid-template-columns: 90px 1fr; align-items: start; } .week-col .week-it + .week-it { grid-column: 2; } .week-free { display: none; } .week-col:has(.week-free) { display: none; }
  .live-off { flex-direction: column; text-align: center; padding: 28px 20px; }
}
.chat-shell > .panel + .panel { margin-top: 0; }
.ch-pane { overflow-x: hidden; }
.ch-list { grid-template-columns: minmax(0, 1fr); }
.ch-item { min-width: 0; }
.tile > .badge { align-self: flex-start; }

/* Menu em seções recolhíveis */
.nav-sec { margin-top: 10px; }
.nav-sec > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; margin: 0 4px 2px; padding: 4px 8px; font-size: 12px; font-weight: 600; color: var(--faint); cursor: pointer; border-radius: 8px; }
.nav-sec > summary::-webkit-details-marker { display: none; }
.nav-sec > summary:hover { background: var(--fill-2); color: var(--ink-2); }
.nav-sec > summary .ic { transition: transform .2s var(--ease); }
.nav-sec:not([open]) > summary .ic { transform: rotate(-90deg); }
.nav { scrollbar-width: thin; scrollbar-color: var(--fill) transparent; mask-image: linear-gradient(#000 92%, transparent); }
.nav::-webkit-scrollbar { display: block; width: 4px; } .nav::-webkit-scrollbar-thumb { background: var(--fill); border-radius: 4px; }

/* Consentimentos */
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--fill-2); cursor: pointer; transition: background .15s, box-shadow .15s; }
.consent:hover { background: var(--fill); }
.consent:has(input:checked), .consent.on { background: var(--porto-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--porto) 40%, transparent); }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--porto); flex: none; }
.consent > span:last-child { display: grid; gap: 3px; }
.consent b { font-size: 15px; } .consent b em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 6px; }
.consent small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.consent-ic { width: 22px; height: 22px; border-radius: 50%; background: var(--porto); color: #fff; display: grid; place-items: center; flex: none; }
.consent-h { margin: 8px 0 -4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.consent-kid { display: grid; gap: 8px; padding: 12px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.consent-kid > b { padding: 2px 4px; }

/* Kids Família */
.kid-feed { display: grid; gap: 12px; }
.kid-note { display: flex; gap: 10px; align-items: flex-start; }
.kid-note > div { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 18px; background: var(--fill-2); }
.kid-note.prof > div { background: var(--porto-soft); }
.kid-note-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .kid-note-h small { color: var(--muted); font-size: 12px; margin-left: auto; }
.kid-note p { margin: 6px 0 0; font-size: 15px; }
.marcos { display: grid; gap: 6px; }
.marco { display: flex; gap: 11px; align-items: center; padding: 8px 10px; border-radius: 14px; }
.marco > div { flex: 1; min-width: 0; } .marco b { display: block; font-size: 14px; font-weight: 600; } .marco small { font-size: 12px; color: var(--muted); }
.marco-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--muted); flex: none; }
.marco.on { background: var(--porto-soft); } .marco.on .marco-ic { background: var(--porto); color: #fff; }

/* Módulos (gestão) e aniversariantes */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.mod { position: relative; display: grid; gap: 10px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--card-shadow); text-decoration: none; transition: transform .2s var(--ease); }
a.mod:hover { transform: translateY(-3px); }
.mod-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--porto-soft); color: var(--porto); }
.mod h3 { font-size: 18px; font-weight: 700; } .mod p { margin: 0; color: var(--muted); font-size: 13.5px; }
.mod-n { font-size: 28px; font-weight: 700; letter-spacing: -.04em; } .mod-n small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.bday-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bday { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--card-shadow); }
.bday > div { flex: 1; min-width: 0; } .bday b { display: block; } .bday small { color: var(--muted); font-size: 13px; }
.bday.today { background: radial-gradient(130% 130% at 0% 0%, #FF8A50, #FF6624 50%, #D9480F); color: #fff; } .bday.today small { color: rgba(255,255,255,.88); }
.bday .day { width: 46px; text-align: center; font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
/* Relatório anual e documentos */
.t.rel td, .t.rel th { padding: 7px 8px; font-size: 13px; }
.rel-h td { background: var(--fill-2); padding-top: 12px !important; }
.rel-t td { font-weight: 700; border-top: 1px solid var(--line); }
.rel-r td { font-weight: 700; font-size: 14px !important; background: var(--porto-soft); }
.doc-page { min-height: 100vh; padding: 30px 16px; display: grid; justify-items: center; gap: 16px; }
.doc-sheet { width: min(794px, 100%); background: #fff; color: #1D1D1F; padding: 64px 70px 44px; border-radius: 8px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.35); display: grid; gap: 18px; }
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 20px; border-bottom: 2px solid #FF6624; font-size: 12px; color: #6E6E73; text-align: right; }
.doc-logo { height: 46px; }
.doc-sheet h1 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; text-align: center; margin: 22px 0 8px; }
.doc-name { text-align: center; font-size: 34px; font-weight: 700; letter-spacing: -.03em; color: #D9480F; margin: 0; }
.doc-body { font-size: 17px; line-height: 1.75; text-align: justify; } .doc-body p { margin: 0 0 1em; }
.doc-date { text-align: right; margin-top: 10px; }
.doc-sign { display: grid; justify-items: center; margin: 46px auto 12px; width: 320px; } .doc-sign span { width: 100%; border-top: 1px solid #1D1D1F; margin-bottom: 8px; } .doc-sign small { color: #6E6E73; }
.doc-foot { display: flex; gap: 14px; align-items: center; padding-top: 16px; border-top: 1px solid #E5E5EA; font-size: 11px; color: #6E6E73; word-break: break-all; } .doc-qr { width: 78px; flex: none; }
.doc-page.cert .doc-sheet { width: min(1123px, 100%); padding: 56px 80px 36px; background: radial-gradient(120% 90% at 100% 0%, #FFF1EA, #fff 50%); box-shadow: inset 0 0 0 10px #fff, inset 0 0 0 12px #FF6624, 0 30px 80px -30px rgba(0,0,0,.35); text-align: center; }
.doc-page.cert .doc-body { text-align: center; font-size: 19px; max-width: 760px; margin: 0 auto; }
.doc-page.cert .doc-date { text-align: center; }
@media print { .doc-actions { display: none; } .doc-page { padding: 0; } .doc-sheet { box-shadow: none; border-radius: 0; width: 100%; } .doc-page.cert .doc-sheet { box-shadow: inset 0 0 0 10px #fff, inset 0 0 0 12px #FF6624; } @page { margin: 12mm; } }
@media (max-width: 700px) { .doc-sheet { padding: 32px 22px; } .doc-head { flex-direction: column; text-align: center; } }

.top .bell { position: relative; }
.top .bell .tab-badge { top: 1px; left: 58%; }
