/* =====================================================================
   Cerimônias · A Cura da Natureza — Design System
   Base visual: template Ombe (Framework7) adaptado à identidade do Instituto
   ===================================================================== */

:root {
  /* Marca */
  --forest-900: #0E2A1F;
  --forest-800: #12382A;
  --brand: #04764E;
  --brand-strong: #035E3E;
  --brand-soft: #EBF6F0;
  --gold: #C9A23A;
  --gold-strong: #8A6B1A;
  --sand: #F6DBB3;
  --sand-soft: #FBF1E2;

  /* Superfícies e texto */
  --bg: #F7F5EF;
  --surface: #FFFFFF;
  --surface-2: #F2EFE8;
  --border: #ECE8DF;
  --text: #1B1B1B;
  --text-2: #6B6B6B;
  --text-3: #9A9893;

  /* Estados */
  --success: #138A55;
  --success-soft: #E4F5EC;
  --warning: #B86E0B;
  --warning-soft: #FDF1DE;
  --danger: #D93A3F;
  --danger-soft: #FDECEC;
  --info: #2F64D6;
  --info-soft: #E9F0FD;

  /* Forma e profundidade */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(14, 42, 31, .05), 0 2px 10px rgba(14, 42, 31, .05);
  --shadow-2: 0 10px 30px -8px rgba(14, 42, 31, .22);
  --shadow-brand: 0 12px 24px -10px rgba(4, 118, 78, .55);

  /* Tipografia */
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --nav-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #2FB37E; --brand-strong: #4CC994; --brand-soft: #15291F;
    --gold: #D9B654; --gold-strong: #E6C76A; --sand: #3A2F1E; --sand-soft: #2A241A;
    --bg: #0F1311; --surface: #171C19; --surface-2: #202722; --border: #28302B;
    --text: #F1F2EE; --text-2: #A7AFAA; --text-3: #737C76;
    --success: #3DCB8A; --success-soft: #15291F; --warning: #F0A84A; --warning-soft: #2E2416;
    --danger: #FF6B6F; --danger-soft: #331A1B; --info: #7FA6FF; --info-soft: #18213A;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 14px 34px -10px rgba(0, 0, 0, .6);
    --shadow-brand: 0 12px 24px -12px rgba(47, 179, 126, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #2FB37E; --brand-strong: #4CC994; --brand-soft: #15291F;
  --gold: #D9B654; --gold-strong: #E6C76A; --sand: #3A2F1E; --sand-soft: #2A241A;
  --bg: #0F1311; --surface: #171C19; --surface-2: #202722; --border: #28302B;
  --text: #F1F2EE; --text-2: #A7AFAA; --text-3: #737C76;
  --success: #3DCB8A; --success-soft: #15291F; --warning: #F0A84A; --warning-soft: #2E2416;
  --danger: #FF6B6F; --danger-soft: #331A1B; --info: #7FA6FF; --info-soft: #18213A;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 14px 34px -10px rgba(0, 0, 0, .6);
  --shadow-brand: 0 12px 24px -12px rgba(47, 179, 126, .45);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text);
  background: var(--forest-900);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { color: var(--text); font-weight: 600; line-height: 1.25; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.xs { width: 14px; height: 14px; }
svg.i.lg { width: 24px; height: 24px; }
svg.i.xl { width: 32px; height: 32px; }
[v-cloak] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { overflow-wrap: anywhere; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.serif { font-family: var(--font-display); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.mt-s { margin-top: 8px; } .mt { margin-top: 14px; } .mt-l { margin-top: 22px; }

/* ---------- Splash (antes do Vue montar) ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(120% 70% at 50% 0%, #1B4A37 0%, var(--forest-900) 60%);
  color: #F6F1E4; transition: opacity .4s ease;
}
.splash img { width: 84px; height: 84px; border-radius: 24px; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .5); animation: breathe 2.4s ease-in-out infinite; }
.splash p { font-family: var(--font-display); font-size: 20px; letter-spacing: .02em; }
.splash.hide { opacity: 0; pointer-events: none; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ---------- Shell ---------- */
#app { height: 100%; }
.shell {
  position: relative; height: 100%; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; overflow: hidden; background: var(--bg);
  transition: max-width .3s var(--ease-out);
}
.shell.wide { max-width: 1040px; }
@media (min-width: 560px) {
  body { background: radial-gradient(90% 60% at 50% 0%, #1B4A37 0%, var(--forest-900) 70%); }
  .shell { box-shadow: 0 0 80px rgba(0, 0, 0, .35); }
}
.scroller {
  flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.page { padding: 16px 20px calc(var(--nav-h) + var(--safe-bottom) + 28px); animation: page-in .35s var(--ease-out); }
.page.no-nav { padding-bottom: calc(var(--safe-bottom) + 28px); }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-top) + 10px) 16px 10px; min-height: 60px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.appbar.scrolled { border-bottom-color: var(--border); }
.appbar .title { flex: 1; min-width: 0; text-align: center; }
.appbar .title h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .title p { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: transform .12s, background-color .15s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.ghost { background: transparent; border-color: transparent; }
.icon-btn.spacer { visibility: hidden; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Home top-bar (estilo Ombe: saudação + avatar) */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: calc(var(--safe-top) + 10px); margin-bottom: 18px; }
.topbar .hello { font-size: 13px; color: var(--text-2); }
.topbar h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.avatar {
  width: 46px; height: 46px; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-weight: 600; font-size: 16px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--forest-800)); position: relative;
}
.avatar.sm { width: 36px; height: 36px; font-size: 13px; border-radius: 12px; }
.avatar.xs { width: 32px; height: 32px; font-size: 12px; border-radius: 10px; }
.avatar.xl { width: 72px; height: 72px; font-size: 26px; border-radius: 22px; }
.avatar .dot { position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2px solid var(--bg); }

/* ---------- Títulos de seção (title-bar Ombe) ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; }
.section-title h2 { font-size: 16px; font-weight: 600; }
.section-title .link { font-size: 13px; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: 2px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: 18px; }
.card.flat { box-shadow: none; }
.card.tap { transition: transform .15s var(--ease-out); cursor: pointer; }
.card.tap:active { transform: scale(.985); }

/* Hero (card-overlay style-1 do Ombe) */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 22px; color: #F6F1E4;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(201, 162, 58, .28) 0%, rgba(201, 162, 58, 0) 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(60, 196, 138, .22) 0%, rgba(60, 196, 138, 0) 60%),
    linear-gradient(160deg, #0A5A3C 0%, var(--forest-900) 100%);
  box-shadow: var(--shadow-2);
}
.hero::after {
  content: ""; position: absolute; right: -50px; top: -60px; width: 190px; height: 190px; opacity: .07; z-index: 0; pointer-events: none;
  background: url("../icons/logo.svg") center/contain no-repeat; filter: grayscale(1) brightness(3);
}
.hero > * { position: relative; z-index: 1; }
.hero h2, .hero h3 { color: #fff; }
.hero .muted { color: rgba(246, 241, 228, .72); }
.hero-title { font-family: var(--font-display); font-size: 25px; font-weight: 700; line-height: 1.15; margin-top: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: rgba(246, 241, 228, .82); }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero .countdown { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); font-size: 12px; font-weight: 600; }
.hero .countdown b { font-size: 16px; color: #F6DBB3; }
.hero .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.hero .meter-track { background: rgba(255, 255, 255, .14); }
.hero .meter-label { color: rgba(246, 241, 228, .8); }
.hero .meter-label b { color: #fff; }

/* Carrossel horizontal (swiper Ombe) */
.carousel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 4px 20px 12px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: center; flex: 0 0 86%; }
.carousel > *:only-child { flex-basis: 100%; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.dots i { width: 6px; height: 6px; border-radius: 6px; background: var(--border); transition: all .25s; }
.dots i.on { width: 18px; background: var(--brand); }

/* Bloco de data (icon-bx das categorias Ombe) */
.date-tile {
  width: 56px; flex-shrink: 0; border-radius: var(--r-md); text-align: center; padding: 8px 0 7px;
  background: var(--brand-soft); color: var(--brand); line-height: 1.05;
}
.date-tile b { display: block; font-size: 21px; font-weight: 700; }
.date-tile small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.hero .date-tile { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .14); }

/* Linha de cerimônia (categories-bx) */
.event-row { display: flex; gap: 14px; align-items: center; }
.event-row h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.2; }
.event-row .sub { font-size: 12.5px; color: var(--text-2); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Medidores ---------- */
.meter-label { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.meter-label b { color: var(--text); font-weight: 600; }
.meter-track { height: 7px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.meter-fill { height: 100%; border-radius: var(--r-pill); background: var(--gold); transition: width .8s var(--ease-out); }
.meter-fill.van { background: var(--info); }
.meter-fill.full { background: var(--danger); }
.hero .meter-fill { background: linear-gradient(90deg, var(--gold), #F3D27A); }
.hero .meter-fill.van { background: linear-gradient(90deg, #7FA6FF, #B8CCFF); }

/* Anéis (detalhe) */
.rings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ring-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface-2); }
.ring { width: 58px; height: 58px; position: relative; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .bgc { stroke: var(--border); }
.ring .fgc { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease-out); }
.ring.van .fgc { stroke: var(--info); }
.ring.full .fgc { stroke: var(--danger); }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.ring-card b { font-size: 18px; font-weight: 700; display: block; line-height: 1.1; }
.ring-card small { font-size: 11.5px; color: var(--text-2); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: var(--r-md); font-size: 14px; font-weight: 600; white-space: nowrap; user-select: none;
  transition: transform .12s, box-shadow .2s, background-color .15s, opacity .15s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.block { width: 100%; }
.btn.lg { min-height: 56px; padding: 16px 24px; font-size: 15.5px; border-radius: var(--r-pill); }
.btn.sm { min-height: 36px; padding: 7px 13px; font-size: 13px; border-radius: 12px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
:root[data-theme="dark"] .btn-primary { color: #06140E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #06140E; } }
.btn-gold { background: linear-gradient(135deg, #E2C266, var(--gold)); color: #2B2108; box-shadow: 0 12px 24px -10px rgba(201, 162, 58, .7); }
.btn-light { background: var(--brand-soft); color: var(--brand); }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-whats { background: #25D366; color: #fff; }
.hero .btn-glass { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }
.loader { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* Ações rápidas */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick a, .quick button {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); font-size: 11.5px; font-weight: 500; color: var(--text); text-align: center;
  transition: transform .12s;
}
.quick a:active, .quick button:active { transform: scale(.95); }
.quick .qi { width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); }
.quick .qi.gold { background: var(--sand-soft); color: var(--gold-strong); }
.quick .qi.info { background: var(--info-soft); color: var(--info); }

/* ---------- Chips / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.3; }
.chip .pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.chip-success { background: var(--success-soft); color: var(--success); }
.chip-warning { background: var(--warning-soft); color: var(--warning); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-neutral { background: var(--surface-2); color: var(--text-2); }
.chip-gold { background: var(--sand-soft); color: var(--gold-strong); }
.hero .chip-glass { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .16); }
.count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; background: var(--forest-800); color: #fff; }
.count.soft { background: var(--surface-2); color: var(--text-2); }

/* ---------- Status pessoal ---------- */
.status-card { border-radius: var(--r-lg); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.status-card.ok { background: var(--success-soft); }
.status-card.wait { background: var(--warning-soft); }
.status-card .si { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--surface); }
.status-card.ok .si { color: var(--success); }
.status-card.wait .si { color: var(--warning); }
.status-card h4 { font-size: 15px; }
.status-card.ok h4 { color: var(--success); }
.status-card.wait h4 { color: var(--warning); }
.status-card p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

/* ---------- Segmented (tabs Ombe) ---------- */
.segmented { display: flex; padding: 4px; gap: 4px; border-radius: var(--r-md); background: var(--surface-2); }
.segmented button { flex: 1; min-height: 38px; border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .2s, color .2s, box-shadow .2s; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.segmented button .count { height: 18px; min-width: 18px; font-size: 10.5px; padding: 0 5px; }

/* ---------- Lista de participantes ---------- */
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.plist li:last-child { border-bottom: 0; }
.plist .pos { width: 22px; text-align: right; font-size: 12px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.plist .name { font-weight: 500; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.plist .resp { font-size: 11.5px; color: var(--text-3); }
.plist li.me { background: linear-gradient(90deg, var(--sand-soft), transparent); margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 12px; border-bottom-color: transparent; }
.plist li.wait .name { color: var(--text-2); }
.mini-btn { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--surface-2); color: var(--text-2); transition: transform .12s; }
.mini-btn:active { transform: scale(.9); }
.mini-btn.whats { background: #E7F8EE; color: #128C4A; }
.mini-btn.danger { background: var(--danger-soft); color: var(--danger); }
.pay { min-height: 30px; padding: 4px 10px; border-radius: 10px; font-size: 11.5px; font-weight: 700; flex-shrink: 0; }
.pay.ok { background: var(--success-soft); color: var(--success); }
.pay.no { background: var(--danger-soft); color: var(--danger); }
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.list-head h3 { font-size: 14px; }

/* Lista de menu (perfil) */
.menu { padding: 6px; }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px; border-radius: var(--r-md); text-align: left; transition: background-color .15s; }
.menu-item:active { background: var(--surface-2); }
.menu-item .mi { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--brand-soft); color: var(--brand); }
.menu-item .mi.gold { background: var(--sand-soft); color: var(--gold-strong); }
.menu-item .mi.danger { background: var(--danger-soft); color: var(--danger); }
.menu-item .mi.info { background: var(--info-soft); color: var(--info); }
.menu-item b { display: block; font-weight: 500; font-size: 14px; }
.menu-item small { display: block; font-size: 12px; color: var(--text-2); }
.menu-item > svg.i:last-child { color: var(--text-3); }

/* ---------- Formulários ---------- */
.field { display: block; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin: 0 0 6px 4px; }
.input {
  width: 100%; min-height: 52px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1.5px solid var(--border); outline: none; font-size: 16px; font-weight: 500;
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--text-3); font-weight: 400; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.input.invalid { border-color: var(--danger); }
.input:disabled { background: var(--surface-2); color: var(--text-2); }
textarea.input { min-height: 88px; resize: vertical; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input.sm { min-height: 42px; padding: 9px 12px; font-size: 14px; }
.input-icon { position: relative; }
.input-icon > svg.i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 46px; }
.hint { font-size: 12px; margin: 6px 0 0 4px; color: var(--text-2); }
.hint.err { color: var(--danger); font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border-radius: var(--r-lg); border: 1.5px solid var(--border); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--text-2); transition: all .18s; }
.choice small { font-weight: 500; font-size: 11px; color: var(--text-3); }
.choice.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.choice.on.van { border-color: var(--info); background: var(--info-soft); color: var(--info); }
.check-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); border: 1.5px solid var(--border); cursor: pointer; transition: all .18s; }
.check-row.on { border-color: var(--brand); background: var(--brand-soft); }
.check-row .box { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; color: transparent; transition: all .18s; }
.check-row.on .box { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Switch */
.switch { position: relative; width: 48px; height: 28px; border-radius: var(--r-pill); background: var(--border); transition: background-color .2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease-spring); }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(20px); }

/* ---------- Bottom nav (menubar Ombe) ---------- */
.bottom-nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: stretch;
  height: calc(var(--nav-h) + var(--safe-bottom)); padding: 0 8px var(--safe-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
  border-top: 1px solid var(--border);
}
.nav-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-3); font-size: 11px; font-weight: 500; transition: color .2s; }
.nav-item svg.i { width: 23px; height: 23px; transition: transform .25s var(--ease-spring); }
.nav-item.on { color: var(--brand); }
.nav-item.on svg.i { transform: translateY(-1px) scale(1.06); }
.nav-item::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 12px; height: 6px; border-radius: 6px 6px 0 0; background: var(--brand); transform: translateX(-50%) scaleY(0); transform-origin: bottom; transition: transform .25s var(--ease-out); }
.nav-item.on::after { transform: translateX(-50%) scaleY(1); }
.nav-item .badge-dot { position: absolute; top: 9px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--gold); border: 2px solid var(--surface); }

/* ---------- Login / boas-vindas ---------- */
.welcome { min-height: 100%; display: flex; flex-direction: column; background: radial-gradient(120% 60% at 50% 0%, #1B4A37 0%, var(--forest-900) 70%); color: #F6F1E4; }
.welcome-top { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: calc(var(--safe-top) + 40px) 28px 36px; position: relative; overflow: hidden; }
.welcome-top::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(201, 162, 58, .22); top: 50%; left: 50%; transform: translate(-50%, -50%); }
.welcome-top::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(201, 162, 58, .14); top: 50%; left: 50%; transform: translate(-50%, -50%); }
.welcome-top img { width: 92px; height: 92px; border-radius: 26px; box-shadow: 0 24px 50px -14px rgba(0, 0, 0, .6); position: relative; z-index: 1; animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.welcome-top h1 { color: #fff; font-family: var(--font-display); font-size: 31px; font-weight: 700; margin-top: 22px; position: relative; z-index: 1; line-height: 1.12; }
.welcome-top p { color: rgba(246, 241, 228, .74); margin-top: 10px; font-size: 14px; max-width: 290px; position: relative; z-index: 1; }
.welcome-sheet { background: var(--bg); color: var(--text); border-radius: 32px 32px 0 0; padding: 28px 22px calc(var(--safe-bottom) + 26px); animation: sheet-in .55s var(--ease-out); }
.welcome-sheet h2 { font-size: 20px; }
.welcome-sheet .lead { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.cpf-input { text-align: center; font-size: 22px !important; letter-spacing: .12em; font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Sheets e diálogos ---------- */
.overlay { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; }
.overlay.center { justify-content: center; align-items: center; padding: 20px; }
.backdrop { position: absolute; inset: 0; background: rgba(8, 20, 14, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet {
  position: relative; z-index: 1; background: var(--bg); border-radius: 30px 30px 0 0; max-height: 92%; overflow-y: auto;
  padding: 10px 20px calc(var(--safe-bottom) + 22px); box-shadow: var(--shadow-2); overscroll-behavior: contain;
}
.sheet .grabber { width: 42px; height: 5px; border-radius: 5px; background: var(--border); margin: 0 auto 16px; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.sheet-head h3 { font-size: 19px; }
.sheet-head p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.dialog { position: relative; z-index: 1; width: 100%; max-width: 360px; background: var(--surface); border-radius: var(--r-xl); padding: 24px 22px 20px; text-align: center; box-shadow: var(--shadow-2); }
.dialog .di { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: var(--warning-soft); color: var(--warning); }
.dialog .di.danger { background: var(--danger-soft); color: var(--danger); }
.dialog .di.brand { background: var(--brand-soft); color: var(--brand); }
.dialog h3 { font-size: 18px; }
.dialog p { font-size: 13.5px; color: var(--text-2); margin-top: 6px; }
.sheet-enter-active, .sheet-leave-active { transition: opacity .3s ease; }
.sheet-enter-active .sheet, .sheet-leave-active .sheet { transition: transform .38s var(--ease-out); }
.sheet-enter-active .dialog, .sheet-leave-active .dialog { transition: transform .3s var(--ease-spring), opacity .2s; }
.sheet-enter-from, .sheet-leave-to { opacity: 0; }
.sheet-enter-from .sheet, .sheet-leave-to .sheet { transform: translateY(100%); }
.sheet-enter-from .dialog, .sheet-leave-to .dialog { transform: scale(.9); opacity: 0; }
.summary { border-radius: var(--r-md); background: var(--surface-2); padding: 12px 14px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.summary svg.i { color: var(--brand); margin-top: 1px; }

/* ---------- Toasts e banners ---------- */
.toasts { position: absolute; top: calc(var(--safe-top) + 10px); left: 12px; right: 12px; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 420px; width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; font-size: 13.5px; font-weight: 500; background: var(--forest-900); color: #F6F1E4; box-shadow: var(--shadow-2); }
.toast.error { background: var(--danger); color: #fff; }
.toast.info { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.toast .ti { color: var(--gold); }
.toast.error .ti { color: #fff; }
.toast.info .ti { color: var(--info); }
.toast .act { margin-left: auto; font-weight: 700; color: var(--sand); padding: 4px 8px; }
.toast-enter-active { transition: all .35s var(--ease-out); }
.toast-leave-active { transition: all .25s ease; }
.toast-enter-from { opacity: 0; transform: translateY(-14px) scale(.96); }
.toast-leave-to { opacity: 0; transform: translateY(-8px); }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--sand-soft); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.banner .bi { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--gold); color: #2B2108; }
.banner b { font-size: 14px; display: block; }
.banner small { font-size: 12px; color: var(--text-2); display: block; }
.offline-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px); z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); background: var(--forest-900); color: #F6F1E4; font-size: 12.5px; font-weight: 500; box-shadow: var(--shadow-2); white-space: nowrap; }

/* ---------- Pull to refresh ---------- */
.ptr { height: 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; color: var(--brand); transition: height .25s var(--ease-out); }
.ptr.pulling { transition: none; }
.ptr .ptr-icon { width: 36px; height: 36px; margin-bottom: 6px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1); display: flex; align-items: center; justify-content: center; }

/* ---------- Estados vazios / skeleton ---------- */
.empty { text-align: center; padding: 34px 20px; }
.empty .ei { width: 68px; height: 68px; border-radius: 22px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); }
.empty h3 { font-size: 16px; }
.empty p { font-size: 13px; color: var(--text-2); margin-top: 4px; max-width: 260px; margin-left: auto; margin-right: auto; }
.skeleton { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.locked { text-align: center; padding: 22px 10px; color: var(--text-2); font-size: 13px; }
.locked .ei { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-3); }

/* ---------- Celebração ---------- */
.celebrate { position: absolute; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.celebrate .burst { position: relative; background: var(--surface); border-radius: 30px; padding: 28px 30px 24px; text-align: center; box-shadow: var(--shadow-2); animation: pop .5s var(--ease-spring); max-width: 300px; }
.celebrate .ok { width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--success-soft); color: var(--success); animation: ring 1.2s ease-out; }
.celebrate .ok.wait { background: var(--warning-soft); color: var(--warning); }
.celebrate h3 { font-size: 18px; }
.celebrate p { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.celebrate .leaf { position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; color: var(--brand); animation: leaf 1.4s var(--ease-out) forwards; opacity: 0; }
.celebrate .leaf:nth-child(odd) { color: var(--gold); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 45%, transparent); } 100% { box-shadow: 0 0 0 26px transparent; } }
@keyframes leaf { 0% { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(.6); } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)) scale(1.2); } }
.fade-enter-active, .fade-leave-active { transition: opacity .25s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* ---------- Admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.kpi b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.kpi small { font-size: 12px; color: var(--text-2); }
.kpi.accent { background: linear-gradient(150deg, #0A5A3C, var(--forest-900)); border: 0; color: #fff; }
.kpi.accent small { color: rgba(246, 241, 228, .75); }
.admin-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .admin-grid { grid-template-columns: 1fr 1fr; } }
.logs-table { width: 100%; border-collapse: collapse; }
.logs-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; text-align: left; padding: 12px; border-bottom: 1px solid var(--border); }
.logs-table td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
.logs-table tbody tr { cursor: pointer; }
.logs-table tbody tr:hover td { background: var(--surface-2); }
.only-wide { display: none; }
@media (min-width: 760px) { .only-wide { display: block; } .only-narrow { display: none; } }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.kv span:first-child { color: var(--text-2); }
.kv span:last-child { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.diff { font-size: 13px; padding: 8px 0; }
.diff s { color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
