/* ============================================================
   MINISTRA+ — estilos
   Paleta: azul profundo (#2340C8) + menta (#7FD1C7) + tinta (#0E1424)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* marca */
  --brand: #2340C8;
  --brand-deep: #16256F;
  --brand-ink: #0E1424;
  --mint: #7FD1C7;
  --mint-deep: #2E8C81;
  --paper: #F4F5F7;

  /* aliases usados por todo o aplicativo */
  --navy: var(--brand-ink);
  --navy-2: #1B2338;
  --primary: var(--brand);
  --primary-dark: #1B31A3;
  --primary-soft: #EAEDFC;
  --accent: var(--mint);

  --bg: var(--paper);
  --surface: #FFFFFF;
  --surface-2: #EEF0F6;
  --line: #E4E7EF;
  --line-strong: #CDD3E0;

  --ink: #0E1424;
  --ink-soft: #46516A;
  --ink-mute: #7B8598;

  --ok: #1C8A66;
  --ok-soft: #E2F5EE;
  --warn: #A9670F;
  --warn-soft: #FCF0DC;
  --info: #2340C8;
  --info-soft: #E8ECFC;
  --danger: #C0392F;
  --danger-soft: #FCE8E6;

  --r-xl: 28px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 13px;

  --shadow-sm: 0 1px 2px rgba(14, 20, 36, .05);
  --shadow-md: 0 14px 30px -18px rgba(14, 20, 36, .35);
  --shadow-lg: 0 30px 70px -30px rgba(14, 20, 36, .5);

  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", -apple-system,
    BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --topbar-h: 84px;
  --tabbar-space: 150px;
  --ease: cubic-bezier(.22, .9, .3, 1);
  --spring: cubic-bezier(.16, 1, .3, 1);

  --topbar-bg: rgba(244, 245, 247, .97);
  --tabbar-bg: rgba(255, 255, 255, .99);
  --page-glow: rgba(35, 64, 200, .10);
  --card-glow: rgba(35, 64, 200, .06);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #05070C;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body { display: flex; justify-content: center; }

.hidden { display: none !important; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { -webkit-appearance: none; appearance: none; }
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }

/* ---------------- Estrutura ---------------- */

.device {
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  position: relative;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

@media (min-width: 700px) {
  body {
    background:
      radial-gradient(900px 520px at 20% -10%, #16256F 0%, transparent 60%),
      radial-gradient(760px 520px at 92% 8%, #2340C8 0%, transparent 55%),
      radial-gradient(900px 700px at 50% 120%, #0E1424 0%, transparent 60%),
      #05070C;
    align-items: center;
  }
  .device {
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    max-height: 940px;
    border-radius: 38px;
    box-shadow: 0 50px 110px rgba(0, 0, 0, .65), 0 0 0 10px #0B1020,
      0 0 0 11px rgba(127, 209, 199, .28);
  }
}

/* ---------------- Topbar ---------------- */

.topbar {
  flex: 0 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: var(--topbar-bg);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; min-width: 0; }

.brand-mark {
  width: 40px; height: 40px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--brand) 0%, #1A2E9E 55%, var(--brand-deep) 100%);
  box-shadow: 0 10px 22px -12px rgba(35, 64, 200, .9), inset 0 0 0 1px rgba(255, 255, 255, .16);
  flex: 0 0 auto;
  overflow: hidden;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 25% 0%, rgba(127, 209, 199, .5), transparent 70%);
  pointer-events: none;
}
.brand-mark svg { width: 20px; height: 20px; color: #fff; position: relative; z-index: 1; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1; gap: 5px; min-width: 0; }
.brand-word {
  display: flex;
  align-items: flex-start;
  gap: 1px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .13em;
  color: var(--ink);
  line-height: .9;
}
.brand-word i {
  font-style: normal;
  font-weight: 800;
  font-size: 22px;
  line-height: .62;
  color: var(--mint-deep);
  letter-spacing: 0;
}
.brand-text small {
  font-size: 8px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
  white-space: nowrap;
}

.top-actions { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 13px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--spring), background .18s ease, color .18s ease;
}
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { width: 19px; height: 19px; }
.topbar .icon-btn { color: var(--ink-soft); }
.topbar .icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.topbar .icon-btn.has-unread { color: var(--brand); background: var(--primary-soft); border-color: rgba(35, 64, 200, .18); }

.avatar-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(150deg, var(--brand), var(--mint));
  box-shadow: 0 8px 18px -10px rgba(35, 64, 200, .8);
  transition: transform .18s var(--spring);
  flex: 0 0 auto;
}
.avatar-btn:active { transform: scale(.92); }
.avatar-btn .avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  font-size: 13px;
  color: #fff;
  background: var(--brand-ink);
  box-shadow: none;
  border: 2px solid var(--surface);
}

.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .22);
  flex: 0 0 auto;
  overflow: hidden;
}
.avatar.has-photo { padding: 0; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------- View ---------------- */

.view {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px calc(var(--tabbar-space) + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  outline: none;
  background:
    radial-gradient(120% 46% at 50% -6%, var(--page-glow), transparent 62%),
    linear-gradient(180deg, transparent 0%, transparent 100%);
}

/* Entrada suave: só transform (se a animação for interrompida, o
   conteúdo continua visível — sem "buracos" na tela). A animação fica
   só no contêiner: animar cada cartão custava caro em celular fraco. */
.view.view-in { animation: viewIn .3s var(--ease) both; }

/* Atualização em segundo plano: não anima nem pisca. */
.view.no-anim { animation: none !important; }

@keyframes viewIn {
  from { opacity: 0; transform: translate3d(var(--slide-x, 24px), 12px, 0) scale(.992); }
  to { opacity: 1; transform: none; }
}

.screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 2px 20px;
}
.screen-head > div { min-width: 0; }
.screen-head > div::before {
  content: "MINISTRA+";
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .26em;
  color: var(--brand);
  margin-bottom: 7px;
}
.view[data-tab="escala"] .screen-head > div::before { content: "AGENDA DO MINISTÉRIO"; }
.view[data-tab="setlist"] .screen-head > div::before { content: "REPERTÓRIO DO DIA"; }
.view[data-tab="repertorio"] .screen-head > div::before { content: "MINHAS MÚSICAS"; }
.view[data-tab="grupos"] .screen-head > div::before { content: "EQUIPES"; }
.view[data-tab="musicas"] .screen-head > div::before { content: "BIBLIOTECA"; }
.view[data-tab="chat"] .screen-head > div::before { content: "CONVERSAS"; }
.view[data-tab="estudar"] .screen-head > div::before { content: "ESTUDOS"; }
.view[data-tab="equipe"] .screen-head > div::before { content: "PESSOAS"; }
.view[data-tab="membros"] .screen-head > div::before { content: "CLASSIFICAÇÃO"; }
.view[data-tab="relatorio"] .screen-head > div::before { content: "RELATÓRIO"; }
.view[data-tab="perfil"] .screen-head > div::before { content: "MINHA CONTA"; }

.screen-head h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.06;
  color: var(--ink);
}
.screen-head p {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 7px;
  line-height: 1.45;
  max-width: 34ch;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 26px 2px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------------- Hero (próximo encontro) ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 88% -20%, rgba(127, 209, 199, .30), transparent 58%),
    linear-gradient(145deg, #2340C8 0%, #1A2E9E 45%, #0E1424 100%);
  box-shadow: 0 28px 50px -26px rgba(35, 64, 200, .75), inset 0 0 0 1px rgba(255, 255, 255, .08);
  margin-bottom: 18px;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  right: -90px; top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 209, 199, .55), transparent 62%);
  filter: blur(6px);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .09) 45%, transparent 60%),
    radial-gradient(120% 150% at 90% -30%, rgba(127, 209, 199, .16), transparent 60%);
  pointer-events: none;
}

.hero-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--mint);
  margin-bottom: 14px;
}
.hero-label::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(127, 209, 199, .18);
  animation: livePulse 2.4s ease-in-out infinite;
}
@keyframes livePulse { 50% { opacity: .4; } }

.hero-row { position: relative; display: flex; gap: 14px; align-items: center; z-index: 1; }

.hero-date {
  flex: 0 0 auto;
  width: 72px;
  text-align: center;
  padding: 12px 0 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
.hero-date b { display: block; font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.hero-date small { display: block; font-size: 9.5px; letter-spacing: .2em; margin-top: 6px; color: var(--mint); font-weight: 800; }
.hero-info { min-width: 0; }
.hero-info h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.hero-info .hero-sub { font-size: 12.5px; color: rgba(255, 255, 255, .7); margin-top: 4px; }

.hero-groups { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.hero-groups .chip {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border-color: rgba(255, 255, 255, .16);
}
.hero-groups .chip b { color: #fff; }

.hero-empty { position: relative; font-size: 13px; color: rgba(255, 255, 255, .74); }

/* ---------------- Navegação de mês ---------------- */

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.month-nav button {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.month-nav button:active { background: var(--primary-soft); color: var(--primary); }
.month-nav button svg { width: 18px; height: 18px; }
.month-nav .label {
  flex: 1 1 auto;
  width: auto; height: auto;
  min-width: 0;
  padding: 4px 2px;
  background: transparent;
  border: 0;
  border-radius: 12px;
  text-align: center;
  line-height: 1.1;
}
.month-nav .label:active { background: var(--primary-soft); }
.month-nav .label b {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
}
.month-nav .label small {
  display: block;
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 3px;
}

/* ---------------- Cards de escala ---------------- */

.scale-list { display: flex; flex-direction: column; gap: 12px; }

.scale-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}
.scale-card.today { border-color: rgba(139, 90, 60, .5); box-shadow: 0 0 0 3px rgba(139, 90, 60, .12); }

.scale-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px dashed var(--line);
  background: linear-gradient(180deg, #FCFCFF, #FFF);
}

.date-block {
  flex: 0 0 auto;
  width: 52px;
  text-align: center;
  border-radius: 14px;
  padding: 7px 0 6px;
  background: var(--navy);
  color: #fff;
}
.date-block b { display: block; font-size: 20px; line-height: 1; }
.date-block small { display: block; font-size: 9.5px; letter-spacing: .12em; color: #F3D188; font-weight: 700; margin-top: 4px; }

.scale-head-info { flex: 1 1 auto; min-width: 0; }
.scale-head-info h3 { font-size: 14.5px; font-weight: 600; }
.scale-head-info .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip b { font-weight: 800; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }

.chip-md { font-size: 11.5px; padding: 5px 11px; }
.chip-ghost { background: transparent; border-color: var(--line-strong); }

.inst-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.inst {
  background: #fff;
  padding: 9px 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.inst:last-child:nth-child(odd) { grid-column: 1 / -1; }
.inst span {
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
}
.inst strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inst.empty strong { color: #C7B3A3; font-weight: 500; font-style: italic; }

.scale-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.scale-note { font-size: 11.5px; color: var(--ink-soft); font-style: italic; }
.scale-actions { display: flex; gap: 6px; margin-left: auto; }
.scale-restricted {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-mute);
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.scale-restricted svg { width: 14px; height: 14px; flex: 0 0 auto; }

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line-strong);
}
.mini-btn svg { width: 14px; height: 14px; }
.mini-btn:active { transform: scale(.96); }

.today-tag {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 9px;
  letter-spacing: .12em;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
}

/* ---------------- Músicas ---------------- */

.filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 4px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: all .16s ease;
}
.filter-chip b { font-weight: 800; margin-left: 4px; opacity: .6; }
.filter-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 6px 14px rgba(62, 35, 22, .22);
}
.filter-chip.active b { opacity: .7; }

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 13px;
  height: 44px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.search-box svg { width: 17px; height: 17px; color: var(--ink-mute); flex: 0 0 auto; }
.search-box input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; min-width: 0; }
.search-box input::placeholder { color: #C3AE9E; }

.song-list { display: flex; flex-direction: column; gap: 11px; }

.song-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 15px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.song-top { display: flex; align-items: flex-start; gap: 10px; }
.song-title-wrap { min-width: 0; flex: 1; }
.song-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.song-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--ink-mute);
}
.song-meta .key-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--navy);
  color: #F3D188;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: .04em;
}

.pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.st-em_andamento { background: var(--warn-soft); color: var(--warn); }
.st-pronta_ensaio { background: var(--info-soft); color: var(--info); }
.st-aprovada { background: var(--ok-soft); color: var(--ok); }
.st-reprovada { background: var(--danger-soft); color: var(--danger); }

.song-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
  background: var(--surface-2);
  border-left: 3px solid var(--line-strong);
  padding: 8px 10px;
  border-radius: 0 8px 8px 0;
}

.song-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 9px;
  background: var(--primary-soft);
}
.song-link svg { width: 14px; height: 14px; }

.song-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform .14s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 14px rgba(139, 90, 60, .3); }
.btn-ok { background: var(--ok); color: #fff; box-shadow: 0 6px 14px rgba(14, 159, 110, .24); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink-soft); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-block { width: 100%; padding: 14px; font-size: 14px; border-radius: 14px; }
.btn:disabled { opacity: .5; }

.timeline {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 11px;
}
.timeline i {
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  font-style: normal;
}
.timeline i.on { background: var(--primary); }
.timeline i.ok { background: var(--ok); }
.timeline i.no { background: var(--danger); }

/* ---------------- Pessoas / grupos ---------------- */

.group-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.group-card.mine {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-md);
}
.my-group-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
}
.group-badge {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .02em;
  flex: 0 0 auto;
}
.group-head .gh-info { flex: 1; min-width: 0; }
.group-head h3 { font-size: 14.5px; font-weight: 600; }
.group-head p { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }

.member-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 15px 14px; }
.member {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 5px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-soft);
}
.member .mini-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 8.5px;
  font-weight: 800;
  background: var(--line);
  color: var(--ink-soft);
}
.member.leader { border-color: rgba(217, 166, 46, .5); background: #FDF7E7; color: #7A5B07; }
.member.leader .mini-avatar { background: #F3D188; color: #6B4E05; }

.person-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  margin-bottom: 8px;
  text-align: left;
  width: 100%;
}
.person-row:active { background: var(--surface-2); }
.person-avatar {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 12.5px;
  flex: 0 0 auto;
}
.person-avatar.has-photo, .mini-avatar.has-photo { overflow: hidden; padding: 0; }
.person-avatar.has-photo img, .mini-avatar.has-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.person-info { flex: 1; min-width: 0; }
.person-info strong { display: block; font-size: 13.5px; font-weight: 600; }
.person-info small { display: block; font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.person-tags { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }

.role-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--line);
  color: var(--ink-soft);
}
.role-admin { background: var(--navy); color: #F3D188; }
.role-leader { background: #FDF7E7; color: #8A6A00; }

/* ---------------- Classificação de membros ---------------- */
.kind-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 2px;
  scrollbar-width: none;
}
.kind-filters::-webkit-scrollbar { display: none; }
.kind-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}
.kind-chip b { font-size: 10px; font-weight: 800; opacity: .6; }
.kind-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.kind-chip.active b { opacity: .9; }

