@font-face { font-family: "Outfit"; src: url(/fonts/outfit.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(/fonts/figtree.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }

/* Paleta do modo escuro de jumassuncao.com, mais neutra: o laranja só marca o que pede ação. */
:root {
  --bg: #140f0d;
  --surface: #1c1513;
  --surface-2: #241c19;
  --ink: #f7eeea;
  --muted: #ae9a93;
  --faint: #7a6a64;
  --line: #2e2320;
  --line-2: #3d302c;
  --flame: #ff5733;
  --flame-2: #ff8e63;
  --flame-soft: rgba(255, 87, 51, .12);
  --on-flame: #1a0905;
  --ok: #8fbf9a;
  --warm: #e0b46c;
  --cold: #ff7a5c;
  --display: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --r: 18px;
  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 24px);
}
h1, h2, h3 { font-family: var(--display); letter-spacing: -.03em; margin: 0; line-height: 1.1; font-weight: 700; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: 760px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; min-height: 40px; }
.mark { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.mark em { color: var(--flame); font-style: normal; }
.kick { font-family: var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-size: .72rem; font-weight: 600; }
.page-title { font-size: clamp(1.8rem, 6vw, 2.4rem); font-weight: 800; margin: 4px 0 6px; }
.lead { color: var(--muted); margin: 0 0 24px; }

/* Tabs: barra inferior no celular, topo fixo no desktop */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabs[hidden] { display: none !important; }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--faint); font-family: var(--display); font-size: .7rem; font-weight: 500; padding: 6px 0; }
.tabs a.on { color: var(--ink); }
.tabs a.on svg { stroke: var(--flame); }
.fab {
  justify-self: center; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--flame); color: var(--on-flame); display: grid; place-items: center;
  box-shadow: 0 6px 24px rgba(255, 87, 51, .28); transition: transform .15s;
}
.fab svg { stroke-width: 2.2; width: 24px; height: 24px; }
.fab:active { transform: scale(.94); }
@media (min-width: 900px) {
  body { padding-bottom: 40px; }
  .tabs { bottom: auto; top: 0; left: 50%; right: auto; transform: translateX(-50%); width: auto; height: auto;
    display: flex; gap: 6px; padding: 10px 14px; margin-top: 14px; border: 1px solid var(--line); border-radius: 999px; }
  .tabs a { flex-direction: row; gap: 8px; font-size: .88rem; padding: 6px 12px; }
  .tabs a svg { width: 18px; height: 18px; }
  .fab { width: 38px; height: 38px; order: 9; margin-left: 6px; }
  .fab svg { width: 20px; height: 20px; }
  .wrap { padding-top: 96px; }
}

