/* ============================================================
   OK Condomínio — APP do condómino
   Design system único, mobile-first.
   ============================================================ */

:root {
    color-scheme: light;

    /* Marca */
    --c-brand: #1a56db;
    --c-brand-strong: #1344b0;
    --c-brand-soft: #eaf0ff;
    --c-brand-soft-2: #dbe7ff;
    --c-accent: #047857;
    --c-accent-soft: #ecfdf5;
    --c-danger: #b91c1c;
    --c-danger-soft: #fef2f2;
    --c-warning: #a16207;
    --c-warning-soft: #fffbeb;
    --c-violet: #6d28d9;
    --c-violet-soft: #f5f3ff;

    /* Superfícies e texto */
    --c-bg: #f4f6fb;
    --c-surface: #ffffff;
    --c-surface-2: #f8fafc;
    --c-surface-3: #eef2f7;
    --c-text: #172033;
    --c-text-2: #526077;
    --c-text-3: #5f6f85;
    --c-border: #e3e8f0;
    --c-border-strong: #cbd5e1;

    /* Forma */
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.22);

    /* Layout */
    --sidebar-w: 268px;
    --topbar-h: 62px;
    --bottomnav-h: 64px;
    --content-max: 860px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -0.015em; }
ul, ol { margin: 0; padding-left: 1.25rem; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--c-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 3px solid rgba(26, 86, 219, 0.45);
    outline-offset: 2px;
}

::selection { background: var(--c-brand-soft-2); }

/* ── Acessibilidade ──────────────────────────────────────── */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 8px; left: 8px;
    z-index: 1000;
    transform: translateY(-160%);
    background: var(--c-surface);
    color: var(--c-brand);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-weight: 600;
}
.skip-link:focus { transform: translateY(0); }

.hidden { display: none !important; }

/* ── Shell ───────────────────────────────────────────────── */
.app-shell { min-height: 100vh; min-height: 100dvh; }

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    background: #101a2e;
    color: #e5ebf5;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    padding-top: var(--safe-top);
}

.app-sidebar.open { transform: translateX(0); box-shadow: 8px 0 30px rgba(2, 6, 23, 0.35); }

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(2, 6, 23, 0.55);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 76px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    height: 34px;
    width: auto;
    max-width: 210px;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

.sidebar-close-btn { display: inline-flex; color: #fff; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #b9c5d8;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    width: 100%;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--c-brand); color: #fff; }
.nav-item .icon { flex: 0 0 auto; }

.sidebar-sep {
    height: 1px;
    margin: 12px 6px;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-cartao {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    font-size: 0.78rem;
}
.sidebar-cartao:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-cartao.active { border-color: var(--c-brand); background: rgba(26, 86, 219, 0.22); color: #fff; }

.sidebar-qr {
    width: 104px;
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 7px;
    background: #fff;
    border-radius: 8px;
}

.sidebar-user {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px calc(14px + var(--safe-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-user .btn-ghost { color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.16); }
.sidebar-user .btn-ghost:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }

.user-mini { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-mini .avatar { flex: 0 0 auto; }
.user-mini-text { min-width: 0; }
.user-mini-name { font-size: 0.875rem; font-weight: 600; color: #f1f5f9; }
.user-mini-condo { font-size: 0.76rem; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-main {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: calc(var(--topbar-h) + var(--safe-top));
    padding: var(--safe-top) 16px 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border);
}

.topbar-brand { display: inline-flex; align-items: center; }
.topbar-logo { height: 30px; width: auto; object-fit: contain; }
.topbar-page { font-size: 1rem; font-weight: 700; }

.page-content {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 18px 16px calc(var(--bottomnav-h) + var(--safe-bottom) + 24px);
}
.page-content:focus { outline: none; }

/* ── Navegação inferior ──────────────────────────────────── */
.bottom-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    height: calc(var(--bottomnav-h) + var(--safe-bottom));
    padding: 6px 6px calc(6px + var(--safe-bottom));
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--c-border);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--c-text-3);
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
}
.bottom-nav-item .icon { width: 23px; height: 23px; }
.bottom-nav-item span { font-size: 0.75rem; line-height: 1.1; }
.bottom-nav-item:hover { color: var(--c-brand); text-decoration: none; }
.bottom-nav-item.active { color: var(--c-brand); background: var(--c-brand-soft); }
.bottom-nav-item[aria-expanded="true"] { color: var(--c-brand); }

/* ── Folha "Mais" ────────────────────────────────────────── */
.sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(2, 6, 23, 0.5);
    animation: fadeIn 0.18s ease;
}

.sheet {
    width: 100%;
    max-width: 560px;
    max-height: 85dvh;
    overflow-y: auto;
    padding: 8px 16px calc(20px + var(--safe-bottom));
    background: var(--c-surface);
    border-radius: 22px 22px 0 0;
    box-shadow: var(--shadow-lg);
    animation: slideUpSheet 0.22s ease;
}

.sheet-handle {
    width: 40px;
    height: 4px;
    margin: 6px auto 12px;
    border-radius: 99px;
    background: var(--c-border-strong);
}

.sheet-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-text-3); padding: 4px 8px 8px; }