.kind-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.kind-musician { background: #E4EEE8; color: #2F6B5B; }
.kind-singer { background: #F7E3D4; color: #A0522D; }
.kind-both { background: #EDE1E7; color: #7A4459; }

.empty {
  text-align: center;
  padding: 34px 18px;
  color: var(--ink-mute);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.empty svg { width: 34px; height: 34px; margin-bottom: 10px; opacity: .35; }
.empty strong { display: block; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 4px; }
.empty p { font-size: 12px; line-height: 1.5; }

/* ---------------- Perfil ---------------- */

.profile-card {
  background: linear-gradient(150deg, #5A3520, #341D11 60%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 14px 30px rgba(62, 35, 22, .3);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.profile-card::after {
  content: "";
  position: absolute;
  width: 180px; height: 180px;
  right: -60px; bottom: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 65, .42), transparent 65%);
}
.profile-avatar {
  width: 58px; height: 58px;
  border-radius: 18px;
  display: grid; place-items: center;
  font-size: 19px;
  font-weight: 800;
  background: linear-gradient(145deg, #F1CE8A, #D9A441);
  color: #2B1A0E;
  flex: 0 0 auto;
}
.profile-card h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.profile-card p { font-size: 12px; color: rgba(255, 255, 255, .66); margin-top: 3px; }

.menu-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item:active { background: var(--surface-2); }
.menu-item .mi-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  flex: 0 0 auto;
}
.menu-item .mi-icon svg { width: 17px; height: 17px; }
.menu-item .mi-text { flex: 1; }
.menu-item .mi-text small { display: block; font-size: 11px; color: var(--ink-mute); font-weight: 400; margin-top: 2px; }
.menu-item .chev { color: #C7B3A3; }
.menu-item .chev svg { width: 16px; height: 16px; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .mi-icon { background: var(--danger-soft); color: var(--danger); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 20px; font-weight: 700; font-family: var(--font-display); }
.stat small { display: block; font-size: 10px; color: var(--ink-mute); margin-top: 3px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.stat-row.four { grid-template-columns: repeat(2, 1fr); }

/* ---------------- Relatório por abas ---------------- */
.report-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.report-tabs::-webkit-scrollbar { display: none; }
.report-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-mute);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.report-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.report-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.report-ring {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: conic-gradient(var(--primary) var(--p, 0%), var(--surface-2) 0);
  position: relative;
}
.report-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--surface);
}
.report-ring b, .report-ring small { position: relative; z-index: 1; }
.report-ring b { display: block; font-size: 17px; font-weight: 800; font-family: var(--font-display); }
.report-ring small { display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.report-hero-text { min-width: 0; }
.report-hero-text b { display: block; font-size: 14px; }
.report-hero-text span { display: block; font-size: 11.5px; color: var(--ink-mute); margin-top: 3px; }
.report-hero-text span.muted { opacity: .8; font-size: 11px; }
.report-columns {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 170px;
  padding: 10px 4px 0;
  margin-bottom: 16px;
  overflow-x: auto;
}
.report-col {
  flex: 1 0 38px;
  max-width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
}
.report-col-val { font-size: 11px; font-weight: 800; color: var(--primary-dark); }
.report-col-bar {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: var(--surface-2);
  border-radius: 8px;
  overflow: hidden;
}
.report-col-bar i {
  display: block;
  width: 100%;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--mint, #7FD1C7), var(--primary, #2340C8));
}
.report-col-label {
  font-size: 9px;
  line-height: 1.1;
  color: var(--ink-mute);
  text-align: center;
  height: 22px;
  overflow: hidden;
}

/* ---------------- Tabbar ---------------- */

.tabbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  height: 64px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 3px;
  padding: 6px;
  background: var(--tabbar-bg);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 22px 44px -22px rgba(14, 20, 36, .55), inset 0 1px 0 rgba(255, 255, 255, .7);
  z-index: 20;
  overflow: visible;
  transition: transform .32s ease, opacity .25s ease;
}
.tabbar.tabbar-hidden {
  transform: translateY(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
}

.tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 16px;
  color: var(--ink-mute);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: color .2s ease, background .25s var(--spring), transform .2s var(--spring);
  position: relative;
}
.tab svg { width: 21px; height: 21px; transition: transform .25s var(--spring); }
.tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}
.tab.active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 22px -14px rgba(14, 20, 36, .9);
}
.tab.active svg { color: var(--mint); stroke-width: 2.1; animation: tabPop .45s var(--spring); }
.tab:active { transform: scale(.94); }
.tab-more { position: relative; }
@keyframes tabPop {
  0% { transform: translateY(2px) scale(.82); }
  60% { transform: translateY(-1px) scale(1.12); }
  100% { transform: none; }
}

.fab {
  position: absolute;
  right: 18px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  width: 56px; height: 56px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #3A5AE8, var(--brand) 55%, var(--brand-deep));
  color: #fff;
  box-shadow: 0 22px 38px -16px rgba(35, 64, 200, .85), inset 0 1px 0 rgba(255, 255, 255, .28);
  z-index: 19;
  transition: transform .18s var(--spring), box-shadow .2s ease;
}
.fab::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(127, 209, 199, .55), transparent 70%);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: -1;
}
.fab:active { transform: scale(.9); }
.fab:active::before { opacity: 1; }
.fab svg { width: 25px; height: 25px; stroke-width: 2.4; }

/* ---------------- Login ---------------- */

.login {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: calc(30px + env(safe-area-inset-top)) 20px calc(26px + env(safe-area-inset-bottom));
  color: #fff;
  background:
    radial-gradient(120% 70% at 12% -10%, rgba(35, 64, 200, .55) 0%, transparent 55%),
    radial-gradient(90% 60% at 96% 8%, rgba(127, 209, 199, .22) 0%, transparent 55%),
    linear-gradient(170deg, #0E1424 0%, #0B1020 55%, #05070C 100%);
  isolation: isolate;
}

/* malha sutil de fundo */
.login::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 20%, transparent 80%);
  pointer-events: none;
  z-index: -1;
}
.login::after {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 64, 200, .5), transparent 65%);
  bottom: -170px; left: -120px;
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}

.login-inner {
  position: relative;
  z-index: 1;
  margin: auto 0;
  width: 100%;
  max-width: 392px;
  align-self: center;
  animation: loginIn .6s var(--spring) both;
}
@keyframes loginIn {
  from { opacity: 0; transform: translateY(18px) scale(.99); }
  to { opacity: 1; transform: none; }
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}
.login-mark {
  width: 52px; height: 52px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  box-shadow: 0 18px 32px -16px rgba(35, 64, 200, .95), inset 0 0 0 1px rgba(255, 255, 255, .18);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}
.login-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 25% 0%, rgba(127, 209, 199, .55), transparent 70%);
}
.login-mark svg { width: 26px; height: 26px; color: #fff; position: relative; z-index: 1; }
.login-brand-text { display: flex; flex-direction: column; gap: 5px; }
.login-brand-text strong {
  display: flex;
  align-items: flex-start;
  gap: 1px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: .9;
}
.login-brand-text strong i {
  font-style: normal;
  font-size: 27px;
  line-height: .62;
  color: var(--mint);
}
.login-brand-text small {
  font-size: 8.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  font-weight: 700;
}

.login h1 {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.035em;
  color: #fff;
}
.login .sub { font-size: 13px; color: rgba(255, 255, 255, .55); margin-top: 10px; line-height: 1.55; }

.login-card {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.lfield { display: flex; flex-direction: column; gap: 7px; }
.lfield > span { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .45); font-weight: 800; }
.lfield .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.lfield .wrap:focus-within {
  border-color: rgba(127, 209, 199, .75);
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 0 0 4px rgba(127, 209, 199, .12);
}
.lfield .wrap svg { width: 18px; height: 18px; color: rgba(255, 255, 255, .4); flex: 0 0 auto; }
.lfield input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  min-width: 0;
}
.lfield input::placeholder { color: rgba(255, 255, 255, .28); }
.eye-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: -8px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .45);
  flex: 0 0 auto;
}
.eye-btn:active { background: rgba(255, 255, 255, .1); }
.eye-btn.on { color: var(--mint); }
.eye-btn svg { width: 19px; height: 19px; }

.login .btn-primary {
  height: 54px;
  border-radius: 16px;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: .01em;
  background: linear-gradient(135deg, var(--mint) 0%, #59C3B6 100%);
  color: #07231F;
  box-shadow: 0 20px 34px -18px rgba(127, 209, 199, .85);
  margin-top: 4px;
}
.login .btn-primary:disabled { opacity: .7; }

.server-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, .45);
}
.server-line .dot { width: 7px; height: 7px; border-radius: 50%; background: #F0B36A; flex: 0 0 auto; }
.server-line .dot.ok { background: #59D3A6; box-shadow: 0 0 0 4px rgba(89, 211, 166, .14); }
.server-line .dot.err { background: #F08080; }

.server-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.server-link b { color: var(--mint); font-weight: 700; }
.server-link .dot { width: 7px; height: 7px; border-radius: 50%; background: #C9A227; flex: 0 0 auto; }
.server-link .dot.ok { background: #4ADE80; }
.server-link .dot.err { background: #F87171; }

.login-error {
  display: none;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #FFD2CF;
  background: rgba(192, 57, 47, .22);
  border: 1px solid rgba(240, 128, 128, .35);
  padding: 10px 12px;
  border-radius: 12px;
}
.login-error.show { display: flex; }
.login-error svg { width: 15px; height: 15px; flex: 0 0 auto; }

.remember-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
  user-select: none;
}
.remember-row input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: auto;
  width: 18px; height: 18px;
  accent-color: var(--mint);
  cursor: pointer;
  flex: 0 0 auto;
  margin: 0;
}

.login-features {
  display: flex;
  gap: 7px;
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.login-feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .6);
}
.login-feature svg { width: 13px; height: 13px; color: var(--mint); }

.login-hint {
  margin-top: 18px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .5);
  text-align: center;
  line-height: 1.6;
  background: rgba(255, 255, 255, .05);
  border: 1px dashed rgba(255, 255, 255, .14);
  border-radius: 14px;
  padding: 11px 12px;
}
.login-hint b { color: rgba(255, 255, 255, .85); font-weight: 600; }

.login-foot {
  margin-top: auto;
  padding-top: 28px;
  text-align: center;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .26);
}
.login-foot .login-credit {
  display: block;
  margin-top: 8px;
  font-size: 9px;
  letter-spacing: .14em;
  color: rgba(127, 209, 199, .55);
}

/* ---------------- Sheet ---------------- */

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 12, .62);
  opacity: 0;
  transition: opacity .28s ease;
}
.sheet-wrap.is-open .sheet-backdrop { opacity: 1; }

.sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  max-height: 92dvh;
  background: var(--surface);
  border-radius: 30px 30px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .42s var(--spring);
  box-shadow: 0 -30px 70px rgba(0, 0, 0, .4);
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.sheet-wrap.is-open .sheet { transform: translateY(0); }

@media (min-width: 700px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 30px; max-height: 86vh; max-height: 86dvh; transform: translateY(26px) scale(.97); opacity: 0; transition: transform .3s var(--spring), opacity .26s ease; }
  .sheet-wrap.is-open .sheet { transform: none; opacity: 1; }
}

/* Conversa em tela cheia (chat) */
.sheet-wrap.full { align-items: stretch; justify-content: stretch; }
.sheet-wrap.full .sheet-backdrop { background: rgba(6, 10, 20, .55); backdrop-filter: blur(2px); }
.sheet-wrap.full .sheet {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  border-top: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  opacity: 1;
}
.sheet-wrap.full.is-open .sheet { transform: translateY(0); }
.sheet-wrap.full .sheet-grip { display: none; }
.sheet-wrap.full .sheet-head {
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.sheet-wrap.full .sheet-head h2 { font-size: 19px; }
.sheet-wrap.full .sheet-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.sheet-wrap.full .chat-sheet {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin: 0;
}
.sheet-wrap.full .chat-messages { flex: 1; min-height: 0; padding: 14px 16px 6px; }
.sheet-wrap.full .chat-form {
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
}

.sheet-grip {
  width: 40px; height: 4px;
  border-radius: 99px;
  background: var(--line-strong);
  margin: 10px auto 0;
  flex: 0 0 auto;
}

.sheet-head {
  padding: 14px 20px 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 0 0 auto;
}
.sheet-head h2 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.03em;
  flex: 1;
  line-height: 1.1;
}
.sheet-head p { font-size: 12.5px; color: var(--ink-mute); margin-top: 5px; line-height: 1.4; }
.sheet-head .icon-btn {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-soft);
  width: 34px; height: 34px;
  border-radius: 12px;
  flex: 0 0 auto;
  box-shadow: none;
}

.sheet-body {
  padding: 4px 20px 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}

.sheet-foot {
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  gap: 9px;
  flex: 0 0 auto;
}
.sheet-foot .btn { flex: 1; padding: 13px; font-size: 13.5px; border-radius: 14px; }

/* ---------------- Formulários ---------------- */

.form-grid { display: flex; flex-direction: column; gap: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--ink-soft); text-transform: uppercase; }
.field > span b { color: var(--danger); }
.field em { font-size: 10.5px; color: var(--ink-mute); font-style: normal; }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 13px;
  font-size: 14px;
  outline: 0;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  min-width: 0;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(139, 90, 60, .14);
}
.textarea { min-height: 78px; resize: vertical; line-height: 1.45; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238B8BA3' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span {
  display: block;
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 2px #fff;
  transition: transform .14s ease;
}
.swatch input:checked + span { border-color: var(--ink); transform: scale(1.06); }