/* Cartões e listas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 10px; }
.section { margin-top: 28px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.section-h h2 { font-size: 1.05rem; font-weight: 600; }
.section-h .count { color: var(--faint); font-size: .85rem; font-family: var(--display); }
.empty { color: var(--faint); font-size: .92rem; padding: 14px 2px; }

.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; border-top: 1px solid var(--line); min-height: 64px; }
.row:first-child { border-top: 0; }
.row:active, .row:hover { background: var(--surface-2); }
.row .main { flex: 1; min-width: 0; }
.row .name { font-weight: 600; font-family: var(--display); letter-spacing: -.01em; }
.row .sub { color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .side { color: var(--faint); font-size: .8rem; text-align: right; white-space: nowrap; font-family: var(--display); }
.row .side.late { color: var(--flame-2); }

.av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-family: var(--display); font-weight: 600; font-size: .9rem; color: var(--muted); position: relative; }
.av.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.av i { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); }
.dot-ativa { background: var(--ok); } .dot-morna { background: var(--warm); } .dot-esfriando { background: var(--cold); } .dot-nova { background: var(--faint); }

.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; font-size: .78rem; color: var(--muted); font-family: var(--display); font-weight: 500; white-space: nowrap; }
.chip.flame { border-color: transparent; background: var(--flame-soft); color: var(--flame-2); }
.chip .d { width: 7px; height: 7px; border-radius: 50%; }

/* Hoje */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.stat b { display: block; font-family: var(--display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .8rem; }

/* Busca e filtros */
.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 18px; height: 18px; }
.search input { width: 100%; padding: 13px 14px 13px 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; outline: none; font-size: 16px; }
.search input:focus { border-color: var(--line-2); background: var(--surface-2); }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 0 -16px 14px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 7px 14px; font-size: .85rem; color: var(--muted); cursor: pointer; font-family: var(--display); font-weight: 500; }
.filters button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Contato */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-family: var(--display); font-size: .9rem; background: none; border: 0; padding: 8px 0; cursor: pointer; }
.back svg { width: 18px; height: 18px; }
.hero { display: flex; gap: 14px; align-items: center; margin: 4px 0 14px; }
.hero h1 { font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 800; }
.hero .sub { color: var(--muted); font-size: .95rem; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.last { background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.last .meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .82rem; font-family: var(--display); margin-bottom: 8px; }
.last p { margin: 0; white-space: pre-wrap; }
.last .next { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.last .next b { color: var(--ink); font-weight: 600; }
.fu { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fu .when { font-family: var(--display); font-weight: 600; }
.fu .when.late { color: var(--flame-2); }
.fu .quick { display: flex; gap: 6px; flex-wrap: wrap; }

.fields { display: grid; grid-template-columns: 1fr; gap: 0; }
.field { padding: 10px 0; border-top: 1px solid var(--line); }
.field:first-child { border-top: 0; padding-top: 0; }
.field dt { color: var(--faint); font-size: .76rem; font-family: var(--display); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.field dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.give-ask { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .give-ask { grid-template-columns: 1fr; } }
.give-ask .card + .card { margin-top: 0; }
.give-ask h3 { font-size: .8rem; font-family: var(--display); color: var(--faint); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; margin-bottom: 6px; }
.give-ask p { margin: 0; white-space: pre-wrap; }

.timeline { position: relative; padding-left: 20px; }
.timeline:before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.ev { position: relative; padding: 0 0 18px; }
.ev:before { content: ""; position: absolute; left: -19px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); }
.ev:first-child:before { border-color: var(--flame); background: var(--flame); }
.ev .meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-family: var(--display); font-size: .85rem; color: var(--muted); }
.ev .meta b { color: var(--ink); font-weight: 600; }
.ev p { margin: 4px 0 0; white-space: pre-wrap; }
.ev .ns { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.ev .edit { margin-left: auto; background: none; border: 0; color: var(--faint); cursor: pointer; font-size: .8rem; padding: 2px 4px; font-family: var(--display); }

/* Botões */
.btn { font-family: var(--display); background: var(--flame); color: var(--on-flame); border: 1.5px solid var(--flame); border-radius: 999px; padding: 10px 18px; font-size: .92rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: transform .12s, background .12s; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; stroke-width: 2; }
.btn.out { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.out:hover { border-color: var(--muted); }
.btn.sm { padding: 6px 12px; font-size: .82rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.danger { background: transparent; color: var(--cold); border-color: color-mix(in srgb, var(--cold) 40%, transparent); }
.btn.danger.armed { background: var(--cold); color: var(--on-flame); }
.btn.block { width: 100%; justify-content: center; padding: 13px 18px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--muted); text-decoration: none; }
.icon-btn svg { width: 18px; height: 18px; }

/* Funil */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 16px; margin: 0 -16px; padding: 0 16px 8px; }
.col { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-height: 120px; }
.col h3 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; margin-bottom: 10px; }
.opp { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; margin-bottom: 8px; cursor: pointer; }
.opp b { font-family: var(--display); font-weight: 600; display: block; }
.opp span { color: var(--muted); font-size: .84rem; }
.opp .age { display: block; color: var(--faint); font-size: .76rem; margin-top: 6px; font-family: var(--display); }
.opp .age.late { color: var(--flame-2); }

/* Formulários (sheet) */
dialog#sheet { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: 640px; width: 100%; max-height: 100dvh; margin: auto auto 0; }
dialog#sheet::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
.sheet-in { background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 10px 18px calc(18px + var(--safe-b)); max-height: 92dvh; overflow-y: auto; animation: up .22s ease-out; }
@media (min-width: 700px) { dialog#sheet { margin: auto; } .sheet-in { border-radius: 24px; border-bottom: 1px solid var(--line-2); } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.grab { width: 40px; height: 4px; background: var(--line-2); border-radius: 4px; margin: 0 auto 14px; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sheet-h h2 { font-size: 1.3rem; }
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: .78rem; color: var(--muted); font-family: var(--display); margin-bottom: 6px; letter-spacing: .02em; }
.f input, .f select, .f textarea { width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 12px; outline: none; font-size: 16px; }
.f textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--muted); }
.f select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.picks button { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 7px 13px; font-size: .86rem; color: var(--muted); cursor: pointer; font-family: var(--display); }
.picks button.on { background: var(--flame-soft); border-color: var(--flame); color: var(--ink); }
.picks button.add { border-style: dashed; }
.seg { display: flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 7px 8px; color: var(--muted); font-family: var(--display); font-size: .85rem; cursor: pointer; }
.seg button.on { background: var(--surface-2); color: var(--ink); }
.form-actions { display: flex; gap: 8px; margin-top: 6px; align-items: center; }
.form-actions .spacer { flex: 1; }
.more { color: var(--muted); background: none; border: 0; font-family: var(--display); font-size: .88rem; padding: 6px 0 14px; cursor: pointer; }
.err { color: var(--cold); font-size: .88rem; min-height: 1.2em; margin: 0 0 8px; }
.picker-list { max-height: 46dvh; overflow-y: auto; }

/* Ajustes */
.type-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.type-row:first-child { border-top: 0; }
.type-row input[type=text] { flex: 1; background: transparent; border: 0; outline: none; padding: 4px 0; font-size: 16px; }
.type-row input[type=text]:focus { border-bottom: 1px solid var(--line-2); }
.type-row.arch input[type=text] { color: var(--faint); text-decoration: line-through; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); font-family: var(--display); cursor: pointer; white-space: nowrap; }
.add-row { display: flex; gap: 8px; margin-top: 10px; }
.add-row input { flex: 1; background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 14px; outline: none; font-size: 16px; }
.export { display: grid; gap: 8px; }

/* PIN */
.pin-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; margin-top: calc(-1 * (var(--tabs-h))); }
.pin-box { width: 100%; max-width: 340px; text-align: center; }
.pin-box .mark { font-size: 1.4rem; display: block; margin-bottom: 28px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 22px 0 10px; }
.pin-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--muted); }
.pin-dots i.on { background: var(--ink); border-color: var(--ink); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.keypad button { height: 66px; border-radius: 50%; width: 66px; justify-self: center; border: 1px solid var(--line-2); background: var(--surface); font-family: var(--display); font-size: 1.5rem; cursor: pointer; }
.keypad button:active { background: var(--surface-2); }
.keypad button.txt { border: 0; background: transparent; font-size: .85rem; color: var(--muted); }

#toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-family: var(--display); font-weight: 500; font-size: .9rem; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { #toast { bottom: 28px; } }

[hidden] { display: none !important; }
