/* =========================================================================
   AulaFácil — sistema de design
   Tokens, componentes e páginas. Modo claro/escuro automático.
   ========================================================================= */
:root {
    --bg: #f5f6fb;
    --surface: #ffffff;
    --surface-2: #f8f9fd;
    --text: #172033;
    --muted: #667089;
    --line: #e4e8f1;
    --primary: #4f46e5;
    --primary-d: #4338ca;
    --primary-soft: #eceefe;
    --on-primary: #ffffff;
    --ok: #15803d;
    --ok-soft: #e6f6ec;
    --warn: #b45309;
    --warn-soft: #fff3df;
    --bad: #c81e1e;
    --bad-soft: #fdeaea;
    --info: #1d4ed8;
    --info-soft: #e8f0ff;
    --wa: #17a34a;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 20px rgba(16, 24, 40, .06);
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --nav-h: 60px;
    --tab-h: 64px;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e1220;
        --surface: #161c2e;
        --surface-2: #1b2237;
        --text: #e9edf7;
        --muted: #9ba6c2;
        --line: #283049;
        --primary: #8b93ff;
        --primary-d: #a5abff;
        --primary-soft: #232b55;
        --on-primary: #0e1220;
        --ok: #4ade80;
        --ok-soft: #12301f;
        --warn: #fbbf24;
        --warn-soft: #3a2a0c;
        --bad: #f87171;
        --bad-soft: #3a1717;
        --info: #8ab4ff;
        --info-soft: #14264d;
        --wa: #22c55e;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 20px 16px 28px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- barra superior ---------- */
.appbar {
    position: sticky; top: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.appbar-in { max-width: 1040px; margin: 0 auto; padding: 0 16px; height: var(--nav-h); display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.2px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #4338ca); display: grid; place-items: center; color: #fff; box-shadow: 0 4px 12px rgba(79, 70, 229, .35); }
.brand-logo .icon { width: 19px; height: 19px; stroke-width: 2.6; }

.nav-main { display: flex; gap: 2px; margin-left: 8px; flex: 1; min-width: 0; }
.nav-main a {
    display: flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 10px;
    color: var(--muted); font-size: 14.5px; font-weight: 600; white-space: nowrap;
}
.nav-main a:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.nav-main a.on { background: var(--primary-soft); color: var(--primary); }

.nav-more { position: relative; }
.nav-more > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 8px 11px;
    border-radius: 10px; color: var(--muted); font-size: 14.5px; font-weight: 600;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary:hover, .nav-more > summary.on, .nav-more[open] > summary { background: var(--primary-soft); color: var(--primary); }
.nav-more .menu-pop { left: 0; right: auto; }

.usermenu { position: relative; margin-left: auto; }
.usermenu > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
    padding: 5px 8px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
}
.usermenu > summary::-webkit-details-marker { display: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.usermenu .nome { font-size: 14px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pop {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 40;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px;
}
.menu-pop a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 500; }
.menu-pop a:hover { background: var(--primary-soft); text-decoration: none; }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu-pop .perigo { color: var(--bad); }

/* ---------- barra inferior (celular) ---------- */
.tabbar { display: none; }
@media (max-width: 860px) {
    .nav-main { display: none; }
    .usermenu .nome { display: none; }
    body.com-tabbar { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
    .tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
        height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px);
        border-top: 1px solid var(--line);
    }
    .tabbar a, .tabbar summary {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        color: var(--muted); font-size: 11px; font-weight: 600; list-style: none; cursor: pointer;
    }
    .tabbar summary::-webkit-details-marker { display: none; }
    .tabbar a:hover { text-decoration: none; }
    .tabbar a.on, .tabbar details[open] summary { color: var(--primary); }
    .tabbar .icon { width: 23px; height: 23px; }
    .tabbar details { display: contents; }
    .more-sheet {
        position: fixed; left: 10px; right: 10px; bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); z-index: 36;
        background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 8px;
        display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
    }
    .more-sheet a { flex-direction: row; justify-content: flex-start; gap: 10px; font-size: 14px; color: var(--text); padding: 12px; border-radius: 12px; }
    .more-sheet a:hover { background: var(--primary-soft); }
}

/* ---------- títulos ---------- */
h1 { font-size: 26px; line-height: 1.2; margin: 6px 0 4px; letter-spacing: -.4px; }
h2 { font-size: 18px; margin: 28px 0 12px; letter-spacing: -.2px; }
h3 { font-size: 16px; margin: 0 0 10px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; justify-content: space-between; margin: 4px 0 18px; }
.page-head p { margin: 2px 0 0; color: var(--muted); }

/* ---------- cartões e métricas ---------- */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); margin-bottom: 18px; }
.stat {
    position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 16px 14px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.stat .n { font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat .ico { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat.ok .ico { background: var(--ok-soft); color: var(--ok); }
.stat.warn .ico { background: var(--warn-soft); color: var(--warn); }
.stat.bad .ico { background: var(--bad-soft); color: var(--bad); }
.stat.ok .n { color: var(--ok); }
.stat.warn .n { color: var(--warn); }
.stat.bad .n { color: var(--bad); }
/* celular: ícone em cima, valor embaixo (precisa vir DEPOIS das regras base) */
@media (max-width: 560px) {
    .stat { padding: 48px 13px 12px; }
    .stat .n { font-size: 21px; }
    .stat .ico { width: 30px; height: 30px; left: 12px; right: auto; top: 11px; border-radius: 9px; }
    .stat .ico .icon { width: 16px; height: 16px; }
    .stat .l { font-size: 12.5px; }
}

.flash {
    display: block; padding: 12px 14px; border-radius: var(--radius-sm);
    margin: 0 0 16px; border: 1px solid transparent; font-size: 15px;
}
.flash.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash.err { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.flash.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.flash a { color: inherit; text-decoration: underline; }

.empty { text-align: center; color: var(--muted); padding: 28px 18px; }
.empty .icon { width: 34px; height: 34px; opacity: .5; margin-bottom: 6px; }

/* ---------- botões ---------- */
.btn, button {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid transparent; background: var(--primary); color: var(--on-primary);
    padding: 10px 16px; border-radius: 11px; font: inherit; font-size: 15px; font-weight: 600;
    cursor: pointer; line-height: 1.2; transition: filter .12s, transform .06s, background .12s;
}
.btn:hover, button:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active, button:active { transform: translateY(1px); }
.btn.ghost, button.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.ghost:hover, button.ghost:hover { background: var(--primary-soft); filter: none; }
.btn.ok, button.ok { background: var(--ok); color: #fff; }
.btn.bad, button.bad { background: var(--bad); color: #fff; }
.btn.wa, button.wa { background: var(--wa); color: #fff; }
.btn.sm, button.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.block, button.block { width: 100%; }
button[disabled] { opacity: .6; cursor: not-allowed; }
.btn .icon, button .icon { width: 17px; height: 17px; }

/* ---------- formulários ---------- */
label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
input, select, textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px;
    font: inherit; background: var(--surface); color: var(--text); transition: border-color .12s, box-shadow .12s;
}
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--primary); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea { resize: vertical; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.field { margin-bottom: 4px; }
.inline-form { display: inline; margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .grow { flex: 1 1 180px; }

/* ---------- listas ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.item {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 13px 15px; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 10px 14px;
    align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm);
}
.item .main { flex: 1 1 230px; min-width: 0; }
.item .title { font-weight: 700; }
.item .actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
li.card { list-style: none; }

.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; vertical-align: middle; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
a.badge:hover { text-decoration: none; filter: brightness(.96); }

/* ---------- tabelas ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

details summary { cursor: pointer; color: var(--primary); font-weight: 600; }
details img { display: block; margin: 8px 0; border-radius: 10px; }
.bar { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; height: 10px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444); border-radius: 999px; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* ---------- planos ---------- */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin-bottom: 18px; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); }
.plan.featured { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.plan h2 { margin: 6px 0 4px; }
.plan .price { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.feat { list-style: none; margin: 14px 0; padding: 0; }
.feat li { padding: 5px 0 5px 26px; position: relative; font-size: 15px; }
.feat li::before { content: "✓"; position: absolute; left: 2px; top: 5px; color: var(--ok); font-weight: 800; }
.feat li.off { color: var(--muted); opacity: .65; }
.feat li.off::before { content: "–"; color: var(--muted); }

/* ---------- autenticação ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-hero {
    background: radial-gradient(1200px 500px at 0% 0%, #6366f1 0%, transparent 60%), linear-gradient(160deg, #3730a3, #1e1b4b);
    color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero .brand { color: #fff; }
.auth-hero h2 { font-size: 30px; line-height: 1.2; margin: 0 0 14px; letter-spacing: -.6px; }
.auth-hero ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.auth-hero li { display: flex; gap: 10px; align-items: flex-start; opacity: .95; }
.auth-hero li::before { content: "✓"; background: rgba(255,255,255,.18); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.auth-main { display: grid; place-items: center; padding: 28px 18px; }
.auth-box { width: 100%; max-width: 410px; }
.auth-box h1 { font-size: 26px; margin-bottom: 4px; }
.auth-mobile-brand { display: none; margin-bottom: 18px; }
@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-mobile-brand { display: flex; }
}
/* compat: telas antigas que ainda usam .auth */
.auth { max-width: 420px; margin: 36px auto; }
.auth h1 { text-align: center; }

/* ---------- landing ---------- */
.land-nav { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.land-nav .sp { flex: 1; }
.hero { padding: 54px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.08; letter-spacing: -1.5px; margin: 0 auto 16px; max-width: 800px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #6366f1, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 26px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn.lg { padding: 14px 24px; font-size: 16px; border-radius: 13px; }
.feat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 10px 0 40px; }
.feat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm); }
.feat-card .ico { width: 44px; height: 44px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 12px; }
.feat-card h3 { font-size: 17px; }
.feat-card p { margin: 0; color: var(--muted); font-size: 15px; }
.section-title { text-align: center; margin: 44px 0 6px; font-size: 28px; letter-spacing: -.6px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 22px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { color: var(--text); }
.faq p { margin: 10px 0 0; color: var(--muted); }
.land-footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 22px 0 8px; text-align: center; color: var(--muted); font-size: 14px; }
.cta-band { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border-radius: 22px; padding: 34px 22px; text-align: center; margin: 40px 0 10px; }
.cta-band h2 { margin: 0 0 8px; font-size: 26px; }
.cta-band .btn { background: #fff; color: #4338ca; }

/* ---------- painel inicial ---------- */
.hello { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin: 4px 0 18px; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; }
.timeline { display: grid; gap: 10px; }
.tl-item { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px; box-shadow: var(--shadow-sm); }
.tl-time { min-width: 56px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.tl-body { flex: 1; min-width: 0; font-weight: 600; }

.cols2 { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .cols2 { grid-template-columns: 1fr; gap: 0; } }
.steps { display: grid; gap: 12px; counter-reset: passo; }
.step { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); counter-increment: passo; }
.step::before { content: counter(passo); width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; flex: none; }
.step b { display: block; }

/* ---------- admin ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); margin-bottom: 18px; }
.kpis .stat .n { padding-right: 36px; }
@media (max-width: 560px) { .kpis { grid-template-columns: 1fr 1fr; } .kpis .stat .n { padding-right: 0; } }

/* ---------- chat do assistente ---------- */
#chat { max-height: 55vh; min-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.bolha { padding: 10px 14px; border-radius: 16px; max-width: 88%; white-space: pre-wrap; word-wrap: break-word; }
.bolha.eu { align-self: flex-end; background: var(--primary); color: var(--on-primary); }
.bolha.ia { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); }
.bolha.erro { align-self: flex-start; background: var(--bad-soft); color: var(--bad); }
.bolha.acao { align-self: flex-start; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.bolha.arquivo { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); max-width: 100%; }
.ia-img { display: block; max-width: 100%; height: auto; border-radius: 8px; background: #fff; }
.bolha.ia.md { white-space: normal; max-width: 100%; line-height: 1.5; }
.md > * + * { margin-top: 8px; }
.md-h { font-weight: 700; }
.md-h1 { font-size: 18px; }
.md-h2 { font-size: 16px; padding-bottom: 3px; border-bottom: 2px solid var(--line); }
.md-h3 { font-size: 15px; color: var(--primary); }
.md-p { margin: 0; }
.md-list { margin: 0; padding-left: 22px; }
.md-list li { margin: 4px 0; }
.md-list.md-sub { margin-top: 4px; padding-left: 20px; list-style-type: circle; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.md-scroll { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.md-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md-table th { background: var(--primary-soft); text-align: left; font-weight: 700; white-space: nowrap; }
.md-table th, .md-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.md-table td.nw { white-space: nowrap; }
.md-table tbody tr:nth-child(even) td { background: var(--surface-2); }
.md-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- rodapé ---------- */
.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 16px 24px; }
.site-footer a { color: var(--muted); text-decoration: underline; }

@media (max-width: 560px) {
    h1 { font-size: 23px; }
    .wrap { padding-top: 14px; }
    .item .actions { width: 100%; }
}

@media print {
    .appbar, .tabbar, .no-print, .flash, .site-footer { display: none !important; }
    body { background: #fff; color: #000; padding: 0 !important; }
    .card, .stat { box-shadow: none; border-color: #ccc; }
}

/* bloco de código no chat do assistente (cifras alinhadas) */
.md-code{font-family:ui-monospace,Consolas,monospace;font-size:13px;white-space:pre;overflow-x:auto;background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:8px 0}