.check-list { display: flex; flex-wrap: wrap; gap: 7px; }
.check-chip { position: relative; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: all .14s ease;
}
.check-chip input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.switch-row p { font-size: 13px; font-weight: 500; }
.switch-row small { display: block; font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.switch { position: relative; width: 46px; height: 27px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span {
  position: absolute; inset: 0;
  border-radius: 99px;
  background: #D5D4E4;
  transition: background .2s ease;
}
.switch span::after {
  content: "";
  position: absolute;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: transform .2s cubic-bezier(.3, 1.4, .5, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(19px); }

.form-error {
  display: none;
  font-size: 12px;
  color: var(--danger);
  background: var(--danger-soft);
  padding: 9px 12px;
  border-radius: 10px;
}
.form-error.show { display: block; }

/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  top: calc(16px + env(safe-area-inset-top));
  bottom: auto;
  transform: translate(-50%, -16px) scale(.97);
  background: var(--brand-ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .7);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .3s var(--spring);
  z-index: 200;
  max-width: min(440px, calc(100vw - 40px));
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .12);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.ok { background: #0C5B45; }
.toast.err { background: #8E231C; }

/* ---------------- Aviso instantâneo (app aberto) ---------------- */

.push-banner {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 320;
  animation: pushBannerIn .25s cubic-bezier(.22, .9, .3, 1) both;
}
.push-banner.out { opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease; }
.push-banner-icon {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}
.push-banner-icon svg { width: 18px; height: 18px; }
.push-banner-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.push-banner-text strong { font-size: 13.5px; color: var(--ink); line-height: 1.25; }
.push-banner-text small {
  font-size: 12px; color: var(--ink-soft); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.push-banner-open {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}
.push-banner-close {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 8px;
  color: var(--ink-mute);
  font-size: 18px;
  line-height: 1;
}
@keyframes pushBannerIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Puxar para atualizar ---------------- */

.pull-hint {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translate(-50%, -70px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--navy);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 310;
  pointer-events: none;
}
.pull-hint.show { opacity: 1; transform: translate(-50%, calc(var(--pull, 0px) - 70px)); }
.pull-hint svg { width: 15px; height: 15px; }

/* ---------------- Diversos ---------------- */

.divider { height: 1px; background: var(--line); margin: 16px 0; }

.info-box {
  display: flex;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 13px;
  background: var(--primary-soft);
  border: 1px solid rgba(139, 90, 60, .18);
  font-size: 12px;
  line-height: 1.5;
  color: #6E4429;
}
.info-box svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--line);
  padding: 3px 7px;
  border-radius: 6px;
}

.brand-mark svg { width: 22px; height: 22px; }
.login-error svg { width: 15px; height: 15px; flex: 0 0 auto; }
.sheet-head .icon-btn svg { width: 17px; height: 17px; }
.member-wrap .person-info { color: var(--ink-mute); }

/* ---------------- Sincronização ---------------- */

.sync-btn { position: relative; }
.sync-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #A9968A;
  border: 2px solid rgba(53, 32, 20, .9);
  box-sizing: content-box;
}
.sync-dot.ok { background: #4ADE80; }
.sync-dot.err { background: #F87171; }
.sync-dot.busy { background: #FBBF24; animation: pulse 1s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.8); }
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.sync-status .dot { width: 9px; height: 9px; border-radius: 50%; background: #A9968A; flex: 0 0 auto; }
.sync-status .dot.ok { background: var(--ok); }
.sync-status .dot.err { background: var(--danger); }
.sync-status b { color: var(--ink); }

.server-help {
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
}
.server-help code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  background: #fff;
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.server-link {
  font-family: inherit;
  cursor: pointer;
  transition: background .16s ease;
}
.server-link:active { background: rgba(255, 255, 255, .12); }
.server-link > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-line { color: var(--ink-soft); font-weight: 600; }

/* ============================================================
   v1.2 — repertório, do dia, relatório e ministrantes
   ============================================================ */

/* login: status da sincronização (sem configuração de servidor) */
.server-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.server-line .dot { width: 7px; height: 7px; border-radius: 50%; background: #C9A227; flex: 0 0 auto; }
.server-line .dot.ok { background: #4ADE80; }
.server-line .dot.err { background: #F87171; }

/* convite para enviar o repertório do dia */
.cta-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #FFF7EC, #F7E9D8);
  border: 1px solid #EBD6BF;
  box-shadow: var(--shadow-sm);
}
.cta-icon {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: #fff;
  color: var(--primary);
  flex: 0 0 auto;
  box-shadow: var(--shadow-sm);
}
.cta-icon svg { width: 20px; height: 20px; }
.cta-text { flex: 1; min-width: 0; }
.cta-text strong { display: block; font-size: 13px; }
.cta-text small { display: block; font-size: 11px; color: var(--ink-mute); margin-top: 3px; line-height: 1.4; }
.btn-sm { padding: 9px 13px; font-size: 12px; border-radius: 11px; }

/* meu repertório */
.rep-list { display: flex; flex-direction: column; gap: 9px; }
.rep-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
}
.rep-main { flex: 1; min-width: 0; }
.rep-main h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.rep-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 5px; font-size: 11.5px; color: var(--ink-mute);
}
.rep-actions { display: flex; gap: 4px; flex: 0 0 auto; }

/* músicas do repertório (do dia) */
.setlist-wrap { display: flex; flex-direction: column; gap: 14px; }
.setlist-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.setlist-head { display: flex; gap: 12px; align-items: center; padding: 15px; }
.setlist-head-info { flex: 1; min-width: 0; }
.setlist-head-info h3 { font-size: 15.5px; font-weight: 700; }
.setlist-head-info p { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.pill-day {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.setlist-songs { padding: 4px 15px 8px; }
.setlist-songs li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-top: 1px dashed var(--line);
}
.setlist-songs li:first-child { border-top: 0; }
.song-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.song-info { flex: 1; min-width: 0; }
.song-info b { display: block; font-size: 13.5px; font-weight: 700; }
.song-info small { display: block; font-size: 11px; color: var(--ink-mute); margin-top: 1px; }
.song-link-icon {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--primary);
  flex: 0 0 auto;
}
.song-link-icon svg { width: 14px; height: 14px; }
.setlist-foot {
  display: flex; gap: 6px; align-items: center;
  padding: 9px 15px 13px;
  font-size: 10.5px;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
}
.setlist-foot svg { width: 13px; height: 13px; flex: 0 0 auto; }
.setlist-empty {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 15px 15px;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
}
.setlist-empty svg { width: 16px; height: 16px; flex: 0 0 auto; }
.chip-soft {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-soft);
  font-weight: 600;
}
.chip-soft svg { width: 12px; height: 12px; }

/* relatório */
.rank-list {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px;
  box-shadow: var(--shadow-sm);
}
.rank-head {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12.5px;
}
.rank-head b {
  font-weight: 700; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-head span { font-weight: 800; color: var(--primary-dark); flex: 0 0 auto; }
.rank-row small { display: block; font-size: 10.5px; color: var(--ink-mute); margin-top: 2px; }
.rank-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-top: 6px;
  overflow: hidden;
}
.rank-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #D9A441, #8B5A3C);
  transition: width .45s cubic-bezier(.22, .9, .3, 1);
}
.rank-row.tone-warm .rank-bar i { background: linear-gradient(90deg, #D79066, #A0522D); }
.dot-inline {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.report-note {
  display: flex; gap: 7px;
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-mute);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
}
.report-note svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }
.alert-box, .ok-box {
  display: flex; gap: 8px;
  padding: 12px 13px;
  border-radius: 13px;
  font-size: 11.5px;
  line-height: 1.5;
  margin-bottom: 4px;
}
.alert-box { background: var(--warn-soft); color: #7A430C; border: 1px solid #F2D4AE; }
.ok-box { background: var(--ok-soft); color: #1E5C43; border: 1px solid #C7E3D6; }
.alert-box svg, .ok-box svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }

/* grupos: quem ministra */
.group-ministry { padding: 0 15px 14px; }
.gm-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.gm-title svg { width: 13px; height: 13px; }
.gm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}
.gm-row:first-of-type { border-top: 0; }
.gm-date { flex: 0 0 auto; min-width: 56px; }
.gm-date b { display: block; font-size: 12.5px; }
.gm-date small { display: block; font-size: 9.5px; color: var(--ink-mute); }
.gm-people { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.member.mini { padding: 3px 8px; font-size: 10.5px; gap: 4px; }
.muted { font-size: 11px; color: var(--ink-mute); font-style: italic; }
.ministers-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 10px 15px 0;
}
.mr-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-right: 2px;
}
.mr-label svg { width: 12px; height: 12px; }
.hero-ministers {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  margin-top: 9px;
  font-size: 11.5px;
  color: #F3D188;
}
.hero-ministers svg { width: 13px; height: 13px; flex: 0 0 auto; }
.hero-ministers.muted { color: #E8D3C0; opacity: .88; }

/* escolha de músicas do repertório */
.song-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 7px;
  cursor: pointer;
}
.song-pick input { width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 auto; }
.song-pick .sp-main { flex: 1; min-width: 0; }
.song-pick b { display: block; font-size: 13px; }
.song-pick small { display: block; font-size: 10.5px; color: var(--ink-mute); }
.song-pick:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

.about-logo { display: flex; justify-content: center; padding: 2px 0 8px; }
.about-logo img {
  width: 104px; height: 104px;
  border-radius: 26px;
  box-shadow: var(--shadow-md);
}

/* crédito ao criador do aplicativo */
.about-credit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(217, 164, 65, .4);
  background: linear-gradient(145deg, var(--primary-soft), var(--surface));
}
.about-credit-icon {
  width: 40px; height: 40px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
}
.about-credit-icon svg { width: 20px; height: 20px; }
.about-credit div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.about-credit b { font-size: 14px; color: var(--primary-dark); letter-spacing: .02em; }
.about-credit small { font-size: 11.5px; color: var(--ink-soft); }
html[data-theme="dark"] .about-credit {
  border-color: rgba(217, 164, 65, .3);
  background: linear-gradient(145deg, rgba(217, 164, 65, .12), var(--surface));
}

/* ============================================================
   RELATÓRIO — link de volta para o Perfil
   ============================================================ */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0 0 12px;
  padding: 7px 11px 7px 7px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.back-link:active { background: var(--primary-soft); }
.back-link svg { width: 15px; height: 15px; }

/* ============================================================
   ESTUDAR — teoria musical e biblioteca
   ============================================================ */

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
}
.seg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-mute);
}
.seg-btn svg { width: 16px; height: 16px; }
.seg-btn.active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.study-tools {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.study-tools::-webkit-scrollbar { display: none; }
.study-chip {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.study-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.study-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.study-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.study-card-head h3 { font-size: 15px; }
.study-card-head p { font-size: 11.5px; color: var(--ink-mute); margin-top: 3px; }

.study-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.study-form-3 { grid-template-columns: repeat(3, 1fr); }
.study-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  min-width: 0;
}
.study-form select,
.study-search input {
  width: 100%;
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.study-search { margin-bottom: 12px; }
.study-search input { padding-left: 2px; border: 0; background: transparent; }

.study-note {
  display: flex;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-mute);
  font-size: 11.5px;
  line-height: 1.5;
  margin-top: 12px;
}
.study-note svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
.study-note.ok-box, .study-note.alert-box { font-size: 11.5px; }
.study-loading {
  padding: 14px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 12px;
}

.degree-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.degree-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 9px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  min-width: 0;
}
.degree-card small { font-size: 9.5px; color: var(--ink-mute); font-weight: 700; }
.degree-card b { font-size: 15px; color: var(--primary-dark); }
.degree-card span { font-size: 9px; color: var(--ink-mute); }
.degree-card:active { background: var(--primary-soft); }

.scale-notes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.scale-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.scale-note b { font-size: 15px; color: var(--primary-dark); }
.scale-note small { font-size: 9px; color: var(--ink-mute); }
.scale-note:active { background: var(--primary-soft); }

.chord-result { text-align: center; padding: 6px 0; }
.chord-big { font-size: 42px; font-weight: 800; color: var(--primary-dark); font-family: var(--font-display); }
.chord-sub { font-size: 12px; color: var(--ink-mute); margin-bottom: 12px; }
.chord-notes { margin-bottom: 12px; }
.interval-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 0 10px;
}
.interval-result b { font-size: 28px; color: var(--primary-dark); }
.interval-result span { font-size: 12px; color: var(--ink-mute); }

.circle-wrap { padding: 4px 0; }
.circle-fifth {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
}
.fifth-chip {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 56px;
  padding: 7px 2px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.fifth-chip b { font-size: 14px; color: var(--primary-dark); }
.fifth-chip small { font-size: 9px; color: var(--ink-mute); }
.fifth-chip:active { background: var(--primary-soft); }
.circle-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 78px; height: 78px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.circle-center b { font-size: 18px; color: var(--primary-dark); }
.circle-center small { font-size: 9px; color: var(--ink-mute); }

.prog-list { display: flex; flex-direction: column; gap: 8px; }
.prog-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.prog-item > div:first-child { flex: 1; min-width: 0; }
.prog-item b { display: block; font-size: 12.5px; }
.prog-item small { display: block; font-size: 10px; color: var(--ink-mute); margin-top: 2px; }
.prog-chords { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.prog-chords span {
  padding: 3px 7px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary-dark);
}

.fretboard-scroll { overflow-x: auto; padding-bottom: 6px; }
.fretboard { min-width: max-content; }
.fret-string { display: flex; align-items: center; height: 36px; }
.string-name {
  width: 26px;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-mute);
}
.fret-cell {
  position: relative;
  width: 31px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 700;
  color: transparent;
  border-left: 1px solid var(--line-strong);
}
.fret-cell.on span {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid var(--primary);
}
.fret-cell.root span {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.fret-cell .nut {
  position: absolute;
  left: -2px; top: 2px; bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: var(--line-strong);
}

.metro-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 14px;
}
.metro-display b { font-size: 52px; line-height: 1; color: var(--primary-dark); font-family: var(--font-display); }
.metro-display > span { font-size: 10px; letter-spacing: .2em; color: var(--ink-mute); text-transform: uppercase; }
.metro-beats { display: flex; gap: 6px; margin-top: 10px; }
.metro-beats i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background .1s ease, transform .1s ease;
}
.metro-beats i.accent { width: 13px; height: 13px; }
.metro-beats i.on { background: var(--primary); transform: scale(1.25); }

.range {
  width: 100%;
  height: 28px;
  background: transparent;
  accent-color: var(--primary);
}
.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--surface);
  margin-top: -7px;
  box-shadow: var(--shadow-sm);
}

.study-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.study-actions .btn { flex: 1; }

.tuner-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
}
.tuner-note { font-size: 58px; font-weight: 800; line-height: 1; color: var(--primary-dark); font-family: var(--font-display); }
.tuner-cents { font-size: 12px; color: var(--ink-mute); min-height: 16px; }
.tuner-bar {
  position: relative;
  width: 100%;
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--danger), var(--line-strong) 45%, var(--line-strong) 55%, var(--danger));
}
.tuner-bar span {
  position: absolute;
  top: -5px; left: 50%;
  width: 3px; height: 16px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--primary);
  transition: left .08s linear;
}

.solfejo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.solfejo-btn {
  padding: 12px 4px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
}
.solfejo-btn:active { background: var(--primary-soft); }