.sheet-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    padding: 10px 8px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--c-text);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
}
.sheet-item:hover { background: var(--c-surface-2); text-decoration: none; }
.sheet-item .icon { color: var(--c-brand); }
.sheet-item-danger { color: var(--c-danger); }
.sheet-item-danger .icon { color: var(--c-danger); }

/* ── Cabeçalho de página ─────────────────────────────────── */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.page-title { font-size: 1.55rem; font-weight: 800; color: var(--c-text); }
.page-sub { margin-top: 4px; font-size: 0.92rem; color: var(--c-text-2); }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.section { margin-top: 24px; }
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.section-title { font-size: 1.05rem; font-weight: 700; }
.section-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--c-brand);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}
.section-link:hover { text-decoration: underline; }

/* ── Cartões e listas ────────────────────────────────────── */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.card-flat { box-shadow: none; }
.card-soft { background: var(--c-surface-2); }
.card + .card { margin-top: 12px; }

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

.list { display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--c-surface); border: 1px solid var(--c-border); overflow: hidden; }
.list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--c-border);
    background: var(--c-surface);
}
.list-item:first-child { border-top: 0; }
.list-item-link { color: inherit; text-decoration: none; }
.list-item-link:hover { background: var(--c-surface-2); text-decoration: none; }
.list-item-main { flex: 1; min-width: 0; }
.list-item-title { font-size: 0.98rem; font-weight: 600; color: var(--c-text); overflow-wrap: anywhere; }
.list-item-desc { margin-top: 3px; font-size: 0.92rem; color: var(--c-text-2); overflow-wrap: anywhere; }
.list-item-desc.clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.list-item-meta { margin-top: 6px; font-size: 0.8rem; color: var(--c-text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-item-trailing { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.list-item-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--c-brand-soft);
    color: var(--c-brand);
}
.list-item-icon.is-accent { background: var(--c-accent-soft); color: var(--c-accent); }
.list-item-icon.is-warning { background: var(--c-warning-soft); color: var(--c-warning); }
.list-item-icon.is-violet { background: var(--c-violet-soft); color: var(--c-violet); }

.ticket-card { cursor: pointer; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.ticket-card:hover { border-color: var(--c-brand-soft-2); box-shadow: var(--shadow-md); }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--c-surface-3);
    color: var(--c-text-2);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge-info { background: var(--c-brand-soft); color: var(--c-brand-strong); }
.badge-success { background: var(--c-accent-soft); color: var(--c-accent); }
.badge-warning { background: var(--c-warning-soft); color: var(--c-warning); }
.badge-danger { background: var(--c-danger-soft); color: var(--c-danger); }
.badge-violet { background: var(--c-violet-soft); color: var(--c-violet); }

/* ── Botões ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--c-brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--c-brand-strong); }
.btn-outline { border-color: var(--c-border-strong); background: transparent; color: var(--c-text); }
.btn-outline:hover:not(:disabled) { border-color: var(--c-brand); color: var(--c-brand); background: var(--c-brand-soft); }
.btn-soft { background: var(--c-brand-soft); color: var(--c-brand-strong); }
.btn-soft:hover:not(:disabled) { background: var(--c-brand-soft-2); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #991b1b; }
.btn-violet { background: var(--c-violet); color: #fff; }
.btn-violet:hover:not(:disabled) { background: #5b21b6; }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: #065f46; }
.btn-cyan { background: #0e7490; color: #fff; }
.btn-cyan:hover:not(:disabled) { background: #155e75; }
.btn-ghost { background: transparent; color: var(--c-text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--c-surface-2); color: var(--c-text); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 7px 13px; font-size: 0.86rem; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 14px 22px; font-size: 1.02rem; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--c-text-2);
}
.icon-btn:hover { background: var(--c-surface-2); color: var(--c-text); }

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--c-brand);
    color: #fff;
    font-weight: 800;
    font-size: 0.92rem;
    flex: 0 0 auto;
}
.avatar-lg { width: 48px; height: 48px; font-size: 1.05rem; }

/* ── Formulários ─────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .field-label { font-size: 0.9rem; font-weight: 600; color: var(--c-text); }
.field-hint { font-size: 0.8rem; color: var(--c-text-3); line-height: 1.45; }

.input, .select, .textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1.5px solid var(--c-border-strong);
    border-radius: 12px;
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 1rem;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.14);
}
.input:disabled, .select:disabled, .textarea:disabled { background: var(--c-surface-3); color: var(--c-text-3); }

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    cursor: pointer;
}
.check-row input[type="checkbox"], .check-row input[type="radio"] {
    width: 20px; height: 20px;
    margin: 2px 0 0;
    accent-color: var(--c-brand);
    flex: 0 0 auto;
}
.check-row-text { font-size: 0.92rem; color: var(--c-text-2); line-height: 1.5; }

.switch-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--c-border);
}
.switch-row:first-of-type { border-top: 0; }
.switch-row-text { min-width: 0; }
.switch-row-title { font-size: 0.94rem; font-weight: 600; }
.switch-row-desc { margin-top: 2px; font-size: 0.82rem; color: var(--c-text-3); line-height: 1.45; }
.switch-row input[type="checkbox"] {
    width: 22px; height: 22px;
    margin-top: 2px;
    accent-color: var(--c-brand);
    flex: 0 0 auto;
}

/* ── Estados ─────────────────────────────────────────────── */
.spinner {
    width: 30px;
    height: 30px;
    margin: 0 auto;
    border: 3px solid var(--c-border);
    border-top-color: var(--c-brand);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.spinner-inline { width: 18px; height: 18px; border-width: 2px; display: inline-block; vertical-align: -3px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideUpSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes scaleIn { from { transform: scale(0.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.loading-container { display: flex; justify-content: center; align-items: center; padding: 56px 0; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 42px 20px;
    text-align: center;
    color: var(--c-text-2);
}
.empty-state .icon { color: var(--c-text-3); opacity: 0.65; }
.empty-state-title { font-size: 1rem; font-weight: 700; color: var(--c-text); }
.empty-state-text { font-size: 0.92rem; max-width: 34ch; }

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 38px 18px;
    text-align: center;
    color: var(--c-danger);
}
.error-state p { color: var(--c-text-2); font-size: 0.92rem; }

.skeleton {
    border-radius: 10px;
    background: linear-gradient(90deg, var(--c-surface-3) 25%, #f6f8fb 37%, var(--c-surface-3) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ── Avisos ──────────────────────────────────────────────── */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface-2);
    color: var(--c-text-2);
    font-size: 0.9rem;
    line-height: 1.5;
}
.notice .icon { flex: 0 0 auto; margin-top: 2px; }
.notice-info { border-color: #c7d7fe; background: var(--c-brand-soft); color: #1e3a8a; }
.notice-warning { border-color: #fde68a; background: var(--c-warning-soft); color: #78350f; }
.notice-danger { border-color: #fecaca; background: var(--c-danger-soft); color: #7f1d1d; }
.notice-success { border-color: #a7f3d0; background: var(--c-accent-soft); color: #065f46; }
.notice strong { color: inherit; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.18s ease;
}
.modal {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.18s ease;
}
.modal-sm { max-width: 440px; }
.modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 12px;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
}
.modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-sub { margin-top: 3px; font-size: 0.85rem; color: var(--c-text-3); }
.modal-body { padding: 18px 20px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 20px 20px; }
.modal-actions .btn { flex: 1; min-width: 130px; }

/* ── Toast ───────────────────────────────────────────────── */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 16px);
    z-index: 300;
    transform: translateX(-50%);
    max-width: min(420px, calc(100vw - 32px));
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--c-text);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 500;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.22s ease;
}
.toast.error { background: var(--c-danger); }
.toast.success { background: var(--c-accent); }
.toast.warning { background: var(--c-warning); }

/* ── Início ──────────────────────────────────────────────── */
.dash-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.dash-eyebrow { font-size: 0.82rem; font-weight: 600; color: var(--c-text-3); }
.dash-hero h1 { margin-top: 2px; font-size: 1.5rem; font-weight: 800; }

.balance-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #1a56db 0%, #2f6bff 55%, #4f46e5 100%);
    color: #fff;
    box-shadow: 0 10px 28px rgba(26, 86, 219, 0.3);
}
.balance-card::after {
    content: '';
    position: absolute;
    width: 180px; height: 180px;
    right: -60px; top: -80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
}
.balance-label { font-size: 0.82rem; font-weight: 600; opacity: 0.85; }
.balance-value { display: block; margin: 4px 0 14px; font-size: clamp(2rem, 9vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.balance-value.is-negative { color: #fecaca; }
.balance-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.22); font-size: 0.82rem; }
.balance-foot a { color: #fff; font-weight: 700; }
.balance-foot a:hover { text-decoration: underline; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 14px;
    border: 1px solid var(--c-border);
    border-radius: 14px;
    background: var(--c-surface);
    color: var(--c-text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}
.quick-action:hover { border-color: var(--c-brand-soft-2); background: var(--c-brand-soft); text-decoration: none; }
.quick-action .icon { flex: 0 0 auto; color: var(--c-brand); }
.quick-action-label { font-size: 0.9rem; font-weight: 700; line-height: 1.2; }
.quick-action-meta { font-size: 0.76rem; color: var(--c-text-3); }

.alert-item { position: relative; padding-left: 18px; }
.alert-item::before {
    content: '';
    position: absolute;
    left: 0; top: 16px; bottom: 16px;
    width: 3px;
    border-radius: 99px;
    background: var(--c-border-strong);
}
.alert-item.is-urgent::before { background: var(--c-danger); }
.alert-item.is-mine::before { background: var(--c-brand); }

.contact-card { display: flex; flex-direction: column; gap: 14px; }
.contact-row { display: flex; align-items: center; gap: 12px; }
.contact-row .list-item-icon { width: 40px; height: 40px; }
.contact-label { font-size: 0.78rem; color: var(--c-text-3); }
.contact-value { font-size: 0.95rem; font-weight: 600; overflow-wrap: anywhere; }
.contact-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Estatísticas ────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-card { padding: 14px; border: 1px solid var(--c-border); border-radius: 14px; background: var(--c-surface); }
.stat-label { font-size: 0.78rem; font-weight: 600; color: var(--c-text-3); }
.stat-value { margin-top: 4px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.stat-value.is-negative { color: var(--c-danger); }
.stat-value.is-positive { color: var(--c-accent); }
.stat-foot { margin-top: 3px; font-size: 0.72rem; color: var(--c-text-3); }

/* ── Divulgação (quotas) ─────────────────────────────────── */
.disclosure { padding: 0; overflow: hidden; }
.disclosure-head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    text-align: left;
    color: var(--c-brand-strong);
    font-weight: 700;
    font-size: 0.95rem;
}
.disclosure-head .icon { flex: 0 0 auto; }
.disclosure-chevron { margin-left: auto; transition: transform 0.22s ease; }
.disclosure[data-open="true"] .disclosure-chevron { transform: rotate(180deg); }
.disclosure-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
    padding: 0 16px;
    color: var(--c-text-2);
    font-size: 0.9rem;
    line-height: 1.6;
}
.disclosure-body > :first-child { margin-top: 0; }
.disclosure-body > :last-child { margin-bottom: 16px; }

/* ── Paginação ───────────────────────────────────────────── */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--c-border);
}
.pagination-info { font-size: 0.8rem; color: var(--c-text-3); }
.pagination-buttons { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pagination-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-surface);
    color: var(--c-text-2);
    font-size: 0.85rem;
    font-weight: 600;
}
.pagination-btn:hover:not(:disabled):not(.active) { border-color: var(--c-brand); color: var(--c-brand); }
.pagination-btn.active { border-color: var(--c-brand); background: var(--c-brand); color: #fff; }
.pagination-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pagination-ellipsis { padding: 0 4px; color: var(--c-text-3); font-size: 0.8rem; }

/* ── Segmentos / filtros ─────────────────────────────────── */
.segmented {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-surface-2);
}
.segment {
    min-height: 38px;
    padding: 7px 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--c-text-2);
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
}
.segment.active { background: var(--c-surface); color: var(--c-brand-strong); box-shadow: var(--shadow-sm); }

/* ── Votações ────────────────────────────────────────────── */
.voting-page { width: 100%; }
.voting-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.voting-page-header h2 { font-size: 1.55rem; font-weight: 800; }
.voting-stats-row { display: flex; gap: 6px; flex-wrap: wrap; }
.stat-chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--c-surface-2);
    color: var(--c-text-2);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}
.stat-chip:hover { background: var(--c-surface-3); }
.stat-chip.active { background: var(--c-brand-soft); color: var(--c-brand-strong); }
.stat-chip.closed { background: var(--c-surface-2); color: var(--c-text-2); }
.stat-chip.active-filter { border-color: currentColor; box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.13); }

