:root{
  --bg:#050B16; --card:#0B1220; --card2:#111827; --border:#253046;
  --text:#F3F4F6; --muted:#A7B0C0; --primary:#5B4CF5; --primary2:#8B5CF6; --danger:#EF4444; --ok:#22C55E;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;font-size:16px}
a{color:#B9D7FF;text-decoration:none} a:hover{text-decoration:underline}
.page{min-height:100vh;padding:10px;display:flex;justify-content:center;background:var(--bg)}
.center-page{align-items:center}.with-bottom{padding-bottom:96px}.app-shell{width:100%;max-width:680px;margin:0 auto;display:flex;flex-direction:column;gap:12px}.auth-card{width:100%;max-width:480px}.auth-card.large{max-width:760px}
h1{font-size:clamp(1.8rem,6vw,3rem);line-height:1.05;margin:0 0 12px}h2{font-size:1.35rem;margin:0 0 10px}h3{font-size:1.05rem;margin:0 0 8px}.muted{color:var(--muted)}
.card{background:var(--card);border:1px solid rgba(255,255,255,.04);border-radius:22px;padding:18px;box-shadow:0 10px 28px rgba(0,0,0,.18)}
.form{display:flex;flex-direction:column;gap:12px}.grid-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.full{grid-column:1/-1}.compact input,.compact select{min-height:42px}
label{display:flex;flex-direction:column;gap:6px;color:#CFE1FF}input,select,textarea{width:100%;border:1px solid var(--border);border-radius:16px;background:#08111F;color:var(--text);padding:14px 16px;font:inherit;outline:none}textarea{min-height:90px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:#60A5FA;box-shadow:0 0 0 3px rgba(96,165,250,.12)}
.btn,button{border:0;border-radius:16px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:white;font-weight:800;padding:14px 18px;min-height:48px;cursor:pointer}.btn-secondary{border:1px solid var(--border);border-radius:14px;background:var(--card2);color:#CFE1FF;font-weight:700;padding:10px 14px;cursor:pointer}.danger{color:#FCA5A5!important}.link-btn{background:transparent;color:#B9D7FF;padding:4px 8px;min-height:auto}.icon-btn{margin-left:auto}.alert{padding:14px 16px;border-radius:16px;margin:8px 0}.alert-error{background:#32131E;border:1px solid #9F3345;color:#FFD4DC}.alert-success{background:#0F2E21;border:1px solid #22C55E;color:#C7F9D7}
.topbar{position:sticky;top:0;z-index:20;background:rgba(5,11,22,.88);backdrop-filter:blur(10px);display:flex;align-items:center;gap:12px;padding:10px max(10px,calc((100vw - 680px)/2));border-bottom:1px solid rgba(255,255,255,.04)}.brand{font-size:1.2rem;font-weight:900;color:white}.menu-link{font-size:1.5rem}.avatar,.avatar-small{width:46px;height:46px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#1E293B;color:white;font-weight:900}.avatar-small{margin-left:auto;width:36px;height:36px}
.bottom-nav{position:fixed;left:50%;bottom:10px;transform:translateX(-50%);width:min(680px,calc(100vw - 20px));background:#071222;border-radius:24px;padding:10px;display:grid;grid-template-columns:repeat(2,1fr);gap:8px;z-index:30}.bottom-four{grid-template-columns:repeat(4,1fr)}.bottom-nav a{text-align:center;padding:14px 8px;border-radius:18px;color:#BFC7D5;font-weight:800;white-space:nowrap;font-size:clamp(.8rem,3vw,1rem)}.bottom-nav a.active{background:linear-gradient(135deg,var(--primary),var(--primary2));color:white;text-decoration:none}
.user-card,.group-card,.ministry-header,.post-head,.profile-card{display:flex;align-items:center;gap:12px}.group-card img,.ministry-header img,.post-head img{width:60px;height:60px;object-fit:cover;border-radius:12px}.group-card{justify-content:space-between}.ministry-header{padding:10px 0}.ministry-header img{width:76px;height:76px}
.media-view{width:100%;max-height:520px;object-fit:contain;border-radius:18px;background:#000}.post-card{display:flex;flex-direction:column;gap:12px}.actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.comments{border-top:1px solid rgba(255,255,255,.06);padding-top:8px}.comment-form{display:flex;gap:8px}.comment-form input{flex:1}.quick-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.big-option{min-height:120px;display:flex;flex-direction:column;justify-content:center}.event-card,.music-row{background:var(--card2);border-radius:16px;padding:14px;margin:10px 0}.search-form,.inline-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.inline-form input,.inline-form select{flex:1;min-width:140px}.file-label{border:1px dashed var(--border);padding:16px;border-radius:16px;text-align:center;color:#B9D7FF}.file-label input{display:none}.file-mini{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:var(--card2);font-size:1.4rem}.file-mini input{display:none}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}.gallery-item{padding:10px}.gallery-item img,.gallery-item video{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:14px}.chat-list{display:flex;flex-direction:column;gap:10px;min-height:50vh}.bubble{max-width:min(80%,520px);padding:12px 14px;border-radius:18px;background:var(--card2)}.bubble.mine{align-self:flex-end;background:#173E2B}.bubble.other{align-self:flex-start}.bubble-name{font-weight:800;color:#DCEBFF}.bubble-name span{font-weight:500;color:var(--muted);font-size:.85rem}.bubble small{display:block;color:var(--muted);font-size:.75rem}.chat-form{position:sticky;bottom:82px;background:var(--bg);padding:8px 0;display:flex;gap:8px}.chat-form input[name="mensagem"]{flex:1}.check-row{display:flex;align-items:center;gap:10px;background:var(--card2);border-radius:14px;padding:12px}.check-row input[type=checkbox]{width:auto}.stacked{flex-direction:column;align-items:stretch}.check-inline{flex-direction:row;align-items:center}.check-inline input{width:auto}.auth-links{display:flex;justify-content:space-between;gap:12px;margin-top:16px}
@media (max-width:520px){.page{padding:10px 10px 110px}.card{border-radius:20px;padding:16px}.comment-form,.search-form,.inline-form{flex-direction:column;align-items:stretch}.bottom-nav{bottom:8px}.bottom-four a{font-size:.78rem;padding:12px 4px}.grid-form{grid-template-columns:1fr}.auth-links{flex-direction:column;text-align:center}.ministry-header img{width:64px;height:64px}}
.avatar-img,.avatar-small img{width:100%;height:100%;object-fit:cover;border-radius:50%}.profile-card .avatar-img{width:72px;height:72px}.member-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.06)}.member-row:last-child{border-bottom:0}.member-row img{width:44px;height:44px;object-fit:cover;border-radius:50%}.music-card .inline-form{margin-top:12px}.ministry-header h1{margin-bottom:2px}@media(max-width:520px){.profile-card{align-items:center}.profile-card .avatar-img{width:64px;height:64px}}

/* Atualizações visuais/profissionais */
.logo-wrap{display:flex;justify-content:center;align-items:center;margin:0 auto 14px}.auth-logo{width:min(210px,52vw);height:auto;display:block}.auth-logo.small{width:min(160px,42vw)}.bottom-logo{margin-top:24px}.bottom-logo img{width:min(280px,70vw);height:auto}.keep-login{background:rgba(255,255,255,.03);border-radius:14px;padding:10px 12px}.small-btn{padding:9px 14px;min-height:auto;white-space:nowrap}.home-user-card{gap:14px}.home-user-card .avatar-img{width:56px;height:56px;border-radius:50%;object-fit:cover}.home-user-info{min-width:0;flex:1}.flat-card{border-radius:22px;padding:14px 16px}.verse-card{font-size:1rem;line-height:1.5}.status-line.ok{color:var(--ok);font-weight:800}.status-line.no{color:#FCA5A5;font-weight:800}.birthday-list{display:flex;flex-direction:column;gap:10px}.birthday-row{display:flex;align-items:center;gap:12px;background:var(--card2);border-radius:16px;padding:10px}.birthday-row img{width:46px;height:46px;border-radius:50%;object-fit:cover}.birthday-today{border:1px solid #FBBF24;background:rgba(251,191,36,.08)}
.gallery-upload{margin-bottom:18px}.gallery-grid.profissional{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:18px;align-items:start}.gallery-item{display:flex;flex-direction:column;gap:10px;padding:12px;min-width:0}.gallery-media{width:100%;background:#050B16;border-radius:16px;overflow:hidden}.gallery-media img,.gallery-media video{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:16px;display:block}.gallery-info{display:flex;flex-direction:column;gap:8px;min-width:0}.gallery-info strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gallery-actions{display:flex;gap:10px;flex-wrap:wrap}.file-preview{aspect-ratio:1/1;display:grid;place-items:center;font-size:2rem;background:#111827;border-radius:16px}
.chat-line{display:flex;gap:8px;align-items:flex-end}.chat-line.mine{justify-content:flex-end}.chat-line.other{justify-content:flex-start}.chat-avatar{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#1E293B;color:white;font-weight:900;flex:0 0 36px}.chat-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.bubble{word-break:break-word}.bubble.mine{border-bottom-right-radius:6px}.bubble.other{border-bottom-left-radius:6px}
.member-permission-row{align-items:flex-start;gap:12px}.mini-btn{padding:4px 8px;font-size:12px;border-radius:6px;width:auto}.event-playlist-actions{flex-wrap:wrap}.member-info{flex:1;min-width:170px}.member-role-form{flex:1;min-width:220px}.member-role-form select{min-width:130px}.music-player iframe{width:100%;aspect-ratio:16/9;border:0;border-radius:18px;background:#000}.player-frame-wrap{margin:10px 0}.player-actions{margin-top:12px}.player-actions button{flex:1}.about-card{text-align:center}.about-card p{text-align:left}.about-card .bottom-logo{text-align:center}.topbar .avatar-small img{display:block}.user-card .avatar-img{width:56px;height:56px;border-radius:50%;object-fit:cover}
@media(max-width:520px){.gallery-grid.profissional{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.gallery-item{padding:10px;border-radius:18px}.gallery-actions{gap:8px;font-size:.9rem}.home-user-card{padding:14px}.home-user-card .btn-secondary{font-size:.85rem}.member-permission-row{flex-direction:column}.member-role-form{width:100%;min-width:0}.player-actions{flex-direction:column}.chat-avatar{width:32px;height:32px;flex-basis:32px}.bubble{max-width:calc(100% - 44px)}}


/* Planos, suporte, playlist e biblioteca musical */
.ministry-nav{grid-template-columns:repeat(6,1fr)}
.bottom-six{grid-template-columns:repeat(6,1fr)}
.bottom-five{grid-template-columns:repeat(5,1fr)}
.ministry-nav a{display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 4px}
.ministry-nav a span{font-size:1.05rem}
.ministry-nav a small{font-size:.72rem;font-weight:800}
.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.page-icon{font-size:2.2rem;background:var(--card);border-radius:18px;padding:10px}
.pill{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);background:#08111F;border-radius:999px;padding:6px 10px;color:#CFE1FF;font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}
.plan-card{display:flex;flex-direction:column;gap:10px}
.plan-card.selected{border-color:#60A5FA;box-shadow:0 0 0 2px rgba(96,165,250,.12),0 10px 28px rgba(0,0,0,.18)}
.plan-top{display:flex;justify-content:space-between;align-items:center}
.plan-icon,.support-icon{font-size:2rem}
.price{font-size:1.45rem;font-weight:900;margin:0;color:#fff}
.plan-current{border-color:rgba(96,165,250,.35)}
.info-card{background:linear-gradient(135deg,rgba(91,76,245,.15),rgba(139,92,246,.08))}
.support-summary{display:flex;justify-content:space-between;align-items:center;gap:12px}
.ticket-card{background:var(--card2);border:1px solid rgba(255,255,255,.06);border-radius:18px;padding:14px;margin:12px 0}
.ticket-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.status-badge{border-radius:999px;padding:6px 10px;font-weight:900;font-size:.75rem;text-transform:uppercase;background:#1E293B;color:#DCEBFF;white-space:nowrap}
.status-aberta{background:#312E81;color:#E0E7FF}.status-em_analise{background:#78350F;color:#FEF3C7}.status-respondida{background:#064E3B;color:#D1FAE5}.status-resolvida{background:#14532D;color:#DCFCE7}.status-cancelada{background:#4B1117;color:#FECACA}
.solution-box{background:#061B15;border:1px solid rgba(34,197,94,.35);border-radius:16px;padding:12px;margin:10px 0}
.quick-card{display:flex;flex-direction:column;gap:6px;min-height:118px;justify-content:center}
.quick-card>span:first-child{font-size:1.8rem}
.music-library{display:flex;flex-direction:column;gap:12px}
.music-card.professional{display:flex;flex-direction:column;gap:14px}
.music-card-head{display:flex;gap:12px;align-items:center}
.music-icon{width:52px;height:52px;border-radius:18px;background:linear-gradient(135deg,var(--primary),var(--primary2));display:grid;place-items:center;font-size:1.5rem;flex:0 0 auto}
.music-actions-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.music-event-form{background:#08111F;border:1px solid rgba(255,255,255,.06);border-radius:16px;padding:12px}
.music-search button{white-space:nowrap}
.player-actions .active{border-color:#60A5FA;box-shadow:0 0 0 3px rgba(96,165,250,.12);background:#10233D}
.danger-zone{border-color:rgba(239,68,68,.35)}
.danger-zone hr{border:0;border-top:1px solid rgba(255,255,255,.08);width:100%;margin:12px 0}
button:disabled{opacity:.55;cursor:not-allowed;filter:grayscale(.35)}
@media(max-width:640px){
  .bottom-six,.bottom-five{grid-template-columns:repeat(3,1fr)}
  .ministry-nav a{padding:8px 4px}
  .ticket-head,.support-summary{flex-direction:column}
  .music-card-head{align-items:flex-start}
}

/* Versão 2: menu superior, notificações, relatórios, tema e busca YouTube */
body.group-themed, body.group-themed .page{background:var(--group-bg,var(--bg));color:var(--group-text,var(--text));font-family:var(--group-font,Inter),system-ui,-apple-system,Segoe UI,Arial,sans-serif}
body.group-themed .card, body.group-themed .topbar, body.group-themed .bottom-nav{color:var(--group-text,var(--text))}
.menu-link.menu-toggle{background:transparent;color:#B9D7FF;border:0;min-height:auto;padding:4px 8px;font-size:1.55rem;border-radius:12px}
.menu-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.48);z-index:80;backdrop-filter:blur(2px)}
.group-drawer{position:fixed;top:0;left:0;width:min(380px,92vw);height:100vh;background:#071222;border-right:1px solid rgba(255,255,255,.08);z-index:90;padding:16px;overflow:auto;box-shadow:18px 0 40px rgba(0,0,0,.35)}
.drawer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px;padding-bottom:14px;border-bottom:1px solid rgba(255,255,255,.08)}
.drawer-close{background:#111827;border:1px solid var(--border);width:42px;height:42px;min-height:42px;border-radius:14px;padding:0;font-size:1.5rem}
.drawer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.drawer-grid a{min-height:100px;border:1px solid rgba(255,255,255,.07);background:#0B1220;border-radius:24px;padding:16px;display:flex;flex-direction:column;justify-content:center;gap:10px;color:#B9D7FF;font-size:1.02rem}
.drawer-grid a:hover{text-decoration:none;border-color:rgba(96,165,250,.45);transform:translateY(-1px)}
.drawer-grid a span{font-size:1.65rem}.drawer-grid a strong{line-height:1.2}
.member-count-badge{display:inline-flex;margin-top:6px;border:1px solid rgba(255,255,255,.12);border-radius:999px;padding:5px 10px;background:rgba(255,255,255,.04);font-size:.85rem;color:#CFE1FF}
.theme-preview{border-radius:18px;padding:14px;border:1px dashed rgba(255,255,255,.18);background:var(--preview-bg,#050B16);color:var(--preview-text,#F3F4F6);font-family:var(--preview-font,Inter),system-ui}
.youtube-results{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.youtube-result{display:grid;grid-template-columns:96px 1fr auto;gap:12px;align-items:center;background:var(--card2);border:1px solid rgba(255,255,255,.06);border-radius:18px;padding:10px}
.youtube-result img{width:96px;height:54px;object-fit:cover;border-radius:12px;background:#000}.youtube-result h3{margin:0;font-size:1rem}.youtube-result button{white-space:nowrap}
.category-badge{display:inline-flex;align-items:center;gap:5px;background:#111827;border:1px solid var(--border);border-radius:999px;padding:4px 9px;font-size:.75rem;font-weight:900;color:#DCEBFF;text-transform:uppercase}
.top-music-list{display:flex;flex-direction:column;gap:8px}.top-music-item{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:10px;background:var(--card2);border-radius:16px;padding:10px}.rank-badge{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,var(--primary),var(--primary2));font-weight:900}.play-count{font-weight:900;color:#CFE1FF}
.report-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.metric-card{background:var(--card2);border-radius:18px;padding:16px}.metric-card strong{font-size:1.8rem;display:block}.chart-card{overflow:hidden}.bar-chart{display:flex;flex-direction:column;gap:10px}.bar-row{display:grid;grid-template-columns:minmax(110px,1fr) 2fr auto;gap:10px;align-items:center}.bar-track{height:16px;background:#08111F;border-radius:999px;overflow:hidden}.bar-fill{height:100%;background:linear-gradient(135deg,var(--primary),var(--primary2));border-radius:999px;min-width:4px}.download-actions{display:flex;gap:10px;flex-wrap:wrap}.notification-card{border-color:rgba(96,165,250,.25)}.notification-list{margin:8px 0 0;padding-left:18px}.howto-step{display:grid;grid-template-columns:42px 1fr;gap:12px;align-items:flex-start}.step-number{width:42px;height:42px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,var(--primary),var(--primary2));font-weight:900}.restricted-note{border:1px solid rgba(251,191,36,.35);background:rgba(251,191,36,.08);border-radius:16px;padding:10px}
@media(max-width:520px){.drawer-grid{grid-template-columns:1fr}.youtube-result{grid-template-columns:74px 1fr}.youtube-result img{width:74px;height:48px}.youtube-result button{grid-column:1/-1}.bar-row{grid-template-columns:1fr}.bar-track{width:100%}}
.music-thumb{width:72px;height:54px;object-fit:cover;border-radius:14px;background:#000;flex:0 0 auto}

/* Versão 2.3: início limpo, membros responsivos e tema aplicado ao grupo inteiro */
body.group-themed{
  background:var(--group-bg,var(--bg));
  color:var(--group-text,var(--text));
  font-family:var(--group-font,Inter),system-ui,-apple-system,Segoe UI,Arial,sans-serif;
}
body.group-themed .page,
body.group-themed .chat-form{
  background:var(--group-bg,var(--bg));
  color:var(--group-text,var(--text));
}
body.group-themed .card,
body.group-themed .event-card,
body.group-themed .music-row,
body.group-themed .ticket-card,
body.group-themed .metric-card,
body.group-themed .youtube-result,
body.group-themed .top-music-item,
body.group-themed .member-card,
body.group-themed .group-drawer,
body.group-themed .drawer-grid a,
body.group-themed .bottom-nav,
body.group-themed .topbar{
  color:var(--group-text,var(--text));
  background:color-mix(in srgb, var(--group-bg,var(--bg)) 88%, #ffffff 12%);
}
body.group-themed .event-card,
body.group-themed .music-row,
body.group-themed .ticket-card,
body.group-themed .metric-card,
body.group-themed .youtube-result,
body.group-themed .top-music-item{
  background:color-mix(in srgb, var(--group-bg,var(--bg)) 82%, #ffffff 18%);
}
body.group-themed input,
body.group-themed select,
body.group-themed textarea,
body.group-themed .btn-secondary,
body.group-themed .drawer-close,
body.group-themed .bar-track,
body.group-themed .music-event-form{
  color:var(--group-text,var(--text));
  background:color-mix(in srgb, var(--group-bg,var(--bg)) 76%, #000000 24%);
}
body.group-themed .muted,
body.group-themed label,
body.group-themed .member-count-badge,
body.group-themed .category-badge,
body.group-themed .status-badge{
  color:color-mix(in srgb, var(--group-text,var(--text)) 82%, #9CA3AF 18%);
}
body.group-themed a,
body.group-themed .menu-link,
body.group-themed .brand{
  color:var(--group-text,var(--text));
}
.member-card{
  border:1px solid rgba(255,255,255,.06);
  border-radius:18px;
  padding:14px;
  margin:12px 0;
  background:var(--card2);
}
.member-main{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:12px;
  align-items:start;
}
.member-avatar{
  width:48px!important;
  height:48px!important;
  object-fit:cover;
  border-radius:50%;
  flex:0 0 48px;
}
.member-info{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.member-name{
  display:block;
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.2;
}
.member-actions-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(148px,1fr));
  gap:10px;
  align-items:stretch;
}
.member-actions-grid form,
.member-role-form-clean{
  min-width:0;
  display:flex;
  gap:8px;
  align-items:stretch;
  flex-wrap:wrap;
}
.member-role-form-clean{
  grid-column:1/-1;
}
.member-role-form-clean select{
  flex:1 1 150px;
  min-width:0;
}
.member-actions-grid button{
  width:100%;
  min-width:0;
  white-space:normal;
  line-height:1.15;
  padding-left:10px;
  padding-right:10px;
}
@media(max-width:520px){
  .member-actions-grid{grid-template-columns:1fr}
  .member-role-form-clean{display:grid;grid-template-columns:1fr}
}

/* Versão 2.4: menus simplificados, player compacto, tema robusto e financeiro */
.bottom-three{grid-template-columns:repeat(3,1fr)}
.compact-bottom-nav a,
.compact-bottom-nav .bottom-logout-form button{
  text-align:center;padding:10px 8px;border-radius:18px;color:#BFC7D5;font-weight:800;white-space:nowrap;font-size:clamp(.8rem,3vw,1rem);background:transparent;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;width:100%;line-height:1.1;
}
.compact-bottom-nav .bottom-logout-form{margin:0;display:block}
.compact-bottom-nav .bottom-logout-form button{color:#FCA5A5;cursor:pointer}
.compact-bottom-nav a.active{background:linear-gradient(135deg,var(--primary),var(--primary2));color:white;text-decoration:none}
.drawer-logout-form{display:block;margin:0}
.drawer-logout-form button{min-height:100px;width:100%;border:1px solid rgba(255,255,255,.07);background:#0B1220;border-radius:24px;padding:16px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;color:#FCA5A5;font-size:1.02rem;text-align:left}
.drawer-logout-form button span{font-size:1.65rem}.drawer-logout-form button strong{line-height:1.2}
.player-actions-mini{display:flex;align-items:center;justify-content:flex-start;gap:8px;margin-top:12px;flex-wrap:wrap}
.player-icon-btn{width:42px;height:42px;min-height:42px;border-radius:14px;padding:0;display:grid;place-items:center;background:var(--card2);border:1px solid var(--border);color:#CFE1FF;font-size:1.05rem}
.player-icon-btn.active{border-color:#60A5FA;box-shadow:0 0 0 3px rgba(96,165,250,.12);background:#10233D}
body.group-themed{background:var(--group-bg,var(--bg))!important;color:var(--group-text,var(--text))!important;font-family:var(--group-font,Inter),system-ui,-apple-system,Segoe UI,Arial,sans-serif!important}
body.group-themed *{font-family:inherit}
body.group-themed .page,
body.group-themed .app-shell,
body.group-themed .chat-form{background:var(--group-bg,var(--bg))!important;color:var(--group-text,var(--text))!important}
body.group-themed .card,
body.group-themed .event-card,
body.group-themed .music-row,
body.group-themed .music-card,
body.group-themed .ticket-card,
body.group-themed .metric-card,
body.group-themed .youtube-result,
body.group-themed .top-music-item,
body.group-themed .member-card,
body.group-themed .group-drawer,
body.group-themed .drawer-grid a,
body.group-themed .drawer-logout-form button,
body.group-themed .bottom-nav,
body.group-themed .topbar,
body.group-themed .birthday-row,
body.group-themed .bubble,
body.group-themed .gallery-item,
body.group-themed .music-event-form{background:var(--group-bg,var(--bg))!important;color:var(--group-text,var(--text))!important;border-color:rgba(255,255,255,.18)!important}
body.group-themed input,
body.group-themed select,
body.group-themed textarea,
body.group-themed .btn-secondary,
body.group-themed .player-icon-btn,
body.group-themed .drawer-close,
body.group-themed .bar-track{background:rgba(0,0,0,.22)!important;color:var(--group-text,var(--text))!important;border-color:rgba(255,255,255,.25)!important}
body.group-themed .muted,
body.group-themed label,
body.group-themed .member-count-badge,
body.group-themed .category-badge,
body.group-themed .status-badge,
body.group-themed a,
body.group-themed .menu-link,
body.group-themed .brand{color:var(--group-text,var(--text))!important}
body.group-themed .btn,
body.group-themed button:not(.link-btn):not(.menu-toggle):not(.drawer-close):not(.player-icon-btn){color:white}
.finance-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;align-items:end}.finance-form-grid .full{grid-column:1/-1}
.finance-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}.finance-item{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;background:var(--card2);border-radius:14px;padding:10px}.finance-value.entrada{color:#86EFAC;font-weight:900}.finance-value.saida{color:#FCA5A5;font-weight:900}.report-catalog{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}.report-item{background:var(--card2);border-radius:16px;padding:14px;border:1px solid rgba(255,255,255,.06);display:flex;flex-direction:column;gap:8px}.report-item button{align-self:flex-start}.financial-only-note{border:1px solid rgba(96,165,250,.35);background:rgba(96,165,250,.08);border-radius:16px;padding:12px}
@media(max-width:520px){.compact-bottom-nav a,.compact-bottom-nav .bottom-logout-form button{min-height:52px;padding:8px 4px}.player-icon-btn{width:38px;height:38px;min-height:38px}.finance-item{grid-template-columns:1fr}.drawer-logout-form button{min-height:86px}}

/* Versão 2.4.2: tema aplicado de forma global e sem cache */
html.group-themed-html,
html.group-themed-html body,
body.group-themed,
body.group-themed .page,
body.group-themed .app-shell,
body.group-themed main,
body.group-themed .chat-form{
  background-color:var(--group-bg,#050B16)!important;
  color:var(--group-text,#F3F4F6)!important;
  font-family:var(--group-font,Inter),system-ui,-apple-system,Segoe UI,Arial,sans-serif!important;
}
body.group-themed *{font-family:inherit!important}
body.group-themed .card,
body.group-themed .event-card,
body.group-themed .music-row,
body.group-themed .music-card,
body.group-themed .ticket-card,
body.group-themed .metric-card,
body.group-themed .youtube-result,
body.group-themed .top-music-item,
body.group-themed .member-card,
body.group-themed .group-drawer,
body.group-themed .drawer-grid a,
body.group-themed .drawer-logout-form button,
body.group-themed .bottom-nav,
body.group-themed .topbar,
body.group-themed .birthday-row,
body.group-themed .bubble,
body.group-themed .gallery-item,
body.group-themed .music-event-form,
body.group-themed .report-item,
body.group-themed .finance-item{
  color:var(--group-text,#F3F4F6)!important;
  border-color:color-mix(in srgb, var(--group-text,#F3F4F6) 18%, transparent)!important;
}
body.group-themed .card,
body.group-themed .topbar,
body.group-themed .bottom-nav,
body.group-themed .group-drawer{
  background:color-mix(in srgb, var(--group-bg,#050B16) 92%, var(--group-text,#F3F4F6) 8%)!important;
}
body.group-themed .event-card,
body.group-themed .music-row,
body.group-themed .music-card,
body.group-themed .ticket-card,
body.group-themed .metric-card,
body.group-themed .youtube-result,
body.group-themed .top-music-item,
body.group-themed .member-card,
body.group-themed .drawer-grid a,
body.group-themed .drawer-logout-form button,
body.group-themed .birthday-row,
body.group-themed .bubble,
body.group-themed .gallery-item,
body.group-themed .music-event-form,
body.group-themed .report-item,
body.group-themed .finance-item{
  background:color-mix(in srgb, var(--group-bg,#050B16) 84%, var(--group-text,#F3F4F6) 16%)!important;
}
body.group-themed input,
body.group-themed select,
body.group-themed textarea,
body.group-themed .btn-secondary,
body.group-themed .player-icon-btn,
body.group-themed .drawer-close,
body.group-themed .bar-track{
  background:color-mix(in srgb, var(--group-bg,#050B16) 82%, #000000 18%)!important;
  color:var(--group-text,#F3F4F6)!important;
  border-color:color-mix(in srgb, var(--group-text,#F3F4F6) 28%, transparent)!important;
}
body.group-themed h1,
body.group-themed h2,
body.group-themed h3,
body.group-themed p,
body.group-themed strong,
body.group-themed span,
body.group-themed small,
body.group-themed label,
body.group-themed .muted,
body.group-themed .member-count-badge,
body.group-themed .category-badge,
body.group-themed .status-badge,
body.group-themed a,
body.group-themed .menu-link,
body.group-themed .brand{
  color:var(--group-text,#F3F4F6)!important;
}
body.group-themed .btn,
body.group-themed button:not(.link-btn):not(.menu-toggle):not(.drawer-close):not(.player-icon-btn){color:white!important}
.member-info .member-name{overflow-wrap:anywhere;word-break:normal;line-height:1.2}
.member-info .muted{overflow-wrap:anywhere;line-height:1.25}
.permission-hidden-note{font-size:.9rem;color:var(--muted);margin-top:8px}

/* Versão 2.4.4: visualização pública de membros e suporte customização */
.page-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.members-directory-card{display:flex;flex-direction:column;gap:12px}
.members-directory-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.member-directory-item{display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px;align-items:center;background:var(--card2);border:1px solid rgba(255,255,255,.07);border-radius:20px;padding:12px;min-width:0}
.member-directory-photo{width:56px;height:56px;border-radius:50%;overflow:hidden;background:linear-gradient(135deg,var(--primary),var(--primary2));display:grid;place-items:center;font-weight:900;color:#fff;flex:0 0 auto}
.member-directory-photo img{width:100%;height:100%;object-fit:cover;display:block}
.member-directory-info{min-width:0;display:flex;flex-direction:column;gap:8px}
.member-directory-name{display:block;line-height:1.2;overflow-wrap:anywhere;word-break:break-word}
.member-directory-meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.profile-badge,.instrument-badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 9px;font-size:.78rem;font-weight:800;background:#111827;border:1px solid rgba(255,255,255,.08);color:#DCEBFF;max-width:100%;overflow-wrap:anywhere;word-break:break-word}
body.group-themed .member-directory-item,
body.group-themed .profile-badge,
body.group-themed .instrument-badge{color:var(--group-text,var(--text));background:color-mix(in srgb, var(--group-bg,var(--bg)) 82%, #ffffff 18%)}
@media(max-width:520px){.members-directory-list{grid-template-columns:1fr}.member-directory-item{grid-template-columns:48px minmax(0,1fr)}.member-directory-photo{width:48px;height:48px}}

/* Versão 2.4.5: suporte profissional com resposta do desenvolvedor */
.support-pro-summary{align-items:stretch}
.support-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:min(100%,260px)}
.support-steps span{display:inline-flex;align-items:center;justify-content:center;text-align:center;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04);border-radius:14px;padding:9px 10px;font-size:.78rem;font-weight:900;color:#DCEBFF}
.support-ticket-pro{display:flex;flex-direction:column;gap:14px}
.ticket-title-block{min-width:0;display:flex;flex-direction:column;gap:4px}.ticket-title-block strong{overflow-wrap:anywhere;word-break:break-word}.ticket-number-line{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.ticket-number{font-weight:950;color:#CFE1FF;letter-spacing:.02em}.ticket-description{background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.06);border-radius:16px;padding:12px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.priority-badge,.dev-status-badge,.version-badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;font-size:.74rem;font-weight:950;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}.priority-baixa{background:#0F2E21;color:#BBF7D0}.priority-normal{background:#1E293B;color:#DCEBFF}.priority-alta{background:#78350F;color:#FEF3C7}.priority-critica{background:#4B1117;color:#FECACA}.version-badge{background:#172554;color:#DBEAFE}
.support-response-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.support-box-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.client-response-box,.developer-response-box{border-radius:18px;padding:14px;margin:0}.client-response-box{background:#061B15;border:1px solid rgba(34,197,94,.35)}.developer-response-box{background:linear-gradient(135deg,rgba(59,130,246,.13),rgba(139,92,246,.08));border:1px solid rgba(96,165,250,.28)}.developer-status-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:8px}.dev-status-aguardando_analise{background:#1E293B;color:#DCEBFF}.dev-status-em_desenvolvimento{background:#78350F;color:#FEF3C7}.dev-status-ajuste_aplicado{background:#064E3B;color:#D1FAE5}.dev-status-aguardando_cliente{background:#312E81;color:#E0E7FF}.dev-status-finalizado{background:#14532D;color:#DCFCE7}
.support-update-form{border-top:1px solid rgba(255,255,255,.08);padding-top:14px}.support-form-section{background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.06);border-radius:18px;padding:14px}.developer-form-section{border-color:rgba(96,165,250,.22);background:linear-gradient(135deg,rgba(59,130,246,.06),rgba(139,92,246,.05))}.support-form-section h3{margin-bottom:6px}
body.group-themed .support-steps span,
body.group-themed .ticket-description,
body.group-themed .support-form-section,
body.group-themed .developer-response-box,
body.group-themed .client-response-box{color:var(--group-text,#F3F4F6)!important;border-color:color-mix(in srgb, var(--group-text,#F3F4F6) 20%, transparent)!important;background:color-mix(in srgb, var(--group-bg,#050B16) 82%, var(--group-text,#F3F4F6) 18%)!important}
@media(max-width:520px){.support-steps{grid-template-columns:1fr}.priority-badge,.dev-status-badge,.version-badge{white-space:normal}.support-update-form .grid-form{grid-template-columns:1fr}}

/* Versão 2.4.6: suporte com resposta do desenvolvedor via banco e conversa da demanda */
.developer-source-info {
  border-left: 4px solid rgba(37, 99, 235, .55);
}
.ticket-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .35rem;
}
.support-timeline {
  margin-top: 1rem;
  padding: .9rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, .035);
  border: 1px solid rgba(15, 23, 42, .08);
}
.support-message {
  margin-top: .75rem;
  padding: .8rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(15, 23, 42, .07);
}
.support-message-dev {
  background: rgba(219, 234, 254, .78);
  border-color: rgba(37, 99, 235, .18);
}
.support-message-meta {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  color: #64748b;
  font-size: .82rem;
  margin-bottom: .35rem;
  flex-wrap: wrap;
}
.support-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.support-reply-form {
  margin-top: .9rem;
  padding: .9rem;
  border-radius: 18px;
  border: 1px dashed rgba(15, 23, 42, .18);
  background: rgba(248, 250, 252, .72);
}
.support-reply-form label {
  font-weight: 800;
}
.compact-support-update {
  margin-top: 1rem;
}
@media (max-width: 640px) {
  .ticket-status-stack {
    align-items: flex-start;
  }
}

/* Versão 2.4.7: ajustes profissionais e exclusão de instrumentos do perfil */
.settings-shell{gap:14px}
.settings-title-row{align-items:flex-start}
.eyebrow{display:inline-block;color:#9CC7FF;font-weight:900;text-transform:uppercase;letter-spacing:.08em;font-size:.72rem;margin-bottom:4px}
.profile-summary-card{display:grid;grid-template-columns:86px minmax(0,1fr);gap:16px;align-items:center;border:1px solid rgba(96,165,250,.18);background:linear-gradient(145deg,color-mix(in srgb,var(--card) 88%,#2563EB 12%),var(--card))}
.profile-summary-avatar{width:86px!important;height:86px!important;border-radius:24px!important;object-fit:cover;box-shadow:0 16px 30px rgba(0,0,0,.28)}
.profile-summary-content{min-width:0}.profile-summary-content h2{font-size:clamp(1.45rem,4vw,2.25rem);margin-bottom:3px;overflow-wrap:anywhere}.profile-summary-content p{margin:.25rem 0 .6rem}
.profile-badge{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(96,165,250,.25);background:rgba(96,165,250,.1);color:#DCEBFF;border-radius:999px;padding:7px 11px;font-weight:800;font-size:.86rem}.muted-badge{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.08)}
.settings-card{border-color:rgba(255,255,255,.07)}.professional-form label{color:#DCEBFF;font-weight:800}.professional-form input{font-weight:600}
.instrument-add-form{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;gap:10px;align-items:end;margin-top:12px}.instrument-select-label{min-width:0}.principal-check{height:52px;padding:0 12px;border:1px solid var(--border);background:var(--card2);border-radius:16px;white-space:nowrap;font-weight:800;color:#DCEBFF}.principal-check input{width:auto}.info-box{margin:14px 0;padding:13px 15px;border-radius:18px;border:1px solid rgba(251,191,36,.25);background:rgba(251,191,36,.08);color:#FDE68A}.info-box p{margin:.25rem 0 0;color:color-mix(in srgb,#FDE68A 78%,var(--text) 22%)}
.empty-state-mini{border:1px dashed rgba(255,255,255,.14);border-radius:20px;padding:18px;text-align:center;background:rgba(255,255,255,.03)}.empty-state-mini span{font-size:2rem;display:block;margin-bottom:6px}.empty-state-mini p{margin:.35rem 0 0}
.instrument-list{display:flex;flex-direction:column;gap:10px;margin-top:6px}.instrument-item{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;background:var(--card2);border:1px solid rgba(255,255,255,.07);border-radius:20px;padding:12px}.instrument-icon{width:48px;height:48px;border-radius:16px;background:rgba(96,165,250,.12);display:grid;place-items:center;font-size:1.35rem}.instrument-details{min-width:0}.instrument-details strong{display:block;overflow-wrap:anywhere}.instrument-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:5px}.tag{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:.72rem;font-weight:900;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);color:#DCEBFF}.tag-primary{border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.12);color:#BBF7D0}.tag-warning{border-color:rgba(251,191,36,.35);background:rgba(251,191,36,.12);color:#FDE68A}.instrument-lock{font-size:.8rem;text-align:right}.compact-danger{min-height:40px;padding:9px 12px;border-color:rgba(239,68,68,.35);background:rgba(239,68,68,.08)}.professional-danger-zone{border-color:rgba(239,68,68,.22)}
body.group-themed .profile-summary-card,body.group-themed .instrument-item,body.group-themed .principal-check,body.group-themed .info-box,body.group-themed .empty-state-mini{color:var(--group-text,var(--text))}
@media(max-width:620px){.profile-summary-card{grid-template-columns:66px minmax(0,1fr)}.profile-summary-avatar{width:66px!important;height:66px!important;border-radius:20px!important}.instrument-add-form{grid-template-columns:1fr}.principal-check{height:auto;min-height:48px}.instrument-item{grid-template-columns:42px minmax(0,1fr);align-items:start}.instrument-icon{width:42px;height:42px}.instrument-item form,.instrument-lock{grid-column:1/-1;text-align:left}.compact-danger{width:100%}}

/* Versão 2.4.8: layout web aberto, navegação lateral e tema de página */
:root{
  --sidebar-width:288px;
}
body.has-app-sidebar .page{
  justify-content:stretch;
}
.app-shell{
  max-width:1180px;
}
.card{
  border-color:rgba(255,255,255,.08);
}
.group-drawer{
  transform:translateX(-105%);
  transition:transform .22s ease;
  width:min(var(--sidebar-width),92vw);
}
.group-drawer.is-open{
  transform:translateX(0);
}
.drawer-grid{
  grid-template-columns:1fr;
  gap:8px;
}
.drawer-grid a,
.drawer-logout-form button{
  min-height:52px;
  border-radius:16px;
  padding:11px 12px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  align-items:center;
  justify-content:initial;
  gap:10px;
  font-size:.95rem;
}
.drawer-grid a span,
.drawer-logout-form button span{
  font-size:1.22rem;
  width:34px;
  text-align:center;
}
.drawer-grid a strong,
.drawer-logout-form button strong{
  overflow-wrap:anywhere;
}
.drawer-grid a:hover,
.drawer-grid a:focus-visible{
  transform:none;
  background:linear-gradient(135deg,rgba(91,76,245,.18),rgba(139,92,246,.1));
}
.drawer-logout-form button{
  align-items:center;
  text-align:left;
}
.topbar{
  min-height:56px;
}
.ministry-header.card{
  padding:18px 22px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
}
.ministry-header h1,
.ministry-header h2{
  overflow-wrap:anywhere;
}
.quick-grid,
.report-grid,
.report-catalog,
.members-directory-list{
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}
.event-card,
.music-row,
.report-item,
.member-card,
.member-directory-item,
.ticket-card{
  border:1px solid rgba(255,255,255,.07);
}
.grid-form{
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}
body.group-themed,
body.group-themed .page,
body.group-themed .app-shell,
body.group-themed main{
  background-color:var(--group-bg,#050B16)!important;
  color:var(--group-text,#F3F4F6)!important;
}
body.group-themed .topbar,
body.group-themed .group-drawer,
body.group-themed .card{
  background:color-mix(in srgb, var(--group-bg,#050B16) 90%, var(--group-text,#F3F4F6) 10%)!important;
  color:var(--group-text,#F3F4F6)!important;
}
body.group-themed .event-card,
body.group-themed .music-row,
body.group-themed .music-card,
body.group-themed .ticket-card,
body.group-themed .metric-card,
body.group-themed .youtube-result,
body.group-themed .top-music-item,
body.group-themed .member-card,
body.group-themed .drawer-grid a,
body.group-themed .drawer-logout-form button,
body.group-themed .birthday-row,
body.group-themed .bubble,
body.group-themed .gallery-item,
body.group-themed .music-event-form,
body.group-themed .report-item,
body.group-themed .finance-item,
body.group-themed .member-directory-item,
body.group-themed .instrument-item{
  background:color-mix(in srgb, var(--group-bg,#050B16) 80%, var(--group-text,#F3F4F6) 20%)!important;
  color:var(--group-text,#F3F4F6)!important;
}
body.group-themed input,
body.group-themed select,
body.group-themed textarea{
  background:color-mix(in srgb, var(--group-bg,#050B16) 78%, #000 22%)!important;
  color:var(--group-text,#F3F4F6)!important;
}
body.group-themed .muted,
body.group-themed label,
body.group-themed p,
body.group-themed span,
body.group-themed small,
body.group-themed strong,
body.group-themed h1,
body.group-themed h2,
body.group-themed h3,
body.group-themed a,
body.group-themed .brand{
  color:var(--group-text,#F3F4F6)!important;
}
@media (min-width:1024px){
  body.has-app-sidebar .topbar{
    left:var(--sidebar-width);
    padding-left:28px;
    padding-right:32px;
    width:calc(100% - var(--sidebar-width));
  }
  body.has-app-sidebar .page{
    padding:28px 32px 42px calc(var(--sidebar-width) + 32px);
  }
  body.has-app-sidebar .app-shell{
    width:100%;
    max-width:1240px;
    margin:0;
  }
  body.has-app-sidebar .group-drawer{
    transform:none!important;
    top:0;
    left:0;
    width:var(--sidebar-width);
    max-width:var(--sidebar-width);
    height:100vh;
    border-right:1px solid rgba(255,255,255,.1);
    box-shadow:8px 0 28px rgba(0,0,0,.22);
    z-index:80;
  }
  body.has-app-sidebar .menu-toggle,
  body.has-app-sidebar .drawer-close,
  body.has-app-sidebar .menu-backdrop{
    display:none!important;
  }
  body.has-app-sidebar .drawer-head{
    min-height:72px;
    align-items:center;
  }
  body.has-app-sidebar .drawer-grid{
    padding-bottom:20px;
  }
  body.has-app-sidebar .brand{
    font-size:1.05rem;
  }
  .chat-form{
    bottom:0;
  }
}
@media (max-width:1023px){
  .group-drawer{
    z-index:90;
  }
  .page{
    padding-bottom:28px;
  }
  .app-shell{
    max-width:760px;
  }
}
@media(max-width:620px){
  .ministry-header.card{
    grid-template-columns:64px minmax(0,1fr);
    padding:16px;
  }
  .quick-grid,
  .report-grid,
  .report-catalog,
  .members-directory-list{
    grid-template-columns:1fr;
  }
}

/* Versão 2.4.9: PWA instalável, navegação intuitiva, vice-líder nos planos e tema robusto */
.topbar{
  justify-content:flex-start;
}
.topbar-actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  min-width:0;
}
.topbar-pill,
.install-app-btn,
.drawer-install-btn{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.045);
  color:var(--text);
  border-radius:999px;
  padding:9px 12px;
  min-height:38px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
  line-height:1;
}
.install-app-btn{
  cursor:pointer;
}
.drawer-install-btn{
  width:100%;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  justify-content:initial;
  text-align:left;
  border-radius:16px;
  min-height:52px;
}
.profile-avatar-link{
  margin-left:4px;
}
.access-group-pill{
  border:1px solid rgba(96,165,250,.28);
  background:rgba(96,165,250,.10);
  color:#DCEBFF;
  font-weight:900;
  border-radius:999px;
  padding:8px 12px;
  white-space:nowrap;
}
.group-card{
  gap:16px;
}
.group-card > div:not(.avatar){
  min-width:0;
  flex:1;
}
.user-card.home-user-card{
  flex-wrap:wrap;
}
.user-card.home-user-card .btn-secondary{
  white-space:nowrap;
}

html.group-themed-html{
  background:var(--group-bg,#050B16)!important;
}
html.group-themed-html body.group-themed{
  --bg:var(--group-bg,#050B16);
  --text:var(--group-text,#F3F4F6);
  --muted:color-mix(in srgb, var(--group-text,#F3F4F6) 72%, #94A3B8 28%);
  --card:color-mix(in srgb, var(--group-bg,#050B16) 90%, var(--group-text,#F3F4F6) 10%);
  --card2:color-mix(in srgb, var(--group-bg,#050B16) 82%, var(--group-text,#F3F4F6) 18%);
  --border:color-mix(in srgb, var(--group-text,#F3F4F6) 28%, transparent);
  background:var(--group-bg,#050B16)!important;
  color:var(--group-text,#F3F4F6)!important;
  font-family:var(--group-font,Inter),system-ui,-apple-system,Segoe UI,Arial,sans-serif!important;
}
body.group-themed .page,
body.group-themed main,
body.group-themed .app-shell{
  background:var(--group-bg,#050B16)!important;
  color:var(--group-text,#F3F4F6)!important;
}
body.group-themed .topbar,
body.group-themed .group-drawer,
body.group-themed .card,
body.group-themed .event-card,
body.group-themed .music-row,
body.group-themed .music-card,
body.group-themed .ticket-card,
body.group-themed .metric-card,
body.group-themed .youtube-result,
body.group-themed .top-music-item,
body.group-themed .member-card,
body.group-themed .drawer-grid a,
body.group-themed .drawer-logout-form button,
body.group-themed .drawer-install-btn,
body.group-themed .birthday-row,
body.group-themed .bubble,
body.group-themed .gallery-item,
body.group-themed .music-event-form,
body.group-themed .report-item,
body.group-themed .finance-item,
body.group-themed .member-directory-item,
body.group-themed .instrument-item,
body.group-themed .profile-summary-card,
body.group-themed .topbar-pill,
body.group-themed .install-app-btn{
  color:var(--group-text,#F3F4F6)!important;
  border-color:var(--border)!important;
}
body.group-themed .topbar,
body.group-themed .group-drawer,
body.group-themed .card,
body.group-themed .topbar-pill,
body.group-themed .install-app-btn{
  background:var(--card)!important;
}
body.group-themed .event-card,
body.group-themed .music-row,
body.group-themed .music-card,
body.group-themed .ticket-card,
body.group-themed .metric-card,
body.group-themed .youtube-result,
body.group-themed .top-music-item,
body.group-themed .member-card,
body.group-themed .drawer-grid a,
body.group-themed .drawer-logout-form button,
body.group-themed .drawer-install-btn,
body.group-themed .birthday-row,
body.group-themed .bubble,
body.group-themed .gallery-item,
body.group-themed .music-event-form,
body.group-themed .report-item,
body.group-themed .finance-item,
body.group-themed .member-directory-item,
body.group-themed .instrument-item{
  background:var(--card2)!important;
}
body.group-themed h1,
body.group-themed h2,
body.group-themed h3,
body.group-themed p,
body.group-themed span,
body.group-themed small,
body.group-themed strong,
body.group-themed label,
body.group-themed a,
body.group-themed .brand,
body.group-themed .muted,
body.group-themed .member-count-badge,
body.group-themed .category-badge,
body.group-themed .status-badge{
  color:var(--group-text,#F3F4F6)!important;
}
body.group-themed input,
body.group-themed select,
body.group-themed textarea,
body.group-themed .btn-secondary,
body.group-themed .player-icon-btn,
body.group-themed .drawer-close,
body.group-themed .bar-track{
  background:color-mix(in srgb, var(--group-bg,#050B16) 76%, #000000 24%)!important;
  color:var(--group-text,#F3F4F6)!important;
  border-color:var(--border)!important;
}
.theme-preview{
  background:var(--preview-bg,#050B16)!important;
  color:var(--preview-text,#F3F4F6)!important;
  font-family:var(--preview-font,Inter),system-ui,-apple-system,Segoe UI,Arial,sans-serif!important;
  border:1px solid rgba(255,255,255,.16);
  padding:18px;
  border-radius:18px;
}
@media (max-width:760px){
  .topbar-actions{
    gap:6px;
  }
  .topbar-pill span,
  .install-app-btn span{
    display:none;
  }
  .topbar-pill,
  .install-app-btn{
    width:38px;
    height:38px;
    justify-content:center;
    padding:0;
  }
  .brand{
    max-width:38vw;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .access-group-pill{
    width:100%;
    text-align:center;
  }
  .group-card{
    align-items:flex-start;
    flex-wrap:wrap;
  }
}

/* Versão 2.5.0: menu superior limpo, feedback de mídia e notificações PWA */
.compact-topbar{
  gap:12px;
}
.compact-topbar .brand{
  margin-right:auto;
}
.topbar-actions{
  display:none!important;
}
.drawer-notification-btn.is-active,
.drawer-install-btn.is-active{
  border-color:rgba(34,197,94,.38)!important;
  background:rgba(34,197,94,.12)!important;
  color:#BBF7D0!important;
}
.notification-trigger{
  position:relative;
  width:38px;
  height:38px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:white;
  display:grid;
  place-items:center;
  padding:0;
}
.notification-trigger strong{
  position:absolute;
  top:-6px;
  right:-7px;
  min-width:20px;
  height:20px;
  border-radius:999px;
  display:grid;
  place-items:center;
  padding:0 5px;
  background:#EF4444;
  color:white;
  font-size:.68rem;
  line-height:1;
  border:2px solid #071222;
}
.notification-panel{
  position:fixed;
  top:64px;
  right:16px;
  z-index:120;
  width:min(420px,calc(100vw - 32px));
  max-height:min(680px,calc(100vh - 84px));
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  background:#08111F;
  box-shadow:0 22px 70px rgba(0,0,0,.42);
}
.notification-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.notification-panel-head span{
  display:block;
  color:var(--muted);
  font-size:.82rem;
  font-weight:700;
}
.notification-panel-head button{
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:white;
  font-size:1.25rem;
  padding:0;
}
.notification-panel .notification-list{
  margin:0;
  padding:10px;
  overflow:auto;
  max-height:calc(min(680px,100vh - 84px) - 66px);
}
.notification-item{
  display:grid;
  grid-template-columns:10px minmax(0,1fr);
  gap:10px;
  padding:12px;
  border-radius:14px;
  color:var(--text);
  border:1px solid transparent;
}
.notification-item:hover,
.notification-item:focus-visible{
  background:rgba(255,255,255,.05);
}
.notification-item.unread{
  background:rgba(96,165,250,.1);
  border-color:rgba(96,165,250,.22);
}
.notification-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  margin-top:7px;
  background:rgba(148,163,184,.45);
}
.notification-item.unread .notification-dot{
  background:#60A5FA;
}
.notification-item p{
  margin:3px 0;
  color:#CBD5E1;
  line-height:1.35;
}
.notification-item small{
  color:var(--muted);
  font-weight:800;
}
.drawer-chat-link,
.bottom-nav [data-chat-menu-link]{
  position:relative;
}
[data-chat-unread-count]{
  min-width:21px;
  height:21px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  padding:0 6px;
  background:#EF4444;
  color:white;
  font-size:.7rem;
  font-style:normal;
  font-weight:950;
  line-height:1;
  border:2px solid #071222;
}
.drawer-chat-link [data-chat-unread-count]{
  margin-left:auto;
}
.bottom-nav [data-chat-unread-count]{
  position:absolute;
  top:4px;
  right:18%;
}
.has-unread-chat strong,
.has-unread-chat small{
  color:#fff;
}
body.culto-popup-window.has-app-sidebar .topbar{
  left:0;
  width:100%;
  padding-left:max(10px,calc((100vw - 1180px)/2));
  padding-right:max(10px,calc((100vw - 1180px)/2));
}
body.culto-popup-window.has-app-sidebar .page{
  padding:24px max(14px,calc((100vw - 1180px)/2)) 42px;
}
body.culto-popup-window .compact-topbar .brand{
  margin-left:0;
}
.close-window-btn{
  width:38px;
  height:38px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.07);
  color:white;
  padding:0;
  line-height:1;
}
.bible-auto-project{
  align-self:end;
  min-height:48px;
}
.file-selected-feedback{
  display:block;
  margin-top:-8px;
  margin-bottom:8px;
  color:var(--muted);
  font-size:.86rem;
  font-weight:800;
}
.file-selected-feedback.has-file{
  color:#BBF7D0;
}
body.group-themed .file-selected-feedback{
  color:color-mix(in srgb, var(--group-text,#F3F4F6) 70%, #94A3B8 30%)!important;
}
body.group-themed .file-selected-feedback.has-file{
  color:color-mix(in srgb, var(--group-text,#F3F4F6) 88%, #22C55E 12%)!important;
}
html.group-themed-html,
html.group-themed-html body,
body.group-themed,
body.group-themed .page,
body.group-themed main,
body.group-themed .app-shell{
  background:var(--group-bg,#050B16)!important;
  background-color:var(--group-bg,#050B16)!important;
  color:var(--group-text,#F3F4F6)!important;
  font-family:var(--group-font,Inter),system-ui,-apple-system,Segoe UI,Arial,sans-serif!important;
}
html.group-themed-html body.group-themed{
  min-height:100vh;
}
body.group-themed *{
  font-family:inherit!important;
}
body.group-themed .topbar,
body.group-themed .group-drawer,
body.group-themed .card{
  background:color-mix(in srgb, var(--group-bg,#050B16) 92%, var(--group-text,#F3F4F6) 8%)!important;
  color:var(--group-text,#F3F4F6)!important;
}
body.group-themed .drawer-grid a,
body.group-themed .drawer-install-btn,
body.group-themed .drawer-logout-form button,
body.group-themed .event-card,
body.group-themed .music-row,
body.group-themed .music-card,
body.group-themed .member-card,
body.group-themed .member-directory-item,
body.group-themed .ticket-card,
body.group-themed .gallery-item,
body.group-themed .bubble,
body.group-themed .birthday-row,
body.group-themed .report-item,
body.group-themed .finance-item,
body.group-themed .instrument-item,
body.group-themed .youtube-result,
body.group-themed .top-music-item{
  background:color-mix(in srgb, var(--group-bg,#050B16) 84%, var(--group-text,#F3F4F6) 16%)!important;
  color:var(--group-text,#F3F4F6)!important;
  border-color:color-mix(in srgb, var(--group-text,#F3F4F6) 26%, transparent)!important;
}
body.group-themed input,
body.group-themed select,
body.group-themed textarea,
body.group-themed .btn-secondary,
body.group-themed .player-icon-btn,
body.group-themed .drawer-close{
  background:color-mix(in srgb, var(--group-bg,#050B16) 78%, #000 22%)!important;
  color:var(--group-text,#F3F4F6)!important;
  border-color:color-mix(in srgb, var(--group-text,#F3F4F6) 30%, transparent)!important;
}
body.group-themed h1,
body.group-themed h2,
body.group-themed h3,
body.group-themed h4,
body.group-themed p,
body.group-themed span,
body.group-themed small,
body.group-themed strong,
body.group-themed label,
body.group-themed a,
body.group-themed .brand,
body.group-themed .muted,
body.group-themed .member-count-badge,
body.group-themed .category-badge,
body.group-themed .status-badge{
  color:var(--group-text,#F3F4F6)!important;
}
@media(max-width:760px){
  .compact-topbar .brand{
    max-width:60vw;
  }
}

/* Versão 2.5.1: chat amplo, atualização de versão, aniversários e login profissional */
.chat-page .chat-shell{
  min-height:calc(100vh - 100px);
  display:flex;
  flex-direction:column;
  gap:12px;
}
.chat-page .chat-list{
  flex:1;
  min-height:0;
  overflow:visible;
  padding:2px 2px 12px;
}
/* Removido duplicata .modern-chat-form anterior */
.chat-form-actions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  min-width:0;
}
.modern-chat-form textarea{
  min-height:52px;
  max-height:150px;
  resize:vertical;
  line-height:1.35;
  padding:14px 16px;
}
.modern-chat-form button[type="submit"]{
  min-height:52px;
  min-width:96px;
  padding-inline:18px;
}
.chat-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.chat-attachment-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0 4px;
}
.chat-attachment-actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:#DCEBFF;
  font-weight:800;
  text-decoration:none;
}
@media(max-width:620px){
  .chat-page .chat-shell{
    min-height:calc(100vh - 92px);
  }
/* Removido override antigo .modern-chat-form 620px */
  .modern-chat-form button[type="submit"]{
    min-width:82px;
    padding-inline:12px;
  }
  .modern-chat-form textarea{
    min-height:46px;
    padding:12px 14px;
  }
  .modern-chat-form .file-selected-feedback{
    grid-column:1/-1;
    margin:0;
  }
}
.file-selected-feedback[hidden]{display:none!important}
.password-field{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:8px;align-items:center}
.password-field input{margin:0!important}
.password-toggle{min-height:48px;border-radius:14px;border:1px solid var(--border);background:var(--card2);color:var(--text);font-size:1rem;padding:0;display:grid;place-items:center}
.version-modal-backdrop{position:fixed;inset:0;z-index:999;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.62);backdrop-filter:blur(8px)}
.version-modal{width:min(520px,100%);background:linear-gradient(145deg,#0B1220,#111827);border:1px solid rgba(255,255,255,.12);border-radius:26px;padding:24px;box-shadow:0 24px 70px rgba(0,0,0,.45);position:relative}
.version-modal h2{font-size:clamp(1.35rem,4vw,2rem);margin:8px 0}.version-modal p{color:#C8D2E2}.version-close{position:absolute;right:14px;top:14px;width:38px;height:38px;border-radius:50%;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:white;font-size:1.4rem;line-height:1}.version-badge{display:inline-flex;border-radius:999px;background:rgba(139,92,246,.16);border:1px solid rgba(139,92,246,.35);color:#DDD6FE;font-weight:900;padding:7px 11px}.version-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.updates-timeline{display:flex;flex-direction:column;gap:14px}.update-card{border-left:4px solid var(--primary);}.update-card ul{margin:.4rem 0 0;padding-left:1.25rem}.update-card li{margin:.35rem 0}.video-tutorial-card{display:grid;grid-template-columns:1.2fr .8fr;gap:18px;align-items:start}.video-embed{position:relative;overflow:hidden;border-radius:22px;background:#000;border:1px solid rgba(255,255,255,.1);aspect-ratio:16/9}.video-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}.video-placeholder{display:grid;place-items:center;text-align:center;height:100%;padding:24px;background:linear-gradient(145deg,rgba(91,76,245,.18),rgba(96,165,250,.08))}.tutorial-script{display:flex;flex-direction:column;gap:8px}.tutorial-script .script-item{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:start;border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:10px;background:rgba(255,255,255,.035)}.tutorial-script .script-item span{width:34px;height:34px;border-radius:12px;background:rgba(91,76,245,.18);display:grid;place-items:center;font-weight:900}.birthday-today{border-color:rgba(251,191,36,.55)!important;background:linear-gradient(135deg,rgba(251,191,36,.18),rgba(34,197,94,.08))!important;box-shadow:0 0 0 3px rgba(251,191,36,.09)}.birthdays-card h2::after{content:' 🎉'} .mini-player-note{font-size:.88rem;margin-top:10px}.player-icon-btn#background-audio.active{border-color:#22C55E;box-shadow:0 0 0 3px rgba(34,197,94,.14)}
@media(max-width:760px){.video-tutorial-card{grid-template-columns:1fr}.version-modal{padding:20px}.version-actions .btn,.version-actions .btn-secondary{width:100%;justify-content:center}}

/* Versão 2.5.2: escalas vigentes, card do ministério e modo iPhone do player */
.home-user-card .group-card-avatar{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 8px 20px rgba(0,0,0,.22);
}
.player-icon-btn#open-platform-track.active,.player-icon-btn#open-platform-app.active{
  border-color:#A78BFA;
  box-shadow:0 0 0 3px rgba(167,139,250,.16);
  background:#1E163F;
}
.music-player iframe.platform-spotify{height:152px;aspect-ratio:auto}
.music-player iframe.platform-deezer{height:300px;aspect-ratio:auto}
@media(max-width:520px){
  .home-user-card .group-card-avatar{border-radius:14px}
}

/* Versão 2.5.3 - área Culto, Bíblia e data show */
.wide-shell{max-width:min(1500px,calc(100vw - 32px));}
.page-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px;}
.eyebrow{margin:0 0 6px;color:#A5B4FC;text-transform:uppercase;letter-spacing:.12em;font-weight:900;font-size:.78rem;}
.culto-shell h1{font-size:clamp(2rem,4vw,4.4rem);line-height:1;margin:0 0 8px;}
.culto-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,rgba(91,76,245,.22),rgba(6,18,38,.94));}
.culto-hero-actions{display:flex;gap:10px;flex-wrap:wrap;}
.culto-layout{display:grid;grid-template-columns:minmax(320px,0.95fr) minmax(360px,1.05fr);gap:18px;margin:18px 0;align-items:start;}
.culto-panel{border:1px solid rgba(148,163,184,.22);box-shadow:0 18px 42px rgba(0,0,0,.14);}
.culto-list{display:flex;flex-direction:column;gap:12px;}
.culto-item{border:1px solid rgba(255,255,255,.09);border-radius:20px;background:rgba(15,23,42,.62);padding:14px;}
.culto-item summary{cursor:pointer;display:flex;justify-content:space-between;gap:12px;align-items:center;list-style:none;}
.culto-item summary::-webkit-details-marker{display:none;}
.lyric-preview{white-space:pre-wrap;font-family:inherit;background:#050B16;border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:14px;max-height:360px;overflow:auto;color:#E5E7EB;}
.wrap-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px;}
.bible-selector{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(180px,1fr) minmax(120px,.55fr) auto auto;gap:12px;align-items:end;margin-bottom:14px;}
.bible-import-note{display:flex;gap:10px;flex-wrap:wrap;background:rgba(96,165,250,.08);border:1px solid rgba(96,165,250,.22);border-radius:16px;padding:12px;margin:12px 0;color:#DCEBFF;}
.bible-import-note code{background:#020617;border:1px solid rgba(255,255,255,.08);border-radius:8px;padding:2px 6px;color:#C4B5FD;}
.bible-preview{background:#050B16;border:1px solid rgba(255,255,255,.08);border-radius:20px;padding:18px;max-height:520px;overflow:auto;}
.bible-preview p{font-size:1.08rem;line-height:1.65;margin:0 0 12px;}
.bible-preview sup{color:#A78BFA;font-weight:900;margin-right:5px;}
.aviso-item{display:block;}
.aviso-item summary{cursor:pointer;display:flex;justify-content:space-between;gap:12px;align-items:center;list-style:none;}
.aviso-item summary::-webkit-details-marker{display:none;}
.aviso-item p{white-space:pre-wrap;margin:8px 0;}
.projection-help ol{margin:0;padding-left:22px;line-height:1.8;}
.lyric-item[data-pinned="1"]{border-color:rgba(34,197,94,.55);box-shadow:0 0 0 1px rgba(34,197,94,.18);}
.lyric-item[data-pinned="1"] summary strong::after{content:" fixada";font-size:.75rem;color:#16a34a;text-transform:uppercase;margin-left:8px;}
.lyrics-library{display:grid;gap:16px}
.lyric-card-head{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start}
.lyric-expand summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:14px;list-style:none}
.lyric-expand summary::-webkit-details-marker{display:none}
.lyric-expand summary strong{display:block;font-size:1.05rem}
.full-lyrics-text{white-space:pre-wrap;font-family:inherit;line-height:1.75;margin:0;color:inherit}
.ai-assistant{position:fixed;right:18px;bottom:18px;z-index:1200;font-family:inherit;touch-action:none}
.ai-assistant-toggle{width:54px;height:54px;border-radius:50%;border:0;background:#38bdf8;color:#082f49;font-weight:900;box-shadow:0 14px 34px rgba(14,165,233,.34);cursor:grab;user-select:none;touch-action:none}
.ai-assistant-toggle:active{cursor:grabbing}
.ai-assistant[hidden],.ai-assistant-panel[hidden]{display:none!important}
.ai-assistant-panel{position:absolute;right:0;bottom:66px;width:min(380px,calc(100vw - 28px));height:min(560px,calc(100vh - 110px));background:#fff;color:#111827;border:1px solid rgba(17,24,39,.12);border-radius:10px;box-shadow:0 24px 70px rgba(0,0,0,.28);display:flex;flex-direction:column;overflow:hidden}
.ai-assistant-panel header{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px 16px;background:#111827;color:#fff}
.ai-assistant-panel header span{display:block;font-size:.78rem;color:#cbd5e1;margin-top:2px}
.ai-assistant-panel header button{border:0;background:transparent;color:#fff;font-size:1.4rem;line-height:1;cursor:pointer}
.ai-assistant-messages{flex:1;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:#f8fafc}
.ai-message{max-width:88%;padding:10px 12px;border-radius:10px;line-height:1.45;font-size:.94rem;white-space:pre-wrap}
.ai-message.assistant{align-self:flex-start;background:#fff;border:1px solid #e5e7eb;color:#111827}
.ai-message.user{align-self:flex-end;background:#2563eb;color:#fff}
.ai-assistant-panel form{display:flex;gap:8px;padding:12px;background:#fff;border-top:1px solid #e5e7eb}
.ai-assistant-panel input{flex:1;min-width:0;border:1px solid #d1d5db;border-radius:8px;padding:10px;color:#111827;background:#fff}
.ai-assistant-panel form button{border:0;border-radius:8px;background:#111827;color:#fff;font-weight:800;padding:0 14px;cursor:pointer}
.platform-select{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:10px;background:#fff;color:#111827;margin:8px 0 12px}
@media(max-width:640px){.ai-assistant{right:12px;bottom:12px}.ai-assistant-panel{height:min(520px,calc(100vh - 94px))}}
.drawer-grid button.drawer-install-btn,.drawer-logout-form button{min-height:100px;border:1px solid rgba(255,255,255,.07);background:#0B1220;border-radius:24px;padding:16px;display:flex;flex-direction:column;justify-content:center;gap:10px;color:#B9D7FF;font-size:1.02rem;text-align:left;width:100%;}
.drawer-grid button.drawer-install-btn span,.drawer-logout-form button span{font-size:1.65rem;}
.drawer-logout-form{margin:0;}
@media(max-width:900px){.culto-layout{grid-template-columns:1fr}.bible-selector{grid-template-columns:1fr}.page-title-row,.culto-hero,.section-head,.aviso-item{flex-direction:column}.wide-shell{max-width:100%;}.culto-hero-actions{width:100%}.culto-hero-actions a{flex:1 1 120px;text-align:center}}

/* Versão 2.5.4 - Culto com API.Bible/YouVersion, blocos e projeção ao vivo */
.culto-submenu-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;margin:18px 0;}
.culto-submenu-card{display:flex;flex-direction:column;gap:10px;text-decoration:none;color:inherit;min-height:220px;justify-content:center;transition:.2s ease;}
.culto-submenu-card:hover{transform:translateY(-3px);border-color:rgba(167,139,250,.48);box-shadow:0 22px 50px rgba(0,0,0,.2);}
.culto-submenu-icon{font-size:2.4rem;}
.culto-submenu-card strong{font-size:1.45rem;}
.culto-submenu-card small{color:var(--muted,#94a3b8);line-height:1.55;}
.culto-sync-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:14px;align-items:end;}
.mini-form{background:rgba(15,23,42,.5);border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:14px;}
.advanced-bible-selector{grid-template-columns:minmax(190px,1.2fr) minmax(170px,1fr) minmax(110px,.55fr) minmax(110px,.55fr) auto;}
.verse-block-list{display:flex;flex-direction:column;gap:10px;max-height:620px;}
.verse-project-block{margin:0;}
.verse-project-block.active .plain-project-button{border-color:rgba(167,139,250,.85);background:rgba(91,76,245,.16);}
.plain-project-button{width:100%;text-align:left;border:1px solid rgba(255,255,255,.08);background:#050B16;color:#E5E7EB;border-radius:16px;padding:14px;cursor:pointer;transition:.18s ease;display:flex;flex-direction:column;gap:6px;line-height:1.55;}
.plain-project-button:hover{border-color:rgba(96,165,250,.55);background:#081224;}
.plain-project-button sup{color:#A78BFA;font-weight:900;margin-right:4px;}
.current-projection-preview{background:#050B16;border:1px solid rgba(255,255,255,.08);border-radius:20px;padding:18px;margin-bottom:14px;}
.current-projection-preview p{font-size:1.15rem;line-height:1.7;}
.slide-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin:14px 0;}
.slide-block{margin:0;}
.slide-block .plain-project-button{min-height:160px;}
.slide-block strong{color:#C4B5FD;}
.slide-block.active{border:1px solid rgba(37,99,235,.55);border-radius:18px;box-shadow:0 0 0 3px rgba(37,99,235,.12);background:rgba(37,99,235,.06)}
.lyric-operator-top{
  margin-bottom:18px;
  position:sticky;
  top:82px;
  z-index:18;
  backdrop-filter:blur(10px);
}
@media(max-width:900px){
  .lyric-operator-top{
    position:static;
    top:auto;
  }
}
.lyric-item .actions,.aviso-item .actions{margin-top:12px;}
.drawer-submenu-card{border:1px solid rgba(255,255,255,.07);background:#0B1220;border-radius:24px;padding:0;overflow:hidden;}
.drawer-submenu-card>a{border:none!important;background:transparent!important;border-radius:0!important;min-height:88px!important;}
.drawer-subitems{display:grid;grid-template-columns:1fr;gap:6px;padding:0 12px 12px;}
.drawer-subitems a{min-height:auto!important;border-radius:14px!important;padding:10px 12px!important;display:block!important;background:rgba(255,255,255,.04)!important;color:#B9D7FF!important;font-size:.94rem!important;}
.drawer-subitems a:hover{background:rgba(96,165,250,.12)!important;}
@media(max-width:1000px){.culto-submenu-grid,.culto-sync-grid{grid-template-columns:1fr}.advanced-bible-selector{grid-template-columns:1fr}.slide-grid{grid-template-columns:1fr}}

/* Versão 2.5.5 - YouVersion e bloco único de avisos */
.aviso-builder-preview{background:#050B16;border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:14px;min-height:88px;}
.aviso-builder-list{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:10px;}
.aviso-builder-list li{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);border-radius:14px;padding:10px 12px;display:flex;justify-content:space-between;gap:10px;align-items:flex-start;}
.mini-icon-btn{border:1px solid rgba(255,255,255,.12);background:#111827;color:#fff;border-radius:10px;width:28px;height:28px;font-weight:900;cursor:pointer;line-height:1;}
.mini-icon-btn.danger{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.32);color:#fecaca;}
.compact-list{margin:8px 0 0;padding-left:18px;color:#E5E7EB;line-height:1.55;}
.compact-list li{margin-bottom:4px;}

/* v2.5.6 - Bíblia estilo data show/Holyrics */
.holyrics-shell .bible-alert-panel {
  border-color: rgba(124, 77, 255, .35);
  background: linear-gradient(135deg, rgba(124, 77, 255, .14), rgba(15, 23, 42, .92));
}
.holyrics-control-panel { position: relative; overflow: hidden; }
.holyrics-layout { align-items: flex-start; }
.scripture-list-panel { min-width: 0; }
.verse-slide-list {
  display: grid;
  gap: .75rem;
  max-height: 68vh;
  overflow: auto;
  padding-right: .35rem;
}
.verse-slide-card {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: rgba(2, 6, 23, .45);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.verse-slide-card:hover,
.verse-slide-card.active {
  border-color: rgba(124, 77, 255, .75);
  background: rgba(124, 77, 255, .12);
  transform: translateY(-1px);
}
.verse-slide-card .plain-project-button {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: start;
  gap: .9rem;
  text-align: left;
  padding: 1rem;
  color: inherit;
}
.verse-slide-card .plain-project-button strong {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(124, 77, 255, .22);
  color: #ddd6fe;
}
.verse-slide-card .plain-project-button span {
  line-height: 1.55;
}
.chapter-project-form {
  margin-bottom: 1rem;
  padding: .85rem;
  border: 1px dashed rgba(148, 163, 184, .28);
  border-radius: 18px;
  background: rgba(15, 23, 42, .45);
}
.operator-panel {
  position: sticky;
  top: 92px;
}
.holyrics-preview {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #020617;
  box-shadow: inset 0 0 0 1px rgba(124, 77, 255, .12);
}
.holyrics-preview strong { font-size: clamp(1.35rem, 3vw, 2.2rem); }
.holyrics-preview p { font-size: clamp(1.1rem, 2.4vw, 1.75rem); line-height: 1.35; }
.operator-tip { margin-top: 1rem; }
@media (max-width: 900px) {
  .operator-panel { position: static; }
  .verse-slide-list { max-height: none; }
}

/* v2.5.7 - Culto Bíblia online e bloco de avisos com slides */
.nested-card{border:1px solid rgba(148,163,184,.22);background:rgba(15,23,42,.52);border-radius:22px;padding:18px}.nested-card h3{margin:0 0 14px}.aviso-editor-card{margin-top:6px}.aviso-mini-list{display:grid;gap:10px;margin-top:12px}.aviso-mini-card,.aviso-preview-card{border:1px solid rgba(148,163,184,.18);background:rgba(2,6,23,.34);border-radius:16px;padding:12px 14px}.aviso-mini-card strong,.aviso-preview-card strong{display:block}.aviso-mini-card small,.aviso-preview-card small{display:block;color:var(--muted);font-weight:800;margin-top:3px}.aviso-mini-card p,.aviso-preview-card p{margin:7px 0 0;color:var(--text);white-space:pre-line}.aviso-builder-list{display:grid;gap:10px}.aviso-preview-card{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.aviso-bloco-form .actions.full{justify-content:flex-start}.holyrics-control-panel .status-badge{text-transform:uppercase}.scripture-list-panel .chapter-project-form{margin-bottom:16px}.verse-slide-card.active{border-color:rgba(139,92,246,.9);box-shadow:0 0 0 2px rgba(139,92,246,.16)}

/* Atualização eventos/culto - sem alteração de versão */
.events-page .event-create-card { border: 1px solid rgba(37, 99, 235, .12); }
.events-grid-pro { display: grid; gap: 1.25rem; }
.event-pro-card { overflow: hidden; border: 1px solid rgba(15, 23, 42, .08); box-shadow: 0 18px 50px rgba(15, 23, 42, .08); }
.event-pro-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 1px solid rgba(15, 23, 42, .08); padding-bottom: 1rem; margin-bottom: 1rem; }
.event-pro-header h2 { margin: .25rem 0; font-size: clamp(1.35rem, 2.4vw, 2rem); line-height: 1.1; word-break: break-word; }
.event-meta { margin: 0; color: var(--muted); }
.presence-score { min-width: 92px; padding: .85rem 1rem; border-radius: 1.2rem; background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(16,185,129,.12)); text-align: center; border: 1px solid rgba(37,99,235,.16); }
.presence-score strong { display: block; font-size: 1.75rem; line-height: 1; color: var(--primary); }
.presence-score span { display: block; font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.presence-pill { display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: 999px; background: rgba(37, 99, 235, .1); color: var(--primary); font-weight: 800; }
.event-description { padding: .9rem 1rem; border-radius: 1rem; background: rgba(15, 23, 42, .04); color: var(--text); }
.presence-dashboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.presence-dashboard div { border-radius: 1rem; background: rgba(15,23,42,.04); border: 1px solid rgba(15,23,42,.07); padding: .9rem; }
.presence-dashboard strong { display: block; font-size: 1.35rem; }
.presence-dashboard span { color: var(--muted); font-size: .86rem; }
.presence-actions { margin: .75rem 0 1rem; }
.event-details-block { margin: .85rem 0; border: 1px solid rgba(15,23,42,.08); border-radius: 1rem; padding: .85rem 1rem; background: rgba(255,255,255,.6); }
.event-details-block summary { cursor: pointer; font-weight: 800; color: var(--primary); }
.presence-lists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.presence-lists h4 { margin: 0 0 .45rem; }
.presence-lists p { margin: .35rem 0; }
.event-readonly-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.event-readonly-grid div { background: rgba(15,23,42,.035); border: 1px solid rgba(15,23,42,.07); border-radius: 1rem; padding: .85rem; }
.event-readonly-grid span { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.event-readonly-grid strong { display: block; margin-top: .25rem; word-break: break-word; }
.verse-slide-card.active, .verse-slide-card:focus-within { border-color: rgba(37, 99, 235, .55); box-shadow: 0 0 0 3px rgba(37,99,235,.12); background: rgba(37,99,235,.06); }
#operator-status { min-height: 1.2rem; }
#book-search { width: 100%; }
.field-label{display:block;font-weight:800;margin-bottom:8px}
.bible-book-picker{display:block}
.bible-book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:8px}
.bible-book-chip{min-height:54px;border:1px solid rgba(148,163,184,.24);border-radius:14px;background:rgba(2,6,23,.46);color:#E2E8F0;font-weight:900;cursor:pointer;transition:.18s ease}
.bible-book-chip:hover,.bible-book-chip.active{border-color:rgba(124,77,255,.78);background:rgba(124,77,255,.18);color:#fff;transform:translateY(-1px);box-shadow:0 0 0 2px rgba(124,77,255,.12)}
@media (max-width: 860px) {
  .event-pro-header { flex-direction: column; }
  .presence-score { width: 100%; }
  .presence-dashboard, .presence-lists, .event-readonly-grid { grid-template-columns: 1fr; }
}

/* Apresentacao do culto */
.apresentacao-shell{gap:16px}
.apresentacao-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.apresentacao-option{display:flex;flex-direction:column;gap:10px;min-height:100%;padding:14px}
.apresentacao-option h2{font-size:1.05rem;margin:0 0 2px}
.apresentacao-option p{margin:0;font-size:.9rem}
.apresentacao-option .form{gap:9px}
.apresentacao-option input{min-height:40px;padding:10px 12px;border-radius:12px}
.apresentacao-option .file-label{padding:12px;border-radius:12px}
.apresentacao-option .btn{min-height:40px;padding:10px 12px;border-radius:12px}
.apresentacao-option-head{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:center}
.apresentacao-option-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:rgba(96,165,250,.14);border:1px solid rgba(96,165,250,.28);color:#bfdbfe;font-weight:900;font-size:.82rem}
.apresentacao-library{display:flex;flex-direction:column;gap:18px}
.apresentacao-library-group{border-top:1px solid rgba(255,255,255,.08);padding-top:16px}
.apresentacao-library-group:first-of-type{border-top:0;padding-top:0}
.apresentacao-library-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.apresentacao-bulk-actions{margin-bottom:10px}
.apresentacao-direct-check{padding:9px 10px;margin:0}
.apresentacao-saved-list{display:grid;gap:8px}
.apresentacao-saved-card{border:1px solid rgba(148,163,184,.16);background:rgba(2,6,23,.28);border-radius:14px;padding:8px;display:grid;grid-template-columns:minmax(96px,.5fr) 82px minmax(0,1fr) auto;gap:10px;align-items:center;min-width:0}
.apresentacao-preview{aspect-ratio:16/9;border-radius:10px;overflow:hidden;background:#020617;border:1px solid rgba(255,255,255,.08);display:grid;place-items:center;color:#c4b5fd;font-weight:900;font-size:1rem}
.apresentacao-preview img,.apresentacao-preview video{width:100%;height:100%;object-fit:cover;display:block}
.apresentacao-saved-card strong,.apresentacao-saved-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.apresentacao-saved-card .actions{align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.apresentacao-saved-card .actions form{margin:0}
.apresentacao-check{padding:8px 9px;margin:0;min-width:0}
.apresentacao-saved-info{min-width:0}
.apresentacao-project-hidden{display:none}
@media(max-width:1200px){.apresentacao-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){.apresentacao-options{grid-template-columns:1fr}.apresentacao-saved-card{grid-template-columns:1fr 92px minmax(0,1fr);}.apresentacao-saved-card .actions{grid-column:1/-1;justify-content:flex-start;flex-wrap:wrap}}
@media(max-width:520px){.apresentacao-saved-card{grid-template-columns:1fr}.apresentacao-preview{max-width:140px}.apresentacao-saved-card .actions{flex-direction:column;align-items:stretch}.apresentacao-saved-card .actions a,.apresentacao-saved-card .actions button{width:100%;text-align:center}.apresentacao-bulk-actions{flex-direction:column;align-items:stretch}.apresentacao-bulk-actions button{width:100%}}

/* Chat estilo conversa WhatsApp-like */
.chat-page .bottom-nav{
  display:none!important;
}
.chat-page{
  padding:0;
  max-width:none;
  height:100dvh;
  background:#07101c;
  overflow-x:hidden;
  display:flex;
  justify-content:center;
  overflow:hidden;
}
.chat-page .chat-shell{
  position:relative;
  height:100dvh;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:16px 16px 100px; /* Espaço para o form fixo */
  overflow:hidden;
  border-radius:0;
  background-color:#07101c;
  background-image: var(--chat-wallpaper);
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  background-attachment:fixed;
  width:min(980px,100%);
}
body.group-themed .chat-page .chat-shell,
body.group-themed .page.chat-page .chat-shell{
  background-color:#07101c!important;
  background-image:var(--chat-wallpaper)!important;
  background-position:center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  background-attachment:fixed!important;
}
.modern-chat-form{
  position:fixed!important;
  left:50%;
  transform:translateX(-50%);
  bottom:calc(12px + env(safe-area-inset-bottom, 0px));
  width:min(680px,calc(100vw - 24px));
  z-index:200;
  display:grid;
  grid-template-columns:52px minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
  padding:12px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:24px;
  background:rgba(10,18,34,.98);
  backdrop-filter:blur(20px);
  box-shadow:0 -10px 40px rgba(0,0,0,.5);
}
.chat-form{
  position:static; /* Remove sticky base */
  background:transparent;
}
@media(max-width:520px){
  .chat-page .chat-shell{
    padding:12px 10px 90px;
  }
  .modern-chat-form{
    width:calc(100vw - 16px);
    bottom:calc(8px + env(safe-area-inset-bottom, 0px));
    padding:10px;
    border-radius:20px;
    grid-template-columns:42px minmax(0,1fr) 42px;
  }
}
.chat-page .chat-shell::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7,12,20, 0.45);
  pointer-events: none;
  z-index: 0;
}
.chat-page .chat-shell.has-chat-wallpaper::before,
.chat-page .chat-shell.is-wallpaper-preview::before{
  background: rgba(7,12,20, 0.18);
}
.chat-page .chat-shell > *{
  position:relative;
  z-index:1;
}
.chat-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  position:sticky!important;
  top:0;
  z-index:20!important;
  margin:-14px -14px 8px;
  padding:14px;
  background:linear-gradient(180deg,rgba(7,12,20,.98),rgba(7,12,20,.92));
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.chat-head-copy h1{
  margin:0;
}
@media(max-width:760px){
  .chat-head{
    margin:-12px -12px 8px;
    padding:12px;
  }
}
.chat-settings-trigger{
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:1.05rem;
}
.chat-settings-panel{
  position:fixed;
  left:50%;
  bottom:calc(170px + env(safe-area-inset-bottom, 0px));
  transform:translateX(-50%);
  max-height:min(680px,calc(100dvh - 210px));
  width:min(500px,calc(100vw - 32px));
  padding:20px;
  background:rgba(10,18,34,.98);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(20px);
  border-radius:24px;
  overflow-y:auto;
  z-index:200;
  box-shadow:0 25px 50px -12px rgba(0,0,0,0.5);
}
.chat-settings-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:20px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,.1);
}
.chat-settings-form{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.chat-settings-form label{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:14px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(255,255,255,.03);
  font-weight:600;
  font-size:0.9rem;
}
.chat-settings-form input[type="text"],
.chat-settings-form input[type="color"]{
  width:100%;
}
.chat-settings-actions{
  display:flex;
  gap:12px;
  margin-top:8px;
  position:sticky;
  bottom:0;
  background:rgba(10,18,34,.98);
  padding-top:12px;
}
.chat-settings-close{
  white-space:nowrap;
  cursor:pointer;
}
.chat-settings-actions .btn{
  flex:1;
}
.chat-list{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:8px 4px 132px;
  scroll-padding-bottom:160px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.chat-line{
  display:flex;
  align-items:flex-end;
  gap:8px;
  max-width:100%;
}
.chat-line.mine{
  justify-content:flex-end;
}
.bubble{
  max-width:min(78ch,82%);
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(15,23,42,.08);
  background:rgba(255,255,255,.96);
  box-shadow:0 8px 24px rgba(15,23,42,.08);
  color:var(--chat-text-color,#0f172a);
}
.bubble.mine{
  background:#d9fdd3;
  border-color:rgba(22,163,74,.16);
}
.bubble.other{
  background:rgba(255,255,255,.98);
}
.bubble-name{
  font-weight:800;
  color:var(--chat-text-color,#0f172a);
}
.bubble-name span{
  color:rgba(15,23,42,.58);
}
.bubble p{
  margin:6px 0 0;
  color:inherit;
  white-space:pre-wrap;
}
.bubble small{
  display:block;
  margin-top:8px;
  color:rgba(15,23,42,.56);
}
.chat-avatar{
  width:38px;
  height:38px;
  border-radius:50%;
  overflow:hidden;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  background:#1e293b;
  color:#fff;
  font-weight:900;
}
.chat-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.chat-form{
  position:fixed;
  left:50%;
  bottom:calc(84px + env(safe-area-inset-bottom, 0px));
  transform:translateX(-50%);
  width:min(680px,calc(100vw - 24px));
  z-index:70;
  background:rgba(7,12,20,.82);
  backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 16px 38px rgba(0,0,0,.28);
  overflow:visible;
  border-radius:18px;
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 44px;
  gap:8px;
  align-items:end;
  padding:10px;
}
.chat-menu-wrap{
  position:relative;
  width:44px;
  min-width:44px;
  overflow:visible;
}
.chat-menu-trigger{
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:1.4rem;
  line-height:1;
}
.chat-menu-panel{
  position:absolute;
  left:0;
  bottom:calc(100% + 10px);
  width:min(228px,calc(100vw - 24px));
  padding:8px;
  border-radius:14px;
  background:rgba(7,12,20,.98);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 22px 48px rgba(0,0,0,.36);
  display:grid;
  gap:8px;
  z-index:150;
}
.chat-menu-panel[hidden]{
  display:none !important;
}
.chat-menu-item{
  width:100%;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.05);
  color:#fff;
  border-radius:12px;
  padding:9px 10px;
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  cursor:pointer;
}
.chat-menu-item span{
  font-size:1rem;
  width:22px;
  display:grid;
  place-items:center;
}
.chat-menu-item strong{
  font-size:.88rem;
  line-height:1.2;
}
.chat-attachment-actions a{
  border-color:rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
}
.chat-page .chat-shell.is-wallpaper-preview{
  transition:background-image .18s ease, background-color .18s ease;
}
@media(max-width:760px){
  .chat-page .chat-shell{
    min-height:calc(100dvh - 66px);
    padding:12px 12px 320px;
  }
  .chat-settings-form{
    grid-template-columns:1fr;
  }
  .chat-settings-panel{
    left:12px;
    right:12px;
    transform:none;
    top:auto;
    bottom:calc(120px + env(safe-area-inset-bottom, 0px));
    max-height:none;
    width:auto;
    max-height:calc(100dvh - 148px);
  }
  .chat-settings-panel-head{
    flex-direction:column;
    align-items:flex-start;
    position:sticky;
    top:0;
    padding:0 0 10px;
    margin-bottom:8px;
    background:rgba(7,12,20,.94);
    z-index:3;
  }
  .chat-settings-panel-head .chat-settings-close{
    align-self:flex-start;
  }
  .chat-settings-form label{
    padding:9px 10px;
  }
  .bubble{
    max-width:calc(100% - 44px);
    padding:11px 12px;
  }
/* Removido overrides finais .modern-chat-form */
  .modern-chat-form textarea{
    min-height:44px;
    padding:10px 12px;
    max-height:84px;
    resize:none;
    border-radius:14px;
    background:rgba(255,255,255,.06);
  }
  .chat-menu-trigger{
    width:44px;
    min-width:44px;
    border-radius:12px;
  }
  .chat-send-button{
    width:44px;
    min-width:44px;
    padding:0;
    border-radius:14px;
    font-size:1.05rem;
  }
  .chat-list{
    padding-bottom:140px;
    scroll-padding-bottom:180px;
  }
  .chat-settings-actions{
    flex-direction:column;
    align-items:stretch;
    position:sticky;
    bottom:0;
    padding-bottom:2px;
  }
  .chat-settings-actions .btn,
  .chat-settings-actions .btn-secondary{
    width:100%;
    justify-content:center;
  }
  .chat-settings-panel{
    padding:10px;
    border-radius:16px;
  }
  .chat-settings-panel-head{
    margin-bottom:8px;
    padding-bottom:8px;
  }
  .chat-settings-form{
    gap:8px;
  }
  .chat-settings-form label{
    padding:8px 10px;
  }
  .chat-menu-panel{
    width:min(228px,calc(100vw - 20px));
    padding:7px;
  }
  .chat-menu-item{
    gap:8px;
  }
  .chat-menu-item{
    padding:9px 10px;
  }
  .modern-chat-form .file-selected-feedback{
    grid-column:1/-1;
    margin:0;
  }
}