.rhythm-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.rhythm-fig {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.rhythm-fig b { font-size: 24px; color: var(--primary-dark); }
.rhythm-fig span { font-size: 10px; color: var(--ink-mute); text-align: center; }
.rhythm-bar { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.rhythm-bar i {
  width: 34px; height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}
.rhythm-bar i:first-child { background: var(--primary); }

.exercise-box { background: var(--surface-2); border-radius: 14px; padding: 14px; }
.exercise-box p { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.exercise-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.exercise-btn {
  padding: 11px 8px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}
.exercise-btn:active { background: var(--primary-soft); }
.exercise-feedback { display: none; margin-top: 10px; font-size: 12px; font-weight: 700; }
.exercise-feedback.show { display: block; }
.exercise-feedback.ok { color: var(--ok); }
.exercise-feedback.err { color: var(--danger); }


.mini-btn.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.mini-btn.danger { color: var(--danger); }


html[data-theme="dark"] .degree-card,
html[data-theme="dark"] .scale-note,
html[data-theme="dark"] .fifth-chip,
html[data-theme="dark"] .prog-item,
html[data-theme="dark"] .rhythm-fig,
html[data-theme="dark"] .exercise-box,

html[data-theme="dark"] .seg-btn.active { background: var(--surface-2); }
html[data-theme="dark"] .mini-btn.on { background: var(--primary); color: #23140D; }

/* Interruptor do menu (modo noturno) */
.switch.on span { background: var(--ok); }
.switch.on span::after { transform: translateX(19px); }

/* ============================================================
   TEMA NOTURNO — html[data-theme="dark"]
   ============================================================ */

html[data-theme="dark"] {
  --navy: #0B1020;
  --navy-2: #141B30;
  --primary: #5B78F0;
  --primary-dark: #8FA4FF;
  --primary-soft: rgba(91, 120, 240, .16);
  --accent: var(--mint);

  --bg: #080B14;
  --surface: #121726;
  --surface-2: #181F31;
  --line: #232B40;
  --line-strong: #33405C;

  --ink: #F2F4F9;
  --ink-soft: #C3CBDA;
  --ink-mute: #8792A8;

  --ok: #5FD3AC;
  --ok-soft: rgba(28, 138, 102, .22);
  --warn: #F2B871;
  --warn-soft: rgba(169, 103, 15, .24);
  --info: #93A8F5;
  --info-soft: rgba(35, 64, 200, .26);
  --danger: #F08C84;
  --danger-soft: rgba(192, 57, 47, .24);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-md: 0 16px 34px -22px rgba(0, 0, 0, .9);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, .95);

  --topbar-bg: rgba(8, 11, 20, .97);
  --tabbar-bg: rgba(18, 23, 38, .98);
  --page-glow: rgba(59, 91, 232, .16);
  --card-glow: rgba(91, 120, 240, .10);
}

html[data-theme="dark"],
html[data-theme="dark"] body { background: #05070C; }

html[data-theme="dark"] .device { background: var(--bg); }

html[data-theme="dark"] .tabbar {
  border-color: rgba(51, 64, 92, .8);
  box-shadow: 0 24px 46px -24px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .04);
}
html[data-theme="dark"] .tab { color: var(--ink-mute); }
html[data-theme="dark"] .tab.active { color: #fff; background: #05070C; box-shadow: 0 12px 22px -14px rgba(0, 0, 0, 1); }

html[data-theme="dark"] .sheet {
  background: var(--surface);
  box-shadow: 0 -30px 70px rgba(0, 0, 0, .8);
  border-top-color: var(--line);
}
html[data-theme="dark"] .sheet-grip { background: var(--line-strong); }
html[data-theme="dark"] .sheet-backdrop { background: rgba(2, 3, 6, .74); }

html[data-theme="dark"] .btn-ghost { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink-soft); }
html[data-theme="dark"] .btn-dark { background: #05070C; }
html[data-theme="dark"] .btn-primary { box-shadow: 0 12px 24px -16px rgba(35, 64, 200, .9); }

html[data-theme="dark"] .input,
html[data-theme="dark"] .select,
html[data-theme="dark"] .textarea {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
}
html[data-theme="dark"] .input:focus,
html[data-theme="dark"] .select:focus,
html[data-theme="dark"] .textarea:focus { background: var(--surface); }
html[data-theme="dark"] .search-box { background: var(--surface); border-color: var(--line-strong); }
html[data-theme="dark"] .search-box input::placeholder { color: var(--ink-mute); }

html[data-theme="dark"] .inst,
html[data-theme="dark"] .mini-btn,
html[data-theme="dark"] .server-help code,
html[data-theme="dark"] .cta-icon { background: var(--surface-2); }
html[data-theme="dark"] .scale-head { background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
html[data-theme="dark"] .cta-card {
  background: linear-gradient(140deg, #17203A, #101728);
  border-color: var(--line-strong);
}
html[data-theme="dark"] .cta-icon { background: #1E2740; color: var(--primary-dark); }

html[data-theme="dark"] .member.leader { background: rgba(127, 209, 199, .14); color: #A8E4DC; border-color: rgba(127, 209, 199, .3); }
html[data-theme="dark"] .role-leader { background: rgba(127, 209, 199, .16); color: #A8E4DC; }
html[data-theme="dark"] .role-admin { background: #1E2740; color: #A8E4DC; }
html[data-theme="dark"] .kind-musician { background: rgba(127, 209, 199, .16); color: #A9DCD2; }
html[data-theme="dark"] .kind-singer { background: rgba(143, 164, 255, .16); color: #B9C6FF; }
html[data-theme="dark"] .kind-both { background: rgba(199, 154, 174, .18); color: #E7BACB; }

html[data-theme="dark"] .info-box { color: #A9B8F0; border-color: rgba(91, 120, 240, .3); }
html[data-theme="dark"] .alert-box { background: rgba(169, 103, 15, .24); color: #F6C88A; border-color: rgba(242, 184, 113, .24); }
html[data-theme="dark"] .ok-box { background: rgba(28, 138, 102, .22); color: #9FE0C2; border-color: rgba(159, 224, 194, .22); }

html[data-theme="dark"] .switch span { background: #33405C; }
html[data-theme="dark"] .switch span::after { background: #F2F4F9; }
html[data-theme="dark"] .switch.on span { background: var(--ok); }

html[data-theme="dark"] .toast { background: #232B40; }
html[data-theme="dark"] .menu-item .chev { color: var(--ink-mute); }
html[data-theme="dark"] .rank-bar { background: var(--line); }
html[data-theme="dark"] .timeline { background: var(--line); }
html[data-theme="dark"] .song-pick:has(input:checked) { background: var(--primary-soft); }
html[data-theme="dark"] .login-hint,
html[data-theme="dark"] .server-line { background: rgba(255, 255, 255, .05); }

@media (min-width: 700px) {
  html[data-theme="dark"] body {
    background:
      radial-gradient(900px 520px at 20% -10%, #16256F 0%, transparent 60%),
      radial-gradient(760px 520px at 92% 8%, #2340C8 0%, transparent 55%),
      radial-gradient(900px 700px at 50% 120%, #0E1424 0%, transparent 60%),
      #05070C;
  }
  html[data-theme="dark"] .device {
    box-shadow: 0 50px 110px rgba(0, 0, 0, .7), 0 0 0 10px #0B1020,
      0 0 0 11px rgba(127, 209, 199, .22);
  }
}

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

/* ============================================================
   v1.5 — versículo, notificações, avatar, offline
   ============================================================ */

/* --- versículo do dia --- */
.verse-card {
  position: relative;
  margin: -6px 0 16px;
  padding: 14px 16px 15px;
  border-radius: var(--r-md);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(217, 164, 65, .22), transparent 55%),
    linear-gradient(150deg, #FFF9EE, #F8EBD3);
  border: 1px solid rgba(217, 164, 65, .38);
  box-shadow: var(--shadow-sm);
}
.verse-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.verse-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #8A6420;
}
.verse-label svg { width: 14px; height: 14px; }
.verse-date { font-size: 10.5px; font-weight: 700; color: var(--ink-mute); }
.verse-text {
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-size: 14.5px;
  line-height: 1.55;
  color: #4A3117;
}
.verse-ref { font-size: 11.5px; font-weight: 800; color: #A0522D; }
html[data-theme="dark"] .verse-card {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(217, 164, 65, .18), transparent 55%),
    linear-gradient(150deg, #2A1C11, #1F150D);
  border-color: rgba(217, 164, 65, .3);
}
html[data-theme="dark"] .verse-text { color: #F2DFC7; }
html[data-theme="dark"] .verse-ref { color: #E7B872; }
html[data-theme="dark"] .verse-label { color: #E7B872; }

/* --- notificações --- */
.notif-btn { position: relative; }
.notif-badge {
  display: none;
  position: absolute;
  top: -3px; right: -3px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #E04B3A;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.notif-badge.show { display: block; }
.notif-btn.has-unread { color: var(--mint); border-color: rgba(127, 209, 199, .55); }

.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}
.notif-item.unread {
  border-color: rgba(217, 164, 65, .55);
  background: linear-gradient(145deg, var(--primary-soft), var(--surface));
}
.notif-item:active { transform: scale(.99); }
.notif-icon {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
}
.notif-icon svg { width: 18px; height: 18px; }
.notif-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-text b { font-size: 13px; color: var(--primary-dark); }
.notif-text span { font-size: 12px; color: var(--ink-soft); line-height: 1.35; }
.notif-text small { font-size: 10.5px; color: var(--ink-mute); }
.notif-item.read { opacity: .72; }

/* --- relatório de visualização dos avisos --- */
.notif-report { display: flex; flex-direction: column; gap: 8px; }
.notif-report-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.notif-report-row.pending {
  border-color: rgba(217, 164, 65, .5);
  background: linear-gradient(145deg, var(--warn-soft), var(--surface));
}
.notif-report-icon {
  width: 34px; height: 34px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}
.notif-report-row.pending .notif-report-icon {
  background: var(--warn-soft);
  color: var(--warn);
}
.notif-report-icon svg { width: 17px; height: 17px; }
.notif-report-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-report-info b { font-size: 13px; color: var(--primary-dark); }
.notif-report-info small { font-size: 11px; color: var(--ink-soft); line-height: 1.35; }
.notif-report-info .notif-report-time { font-size: 10.5px; color: var(--ink-mute); }
.notif-report-badge {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
}
.notif-report-badge.seen { background: var(--ok-soft); color: var(--ok); }
.notif-report-badge.pending { background: var(--warn-soft); color: var(--warn); }

html[data-theme="dark"] .notif-report-icon { background: rgba(47, 125, 93, .24); color: #9FE0C2; }
html[data-theme="dark"] .notif-report-row.pending .notif-report-icon { background: rgba(168, 91, 18, .3); color: #F6C88A; }
html[data-theme="dark"] .notif-report-badge.seen { background: rgba(47, 125, 93, .24); color: #9FE0C2; }
html[data-theme="dark"] .notif-report-badge.pending { background: rgba(168, 91, 18, .3); color: #F6C88A; }

/* --- avatar com foto --- */
.avatar-btn {
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  line-height: 0;
}
.avatar.has-photo, .profile-avatar.has-photo { overflow: hidden; padding: 0; }
.avatar.has-photo img, .profile-avatar.has-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-btn {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  flex: 0 0 auto;
  line-height: 0;
}
.avatar-edit {
  position: absolute;
  right: -4px; bottom: -4px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #2B1A0E;
  border: 2px solid #341D11;
}
.avatar-edit svg { width: 13px; height: 13px; }
.avatar-preview { display: flex; justify-content: center; padding: 8px 0 16px; }
.avatar-big {
  width: 104px !important;
  height: 104px !important;
  border-radius: 28px !important;
  font-size: 30px !important;
}
.avatar-actions { display: flex; flex-direction: column; gap: 8px; }
.avatar-input { display: none; }
.danger-text { color: var(--danger); }

/* --- aviso offline --- */
.offline-banner {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(94vw, 520px);
  padding: 10px 14px;
  border-radius: 13px;
  background: linear-gradient(145deg, #1B2A5E, #0E1424);
  color: #E9EDF7;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 12px 26px rgba(6, 10, 22, .45);
  border: 1px solid rgba(127, 209, 199, .38);
}
.offline-banner svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--mint); }
.offline-banner b { color: var(--mint); }
.offline-banner.hidden { display: none; }
body.is-offline .topbar { margin-top: 0; }

/* --- aviso de APK novo --- */
.apk-banner {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 9500;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(94vw, 560px);
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(145deg, #22409E, #101A3C);
  color: #E9EDF7;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 16px 34px rgba(6, 10, 22, .5);
  border: 1px solid rgba(127, 209, 199, .42);
}
.apk-banner-icon { display: flex; flex: 0 0 auto; color: var(--mint); }
.apk-banner-icon svg { width: 22px; height: 22px; }
.apk-banner-text { flex: 1 1 auto; }
.apk-banner-text b { color: var(--mint); }
.apk-banner .btn { flex: 0 0 auto; padding: 8px 12px; font-size: 12px; }
.apk-banner-close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: rgba(233, 237, 247, .8);
  font-size: 22px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}

/* --- bloqueio de atualização --- */
.update-gate {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(9, 13, 26, .9);
}
.update-gate.hidden { display: none; }
.update-gate-card {
  width: min(94vw, 420px);
  padding: 26px 22px;
  border-radius: 24px;
  background: linear-gradient(160deg, #1D2B58, #0C1222);
  color: #EEF1F9;
  box-shadow: 0 30px 70px rgba(4, 8, 20, .6);
  border: 1px solid rgba(127, 209, 199, .34);
  text-align: center;
}
.update-gate-card .gate-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(127, 209, 199, .3), rgba(35, 64, 200, .55));
  color: var(--mint);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.update-gate-card .gate-icon svg { width: 30px; height: 30px; }
.update-gate-card h2 { font-family: var(--font-display); font-size: 21px; margin-bottom: 8px; letter-spacing: -.02em; }
.update-gate-card p { font-size: 13px; line-height: 1.55; color: rgba(233, 237, 247, .74); margin-bottom: 18px; }
.update-gate-card p b { color: var(--mint); }
.update-gate-card .btn { width: 100%; }
.update-gate-card .btn[disabled] { opacity: .7; }
body.update-blocked { overflow: hidden; }
body.update-blocked .device { pointer-events: none; }

/* --- pill do novo status --- */
.st-em_analise { background: #E8ECFC; color: #1B31A3; }
html[data-theme="dark"] .st-em_analise { background: #1E2A52; color: #B9C6FF; }

/* --- teclado interativo --- */
.piano-wrap {
  margin-top: 14px;
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: linear-gradient(160deg, #4A2C18, #2A1A11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), var(--shadow-sm);
}
.piano { position: relative; display: flex; height: 116px; gap: 2px; }
.piano-key {
  position: relative;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
.piano-key.white {
  flex: 1;
  height: 100%;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, #FFFDF8 0%, #F1E6D5 78%, #E3D3BC 100%);
  box-shadow: inset 0 -4px 6px rgba(62, 35, 22, .18), 0 2px 4px rgba(0, 0, 0, .3);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 7px;
}
.piano-key.white span { font-size: 9px; font-weight: 800; color: #9A7B5C; }
.piano-key.white.on { background: linear-gradient(180deg, #FBE9C4 0%, #E9C983 100%); }
.piano-key.white.root { background: linear-gradient(180deg, #F1CE8A 0%, #D9A441 100%); }
.piano-key.white.root span { color: #4A2C18; }
.piano-key.black {
  position: absolute;
  top: 0;
  width: 8.6%;
  height: 63%;
  z-index: 2;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, #3A2A1D 0%, #1C120B 100%);
  box-shadow: 0 3px 5px rgba(0, 0, 0, .45), inset 0 -3px 4px rgba(255, 255, 255, .08);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
}
.piano-key.black span { font-size: 7.5px; font-weight: 700; color: rgba(255, 243, 227, .55); }
.piano-key.black.on { background: linear-gradient(180deg, #8A5A2A 0%, #5A3A1C 100%); }
.piano-key.black.root { background: linear-gradient(180deg, #D9A441 0%, #A0522D 100%); }
.piano-key:active { transform: translateY(1px); }
.piano-key.playing { transform: translateY(2px); filter: brightness(1.16); }
.piano-8 .piano-key.white span { font-size: 8.5px; }
.piano-8 .piano-key.black span { font-size: 7px; }
.piano-hint { margin-top: 8px; font-size: 10px; color: rgba(255, 243, 227, .62); text-align: center; }

/* --- braço: números, marcações e legenda --- */
.fret-string.fret-numbers { height: 18px; }
.fret-num {
  width: 31px;
  flex: 0 0 auto;
  text-align: center;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--ink-mute);
}
.fret-cell .inlay {
  position: absolute;
  left: 50%; top: 50%;
  width: 5px; height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--line-strong);
  opacity: .6;
}
.fret-cell .inlay.twin { box-shadow: 0 -8px 0 var(--line-strong), 0 8px 0 var(--line-strong); }
.fret-cell.on .inlay { opacity: 0; }
.fret-cell.open { border-left-color: var(--primary); }
.fret-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 2px 2px;
  font-size: 10px;
  color: var(--ink-mute);
}
.fret-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--primary-soft); border: 1px solid var(--primary); }
.legend-dot.root { background: var(--primary); }
.legend-dot.inlay-mark { width: 5px; height: 5px; border: 0; background: var(--line-strong); }

/* --- afinador: arco, ponteiro e cordas --- */
.tuner-gauge {
  position: relative;
  width: 230px;
  max-width: 86%;
  height: 112px;
  margin: 0 auto 2px;
}
.tuner-gauge svg { width: 100%; height: 100%; display: block; }
.tuner-pointer {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 4px;
  height: 64px;
  margin-left: -2px;
  border-radius: 3px;
  background: var(--primary);
  transform-origin: 50% 100%;
  transform: rotate(0deg);
  transition: transform .07s linear;
  box-shadow: 0 2px 6px rgba(62, 35, 22, .28);
}
.tuner-zero {
  position: absolute;
  left: 50%; bottom: 8px;
  width: 10px; height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--primary-dark);
}
.tuner-side {
  position: absolute;
  bottom: 2px;
  font-size: 9px;
  font-weight: 800;
  color: var(--ink-mute);
}
.tuner-side.left { left: 4px; }
.tuner-side.right { right: 4px; }
.tuner-display.in-tune .tuner-note { color: var(--ok); }
.tuner-display.in-tune .tuner-cents { color: var(--ok); font-weight: 800; }
.tuner-display.tuned-flat .tuner-note { color: #A85B12; }
.tuner-display.tuned-sharp .tuner-note { color: #A85B12; }
.tuner-strings {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 12px 0 4px;
}
.tuner-string {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 2px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.tuner-string b { font-size: 14px; color: var(--primary-dark); }
.tuner-string small { font-size: 8px; color: var(--ink-mute); }
.tuner-string:active { background: var(--primary-soft); }

@media (max-width: 380px) {
  .tuner-strings { gap: 4px; }
  .tuner-string small { font-size: 7px; }
}


/* ============================================================
   CHAT, PERFIS, BIO E MÚLTIPLOS REPERTÓRIOS (1.6.18)
   ============================================================ */

.tab-more { position: relative; }
.tab-more.active { color: var(--primary-dark); }

/* menu "mais" */
.menu-list .notif-badge { position: static; margin-left: 4px; }

/* repertórios por ministrante */
.setlist-block {
  margin: 0 15px 12px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.setlist-block.mine {
  border-color: rgba(139, 90, 60, .45);
  background: var(--primary-soft);
}
.setlist-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
}
.setlist-owner b { font-size: 12.5px; }
.setlist-owner .mini-avatar { width: 24px; height: 24px; font-size: 9px; }
.setlist-owner-actions { margin-left: auto; display: flex; gap: 4px; }
.mine-tag {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(139, 90, 60, .25);
  border-radius: 999px;
  padding: 3px 7px;
}
html[data-theme="dark"] .mine-tag { background: rgba(0, 0, 0, .25); }
.setlist-block .setlist-songs { padding: 0; }
.setlist-block .setlist-songs li:first-child { border-top: 0; }
.setlist-block .setlist-foot { padding: 6px 0 0; font-size: 10.5px; }
.setlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 15px 14px;
}
.setlist-actions .mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
}
.setlist-actions .mini-btn svg { width: 14px; height: 14px; }

/* lista combinada do dia: um único repertório */
.setlist-ministers {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 15px;
  text-align: left;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
button.setlist-ministers:active { background: var(--primary-soft); }
.setlist-ministers-avatars { display: flex; flex: 0 0 auto; }
.setlist-ministers-avatars .mini-avatar {
  width: 28px; height: 28px;
  font-size: 10px;
  border: 2px solid var(--surface-2);
  margin-left: -8px;
  overflow: hidden;
}
.setlist-ministers-avatars .mini-avatar:first-child { margin-left: 0; }
.setlist-ministers-avatars .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.setlist-ministers-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.setlist-ministers-text b { font-size: 12px; }
.setlist-ministers-text small {
  font-size: 11px;
  color: var(--ink-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.setlist-ministers > svg { width: 16px; height: 16px; color: var(--ink-mute); flex: 0 0 auto; }
.setlist-songs.merged { padding: 4px 15px 8px; }
.setlist-songs.merged li { padding: 10px 0; }
.setlist-row.mine .song-info b { color: var(--primary-dark); }
.song-order { display: flex; flex-direction: column; gap: 2px; flex: 0 0 auto; }
.song-move {
  width: 28px; height: 24px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.song-move svg { width: 13px; height: 13px; }
.song-move:disabled { opacity: .3; }
.song-move:active:not(:disabled) { background: var(--primary-soft); color: var(--primary-dark); }
.song-del { color: var(--danger); }
.setlist-foot-actions { padding: 0 15px 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.setlist-foot-actions .mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
}
.setlist-foot-actions .mini-btn svg { width: 14px; height: 14px; }

/* chat */
.chat-list { display: flex; flex-direction: column; gap: 10px; }
.chat-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.chat-card:active { background: var(--surface-2); }
.chat-avatar {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  flex: 0 0 auto;
  overflow: hidden;
}
.chat-avatar svg { width: 20px; height: 20px; }
.chat-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-card-text strong { font-size: 13.5px; }
.chat-card-text small {
  font-size: 11.5px;
  color: var(--ink-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: 0 0 auto;
  position: relative;
}
.chat-card-side small { font-size: 9.5px; color: var(--ink-mute); }
.chat-card-side .notif-badge { position: static; }

.chat-sheet {
  display: flex;
  flex-direction: column;
  min-height: 46vh;
  max-height: 56vh;
  margin: -4px -2px 0;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
}
.chat-msg { display: flex; align-items: flex-end; gap: 7px; }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-msg .mini-avatar { width: 26px; height: 26px; font-size: 9px; flex: 0 0 auto; }
.chat-bubble {
  max-width: 78%;
  padding: 8px 11px;
  border-radius: 14px 14px 14px 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.chat-msg.mine .chat-bubble {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.chat-bubble .chat-author {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--primary-dark);
}
.chat-msg.mine .chat-bubble .chat-author { color: #fff; }
.chat-bubble small {
  font-size: 9.5px;
  opacity: .65;
  align-self: flex-end;
}
.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--ink-mute);
  padding: 26px 16px;
}
.chat-empty svg { width: 34px; height: 34px; color: var(--line-strong); }
.chat-empty p { font-size: 12px; margin-top: 8px; }
.chat-form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.chat-form .input { flex: 1; min-width: 0; }
.chat-send {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary);
  color: #fff;
  flex: 0 0 auto;
  box-shadow: var(--shadow-sm);
}
.chat-send svg { width: 19px; height: 19px; }
.chat-send:active { transform: scale(.95); }

.chat-members-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  margin-bottom: 6px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.chat-members-bar:active { background: var(--primary-soft); }
.chat-members-avatars { display: flex; flex: 0 0 auto; }
.chat-members-avatars .mini-avatar {
  width: 24px; height: 24px;
  font-size: 9px;
  border: 2px solid var(--surface-2);
  margin-left: -7px;
  overflow: hidden;
}
.chat-members-avatars .mini-avatar:first-child { margin-left: 0; }
.chat-members-avatars .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-members-label {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-members-bar > svg { width: 15px; height: 15px; color: var(--ink-mute); flex: 0 0 auto; }

.chat-audio {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 220px;
  max-width: 100%;
  margin: 2px 0;
  padding: 5px 11px 5px 5px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.chat-audio.loading { opacity: .65; }
.chat-audio-play {
  width: 34px; height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
}
.chat-audio-play svg { width: 15px; height: 15px; }
.chat-audio-track {
  flex: 1;
  min-width: 0;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  overflow: hidden;
}
.chat-audio-progress {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}
.chat-audio-time {
  font-size: 10px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.chat-audio-off { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; opacity: .85; }
.chat-audio-off svg { width: 14px; height: 14px; }

/* foto enviada no chat (líderes e administradores) */
.chat-photo {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  line-height: 0;
  cursor: zoom-in;
}
.chat-photo img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 280px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--surface-2);
}
.chat-caption { display: block; margin-top: 6px; }
.chat-photo-input { display: none !important; }
.chat-photo-btn svg { width: 19px; height: 19px; }

/* emoji e figurinhas no chat */
.chat-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.chat-msg.mine .chat-link { color: #fff; }
.chat-sticker { font-size: 54px; line-height: 1; display: inline-block; }
.chat-picker {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.chat-picker-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.chat-picker-tab {
  flex: 1;
  padding: 7px;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 700;
  background: transparent;
  color: var(--ink-mute);
}
.chat-picker-tab.active { background: var(--primary); color: #fff; }
.chat-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  max-height: 168px;
  overflow-y: auto;
}
.chat-emoji {
  font-size: 22px;
  padding: 6px 0;
  border-radius: 8px;
  background: transparent;
}
.chat-emoji:active { background: var(--primary-soft); }
.chat-sticker-btn {
  font-size: 34px;
  padding: 6px 0;
  border-radius: 10px;
  background: transparent;
}
.chat-sticker-btn:active { background: var(--primary-soft); }

.chat-mic {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--primary);
  flex: 0 0 auto;
}
.chat-mic svg { width: 20px; height: 20px; }
.chat-mic:active { background: var(--primary-soft); }

.chat-rec {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(196, 74, 74, .45);
  border-radius: 12px;
  background: var(--surface-2);
}
.chat-rec-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--danger);
  flex: 0 0 auto;
  animation: chatRecPulse 1s infinite;
}
.chat-rec-time {
  flex: 1;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chat-rec-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
}
.chat-rec-btn.ghost {
  background: transparent;
  color: var(--ink-mute);
  border: 1px solid var(--line);
}
@keyframes chatRecPulse { 50% { opacity: .25; } }

.chat-member-list { display: flex; flex-direction: column; }
.chat-member {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 2px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.chat-member:last-child { border-bottom: 0; }
.chat-member .member-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 auto;
}
.chat-member .member-avatar.has-photo { padding: 0; }
.chat-member .member-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.chat-member-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-member-info b { font-size: 13px; }
.chat-member-info small {
  font-size: 11px;
  color: var(--ink-mute);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chat-member-role {
  flex: 0 0 auto;
  max-width: 36%;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  text-align: center;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 3px 7px;
}
.chat-member-role.is-leader {
  color: #6B4405;
  background: #FBEBC8;
}
html[data-theme="dark"] .chat-member-role.is-leader { color: #F5D48A; background: #3B2E14; }
.chat-member-role.is-admin {
  color: #fff;
  background: linear-gradient(150deg, #3D5DF0, var(--brand));
}

/* perfil público de uma pessoa */
.person-profile { text-align: center; padding-top: 4px; }
.person-profile .profile-avatar { margin: 0 auto 10px; }
.person-profile h2 { font-size: 18px; letter-spacing: -.01em; }
.person-profile .chips { margin-top: 8px; }

/* foto grande no perfil de alguém (antes ficava 62 px) */
.person-photo-btn {
  display: block;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: none;
  line-height: 0;
  cursor: zoom-in;
  border-radius: 34px;
}
.person-profile .profile-avatar.person-photo {
  width: 132px;
  height: 132px;
  border-radius: 36px;
  font-size: 40px;
  margin: 2px auto 14px;
  box-shadow: 0 26px 44px -26px rgba(14, 20, 36, .7),
    inset 0 1px 0 rgba(255, 255, 255, .45);
}
.person-profile .profile-avatar.person-photo.has-photo { padding: 0; }
.person-profile .profile-avatar.person-photo.has-photo img { border-radius: inherit; }
@media (max-width: 380px) {
  .person-profile .profile-avatar.person-photo { width: 112px; height: 112px; font-size: 34px; }
}
.photo-zoom {
  display: flex;
  justify-content: center;
  padding: 4px 0 10px;
}
.photo-zoom img {
  width: min(82vw, 420px);
  max-height: 62vh;
  object-fit: contain;
  border-radius: 22px;
  background: var(--surface-2);
  box-shadow: 0 24px 50px -28px rgba(14, 20, 36, .6);
}
.person-bio {
  display: flex;
  gap: 8px;
  text-align: left;
  margin: 14px 0 4px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.person-bio svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--primary); margin-top: 1px; }
.person-schedule { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; text-align: left; }
.person-schedule-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.ps-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 38px;
}
.ps-date b { font-size: 16px; color: var(--primary-dark); }
.ps-date small { font-size: 9px; color: var(--ink-mute); text-transform: uppercase; }
.ps-info { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.ps-info b { font-size: 12.5px; }
.ps-info small { font-size: 10.5px; color: var(--ink-mute); }

/* bio na tela de perfil */
.my-bio {
  margin: 12px 0 4px;
  padding: 13px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.my-bio-head { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.my-bio-head svg { width: 15px; height: 15px; color: var(--primary); }
.my-bio-head .mini-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.my-bio-head .mini-btn svg { width: 12px; height: 12px; color: inherit; }
.my-bio p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin-top: 7px; }

button.member { font-family: inherit; }

@media (max-width: 380px) {
  .chat-bubble { max-width: 84%; }
  .setlist-owner { flex-wrap: wrap; }
}

/* ============================================================
   v2.0 — camada de polimento (Ministra+)
   ============================================================ */

/* ---------- correções de bugs visuais ---------- */

/* Base única do avatar pequeno: antes cada tela definia só o tamanho,
   e as iniciais apareciam cortadas/quadradas no chat. */
.mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  flex: 0 0 auto;
  overflow: hidden;
}
.mini-avatar.has-photo { padding: 0; }
.mini-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member .mini-avatar { width: 21px; height: 21px; font-size: 8.5px; }
.chat-msg .mini-avatar { width: 26px; height: 26px; font-size: 9px; }
.setlist-owner .mini-avatar { width: 24px; height: 24px; font-size: 9px; }
.setlist-ministers-avatars .mini-avatar { width: 28px; height: 28px; font-size: 10px; border: 2px solid var(--surface-2); margin-left: -8px; }
.setlist-ministers-avatars .mini-avatar:first-child { margin-left: 0; }
.chat-members-avatars .mini-avatar { width: 24px; height: 24px; font-size: 9px; border: 2px solid var(--surface-2); margin-left: -7px; }
.chat-members-avatars .mini-avatar:first-child { margin-left: 0; }

/* Elementos vazios não podem virar "caixinhas fantasma". */
.scale-note:empty,
.chat-card-side:empty,
.setlist-foot:empty,
.my-bio p:empty { display: none; }

/* Momentos de toque: um pouco de resposta física em tudo que é botão. */
button, .tab, .filter-chip, .kind-chip, .chip, .mini-btn, .btn, .song-link, .icon-btn, .fab {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible, .tab:focus-visible, .btn:focus-visible, .mini-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] .tab:focus-visible,
html[data-theme="dark"] .btn:focus-visible,
html[data-theme="dark"] .mini-btn:focus-visible { outline-color: var(--mint); }

/* Rolagem discreta dentro do app. */
.view::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.sheet-body::-webkit-scrollbar { width: 0; height: 0; }
.view, .chat-messages, .sheet-body { scrollbar-width: none; }

/* ---------- cartões ---------- */

.scale-card,
.song-card,
.group-card,
.setlist-card,
.rep-card,
.chat-card,
.verse-card,
.menu-list,
.stat,
.empty {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(14, 20, 36, .04), 0 22px 40px -38px rgba(14, 20, 36, .7);
}
html[data-theme="dark"] .scale-card,
html[data-theme="dark"] .song-card,
html[data-theme="dark"] .group-card,
html[data-theme="dark"] .setlist-card,
html[data-theme="dark"] .rep-card,
html[data-theme="dark"] .chat-card,
html[data-theme="dark"] .verse-card,
html[data-theme="dark"] .menu-list,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .empty {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 24px 44px -40px rgba(0, 0, 0, .9);
}

/* Entrada em cascata das listas: só transform (nunca esconde conteúdo). */
.scale-list > *,
.song-list > *,
.rep-list > *,
.chat-list > *,
.setlist-wrap > *,
.menu-list > *,
.person-row,
.notif-list > *,
.rank-list > * {
  animation: none;
}

/* ---------- escala ---------- */

.scale-list { gap: 14px; }

.scale-card { border-radius: var(--r-lg); }
.scale-card.today {
  border-color: rgba(35, 64, 200, .32);
  box-shadow: 0 0 0 3px rgba(35, 64, 200, .1), 0 26px 44px -34px rgba(35, 64, 200, .75);
}
.scale-card.today::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--mint));
  z-index: 2;
}

.scale-head {
  padding: 15px;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.scale-head-info h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.scale-head-info .chips { margin-top: 7px; }

.date-block {
  width: 54px;
  padding: 9px 0 7px;
  border-radius: 16px;
  background: linear-gradient(160deg, #3D5DF0, var(--brand) 52%, var(--brand-deep));
  box-shadow: 0 12px 20px -14px rgba(35, 64, 200, .95), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.date-block b { font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.date-block small { font-size: 9px; letter-spacing: .16em; color: var(--mint); font-weight: 800; margin-top: 5px; }

.today-tag {
  top: 13px; right: 13px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 8.5px;
  letter-spacing: .14em;
  box-shadow: 0 8px 16px -10px rgba(35, 64, 200, .9);
}

.chip {
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-soft);
}
.chip b { font-weight: 800; color: var(--ink); }
.chip-md { font-size: 11.5px; padding: 5px 11px; }
.chip-ghost { background: transparent; }

.inst-grid { gap: 1px; background: var(--line); }
.inst { background: var(--surface); padding: 10px 14px; }
.inst span { font-size: 9px; letter-spacing: .12em; }
.inst strong { font-size: 13px; font-weight: 700; }
.inst.empty strong { color: var(--ink-mute); opacity: .6; font-weight: 500; }

.ministers-row { padding: 11px 15px 0; }
.member.mini { padding: 4px 9px; font-size: 10.5px; font-weight: 600; }

.scale-foot { padding: 9px 13px; gap: 10px; min-height: 46px; background: var(--surface-2); }
.scale-note { font-size: 11.5px; color: var(--ink-mute); font-style: normal; line-height: 1.4; }
.scale-actions { gap: 7px; }

.mini-btn {
  padding: 7px 11px;
  border-radius: 11px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .16s var(--spring), background .18s ease, color .18s ease, border-color .18s ease;
}
.mini-btn:active { transform: scale(.95); }
.mini-btn.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 10px 18px -12px rgba(35, 64, 200, .9);
}
.mini-btn.danger { color: var(--danger); border-color: rgba(192, 57, 47, .25); }

.scale-restricted { background: var(--surface-2); color: var(--ink-mute); }

/* botões */
.btn {
  padding: 10px 14px;
  border-radius: 13px;
  font-size: 12.5px;
  font-weight: 700;
  transition: transform .16s var(--spring), background .18s ease;
}
.btn-primary {
  background: linear-gradient(140deg, #3D5DF0, var(--brand) 55%, var(--brand-deep));
  box-shadow: 0 14px 26px -18px rgba(35, 64, 200, .95);
}
.btn-ok { background: linear-gradient(140deg, #25A97E, var(--ok)); box-shadow: 0 14px 26px -18px rgba(28, 138, 102, .9); }
.btn-ghost { background: var(--surface); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-block { padding: 15px; font-size: 14px; border-radius: 16px; }

/* ---------- músicas ---------- */

.filter-row { gap: 8px; padding: 2px 2px 14px; }
.filter-chip {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  transition: transform .18s var(--spring), background .2s ease, color .2s ease, border-color .2s ease;
}
.filter-chip:active { transform: scale(.95); }
.filter-chip.active {
  background: linear-gradient(140deg, #3D5DF0, var(--brand) 60%, var(--brand-deep));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 22px -14px rgba(35, 64, 200, .95);
}
.filter-chip.active b { opacity: .75; }

.search-box {
  height: 46px;
  border-radius: 15px;
  padding: 0 14px;
  background: var(--surface);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search-box:focus-within {
  border-color: rgba(35, 64, 200, .45);
  box-shadow: 0 0 0 4px rgba(35, 64, 200, .09);
}
html[data-theme="dark"] .search-box:focus-within { border-color: rgba(127, 209, 199, .5); box-shadow: 0 0 0 4px rgba(127, 209, 199, .1); }
.search-box input { font-size: 14px; color: var(--ink); }
.search-box input::placeholder { color: var(--ink-mute); }

.song-list { gap: 12px; }
.song-card { padding: 16px; border-radius: var(--r-lg); }
.song-card h3 { font-size: 18.5px; font-weight: 800; letter-spacing: -.03em; }
.song-meta { gap: 8px; font-size: 11.5px; }
.song-meta .key-badge {
  background: var(--brand);
  color: #DFFBF7;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}
.pill { border-radius: 999px; padding: 5px 10px; font-size: 9px; letter-spacing: .08em; }
.song-note { border-radius: 12px; border-left: 3px solid rgba(35, 64, 200, .35); background: var(--surface-2); }
.song-link {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--brand);
  transition: transform .16s var(--spring), background .18s ease;
}
.song-link:active { transform: scale(.97); }
html[data-theme="dark"] .song-link { color: var(--primary-dark); }
.song-actions { gap: 8px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }

.timeline { gap: 4px; margin-top: 12px; }
.timeline i { height: 5px; }
.timeline i.on { background: linear-gradient(90deg, var(--brand), var(--mint)); }

/* ---------- pessoas e grupos ---------- */

.group-card { border-radius: var(--r-lg); margin-bottom: 13px; }
.group-card.mine {
  position: relative;
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(35, 64, 200, .06), rgba(35, 64, 200, 0) 58%), var(--surface);
  box-shadow: 0 0 0 3px rgba(35, 64, 200, .12), 0 20px 36px -34px rgba(14, 20, 36, .6);
}
.group-card.mine::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--mint));
}
html[data-theme="dark"] .group-card.mine {
  background: linear-gradient(180deg, rgba(127, 209, 199, .1), rgba(127, 209, 199, 0) 58%), var(--surface);
  box-shadow: 0 0 0 3px rgba(127, 209, 199, .16), 0 20px 36px -34px rgba(0, 0, 0, .9);
}
html[data-theme="dark"] .group-card.mine::before {
  background: linear-gradient(180deg, var(--mint), var(--brand));
}
.group-head { padding: 14px 16px; gap: 12px; }
.group-badge {
  width: 46px; height: 46px;
  border-radius: 15px;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.group-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.group-head p { font-size: 11.5px; }
.my-group-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  border: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}
html[data-theme="dark"] .my-group-tag { background: var(--mint); color: var(--ink); border: 0; }

.member-wrap { padding: 0 16px 15px; gap: 7px; }
.member {
  padding: 5px 10px 5px 5px;
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-soft);
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease;
}
.member.leader {
  background: rgba(127, 209, 199, .16);
  border-color: rgba(46, 140, 129, .3);
  color: #1D6B62;
}
.member.leader .mini-avatar { background: linear-gradient(145deg, #95DED4, #4FB3A6); color: #0B3B35; }
html[data-theme="dark"] .member.leader { color: #A8E4DC; }

.person-row {
  padding: 12px 14px;
  border-radius: 16px;
  margin-bottom: 9px;
  transition: transform .18s var(--spring), background .18s ease, border-color .18s ease;
}
.person-row:active { transform: scale(.99); background: var(--surface-2); }
.person-avatar {
  width: 40px; height: 40px;
  border-radius: 13px;
  font-size: 13px;
}
.person-info strong { font-size: 13.5px; font-weight: 700; }
.person-info small { font-size: 11px; margin-top: 2px; }

.role-badge { border-radius: 999px; padding: 3px 8px; font-size: 8.5px; letter-spacing: .07em; }
.role-admin { background: var(--ink); color: var(--mint); }
.role-leader { background: rgba(127, 209, 199, .2); color: #1D6B62; }
html[data-theme="dark"] .role-leader { color: #A8E4DC; }

.kind-chip { border-radius: 999px; padding: 8px 13px; font-weight: 700; }
.kind-chip.active {
  background: linear-gradient(140deg, #3D5DF0, var(--brand));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 22px -16px rgba(35, 64, 200, .95);
}
.kind-badge { border-radius: 999px; font-size: 8.5px; padding: 3px 8px; }
.kind-musician { background: #E1F4EF; color: #1C7A63; }
.kind-singer { background: #E8ECFC; color: #2340C8; }
.kind-both { background: #F1E6F4; color: #6B3D74; }

.empty {
  padding: 38px 22px;
  border-style: dashed;
  border-color: var(--line-strong);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}
.empty svg {
  width: 30px; height: 30px;
  margin-bottom: 14px;
  padding: 13px;
  box-sizing: content-box;
  border-radius: 20px;
  color: var(--brand);
  background: var(--primary-soft);
  opacity: 1;
}
.empty strong { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: 12.5px; line-height: 1.55; color: var(--ink-mute); }

/* ---------- perfil ---------- */

.profile-card {
  background:
    radial-gradient(90% 120% at 88% 0%, rgba(127, 209, 199, .35), transparent 60%),
    linear-gradient(145deg, #2340C8 0%, #1A2E9E 48%, #0E1424 100%);
  border-radius: var(--r-xl);
  padding: 22px;
  gap: 15px;
  box-shadow: 0 30px 54px -30px rgba(35, 64, 200, .8), inset 0 0 0 1px rgba(255, 255, 255, .1);
  margin-bottom: 18px;
}
.profile-card::after {
  width: 200px; height: 200px;
  right: -70px; bottom: -110px;
  background: radial-gradient(circle, rgba(127, 209, 199, .5), transparent 66%);
}
.profile-avatar {
  width: 62px; height: 62px;
  border-radius: 20px;
  font-size: 20px;
  background: linear-gradient(150deg, #A8E6DE, #7FD1C7 55%, #45A99C);
  color: #08302B;
  box-shadow: 0 14px 26px -16px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .5);
  position: relative;
  z-index: 1;
}
.profile-card > div { position: relative; z-index: 1; min-width: 0; }
.profile-card h2 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.profile-card p { font-size: 12.5px; color: rgba(255, 255, 255, .72); margin-top: 4px; }
.avatar-edit {
  background: var(--mint) !important;
  color: #07231F !important;
  border-color: rgba(255, 255, 255, .8) !important;
}

.menu-list { border-radius: var(--r-lg); }
.menu-item {
  gap: 13px;
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 600;
  transition: background .18s ease;
}
.menu-item .mi-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--brand);
}
html[data-theme="dark"] .menu-item .mi-icon { color: var(--primary-dark); }
.menu-item .mi-text small { font-weight: 400; margin-top: 3px; }
.menu-item .chev svg { width: 15px; height: 15px; }

.stat-row { gap: 11px; margin-bottom: 18px; }
.stat { border-radius: 18px; padding: 14px 10px; }
.stat b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--brand);
}
html[data-theme="dark"] .stat b { color: var(--mint); }
.stat small { font-size: 9px; letter-spacing: .08em; line-height: 1.3; }

.my-bio { border-radius: var(--r-md); padding: 14px; }
.my-bio-head { font-weight: 700; }
.my-bio-head svg { color: var(--brand); }

/* ---------- versículo ---------- */

.verse-card {
  margin: 0 0 18px;
  padding: 16px 17px 17px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(110% 130% at 100% 0%, rgba(127, 209, 199, .28), transparent 58%),
    linear-gradient(150deg, var(--primary-soft), var(--surface) 70%);
  border: 1px solid rgba(35, 64, 200, .14);
}
.verse-label { color: var(--brand); font-size: 9.5px; letter-spacing: .16em; }
.verse-date { font-size: 10px; }
.verse-text {
  margin: 9px 0 7px;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -.01em;
  color: var(--ink);
}
.verse-ref { font-size: 11.5px; color: var(--brand); }
html[data-theme="dark"] .verse-card {
  background:
    radial-gradient(110% 130% at 100% 0%, rgba(127, 209, 199, .16), transparent 58%),
    linear-gradient(150deg, #17203A, #101728);
  border-color: rgba(127, 209, 199, .2);
}
html[data-theme="dark"] .verse-text { color: var(--ink); }
html[data-theme="dark"] .verse-ref,
html[data-theme="dark"] .verse-label { color: var(--mint); }

/* ---------- notificações ---------- */

.notif-badge { background: #E23D2E; box-shadow: 0 3px 8px rgba(0, 0, 0, .35); }
.notif-item {
  padding: 13px;
  border-radius: 16px;
  transition: transform .18s var(--spring), background .18s ease;
}
.notif-item.unread {
  border-color: rgba(35, 64, 200, .35);
  background: linear-gradient(140deg, var(--primary-soft), var(--surface) 75%);
  box-shadow: inset 3px 0 0 var(--brand);
}
.notif-icon { border-radius: 13px; background: linear-gradient(145deg, #3D5DF0, var(--brand)); }
.notif-text b { color: var(--ink); font-weight: 700; }
.notif-item.read { opacity: .66; }
.notif-report-row { border-radius: 16px; }
.notif-report-row.pending {
  border-color: rgba(169, 103, 15, .3);
  background: linear-gradient(140deg, var(--warn-soft), var(--surface) 78%);
}
.notif-report-info b { color: var(--ink); font-weight: 700; }
.notif-report-badge { border-radius: 999px; }

/* ---------- chats ---------- */

.chat-list { gap: 11px; }
.chat-card {
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--r-md);
  transition: transform .18s var(--spring), border-color .18s ease, background .18s ease;
}
.chat-card:active { transform: scale(.99); }
.chat-avatar {
  width: 46px; height: 46px;
  border-radius: 15px;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.chat-card-text strong { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.chat-card-text small { font-size: 11.5px; }

.chat-sheet { margin: -2px -2px 0; }
.chat-messages { gap: 11px; padding: 6px 2px 14px; }
.chat-bubble {
  max-width: 80%;
  padding: 10px 13px;
  border-radius: 18px 18px 18px 6px;
  background: var(--surface-2);
  border-color: var(--line);
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 8px 16px -16px rgba(14, 20, 36, .8);
}
.chat-msg.mine .chat-bubble {
  background: linear-gradient(150deg, #3D5DF0, var(--brand) 60%, var(--brand-deep));
  border-radius: 18px 18px 6px 18px;
  box-shadow: 0 14px 24px -18px rgba(35, 64, 200, .95);
}
.chat-bubble .chat-author { font-size: 10.5px; color: var(--brand); letter-spacing: .01em; }
.chat-msg.mine .chat-bubble .chat-author { color: var(--mint); }
.chat-bubble small { font-size: 9.5px; }

.chat-msg-more {
  flex: 0 0 auto;
  align-self: center;
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-mute);
  opacity: .62;
  touch-action: manipulation;
  transition: opacity .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.chat-msg-more svg { width: 17px; height: 17px; }
.chat-msg-more:hover,
.chat-msg-more:focus-visible {
  opacity: 1;
  color: var(--brand);
  background: var(--surface-2);
  border-color: var(--line);
}
@media (hover: none) {
  .chat-msg-more { opacity: .82; }
}

.chat-del-preview {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 15px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}
.chat-del-preview-top {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--ink-mute);
}
.chat-del-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-mute);
}
.chat-del-kind svg { width: 15px; height: 15px; }
.chat-del-preview p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.chat-form { padding-top: 11px; border-top: 1px solid var(--line); gap: 9px; }
.chat-form .input {
  height: 46px;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--surface-2);
  border-color: var(--line);
}
.chat-form .input:focus { background: var(--surface); }
.chat-send {
  width: 46px; height: 46px;
  background: linear-gradient(145deg, #3D5DF0, var(--brand));
  box-shadow: 0 14px 24px -16px rgba(35, 64, 200, .95);
  transition: transform .16s var(--spring);
}
.chat-mic {
  background: var(--primary-soft);
  border-color: rgba(35, 64, 200, .14);
  color: var(--brand);
  transition: transform .16s var(--spring), background .18s ease;
}
.chat-mic:active { transform: scale(.94); }
.chat-rec {
  border-radius: 14px;
  background: var(--danger-soft);
  border-color: rgba(192, 57, 47, .35);
}
.chat-rec-btn { border-radius: 999px; padding: 7px 12px; background: var(--danger); }
.chat-rec-btn.ghost { background: transparent; color: var(--ink-soft); }

/* marcar pessoas com @ no chat */
.chat-mention-btn {
  font-weight: 800;
  font-size: 17px;
  font-family: var(--font-display);
  letter-spacing: -.02em;
}
.chat-mentions {
  max-height: 190px;
  overflow-y: auto;
  margin-bottom: 8px;
  padding: 5px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 34px -24px rgba(14, 20, 36, .45);
}
.chat-mentions.hidden { display: none; }
.chat-mention-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 11px;
  background: none;
  color: var(--ink);
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.chat-mention-item .mini-avatar { width: 30px; height: 30px; font-size: 10px; }
.chat-mention-item.active,
.chat-mention-item:hover { background: var(--primary-soft); }
.chat-mention-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mention-user {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-mute);
}
.chat-mention-empty { padding: 10px 12px; font-size: 12px; color: var(--ink-mute); }
.chat-bubble .mention {
  font-weight: 800;
  color: var(--brand);
  background: var(--primary-soft);
  border-radius: 6px;
  padding: 1px 4px;
}
html[data-theme="dark"] .chat-bubble .mention { color: #B9C6FF; background: #1E2A52; }
.chat-msg.mine .chat-bubble .mention { color: #0E1424; background: var(--mint); }

.chat-members-bar {
  padding: 9px 11px;
  border-radius: 14px;
  background: var(--surface-2);
  margin-bottom: 8px;
  transition: background .18s ease;
}
.chat-members-label { font-size: 11.5px; font-weight: 600; }

.chat-empty svg {
  width: 26px; height: 26px;
  padding: 15px;
  box-sizing: content-box;
  border-radius: 22px;
  color: var(--brand);
  background: var(--primary-soft);
}
.chat-empty p { font-size: 12.5px; margin-top: 12px; }

.chat-member { padding: 11px 2px; }
.chat-member .member-avatar {
  width: 46px; height: 46px;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.chat-member-info b { font-weight: 700; }
.chat-member-role {
  color: var(--brand);
  background: var(--primary-soft);
  font-size: 9px;
  letter-spacing: .05em;
}

/* ---------- repertório / do dia ---------- */

.rep-card { border-radius: var(--r-md); padding: 14px; }
.rep-main h3 { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }

.setlist-wrap { gap: 15px; }
.setlist-card { border-radius: var(--r-lg); }
.setlist-head { padding: 16px; gap: 13px; }
.setlist-head-info h3 { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.pill-day {
  background: var(--primary-soft);
  color: var(--brand);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 5px 11px;
}
html[data-theme="dark"] .pill-day { color: var(--primary-dark); }
.setlist-songs li { border-top: 1px solid var(--line); }
.song-num {
  width: 24px; height: 24px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--brand);
  font-size: 11px;
}
html[data-theme="dark"] .song-num { color: var(--primary-dark); }
.setlist-block {
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 12px 13px;
}
.setlist-block.mine {
  background: linear-gradient(150deg, var(--primary-soft), var(--surface) 70%);
  border-color: rgba(35, 64, 200, .22);
}
.setlist-owner b { font-weight: 700; }
.mine-tag {
  background: rgba(35, 64, 200, .1);
  border-color: rgba(35, 64, 200, .2);
  color: var(--brand);
}
.setlist-ministers { background: var(--surface-2); border-top: 1px solid var(--line); padding: 11px 16px; }
.setlist-ministers-text b { font-weight: 700; }
.song-move {
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: background .16s ease, color .16s ease, transform .16s var(--spring);
}
.song-move:active:not(:disabled) { transform: scale(.92); }

/* ---------- formulários ---------- */

.field { gap: 7px; }
.field > span { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); font-weight: 800; }
.field > span b { color: var(--danger); }
.input, .select, .textarea {
  border-radius: 14px;
  border-color: var(--line);
  background: var(--surface-2);
  font-size: 14px;
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input, .select { height: 48px; padding: 0 14px; }
.textarea { padding: 12px 14px; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(35, 64, 200, .5);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(35, 64, 200, .08);
}
html[data-theme="dark"] .input:focus,
html[data-theme="dark"] .select:focus,
html[data-theme="dark"] .textarea:focus {
  border-color: rgba(127, 209, 199, .55);
  box-shadow: 0 0 0 4px rgba(127, 209, 199, .1);
}
.switch-row { border-radius: 14px; padding: 12px 14px; }
.switch span { background: var(--line-strong); }
.switch input:checked + span { background: var(--brand); }
html[data-theme="dark"] .switch input:checked + span { background: var(--mint); }

.check-chip span { border-radius: 999px; padding: 8px 13px; font-weight: 600; }
.check-chip input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 10px 18px -14px rgba(35, 64, 200, .9);
}

.seg {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 3px;
}
.seg-btn { border-radius: 999px; font-weight: 700; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.seg-btn.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 6px 14px -10px rgba(14, 20, 36, .6);
}
html[data-theme="dark"] .seg-btn.active { background: #232B40; color: var(--mint); }

.song-pick { border-radius: 14px; padding: 11px 13px; transition: border-color .18s ease, background .18s ease; }
.song-pick:has(input:checked) { border-color: rgba(35, 64, 200, .35); background: var(--primary-soft); }
.song-pick input { accent-color: var(--brand); }

.info-box { border-radius: 14px; background: var(--primary-soft); color: var(--brand); border-color: rgba(35, 64, 200, .16); }
html[data-theme="dark"] .info-box { color: var(--primary-dark); }
.alert-box, .ok-box { border-radius: 14px; }

/* ---------- convite / CTA ---------- */

.cta-card {
  border-radius: var(--r-md);
  padding: 15px;
  background: linear-gradient(140deg, var(--primary-soft), var(--surface) 75%);
  border-color: rgba(35, 64, 200, .16);
}
.cta-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 10px 18px -14px rgba(35, 64, 200, .8);
}
.cta-text strong { font-size: 13px; font-weight: 700; }
.cta-text small { font-size: 11.5px; }

/* ---------- "Mais" dentro da folha ---------- */

.sheet-body .menu-list {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.sheet-body .menu-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 9px;
  padding: 13px 14px;
  background: var(--surface);
}
.sheet-body .menu-item:last-child { border-bottom: 1px solid var(--line); margin-bottom: 0; }
.sheet-body .menu-item:active {
  background: var(--primary-soft);
  border-color: rgba(35, 64, 200, .2);
  transform: scale(.99);
}
.sheet-body .menu-item .chev { color: var(--ink-mute); }
.sheet-body .menu-item .notif-badge { position: static; margin-left: 2px; }

/* ---------- detalhes finais ---------- */

/* Botão flutuante fora da rolagem (fica sempre acima da barra inferior). */
.fab-slot {
  position: absolute;
  inset: 0;
  z-index: 19;
  pointer-events: none;
}
.fab-slot .fab { pointer-events: auto; }

/* O "+" da marca encosta na palavra (sem o espaçamento da última letra). */
.brand-word i,
.login-brand-text strong i { margin-left: -0.14em; }

/* Indicador de sincronização no topo. */
.sync-dot {
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
}
html[data-theme="dark"] .sync-dot { border-color: var(--surface); }

/* Caixa "lembrar minha senha" com marca de seleção menta. */
.login .remember-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  border: 1.5px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .06);
  display: grid;
  place-items: center;
  transition: background .18s ease, border-color .18s ease, transform .18s var(--spring);
  accent-color: var(--mint);
}
.login .remember-row input[type="checkbox"]:active { transform: scale(.92); }
.login .remember-row input[type="checkbox"]:checked {
  background: var(--mint);
  border-color: var(--mint);
}
.login .remember-row input[type="checkbox"]:checked::after {
  content: "";
  width: 10px;
  height: 5px;
  border-left: 2.5px solid #07231F;
  border-bottom: 2.5px solid #07231F;
  transform: translateY(-1px) rotate(-45deg);
}

.hero-ministers { color: var(--mint); font-weight: 600; }
.hero-ministers.muted { color: rgba(255, 255, 255, .62); }

/* ---------- correções de contraste e acabamento (2.0.0) ---------- */

/* O nome do grupo dentro do chip acompanha a cor do chip (antes ficava
   branco no tema escuro e sumia sobre o fundo claro do chip). */
.chip b { color: inherit; }

/* A aba "Mais" ativa também usa texto branco sobre o fundo escuro. */
.tab-more.active { color: #fff; }

/* Rótulos da barra inferior com contraste suficiente para leitura. */
.tabbar .tab:not(.active) { color: #5A6579; }
html[data-theme="dark"] .tabbar .tab:not(.active) { color: #97A2B8; }

/* Chips de grupo no tema escuro: fundo translúcido e texto claro. */
html[data-theme="dark"] .group-chip[data-color="orange"] { background: rgba(232, 137, 108, .20) !important; border-color: rgba(232, 137, 108, .42) !important; color: #FFC9B9 !important; }
html[data-theme="dark"] .group-chip[data-color="blue"] { background: rgba(91, 120, 240, .22) !important; border-color: rgba(91, 120, 240, .46) !important; color: #C6D2FF !important; }
html[data-theme="dark"] .group-chip[data-color="green"] { background: rgba(143, 194, 120, .20) !important; border-color: rgba(143, 194, 120, .42) !important; color: #D2EBC4 !important; }
html[data-theme="dark"] .group-chip[data-color="yellow"] { background: rgba(227, 188, 102, .20) !important; border-color: rgba(227, 188, 102, .42) !important; color: #F4DFB0 !important; }
html[data-theme="dark"] .group-chip[data-color="purple"] { background: rgba(177, 131, 190, .22) !important; border-color: rgba(177, 131, 190, .44) !important; color: #EACBF1 !important; }
html[data-theme="dark"] .group-chip[data-color="pink"] { background: rgba(226, 147, 169, .20) !important; border-color: rgba(226, 147, 169, .42) !important; color: #F8CDD6 !important; }
html[data-theme="dark"] .group-chip[data-color="teal"] { background: rgba(127, 209, 199, .20) !important; border-color: rgba(127, 209, 199, .44) !important; color: #B4E9E2 !important; }
html[data-theme="dark"] .group-chip[data-color="red"] { background: rgba(201, 129, 121, .22) !important; border-color: rgba(201, 129, 121, .44) !important; color: #F3C6C0 !important; }

html[data-theme="dark"] .group-badge[data-color="orange"] { background: rgba(232, 137, 108, .26) !important; color: #FFC9B9 !important; }
html[data-theme="dark"] .group-badge[data-color="blue"] { background: rgba(91, 120, 240, .28) !important; color: #C6D2FF !important; }
html[data-theme="dark"] .group-badge[data-color="green"] { background: rgba(143, 194, 120, .26) !important; color: #D2EBC4 !important; }
html[data-theme="dark"] .group-badge[data-color="yellow"] { background: rgba(227, 188, 102, .26) !important; color: #F4DFB0 !important; }
html[data-theme="dark"] .group-badge[data-color="purple"] { background: rgba(177, 131, 190, .28) !important; color: #EACBF1 !important; }
html[data-theme="dark"] .group-badge[data-color="pink"] { background: rgba(226, 147, 169, .26) !important; color: #F8CDD6 !important; }
html[data-theme="dark"] .group-badge[data-color="teal"] { background: rgba(127, 209, 199, .26) !important; color: #B4E9E2 !important; }
html[data-theme="dark"] .group-badge[data-color="red"] { background: rgba(201, 129, 121, .28) !important; color: #F3C6C0 !important; }

/* A câmera do perfil fica acima do avatar (antes era coberta por ele). */
.profile-avatar-btn .avatar-edit { z-index: 2; }

/* Filtros quebram em mais linhas em vez de cortar o último item. */
.filter-row,
.kind-filters,
.study-tools { flex-wrap: wrap; overflow: visible; }

/* Indicador de sincronização na paleta nova (antes era marrom). */
.sync-dot { background: #8E97AB; }
.sync-dot.ok { background: #34C79B; }

/* Evita quebrar "Ministração G2" no meio em telas estreitas. */
.nowrap { white-space: nowrap; }

/* Tom da música dentro da lista do dia (antes ficava só texto solto). */
.setlist-row .key-badge {
  flex: 0 0 auto;
  min-width: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(35, 64, 200, .10);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
  line-height: 1.2;
}
html[data-theme="dark"] .setlist-row .key-badge {
  background: rgba(127, 209, 199, .16);
  color: #B4E9E2;
}

/* Etiquetas pequenas com contraste melhor. */
.badge-soft { color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); }
html[data-theme="dark"] .badge-soft { color: var(--ink-soft); background: var(--surface-2); border-color: var(--line); }
.scale-card .inst span { color: #6F788C; }
html[data-theme="dark"] .scale-card .inst span { color: #98A3B9; }
.scale-note { color: var(--ink-soft); }

/* Teclado de estudo dentro da paleta azul/menta (antes era marrom). */
.piano-wrap {
  background: linear-gradient(160deg, #1B2544, #0B1020);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 34px -26px rgba(0, 0, 0, .9);
}
.piano-key.white {
  background: linear-gradient(180deg, #FDFEFF 0%, #E9EDF7 78%, #D5DBE9 100%);
  box-shadow: inset 0 -4px 6px rgba(14, 20, 36, .14), 0 2px 4px rgba(0, 0, 0, .35);
}
.piano-key.white span { color: #6C7690; }
.piano-key.white.on { background: linear-gradient(180deg, #DDFAF5 0%, #9FE3D8 100%); }
.piano-key.white.root { background: linear-gradient(180deg, #C9D7FF 0%, #8FAAFF 100%); }
.piano-key.white.root span { color: #16256F; }
.piano-key.black { background: linear-gradient(180deg, #243354 0%, #0C1324 100%); }
.piano-key.black span { color: rgba(214, 228, 255, .6); }
.piano-key.black.on { background: linear-gradient(180deg, #2F8F83 0%, #14544C 100%); }
.piano-key.black.root { background: linear-gradient(180deg, #3A5BE6 0%, #1B31A3 100%); }
.piano-hint { color: rgba(214, 228, 255, .62); }

/* Botão flutuante: recolhe ao rolar para baixo (desliza para fora e some). */
.fab-slot .fab { transition: opacity .2s ease, transform .32s ease, box-shadow .2s ease; }
.fab-slot.fab-hidden .fab {
  opacity: 0;
  transform: translateY(calc(100% + 30px)) scale(.9);
  pointer-events: none;
}

.section-title { letter-spacing: .2em; font-size: 9.5px; }

.device::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(14, 20, 36, .04);
  z-index: 60;
}

/* ---------- Oração, participantes da solicitação e ensaio ---------- */

.prayer-week-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(127, 209, 199, .22), rgba(35, 64, 200, .08));
  box-shadow: var(--shadow-sm);
}
.prayer-week-icon {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.prayer-week-icon svg { width: 21px; height: 21px; }
.prayer-week-card > div:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.prayer-week-card b { display: block; font-size: 14px; }
.prayer-week-card small { display: block; font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.prayer-list { display: flex; flex-direction: column; gap: 8px; }
.prayer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.prayer-row.done { border-color: rgba(127, 209, 199, .65); background: rgba(127, 209, 199, .1); }
.prayer-date {
  flex: 0 0 auto;
  width: 42px;
  text-align: center;
  padding: 4px 0;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.prayer-date b { display: block; font-size: 16px; font-family: var(--font-display); line-height: 1.1; }
.prayer-date small { display: block; font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }
.prayer-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prayer-main b { font-size: 13px; }
.prayer-main span { font-size: 11.5px; color: var(--ink-mute); line-height: 1.35; }
.prayer-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #157A6E;
}
.prayer-done-badge svg { width: 13px; height: 13px; }
.prayer-check {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-mute);
  transition: transform .16s var(--spring), background .18s ease, color .18s ease;
}
.prayer-check svg { width: 18px; height: 18px; }
.prayer-check:active { transform: scale(.9); }
.prayer-row.done .prayer-check { display: none; }
.prayer-today {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 14px;
  border-radius: 18px;
  border: 1px solid rgba(35, 64, 200, .28);
  background: linear-gradient(135deg, rgba(35, 64, 200, .12), rgba(127, 209, 199, .18));
  box-shadow: var(--shadow-sm);
}
.prayer-today .cta-text { flex: 1 1 auto; min-width: 0; }
.prayer-today.done { border-color: rgba(127, 209, 199, .7); }

.song-participants {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  padding: 9px 0 2px;
  margin-top: 8px;
  border-top: 1px dashed var(--line);
}
.sp-avatars { display: flex; align-items: center; }
.sp-avatars .mini-avatar { width: 24px; height: 24px; font-size: 9px; margin-left: -7px; border: 2px solid var(--surface); }
.sp-avatars .mini-avatar:first-child { margin-left: 0; }
.song-participants .mini-btn {
  flex: 1 0 100%;
  justify-content: center;
  margin-top: 2px;
}
.sp-text { flex: 1 1 150px; min-width: 0; font-size: 11px; color: var(--ink-mute); line-height: 1.35; }
.sp-text b { color: var(--ink); font-weight: 700; }
.song-rehearsal {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 9px;
  padding: 9px 11px;
  border-radius: 13px;
  background: rgba(127, 209, 199, .14);
  border: 1px solid rgba(127, 209, 199, .45);
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink);
}
.song-rehearsal svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: #157A6E; }
.song-rehearsal b { font-weight: 700; }

.fab.fab-secondary {
  bottom: calc(86px + 56px + 10px + env(safe-area-inset-bottom));
  width: 46px; height: 46px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--line);
  box-shadow: 0 14px 26px -14px rgba(14, 20, 36, .5);
  z-index: 18;
}
.fab.fab-secondary svg { width: 20px; height: 20px; }
.fab.fab-secondary::before { display: none; }

html[data-theme="dark"] .prayer-week-card {
  background: linear-gradient(135deg, rgba(127, 209, 199, .16), rgba(35, 64, 200, .22));
}
html[data-theme="dark"] .prayer-done-badge,
html[data-theme="dark"] .song-rehearsal svg { color: var(--mint, #7FD1C7); }

/* Só em telas com mouse: elevação suave nos cartões. */
@media (hover: hover) and (pointer: fine) {
  .scale-card:hover,
  .song-card:hover,
  .chat-card:hover,
  .group-card:hover,
  .rep-card:hover,
  .setlist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 1px 2px rgba(14, 20, 36, .04), 0 26px 44px -34px rgba(14, 20, 36, .55);
    border-color: var(--line-strong);
  }
  .tab:hover { color: var(--ink); }
  .tab.active:hover { color: #fff; }
  .menu-item:hover, .person-row:hover, .notif-item:hover { background: var(--surface-2); }
  .mini-btn:hover { background: var(--primary-soft); color: var(--brand); border-color: rgba(35, 64, 200, .2); }
  .filter-chip:not(.active):hover { border-color: var(--line-strong); background: var(--surface-2); }
  .chat-card:hover .chat-avatar { transform: scale(1.04); }
  .chat-avatar { transition: transform .22s var(--spring); }
}

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

@media (max-width: 360px) {
  .tab { font-size: 8.5px; }
  .tab svg { width: 20px; height: 20px; }
  .screen-head h1 { font-size: 25px; }
  .date-block { width: 48px; }
  .date-block b { font-size: 19px; }
  .scale-head { padding: 13px; gap: 10px; }
}

/* Telas estreitas: filtros e ferramentas mais compactos para ocuparem
   menos altura sem cortar nenhum item. */
@media (max-width: 380px) {
  .study-tools { gap: 6px; }
  .study-chip { padding: 6px 10px; font-size: 11.5px; }
  .filter-chip { padding: 7px 11px; font-size: 11.5px; }
  .kind-chip { padding: 6px 10px; font-size: 11.5px; }
  .fab { width: 52px; height: 52px; border-radius: 17px; }
}

/* ============================================================
   2.2.2 — foto do grupo, dias concluídos e oração do dia
   ============================================================ */

.chat-avatar.has-photo,
.group-badge.has-photo,
.chat-group-avatar.has-photo {
  overflow: hidden;
  padding: 0;
  background: var(--surface-2);
}
.chat-avatar.has-photo img,
.group-badge.has-photo img,
.chat-group-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.scale-done {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, .14);
  color: #16A34A;
  border: 1px solid rgba(34, 197, 94, .36);
}
.scale-done svg { width: 16px; height: 16px; stroke-width: 3; }

.past-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s var(--spring), border-color .18s ease;
}
.past-toggle:active { transform: scale(.995); }
.past-toggle.open { border-style: solid; }
.past-toggle-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(34, 197, 94, .14);
  color: #16A34A;
}
.past-toggle-icon svg { width: 15px; height: 15px; stroke-width: 3; }
.past-toggle-text { flex: 1 1 auto; text-align: left; }
.past-toggle b {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-mute);
}
.past-toggle-arrow { display: inline-flex; color: var(--ink-mute); }
.past-toggle-arrow svg { width: 15px; height: 15px; }
.scale-list-past { margin-top: 10px; opacity: .94; }
.scale-list-past .scale-card { background: var(--surface-2); }

.prayer-turn {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--brand);
  white-space: nowrap;
}

.chat-group-top {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.chat-group-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.chat-group-top-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.chat-group-top-info b { font-size: 13.5px; }
.chat-group-top-info small { font-size: 11px; color: var(--ink-mute); }

/* Cabeçalho compacto: nome do grupo + membros em um único bloco. */
.chat-group-top { padding: 8px 10px; gap: 9px; margin-bottom: 7px; }
.chat-group-hit {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}
.chat-group-hit > svg { width: 15px; height: 15px; color: var(--ink-mute); flex: 0 0 auto; }
.chat-group-avatar { width: 38px; height: 38px; border-radius: 12px; font-size: 12px; overflow: hidden; }
.chat-group-avatar.has-photo { padding: 0; }
.chat-group-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.chat-group-top-info b { font-size: 13.5px; line-height: 1.25; }
.chat-group-top-info small { font-size: 10.5px; }
.chat-group-top .mini-btn { width: 34px; height: 34px; flex: 0 0 auto; }

/* Barra única do chat: fechar + nome + membros no mesmo bloco. */
.chat-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex: 0 0 auto;
}
.chat-top-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
}
.chat-top-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}
.chat-top-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  color: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.chat-top-avatar.has-photo { padding: 0; }
.chat-top-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.chat-top-avatar svg { width: 18px; height: 18px; }
.chat-top-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.chat-top-info b {
  font-size: 14.5px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-top-info small { font-size: 11px; color: var(--ink-mute); }
.chat-top-photo { width: 34px; height: 34px; flex: 0 0 auto; }

/* Mensagem fixada no topo do chat */
.chat-pinned {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(35, 64, 200, .2);
  border-radius: 12px;
  background: linear-gradient(140deg, var(--primary-soft), var(--surface) 82%);
}
.chat-pinned-icon {
  width: 27px; height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(150deg, #3D5DF0, var(--brand));
  color: #fff;
}
.chat-pinned-icon svg { width: 14px; height: 14px; }
.chat-pinned-open {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink);
  text-align: left;
}
.chat-pinned-open b {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--brand);
}
.chat-pinned-open span {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-pinned-open small { font-size: 10px; color: var(--ink-mute); }
.chat-pinned-clear {
  width: 28px; height: 28px;
  flex: 0 0 auto;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-mute);
}
.chat-pinned-clear svg { width: 13px; height: 13px; }

.chat-msg.pinned .chat-bubble { border-color: rgba(35, 64, 200, .4); }
.chat-pin-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--brand);
  background: var(--primary-soft);
  vertical-align: middle;
}
.chat-pin-tag svg { width: 9px; height: 9px; }
.chat-msg.flash .chat-bubble { animation: chatFlash 1.4s ease; }
@keyframes chatFlash {
  0%, 100% { box-shadow: 0 8px 16px -16px rgba(14, 20, 36, .8); }
  35% { box-shadow: 0 0 0 3px rgba(35, 64, 200, .35); }
}

/* Folha de opções e prazos da fixação */
.chat-option-preview {
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.chat-options { display: flex; flex-direction: column; gap: 9px; }
.chat-option {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  font: inherit;
  text-align: left;
  color: var(--ink);
}
.chat-option:active { background: var(--primary-soft); }
.chat-option-icon {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--brand);
}
.chat-option-icon svg { width: 18px; height: 18px; }
.chat-option-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-option-text b { font-size: 13px; }
.chat-option-text small { font-size: 11px; color: var(--ink-mute); }
.chat-option > svg { width: 16px; height: 16px; color: var(--ink-mute); flex: 0 0 auto; }
.chat-option.danger .chat-option-icon { background: var(--danger-soft); color: var(--danger); }
.chat-option.danger .chat-option-text b { color: var(--danger); }

.pin-durations { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.pin-duration {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  font: inherit;
  text-align: left;
  color: var(--ink);
}
.pin-duration:active { background: var(--primary-soft); }
.pin-duration b { font-size: 13.5px; }
.pin-duration small { font-size: 10.5px; color: var(--ink-mute); }

.group-photo-preview {
  width: 168px;
  height: 168px;
  margin: 4px auto 10px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 18px 40px -24px rgba(14, 20, 36, .7), inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.group-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.group-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
}
.group-photo-hint {
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
  margin: 0 0 14px;
  line-height: 1.45;
}

/* ============================================================
   VISUAL 2.4 — "Aurora"
   Camada visual nova por cima de tudo. Regras:
   - mesma paleta (azul profundo + menta);
   - animações só com transform/opacity do contêiner; itens de lista
     animam SÓ com transform (se a animação não rodar, o conteúdo
     continua visível — nunca fica tela em branco);
   - "reduzir movimento" do sistema desliga tudo (regra global acima).
   ============================================================ */

:root {
  --grad-brand: linear-gradient(135deg, #4767F0 0%, #2340C8 48%, #172A8C 100%);
  --grad-mint: linear-gradient(135deg, #9BE3D9 0%, #5FC2B5 100%);
  --grad-ink: linear-gradient(135deg, #1B2442 0%, #0E1424 100%);
  --r-card: 22px;
  --shadow-card: 0 1px 2px rgba(14, 20, 36, .04), 0 10px 28px -18px rgba(28, 44, 120, .28);
  --shadow-float: 0 24px 48px -22px rgba(23, 42, 140, .55);
  --tabbar-space: 168px;
  --glass: rgba(255, 255, 255, .78);
  --glass-solid: rgba(255, 255, 255, .94);
  --glass-line: rgba(255, 255, 255, .6);
  --aurora-a: rgba(71, 103, 240, .30);
  --aurora-b: rgba(127, 209, 199, .38);
}
html[data-theme="dark"] {
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .45), 0 14px 30px -20px rgba(0, 0, 0, .9);
  --glass: rgba(14, 19, 33, .74);
  --glass-solid: rgba(18, 23, 38, .95);
  --glass-line: rgba(255, 255, 255, .07);
  --aurora-a: rgba(71, 103, 240, .30);
  --aurora-b: rgba(127, 209, 199, .16);
}

/* ---------- fundo "aurora" (fica atrás das telas, não rola) ---------- */
.shell { isolation: isolate; }
.shell::before {
  content: "";
  position: absolute;
  inset: -20% -30% auto -30%;
  height: 70%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 22% 30%, var(--aurora-a), transparent 70%),
    radial-gradient(34% 38% at 80% 18%, var(--aurora-b), transparent 70%);
  filter: blur(10px);
  animation: auroraDrift 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%  { transform: translate3d(6%, 3%, 0) rotate(4deg); }
  100% { transform: translate3d(-5%, 5%, 0) rotate(-3deg); }
}
.view { position: relative; z-index: 1; background: transparent; }
.topbar, .tabbar, .fab-slot { z-index: 20; }
.topbar { z-index: 6; }

/* ---------- topo de vidro ---------- */
.topbar {
  background: linear-gradient(180deg, var(--glass-solid), var(--glass));
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  backdrop-filter: saturate(170%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand-word { letter-spacing: .09em; }
.brand-mark {
  border-radius: 14px;
  background: var(--grad-brand);
  animation: markIn .7s var(--spring) both;
}
.brand-mark::after { animation: markShine 6s ease-in-out 1.2s infinite; }
@keyframes markIn { from { transform: rotate(-12deg) scale(.7); } to { transform: none; } }
@keyframes markShine {
  0%, 80%, 100% { opacity: 1; transform: translateX(0); }
  88% { opacity: .2; transform: translateX(30%); }
}
.icon-btn {
  border-radius: 14px;
  background: var(--surface);
  transition: transform .2s var(--spring), background .2s ease, color .2s ease, box-shadow .2s ease;
}
.notif-btn.has-unread svg { animation: bellRing 2.6s ease-in-out 1s infinite; transform-origin: 50% 10%; }
@keyframes bellRing {
  0%, 70%, 100% { transform: rotate(0); }
  74% { transform: rotate(14deg); }
  80% { transform: rotate(-12deg); }
  86% { transform: rotate(8deg); }
  92% { transform: rotate(-4deg); }
}

/* ---------- títulos das telas ---------- */
.screen-head { margin: 6px 2px 22px; }
.screen-head > div::before {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px 5px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--brand);
  font-size: 9px;
  letter-spacing: .2em;
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px rgba(35, 64, 200, .10);
}
html[data-theme="dark"] .screen-head > div::before { color: #B9C6FF; box-shadow: inset 0 0 0 1px rgba(143, 164, 255, .18); }
.screen-head h1 {
  font-size: 30px;
  letter-spacing: -.04em;
  background: linear-gradient(120deg, var(--ink) 0%, var(--ink) 55%, var(--brand) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 2px;
}
html[data-theme="dark"] .screen-head h1 {
  background-image: linear-gradient(120deg, #FFFFFF 0%, #E6EAF5 55%, #9BE3D9 100%);
}
.view.view-in .screen-head h1 { animation: riseIn .5s var(--spring) .04s both; }
.view.view-in .screen-head p { animation: riseIn .5s var(--spring) .1s both; }
@keyframes riseIn { from { transform: translate3d(0, 10px, 0); } to { transform: none; } }

/* ---------- entrada da tela ---------- */
.view.view-in { animation: viewIn2 .42s var(--spring) both; }
@keyframes viewIn2 {
  from { opacity: .001; transform: translate3d(var(--slide-x, 18px), 8px, 0); }
  to { opacity: 1; transform: none; }
}

/* Cascata das listas: só transform (o conteúdo nunca fica invisível). */
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row) {
  animation: listIn .55s var(--spring) backwards;
}
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(2) { animation-delay: .04s; }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(3) { animation-delay: .08s; }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(4) { animation-delay: .12s; }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(5) { animation-delay: .16s; }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(n+6) { animation-delay: .2s; }
.view.view-in > :is(.hero, .verse-card, .month-nav, .cta-card, .profile-card, .prayer-week-card) { animation: listIn .6s var(--spring) backwards; }
.view.view-in > .verse-card { animation-delay: .06s; }
.view.view-in > .month-nav { animation-delay: .1s; }
@keyframes listIn {
  from { transform: translate3d(0, 16px, 0) scale(.985); }
  to { transform: none; }
}

/* ---------- cartões ---------- */
.scale-card, .song-card, .group-card, .setlist-card, .rep-card, .chat-card,
.verse-card, .menu-list, .stat, .person-row, .prayer-week-card, .month-nav {
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  transition: transform .25s var(--spring), box-shadow .25s ease, border-color .25s ease;
}
:is(.scale-card, .song-card, .chat-card, .rep-card, .person-row, .stat):active { transform: scale(.985); }
.empty {
  border-radius: var(--r-card);
  border-style: dashed;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}
.empty > :first-child { animation: floatY 4.5s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Cartão de grupo no modo noturno: o topo não fica mais "cinza solto". */
html[data-theme="dark"] .group-head {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent) !important;
  border-bottom: 1px solid var(--line);
}

/* ---------- destaque (próximo encontro) ---------- */
.hero {
  border-radius: 26px;
  background:
    radial-gradient(120% 140% at 88% -20%, rgba(127, 209, 199, .34), transparent 58%),
    linear-gradient(145deg, #3553E6 0%, #2340C8 35%, #172A8C 70%, #0E1424 100%);
}
.hero::before { animation: orbFloat 9s ease-in-out infinite alternate; }
@keyframes orbFloat { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-40px, 30px, 0) scale(1.15); } }
.hero::after {
  inset: 0 auto 0 0;
  width: 45%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .16) 50%, transparent 100%);
  transform: translate3d(-120%, 0, 0) skewX(-12deg);
  animation: sheenMove 6s ease-in-out 1s infinite;
}
@keyframes sheenMove {
  0% { transform: translate3d(-120%, 0, 0) skewX(-12deg); }
  45%, 100% { transform: translate3d(320%, 0, 0) skewX(-12deg); }
}
.hero-date { animation: datePop .7s var(--spring) .15s both; }
@keyframes datePop { from { transform: scale(.7) rotate(-6deg); } to { transform: none; } }

/* ---------- barra inferior de vidro ---------- */
.tabbar {
  background: var(--glass-solid);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--glass-line);
  border-radius: 26px;
  height: 66px;
  box-shadow: 0 24px 50px -24px rgba(14, 20, 36, .55), 0 0 0 1px rgba(14, 20, 36, .05), inset 0 1px 0 rgba(255, 255, 255, .6);
}
html[data-theme="dark"] .tabbar {
  box-shadow: 0 26px 50px -22px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .05), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.tab { border-radius: 19px; }
.tab.active,
html[data-theme="dark"] .tab.active {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 12px 22px -12px rgba(35, 64, 200, .95), inset 0 1px 0 rgba(255, 255, 255, .22);
  animation: pillIn .5s var(--spring);
}
.tab.active svg { color: #BFF3EA; }
.tab.active::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  display: none;
}
@keyframes pillIn {
  0% { transform: scale(.78); }
  60% { transform: scale(1.04); }
  100% { transform: none; }
}
.tab-more.active { color: #fff; }

/* ---------- botão flutuante ---------- */
.fab {
  border-radius: 20px;
  background: var(--grad-brand);
  box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.fab:not(.fab-secondary)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(127, 209, 199, .7);
  opacity: 0;
  animation: fabRing 3.2s ease-out 1.2s infinite;
  pointer-events: none;
}
@keyframes fabRing {
  0% { transform: scale(1); opacity: .8; }
  60%, 100% { transform: scale(1.38); opacity: 0; }
}
.fab svg { transition: transform .35s var(--spring); }
.fab:active svg { transform: rotate(90deg); }
.fab-slot:not(.fab-hidden) .fab { animation: fabIn .6s var(--spring) backwards; }
@keyframes fabIn { from { transform: scale(.4) rotate(-45deg); } to { transform: none; } }
.fab.fab-secondary { background: var(--glass-solid); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }

/* ---------- botões, chips e filtros ---------- */
.btn-primary:not(.login .btn-primary) {
  background: var(--grad-brand);
  box-shadow: 0 12px 24px -14px rgba(35, 64, 200, .9), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn, .mini-btn, .filter-chip, .report-tab, .chip { transition: transform .2s var(--spring), background .2s ease, color .2s ease, box-shadow .2s ease; }
.btn:active, .mini-btn:active, .filter-chip:active, .report-tab:active { transform: scale(.95); }
.filter-chip.active, .report-tab.active {
  background: var(--grad-brand) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 10px 20px -12px rgba(35, 64, 200, .9);
}
/* Abas do relatório quebram linha em vez de cortar "Equipe". */
.report-tabs { flex-wrap: wrap; overflow: visible; }

/* ---------- folhas (sheets) ---------- */
.sheet-backdrop { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet { border-radius: 32px 32px 0 0; transition: transform .5s var(--spring); }
.sheet-wrap.is-open .sheet-body > * { animation: listIn .5s var(--spring) .06s backwards; }
.sheet-grip { width: 42px; border-radius: 99px; }
.menu-item .mi-icon { transition: transform .3s var(--spring); }
.menu-item:active .mi-icon { transform: scale(.88) rotate(-6deg); }

/* ---------- avisos (toast) ---------- */
.toast { border-radius: 18px; transition: opacity .25s ease, transform .45s var(--spring); }

/* ---------- login ---------- */
.login::before { animation: auroraDrift 18s ease-in-out infinite alternate; }
.login-inner > * { animation: riseIn .7s var(--spring) both; }
.login-inner > :nth-child(2) { animation-delay: .06s; }
.login-inner > :nth-child(3) { animation-delay: .12s; }
.login-inner > :nth-child(4) { animation-delay: .18s; }
.login-inner > :nth-child(n+5) { animation-delay: .24s; }
.login-mark { animation: markIn .9s var(--spring) both; }
.login .btn-primary { position: relative; overflow: hidden; }
.login .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .45) 50%, transparent 100%);
  transform: translate3d(-120%, 0, 0) skewX(-12deg);
  animation: sheenMove 4.5s ease-in-out 1.5s infinite;
  pointer-events: none;
}

/* ---------- avatar e perfil ---------- */
.avatar-btn { background: conic-gradient(from 0deg, var(--brand), var(--mint), var(--brand)); }
.profile-card { border-radius: 26px; }

/* ---------- celulares pequenos ---------- */
@media (max-width: 360px) {
  .screen-head h1 { font-size: 26px; }
  .tabbar { left: 8px; right: 8px; }
}

/* ---------- acabamento extra ---------- */
/* Brilho fino no alto dos cartões (efeito "vidro polido"). */
:is(.scale-card, .song-card, .group-card, .chat-card, .verse-card, .stat, .setlist-card, .rep-card) { position: relative; }
:is(.scale-card, .song-card, .group-card, .chat-card, .verse-card, .stat, .setlist-card, .rep-card):not(.today):not(.mine)::before {
  content: "";
  position: absolute;
  left: 18px; right: 18px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 209, 199, .7), rgba(71, 103, 240, .5), transparent);
  opacity: .55;
  pointer-events: none;
  z-index: 1;
}
/* Títulos de seção com marcador em gradiente. */
.section-title > :first-child::before {
  content: "";
  display: inline-block;
  width: 14px; height: 3px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 3px;
  background: var(--grad-mint);
}
/* Números das estatísticas em gradiente. */
.stat b {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme="dark"] .stat b { background-image: linear-gradient(135deg, #B9C6FF, #9BE3D9); }
/* Degradê embaixo da barra flutuante: o conteúdo some suavemente em vez
   de aparecer cortado entre a barra e a borda da tela. */
.shell::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(96px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 85%, transparent) 55%, var(--bg) 100%);
  pointer-events: none;
  z-index: 18;
}
html[data-theme="dark"] .fab:not(.fab-secondary)::after { border-color: rgba(143, 164, 255, .7); }

/* ---------- campo do chat (corrige caixa de texto espremida) ----------
   Linha 1: caixa de texto larga + enviar. Linha 2: @, foto, áudio, emoji. */
.chat-form,
.sheet-wrap.full .chat-form {
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 8px;
  padding-left: 12px;
  padding-right: 12px;
  background: var(--glass-solid);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.chat-form .input {
  order: 1;
  flex: 1 1 calc(100% - 56px);
  min-width: 0;
}
.chat-form .chat-send { order: 2; }
.chat-form .chat-mic {
  order: 3;
  width: 36px; height: 36px;
  border-radius: 12px;
  flex: 0 0 auto;
}
.chat-form .chat-mic svg { width: 18px; height: 18px; }
.chat-form .chat-mention-btn { font-size: 15px; font-weight: 800; }
.chat-form .chat-photo-input { order: 9; }
.chat-form .input:focus { box-shadow: 0 0 0 3px rgba(35, 64, 200, .14); border-color: rgba(35, 64, 200, .4); }

/* ============================================================
   2.4.1 — DESEMPENHO
   O 2.4.0 travava em celulares mais simples. Aqui:
   - sem desfoque (backdrop-filter): era recalculado a cada quadro;
   - fundo "aurora" parado (antes se mexia sem parar);
   - animações infinitas viram poucas repetições ou saem;
   - entradas mais curtas; cascata só nos 6 primeiros itens;
   - folhas (menus) abrem sem animar cada item.
   ============================================================ */
.topbar, .tabbar, .fab.fab-secondary, .sheet-backdrop, .sheet-wrap.full .sheet-backdrop, .chat-form, .sheet-wrap.full .chat-form {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.topbar { background: var(--surface); }
html[data-theme="dark"] .topbar { background: #0B0F1C; }
.tabbar { background: var(--surface); }
.fab.fab-secondary { background: var(--surface); }
.chat-form, .sheet-wrap.full .chat-form { background: var(--surface); }

.shell::before { animation: none; filter: none; will-change: auto; }
.login::before { animation: none; }
.brand-mark::after { animation: none; }
.hero::before { animation: none; }
.empty > :first-child { animation: none; }
.hero::after { animation-iteration-count: 2; }
.login .btn-primary::after { animation-iteration-count: 2; }
.notif-btn.has-unread svg { animation-iteration-count: 2; }
.fab:not(.fab-secondary)::after { animation-iteration-count: 3; }

.view.view-in { animation-duration: .26s; animation-timing-function: var(--ease); }
.view.view-in .screen-head h1, .view.view-in .screen-head p { animation-duration: .3s; }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row) { animation-duration: .32s; animation-timing-function: var(--ease); }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(2) { animation-delay: .03s; }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(3) { animation-delay: .06s; }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(4) { animation-delay: .09s; }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(5) { animation-delay: .12s; }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(6) { animation-delay: .15s; }
.view.view-in :is(.scale-card, .song-card, .group-card, .chat-card, .stat, .person-row, .setlist-card, .rep-card, .menu-item, .notif-item, .rank-row, .prayer-row):nth-child(n+7) { animation: none; }
.view.view-in > :is(.hero, .verse-card, .month-nav, .cta-card, .profile-card, .prayer-week-card) { animation-duration: .32s; animation-timing-function: var(--ease); }
.view.view-in > .verse-card { animation-delay: .04s; }
.view.view-in > .month-nav { animation-delay: .07s; }

.sheet-wrap.is-open .sheet-body > * { animation: none; }
.sheet { transition: transform .32s var(--ease); }

.scale-card, .song-card, .group-card, .setlist-card, .rep-card, .chat-card,
.verse-card, .menu-list, .stat, .person-row, .prayer-week-card, .month-nav {
  transition: transform .16s var(--ease);
}
.tab.active, html[data-theme="dark"] .tab.active { animation-duration: .3s; }
.fab-slot:not(.fab-hidden) .fab { animation-duration: .36s; }

/* ---------- 2.4.2: duplas de guitarra e "Todos" na escala ---------- */
.duo-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.duo-pick {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  transition: transform .14s var(--ease), background .15s ease, color .15s ease;
}
.duo-pick:active { transform: scale(.95); background: var(--primary-soft); color: var(--brand); }
html[data-theme="dark"] .duo-pick:active { color: #B9C6FF; }
.scale-all-ministers {
  padding: 12px;
  border-radius: 16px;
  background: var(--primary-soft);
  border: 1px solid rgba(35, 64, 200, .14);
}
html[data-theme="dark"] .scale-all-ministers { border-color: rgba(143, 164, 255, .2); }
