Melissa: hub Configuracoes + Embed + 9 Pages novas + dialog blueprint dark

Sprints 04-29 + 04-30 acumuladas.

- MelissaConfiguracoes: hub 2-col com 6 grupos (Layout/Conta/Agenda/
  Financeiro/WhatsApp/Sistema), tudo embedado via MelissaEmbed.
- MelissaEmbed: wrapper generico que injeta layout-variant=melissa
  e remove cromos pra reaproveitar Pages tradicionais.
- 9 Melissa Pages novas: CadastrosRecebidos, Compromissos, Configuracoes,
  Conversas, Embed, Grupos, Medicos, Recorrencias, Tags.
- Dialog blueprint atualizado: bg-gray-100 (hardcoded light) ->
  bg-[var(--surface-ground)] (tema-aware). 22 dialogs migrados em
  9 arquivos. Anti-pattern documentado.
- PatientsCadastroPage: bug fix dropdown Grupo (optionLabel nome->name),
  toggle vertical/abas com persist localStorage, sticky margin-top.
- Surface picker no popover do MelissaLayout (8 swatches).
- useTopbarPlanMenu, useMelissaWhatsapp, useMelissaPacientesAside novos.
- Migration: status agenda remarcado/confirmado.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Leonardo
2026-05-04 11:41:19 -03:00
parent 269c380d9c
commit 86311ef305
52 changed files with 16214 additions and 1027 deletions
+790
View File
@@ -0,0 +1,790 @@
<script setup>
/*
* MelissaGrupos — CRUD de grupos de pacientes dentro de Melissa.
* Segue blueprint melissa-page-blueprint.md.
*
* Layout 2-col (espelha MelissaTags):
* - COL 1 — Aside (~280px): stats + busca
* - COL 2 — Lista de grupos (cor + nome + contagem de pacientes)
*
* Tabela: patient_groups, vínculo: patient_group_patient.
* Sem view agregada — contagem feita no client após carregar vínculos.
*/
import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
import { useToast } from 'primevue/usetoast';
import { useConfirm } from 'primevue/useconfirm';
import { supabase } from '@/lib/supabase/client';
import { useTenantStore } from '@/stores/tenantStore';
const emit = defineEmits(['close']);
const toast = useToast();
const confirm = useConfirm();
const tenantStore = useTenantStore();
// ── Breakpoints + drawer ───────────────────────────────────
const drawerOpen = ref(false);
const isMobile = ref(false);
let _mqMobile = null;
function _onMqMobileChange(e) {
isMobile.value = e.matches;
if (!e.matches) drawerOpen.value = false;
}
function toggleDrawer() { drawerOpen.value = !drawerOpen.value; }
function fecharDrawer() { drawerOpen.value = false; }
// ── Estado ─────────────────────────────────────────────────
const loading = ref(false);
const saving = ref(false);
const grupos = ref([]);
const counts = ref(new Map()); // groupId → patient count
const busca = ref('');
const carregandoInicial = computed(
() => loading.value && grupos.value.length === 0
);
async function getOwnerId() {
const { data } = await supabase.auth.getUser();
if (!data?.user?.id) throw new Error('Sessão não inicializada.');
return data.user.id;
}
async function getTenantId() {
if (typeof tenantStore.ensureLoaded === 'function') await tenantStore.ensureLoaded();
const tid = tenantStore.activeTenantId || tenantStore.tenantId;
if (!tid) throw new Error('Tenant não inicializado.');
return tid;
}
async function load() {
loading.value = true;
try {
const ownerId = await getOwnerId();
const tenantId = await getTenantId();
const [{ data: gData, error: gErr }, { data: vData }] = await Promise.all([
supabase.from('patient_groups')
.select('id, owner_id, tenant_id, nome, cor, is_system, is_active, created_at')
.eq('tenant_id', tenantId)
.order('nome', { ascending: true }),
supabase.from('patient_group_patient').select('patient_group_id')
]);
if (gErr) throw gErr;
// Conta vínculos por grupo no client
const map = new Map();
for (const v of vData || []) {
const id = v.patient_group_id;
map.set(id, (map.get(id) || 0) + 1);
}
counts.value = map;
grupos.value = (gData || []).map((g) => ({
...g,
pacientes_count: map.get(g.id) || 0
}));
} catch (e) {
toast.add({ severity: 'error', summary: 'Erro ao carregar grupos', detail: e?.message, life: 4500 });
} finally {
loading.value = false;
}
}
const stats = computed(() => {
const all = grupos.value;
const ativos = all.filter((g) => g.is_active !== false).length;
const sistema = all.filter((g) => g.is_system).length;
const meus = all.filter((g) => !g.is_system).length;
const emUso = all.filter((g) => g.pacientes_count > 0).length;
return [
{ key: 'total', label: 'Total', value: all.length, cls: 'neutral' },
{ key: 'meus', label: 'Meus', value: meus, cls: meus > 0 ? 'ok' : 'neutral' },
{ key: 'uso', label: 'Em uso', value: emUso, cls: emUso > 0 ? 'ok' : 'neutral' },
{ key: 'sistema', label: 'Sistema', value: sistema, cls: 'neutral' }
];
});
const gruposFiltrados = computed(() => {
const q = String(busca.value || '').trim().toLowerCase();
if (!q) return grupos.value;
return grupos.value.filter((g) => String(g.nome || '').toLowerCase().includes(q));
});
// Dialog
const dlgOpen = ref(false);
const dlgMode = ref('create');
const dlgForm = ref({ id: '', nome: '', cor: '#6366F1' });
const dlgError = ref('');
const PRESET_COLORS = ['6366f1', '8b5cf6', 'ec4899', 'ef4444', 'f97316', 'eab308', '22c55e', '14b8a6', '3b82f6', '06b6d4', '64748b', '292524'];
function abrirCriar() {
dlgMode.value = 'create';
dlgForm.value = { id: '', nome: '', cor: '#6366F1' };
dlgError.value = '';
dlgOpen.value = true;
}
function abrirEditar(row) {
if (row.is_system) {
toast.add({ severity: 'info', summary: 'Grupo do sistema', detail: 'Não dá pra editar grupos do sistema.', life: 2500 });
return;
}
dlgMode.value = 'edit';
dlgForm.value = {
id: row.id,
nome: row.nome || '',
cor: row.cor ? (row.cor.startsWith('#') ? row.cor : '#' + row.cor) : '#6366F1'
};
dlgError.value = '';
dlgOpen.value = true;
}
async function salvar() {
const nome = String(dlgForm.value.nome || '').trim();
if (!nome) {
dlgError.value = 'Informe um nome.';
return;
}
saving.value = true;
dlgError.value = '';
try {
const ownerId = await getOwnerId();
const tenantId = await getTenantId();
const cor = dlgForm.value.cor.startsWith('#') ? dlgForm.value.cor : '#' + dlgForm.value.cor;
if (dlgMode.value === 'create') {
const { error } = await supabase.from('patient_groups').insert({
owner_id: ownerId, tenant_id: tenantId,
nome, cor, is_system: false, is_active: true
});
if (error) throw error;
toast.add({ severity: 'success', summary: 'Grupo criado', life: 2200 });
} else {
const { error } = await supabase.from('patient_groups')
.update({ nome, cor })
.eq('id', dlgForm.value.id);
if (error) throw error;
toast.add({ severity: 'success', summary: 'Grupo atualizado', life: 2200 });
}
dlgOpen.value = false;
await load();
} catch (e) {
const msg = e?.message || '';
dlgError.value = (e?.code === '23505' || /duplicate/i.test(msg)) ? 'Já existe um grupo com esse nome.' : (msg || 'Falha ao salvar.');
} finally {
saving.value = false;
}
}
function confirmarExcluir(row) {
if (row.is_system) return;
confirm.require({
message: `Excluir o grupo "${row.nome}"? Os pacientes serão desvinculados.`,
header: 'Confirmar exclusão',
icon: 'pi pi-exclamation-triangle',
acceptLabel: 'Excluir',
rejectLabel: 'Cancelar',
acceptSeverity: 'danger',
accept: () => excluir(row)
});
}
async function excluir(row) {
saving.value = true;
try {
await supabase.from('patient_group_patient').delete().eq('patient_group_id', row.id);
const { error } = await supabase.from('patient_groups').delete().eq('id', row.id);
if (error) throw error;
toast.add({ severity: 'success', summary: 'Grupo excluído', life: 2200 });
await load();
} catch (e) {
toast.add({ severity: 'error', summary: 'Erro', detail: e?.message || 'Falha ao excluir.', life: 4000 });
} finally {
saving.value = false;
}
}
onMounted(() => {
if (typeof window !== 'undefined' && window.matchMedia) {
_mqMobile = window.matchMedia('(max-width: 1023px)');
isMobile.value = _mqMobile.matches;
_mqMobile.addEventListener('change', _onMqMobileChange);
}
load();
});
onBeforeUnmount(() => {
if (_mqMobile) _mqMobile.removeEventListener('change', _onMqMobileChange);
});
</script>
<template>
<aside
class="mg-mobile-drawer"
:class="{ 'is-open': drawerOpen }"
v-show="isMobile"
aria-label="Estatísticas e busca"
>
<div id="mg-mobile-drawer-target" class="mg-mobile-drawer__scroll" />
</aside>
<Transition name="mg-drawer-fade">
<div
v-if="isMobile && drawerOpen"
class="mg-mobile-drawer__backdrop"
@click="fecharDrawer"
/>
</Transition>
<section class="mg-page">
<header class="mg-page__head">
<button
class="mg-menu-btn mg-menu-btn--mobile-only"
v-tooltip.bottom="'Estatísticas & busca'"
@click="toggleDrawer"
>
<i class="pi pi-bars" />
<span>Menu Grupos</span>
</button>
<div class="mg-page__title">
<i class="pi pi-th-large text-cyan-300" />
<span>Grupos</span>
<span class="mg-page__count">{{ gruposFiltrados.length }}</span>
</div>
<div class="mg-page__actions">
<button
class="mg-act-btn"
v-tooltip.bottom="'Novo grupo'"
:disabled="loading"
@click="abrirCriar"
>
<i class="pi pi-plus" />
<span>Novo</span>
</button>
<button
class="mg-head-btn"
v-tooltip.bottom="'Recarregar'"
:disabled="loading"
@click="load"
>
<i :class="loading ? 'pi pi-spin pi-spinner' : 'pi pi-refresh'" />
</button>
<button class="mg-close" v-tooltip.bottom="'Voltar (Esc)'" @click="emit('close')">
<i class="pi pi-times" />
</button>
</div>
</header>
<div class="mg-body">
<Teleport to="#mg-mobile-drawer-target" :disabled="!isMobile">
<aside class="mg-side">
<div class="mg-w">
<div class="mg-w__head">
<span class="mg-w__title"><i class="pi pi-chart-bar" /> Estatísticas</span>
</div>
<div class="mg-stats">
<template v-if="carregandoInicial">
<div v-for="i in 4" :key="`gsk-${i}`" class="mg-stat" aria-busy="true">
<div class="mg-stat__val melissa-skeleton melissa-skeleton--number" />
<div class="mg-stat__lbl melissa-skeleton melissa-skeleton--text" style="width: 60%; margin-top: 6px;" />
</div>
</template>
<div
v-for="s in stats"
v-else
:key="s.key"
class="mg-stat"
:class="`is-${s.cls}`"
>
<div class="mg-stat__val">{{ s.value }}</div>
<div class="mg-stat__lbl">{{ s.label }}</div>
</div>
</div>
</div>
<div class="mg-w">
<div class="mg-w__head">
<span class="mg-w__title"><i class="pi pi-search" /> Buscar</span>
</div>
<input
v-model="busca"
type="text"
placeholder="Nome do grupo…"
class="mg-search__input"
/>
</div>
</aside>
</Teleport>
<div class="mg-main">
<div class="mg-list">
<template v-if="carregandoInicial">
<div v-for="i in 5" :key="`gpsk-${i}`" class="mg-card mg-card--skeleton" aria-busy="true">
<span class="mg-card__dot melissa-skeleton" style="border-radius: 50%;" />
<div style="flex:1; display:flex; flex-direction:column; gap:6px;">
<span class="melissa-skeleton melissa-skeleton--title" :style="{ width: `${50 + (i * 9) % 30}%` }" />
</div>
</div>
</template>
<div v-else-if="gruposFiltrados.length === 0" class="mg-empty">
<i class="pi pi-th-large mg-empty__icon" />
<div class="mg-empty__title">Nenhum grupo encontrado</div>
<div class="mg-empty__hint">
<template v-if="busca">Ajuste a busca pra ver mais resultados.</template>
<template v-else>Crie seu primeiro grupo pra organizar pacientes.</template>
</div>
<button class="mg-act-btn" @click="abrirCriar">
<i class="pi pi-plus" /><span>Novo grupo</span>
</button>
</div>
<div
v-for="g in gruposFiltrados"
v-else
:key="g.id"
class="mg-card"
:class="{ 'is-system': g.is_system }"
@click="abrirEditar(g)"
>
<span class="mg-card__dot" :style="{ background: g.cor || '#6366f1' }" />
<div class="mg-card__main">
<div class="mg-card__name-row">
<span class="mg-card__name">{{ g.nome }}</span>
<span v-if="g.is_system" class="mg-card__badge">Sistema</span>
</div>
<div class="mg-card__meta">
<span><i class="pi pi-users" /> {{ g.pacientes_count }} {{ g.pacientes_count === 1 ? 'paciente' : 'pacientes' }}</span>
</div>
</div>
<div class="mg-card__actions" @click.stop>
<button
v-if="!g.is_system"
class="mg-card__btn"
v-tooltip.left="'Editar'"
@click="abrirEditar(g)"
>
<i class="pi pi-pencil" />
</button>
<button
v-if="!g.is_system"
class="mg-card__btn mg-card__btn--danger"
v-tooltip.left="'Excluir'"
@click="confirmarExcluir(g)"
>
<i class="pi pi-trash" />
</button>
</div>
</div>
</div>
</div>
</div>
<Dialog
v-model:visible="dlgOpen"
modal
dismissable-mask
:style="{ width: '380px', maxWidth: '92vw' }"
:header="dlgMode === 'create' ? 'Novo grupo' : 'Editar grupo'"
>
<div class="flex flex-col gap-3">
<label class="text-xs text-[var(--text-color-secondary)]">
Nome
<InputText v-model="dlgForm.nome" placeholder="Ex: Adolescentes, Casais, Adultos…" class="w-full mt-1" autofocus @keydown.enter="salvar" />
</label>
<label class="text-xs text-[var(--text-color-secondary)]">
Cor
<input v-model="dlgForm.cor" type="color" class="w-full h-9 mt-1 rounded-md border border-[var(--surface-border)] bg-transparent cursor-pointer" />
</label>
<div class="flex flex-wrap gap-1.5">
<button
v-for="c in PRESET_COLORS"
:key="c"
type="button"
class="w-6 h-6 rounded-full border border-white/20 transition-transform hover:scale-110"
:style="{ background: '#' + c }"
@click="dlgForm.cor = '#' + c"
/>
</div>
<div v-if="dlgError" class="text-xs text-red-400">{{ dlgError }}</div>
</div>
<template #footer>
<Button label="Cancelar" text @click="dlgOpen = false" />
<Button :label="saving ? 'Salvando…' : 'Salvar'" :loading="saving" :disabled="!dlgForm.nome.trim() || saving" @click="salvar" />
</template>
</Dialog>
</section>
</template>
<style scoped>
/* Mesmo CSS do MelissaTags trocando o prefixo mt- → mg- */
.mg-page {
position: absolute;
inset: 6px 6px calc(var(--m-dock-h, 76px) + 6px) 6px;
z-index: 40;
display: flex;
flex-direction: column;
background: var(--m-bg-medium);
backdrop-filter: blur(32px) saturate(160%);
-webkit-backdrop-filter: blur(32px) saturate(160%);
border: 1px solid var(--m-border);
border-radius: 18px;
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
overflow: hidden;
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
color: var(--m-text);
animation: mg-page-enter 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
@keyframes mg-page-enter {
from { opacity: 0; transform: scale(0.985); }
to { opacity: 1; transform: scale(1); }
}
.mg-page__head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 18px;
border-bottom: 1px solid var(--m-border);
flex-shrink: 0;
gap: 10px;
}
.mg-page__title {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: 10px;
font-size: 1rem;
font-weight: 500;
}
.mg-page__title > span:not(.mg-page__count) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mg-page__count {
font-size: 0.7rem;
font-weight: 600;
color: var(--m-accent);
background: var(--m-accent-soft);
border: 1px solid color-mix(in srgb, var(--m-accent) 35%, transparent);
padding: 2px 8px;
border-radius: 999px;
}
.mg-page__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mg-close, .mg-head-btn {
width: 32px; height: 32px;
display: grid; place-items: center;
background: var(--m-bg-soft);
border: 1px solid var(--m-border);
color: var(--m-text);
border-radius: 9px;
cursor: pointer;
font-family: inherit;
transition: background-color 140ms ease;
}
.mg-close:hover, .mg-head-btn:hover { background: var(--m-bg-soft-hover); }
.mg-head-btn > i { font-size: 0.85rem; }
.mg-act-btn {
display: inline-flex;
align-items: center;
gap: 6px;
height: 32px;
padding: 0 12px;
border-radius: 9px;
cursor: pointer;
font-family: inherit;
font-size: 0.78rem;
font-weight: 600;
background: var(--m-accent);
border: 1px solid var(--m-accent);
color: white;
transition: background-color 140ms ease, transform 140ms ease;
}
.mg-act-btn:hover {
background: color-mix(in srgb, var(--m-accent) 88%, white);
transform: translateY(-1px);
}
.mg-act-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.mg-menu-btn {
display: none;
height: 32px;
align-items: center;
gap: 6px;
flex-shrink: 0;
background: var(--m-accent);
border: 1px solid var(--m-accent);
color: white;
padding: 0 11px;
border-radius: 9px;
cursor: pointer;
font-family: inherit;
font-size: 0.78rem;
font-weight: 600;
transition: background-color 140ms ease, transform 140ms ease;
}
.mg-menu-btn:hover {
background: color-mix(in srgb, var(--m-accent) 88%, white);
transform: translateY(-1px);
}
.mg-body {
flex: 1;
display: flex;
min-height: 0;
gap: 12px;
padding: 12px;
}
.mg-side {
width: 280px;
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 12px;
overflow-y: auto;
}
.mg-side::-webkit-scrollbar { width: 5px; }
.mg-side::-webkit-scrollbar-thumb {
background: var(--m-border-strong);
border-radius: 3px;
}
.mg-w {
background: var(--m-bg-soft);
border: 1px solid var(--m-border);
border-radius: 12px;
padding: 12px;
}
.mg-w__head { margin-bottom: 10px; }
.mg-w__title {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 0.78rem;
font-weight: 600;
}
.mg-w__title > i { color: var(--m-text-muted); font-size: 0.78rem; }
.mg-stats {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 6px;
}
.mg-stat {
background: var(--m-bg-medium);
border: 1px solid var(--m-border);
border-radius: 10px;
padding: 8px 10px;
}
.mg-stat__val {
font-size: 1.1rem;
font-weight: 600;
line-height: 1.1;
}
.mg-stat__lbl {
font-size: 0.65rem;
color: var(--m-text-muted);
margin-top: 4px;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.mg-stat.is-ok .mg-stat__val { color: rgb(74, 222, 128); }
.mg-search__input {
width: 100%;
background: var(--m-bg-medium);
border: 1px solid var(--m-border);
color: var(--m-text);
padding: 8px 12px;
border-radius: 9px;
font-size: 0.82rem;
font-family: inherit;
outline: none;
}
.mg-search__input:focus { border-color: var(--m-border-strong); }
.mg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mg-list {
flex: 1;
overflow-y: auto;
padding: 0 4px 4px;
display: flex;
flex-direction: column;
gap: 8px;
}
.mg-list::-webkit-scrollbar { width: 5px; }
.mg-list::-webkit-scrollbar-thumb {
background: var(--m-border-strong);
border-radius: 3px;
}
.mg-card {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 14px;
background: var(--m-bg-soft);
border: 1px solid var(--m-border);
border-radius: 10px;
cursor: pointer;
transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
text-align: left;
}
.mg-card:hover {
background: var(--m-bg-soft-hover);
border-color: var(--m-border-strong);
transform: translateY(-1px);
}
.mg-card.is-system { cursor: default; }
.mg-card.is-system:hover { transform: none; }
.mg-card--skeleton { cursor: default; pointer-events: none; opacity: 0.95; }
.mg-card--skeleton:hover { background: var(--m-bg-soft); transform: none; }
.mg-card__dot {
width: 16px; height: 16px;
border-radius: 50%;
flex-shrink: 0;
border: 1px solid rgba(255, 255, 255, 0.15);
}
.mg-card__main {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.mg-card__name-row {
display: flex;
align-items: center;
gap: 8px;
}
.mg-card__name {
font-size: 0.92rem;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mg-card__badge {
display: inline-flex;
align-items: center;
font-size: 0.62rem;
font-weight: 600;
padding: 2px 8px;
border-radius: 999px;
background: var(--m-bg-medium);
border: 1px solid var(--m-border);
color: var(--m-text-muted);
text-transform: uppercase;
letter-spacing: 0.04em;
}
.mg-card__meta {
font-size: 0.7rem;
color: var(--m-text-muted);
display: flex;
gap: 12px;
}
.mg-card__meta i { margin-right: 4px; }
.mg-card__actions { display: flex; gap: 4px; flex-shrink: 0; }
.mg-card__btn {
width: 28px; height: 28px;
display: grid; place-items: center;
background: transparent;
border: 1px solid var(--m-border);
color: var(--m-text-muted);
border-radius: 9px;
cursor: pointer;
font-family: inherit;
transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.mg-card__btn:hover { background: var(--m-bg-soft-hover); color: var(--m-text); }
.mg-card__btn--danger:hover {
background: rgba(239, 68, 68, 0.15);
border-color: rgba(239, 68, 68, 0.4);
color: rgb(248, 113, 113);
}
.mg-card__btn > i { font-size: 0.7rem; }
.mg-empty {
margin: 24px 0;
padding: 56px 28px;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
color: var(--m-text-muted);
border: 2px dashed var(--m-border-strong);
border-radius: 12px;
background: color-mix(in srgb, var(--m-bg-soft) 40%, transparent);
gap: 8px;
}
.mg-empty__icon {
font-size: 2rem;
color: var(--m-text-faint);
margin-bottom: 4px;
}
.mg-empty__title {
font-size: 0.92rem;
font-weight: 600;
color: var(--m-text);
}
.mg-empty__hint {
font-size: 0.78rem;
margin-bottom: 8px;
}
.mg-mobile-drawer {
position: fixed;
top: 0; left: 0;
height: 100vh;
height: 100dvh;
width: min(360px, 88vw);
z-index: 80;
background: var(--m-bg-medium);
backdrop-filter: blur(28px) saturate(160%);
-webkit-backdrop-filter: blur(28px) saturate(160%);
border-right: 1px solid var(--m-border);
transform: translateX(-100%);
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
color: var(--m-text);
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
.mg-mobile-drawer.is-open { transform: translateX(0); }
.mg-mobile-drawer__scroll {
height: 100%;
overflow-y: auto;
padding: 12px 12px 24px;
display: flex;
flex-direction: column;
gap: 12px;
}
.mg-mobile-drawer__scroll::-webkit-scrollbar { width: 5px; }
.mg-mobile-drawer__scroll::-webkit-scrollbar-thumb {
background: var(--m-border-strong);
border-radius: 3px;
}
.mg-mobile-drawer__scroll .mg-side {
width: 100%;
height: auto;
overflow: visible;
padding: 0;
}
.mg-mobile-drawer__backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
z-index: 79;
}
.mg-drawer-fade-enter-active,
.mg-drawer-fade-leave-active { transition: opacity 200ms ease; }
.mg-drawer-fade-enter-from,
.mg-drawer-fade-leave-to { opacity: 0; }
@media (max-width: 1023px) {
.mg-body { flex-direction: column; padding: 8px; }
.mg-main { width: 100%; }
.mg-page__title > span:first-of-type { display: none; }
.mg-menu-btn--mobile-only { display: inline-flex; }
.mg-act-btn span { display: none; }
.mg-act-btn { width: 32px; padding: 0; justify-content: center; }
}
</style>