.assembleia-grupo { margin-bottom: 24px; }
.assembleia-grupo-titulo { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--c-border); font-size: 0.95rem; font-weight: 700; color: var(--c-text-2); }
.voting-list { display: flex; flex-direction: column; gap: 10px; }

.voting-card {
    position: relative;
    padding: 16px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.voting-card:hover { box-shadow: var(--shadow-md); }
.voting-card.pending { border-left: 4px solid var(--c-warning); }
.voting-card.voted { border-left: 4px solid var(--c-accent); }
.voting-card.voted-without-proc { border-left: 4px solid var(--c-warning); }
.voting-card.locked { border-left: 4px solid var(--c-border-strong); background: var(--c-surface-2); }
.voting-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.voting-card-title { min-width: 0; }
.voting-card-title h3 { font-size: 1rem; font-weight: 700; }
.voting-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.estado-badge { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: var(--c-surface-3); color: var(--c-text-2); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.estado-badge.active { background: var(--c-brand-soft); color: var(--c-brand-strong); }
.estado-badge.closed { background: var(--c-surface-3); color: var(--c-text-2); }
.estado-badge.draft { background: var(--c-warning-soft); color: var(--c-warning); }
.voto-badge { display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
.voto-badge.voted { background: var(--c-accent-soft); color: var(--c-accent); }
.voto-badge.pending { background: var(--c-warning-soft); color: var(--c-warning); }
.voto-badge.locked { background: var(--c-surface-3); color: var(--c-text-2); }
.voto-badge.warning { background: var(--c-warning-soft); color: var(--c-warning); }
.voting-date { font-size: 0.78rem; color: var(--c-text-3); white-space: nowrap; }
.voting-card-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.voting-card-actions .btn { flex: 1; min-width: 130px; }

.btn-votar, .btn-ver-voto, .btn-ver-resultados, .btn-detalhes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
}
.btn-votar { background: var(--c-brand); color: #fff; }
.btn-votar:hover { background: var(--c-brand-strong); }
.btn-ver-voto { background: var(--c-accent-soft); color: var(--c-accent); }
.btn-ver-resultados { background: var(--c-surface-2); color: var(--c-text); }
.btn-detalhes { border-color: var(--c-border-strong); background: transparent; color: var(--c-brand); }
.btn-detalhes:hover { background: var(--c-brand-soft); }

.lock-info { padding: 10px; text-align: center; }
.lock-icon { margin-bottom: 10px; font-size: 2.4rem; line-height: 1; }
.lock-info h4 { margin-bottom: 6px; font-size: 1.02rem; color: var(--c-text); }
.lock-info p { margin-bottom: 8px; color: var(--c-text-2); font-size: 0.9rem; line-height: 1.55; }
.lock-info p.privacidade { padding: 10px 14px; border-left: 3px solid var(--c-brand); border-radius: 8px; background: var(--c-brand-soft); color: #1e3a8a; text-align: left; font-size: 0.86rem; }
.btn-pedir-procuracao { width: 100%; min-height: 48px; margin-top: 10px; padding: 12px 18px; border: 0; border-radius: 12px; background: var(--c-brand); color: #fff; font-weight: 700; }
.btn-pedir-procuracao:hover { background: var(--c-brand-strong); }
.btn-pedir-procuracao:disabled { background: var(--c-text-3); cursor: wait; }

/* Modal de votações (compatibilidade) */
.voting-modal-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 6, 23, 0.55); }
.voting-modal-content { width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto; border-radius: var(--radius-lg); background: var(--c-surface); box-shadow: var(--shadow-lg); }
.voting-modal-content .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.voting-modal-content .modal-body { padding: 18px 20px; }
.modal-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--c-text-2); font-size: 1.2rem; }
.modal-close:hover { background: var(--c-surface-2); }

.resultados-section { margin-bottom: 20px; }
.resultados-section h4 { margin-bottom: 10px; font-size: 0.95rem; }
.resultados-stats { display: flex; gap: 14px; margin-bottom: 14px; font-size: 0.82rem; color: var(--c-text-3); }
.resultado-item { margin-bottom: 14px; }
.resultado-header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 0.9rem; font-weight: 600; }
.resultado-votos { color: var(--c-text-3); font-size: 0.8rem; }
.resultado-bar, .progress-bar { height: 8px; overflow: hidden; border-radius: 99px; background: var(--c-surface-3); }
.resultado-fill, .progress-fill { height: 100%; border-radius: 99px; background: var(--c-brand); transition: width 0.4s ease; }
.progress-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--c-border); }
.progress-info { display: flex; justify-content: space-between; margin-top: 5px; font-size: 0.78rem; color: var(--c-text-3); }
.opcoes-voto { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.opcao-voto { display: flex; align-items: center; gap: 12px; padding: 13px; border: 2px solid var(--c-border); border-radius: 12px; cursor: pointer; }
.opcao-voto:hover { border-color: var(--c-brand); background: var(--c-surface-2); }
.opcao-voto.selected { border-color: var(--c-brand); background: var(--c-brand-soft); }
.opcao-voto input[type="radio"] { width: 19px; height: 19px; accent-color: var(--c-brand); }
.opcao-label { font-size: 0.95rem; font-weight: 500; }
.btn-confirmar-voto { width: 100%; min-height: 50px; border: 0; border-radius: 12px; background: var(--c-accent); color: #fff; font-size: 1rem; font-weight: 700; }
.btn-confirmar-voto:hover { background: #065f46; }
.btn-confirmar-voto:disabled { opacity: 0.5; cursor: not-allowed; }
.meu-voto-section { margin-top: 14px; padding: 14px; border: 1px solid #bbf7d0; border-radius: 12px; background: var(--c-accent-soft); }
.meu-voto-section h4 { margin-bottom: 8px; font-size: 0.95rem; }
.meu-voto-section p { margin: 3px 0; font-size: 0.9rem; }
.tracker-info { margin-top: 8px; font-size: 0.78rem; color: var(--c-text-3); word-break: break-all; }
.tracker-info code { padding: 2px 6px; border-radius: 5px; background: var(--c-surface-3); font-size: 0.75rem; }

/* ── Overlay de voto (Belenios) ──────────────────────────── */
.vote-overlay { position: fixed; inset: 0; z-index: 220; display: flex; flex-direction: column; background: #fff; }
.vote-bar { display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 10px; background: var(--c-brand); color: #fff; }
.vote-bar .icon-btn { color: #fff; }
.vote-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; font-weight: 700; }
.vote-wait { font-size: 0.72rem; opacity: 0.85; white-space: nowrap; }
.vote-external { padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 0.72rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.vote-body { position: relative; flex: 1; min-height: 0; display: flex; }
.vote-iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.vote-otp { position: absolute; inset: 0 0 auto; z-index: 2; display: none; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #bfdbfe; background: var(--c-brand-soft); box-shadow: var(--shadow-md); }
.vote-otp-status { font-size: 0.7rem; color: var(--c-text-2); }
.vote-otp-code { font-size: 1.45rem; font-weight: 800; letter-spacing: 4px; color: var(--c-brand); line-height: 1.15; }
.vote-otp .btn { min-height: 38px; padding: 6px 12px; }

/* ── Documentos ──────────────────────────────────────────── */
.doc-group { margin-bottom: 26px; }
.doc-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.doc-group-title { font-size: 1rem; font-weight: 700; }
.doc-group-count { display: inline-flex; min-width: 26px; justify-content: center; padding: 2px 8px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-text-3); font-size: 0.75rem; font-weight: 700; }
.doc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.doc-tag { padding: 2px 7px; border-radius: 999px; background: var(--c-brand-soft); color: var(--c-brand-strong); font-size: 0.7rem; font-weight: 600; }
.doc-file { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; color: var(--c-text-3); }

@media (max-width: 560px) {
    .doc-group .list-item { flex-wrap: wrap; }
    .doc-group .list-item-trailing { width: 100%; align-items: flex-end; }
}

/* ── Definições ──────────────────────────────────────────── */
.settings-section { margin-bottom: 16px; }
.settings-title { margin-bottom: 4px; font-size: 1.02rem; font-weight: 700; }
.settings-sub { margin-bottom: 14px; font-size: 0.85rem; color: var(--c-text-3); }

.canal-card {
    padding: 14px;
    margin-bottom: 8px;
    border: 1px solid var(--c-border);
    border-radius: 14px;
    background: var(--c-surface-2);
    transition: border-color 0.18s ease, background 0.18s ease;
}
.canal-card.is-preferred { border: 2px solid var(--c-brand); background: var(--c-brand-soft); }
.canal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.canal-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.94rem; font-weight: 700; }
.canal-status { font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.canal-status.is-ok { color: var(--c-accent); }
.canal-status.is-pending { color: var(--c-danger); }
.canal-value { font-size: 0.86rem; color: var(--c-text-2); margin-bottom: 8px; overflow-wrap: anywhere; }
.canal-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.canal-actions .input { flex: 1; min-width: 150px; }
.canal-foot { margin-top: 8px; font-size: 0.8rem; color: var(--c-text-3); }
.badge-pref { display: inline-flex; padding: 2px 8px; border-radius: 999px; background: var(--c-brand); color: #fff; font-size: 0.68rem; font-weight: 700; }

/* ── Cartão ──────────────────────────────────────────────── */
.cartao-wrap { max-width: 540px; margin: 0 auto; }
.cartao-card { padding: 22px 18px; border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); text-align: center; box-shadow: var(--shadow-sm); }
.cartao-condo { font-size: 0.78rem; font-weight: 700; color: var(--c-text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.cartao-fracao { margin-top: 4px; font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; color: var(--c-brand); }
.cartao-nome { margin-bottom: 16px; font-size: 0.9rem; color: var(--c-text-2); }
.cartao-qr { display: inline-flex; padding: 10px; border: 1px solid var(--c-border); border-radius: 14px; background: #fff; line-height: 0; }
.cartao-qr svg { width: 260px; height: 260px; max-width: 100%; display: block; }
.cartao-code { margin-top: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; color: var(--c-text-3); word-break: break-all; }
.cartao-info { margin-top: 14px; padding: 16px; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); }
.cartao-info-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 0.86rem; }
.cartao-info-grid dt { color: var(--c-text-3); }
.cartao-info-grid dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.cartao-last { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--c-border); font-size: 0.78rem; color: var(--c-text-3); }

/* ── Autenticação ────────────────────────────────────────── */
.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
    background: radial-gradient(circle at 20% 0%, #e7eeff 0%, var(--c-bg) 55%);
}
.auth-card {
    width: 100%;
    max-width: 430px;
    padding: 28px 22px;
    border: 1px solid var(--c-border);
    border-radius: 24px;
    background: var(--c-surface);
    box-shadow: var(--shadow-md);
    text-align: center;
}
.auth-logo { height: 40px; width: auto; object-fit: contain; margin: 0 auto 18px; display: block; }
.auth-title { font-size: 1.35rem; font-weight: 800; }
.auth-sub { margin-top: 6px; margin-bottom: 20px; font-size: 0.9rem; color: var(--c-text-2); line-height: 1.5; }
.auth-msg { min-height: 22px; margin-bottom: 10px; font-size: 0.84rem; color: var(--c-text-3); }
.auth-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.auth-actions .btn { width: 100%; }
.auth-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-bottom: 8px; padding: 0; border: 0; background: none; color: var(--c-text-2); font-size: 0.88rem; font-weight: 600; }
.auth-back:hover { color: var(--c-text); }

.otp-row { display: flex; justify-content: center; gap: 6px; margin: 4px 0 16px; }
.otp-input {
    width: 46px;
    max-width: 13vw;
    height: 52px;
    padding: 0;
    border: 2px solid var(--c-border);
    border-radius: 11px;
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}
.otp-input:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.14); }
.otp-sep { display: flex; align-items: center; color: var(--c-border-strong); font-size: 1rem; }

.demo-hint { margin-top: 14px; padding: 10px 12px; border: 1px solid #bbf7d0; border-radius: 12px; background: var(--c-accent-soft); font-size: 0.8rem; color: #065f46; text-align: left; }
.demo-hint code { padding: 2px 7px; border-radius: 5px; background: #d1fae5; font-weight: 700; white-space: nowrap; }

/* ── Escolhas (procuração) ───────────────────────────────── */
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    border: 2px solid var(--c-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}
.radio-option:hover { border-color: var(--c-brand-soft-2); background: var(--c-surface-2); }
.radio-option.selected { border-color: var(--c-brand); background: var(--c-brand-soft); }
.radio-option input[type="radio"] { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--c-brand); flex: 0 0 auto; }
.radio-option strong { display: block; font-size: 0.95rem; }
.radio-option small { display: block; margin-top: 2px; font-size: 0.82rem; color: var(--c-text-2); }

/* ── Resultados / estados de fluxo ───────────────────────── */
.result-screen { max-width: 560px; margin: 0 auto; padding: 12px 0 24px; text-align: center; }
.result-icon { margin-bottom: 10px; font-size: 3rem; line-height: 1; }
.result-screen h1, .result-screen h2 { margin-bottom: 8px; font-size: 1.4rem; font-weight: 800; color: var(--c-text); }
.result-screen > p { margin-bottom: 18px; color: var(--c-text-2); font-size: 0.94rem; line-height: 1.6; }
.result-card { margin-bottom: 18px; padding: 16px; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface-2); text-align: left; }
.result-card strong { display: block; margin-bottom: 8px; font-size: 0.94rem; }
.result-card ul { color: var(--c-text-2); font-size: 0.9rem; line-height: 1.65; }

/* ── Banner de atualização ───────────────────────────────── */
.update-banner {
    position: fixed;
    top: calc(10px + var(--safe-top));
    left: 12px;
    right: 12px;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
    padding: 10px 12px 10px 16px;
    border-radius: 14px;
    background: var(--c-brand);
    color: #fff;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 600;
}
.update-banner .btn { min-height: 38px; padding: 6px 14px; background: #fff; color: var(--c-brand); font-size: 0.85rem; }

/* ── Utilitários ─────────────────────────────────────────── */
.muted { color: var(--c-text-3); }
.text-sm { font-size: 0.85rem; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; margin: 14px 0; background: var(--c-border); }

/* ── Desktop ─────────────────────────────────────────────── */
@media (min-width: 900px) {
    .app-sidebar { transform: translateX(0); box-shadow: none; }
    .sidebar-close-btn { display: none; }
    .sidebar-overlay { display: none !important; }
    .app-main { margin-left: var(--sidebar-w); }
    .app-topbar { display: none; }
    .bottom-nav { display: none; }
    .page-content { padding: 32px 32px 48px; }
    .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .toast { bottom: 24px; }
}

@media (min-width: 1200px) {
    .page-content { padding-top: 40px; }
}

/* ── Movimento reduzido ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
