@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* ════════════════════════════════════════════════
   ABARIM — tema dark / worship (preto & branco)
   ════════════════════════════════════════════════ */
:root {
  --bg:        #08080a;
  --bg-2:      #0d0d10;
  --surface:   #141417;
  --surface-2: #1c1c20;
  --surface-3: #26262b;
  --border:    #26262b;
  --border-2:  #36363c;

  --text:    #f4f4f5;
  --muted:   #a1a1aa;
  --faint:   #6b6b73;

  --accent:    #ffffff;   /* monocromático: branco como acento */
  --accent-2:  #d4d4d8;
  --accent-soft: rgba(255,255,255,.09);

  --verde:     #4ade80;
  --verde-bg:  rgba(74,222,128,.13);
  --vermelho:  #f87171;
  --vermelho-bg: rgba(248,113,113,.13);
  --amarelo:   #fbbf24;
  --amarelo-bg: rgba(251,191,36,.13);
  --azul:      #93a4b8;
  --azul-bg:   rgba(147,164,184,.14);

  --radius: 14px;
  --shadow: 0 16px 40px rgba(0,0,0,.55);
  --shadow-sm: 0 4px 16px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 560px at 50% -10%, rgba(255,255,255,.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand { font-family: 'Poppins', 'Inter', sans-serif; letter-spacing: -.01em; }

/* Marca / logo */
.brand-word {
  font-family: 'Poppins', sans-serif; font-weight: 700;
  letter-spacing: .16em; text-transform: lowercase; font-size: 20px; color: #fff;
}
.brand-sub { font-size: 9.5px; letter-spacing: .42em; color: var(--faint); text-transform: uppercase; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; color: #08080a; font-weight: 800; font-size: 22px;
  background: #fff; font-family: 'Poppins', sans-serif;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}

/* ─── Login ─── */
.tela-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.card-login {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); padding: 38px; border-radius: 20px;
  box-shadow: var(--shadow); width: 360px; display: flex; flex-direction: column; gap: 14px;
  animation: rise .5s cubic-bezier(.2,.8,.2,1);
}
.card-login .logo-mark { width: 52px; height: 52px; font-size: 27px; align-self: center; }
.card-login h1 { margin: 8px 0 0; font-size: 26px; text-align: center; }
.card-login .sub { margin: 0 0 6px; color: var(--muted); text-align: center; }

/* ─── Form fields ─── */
label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 500; }
input, select, textarea {
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; color: var(--text); background: var(--surface-2); font-family: inherit;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface-3);
}
select option { background: var(--surface-2); color: var(--text); }
input[type="date"], input[type="month"] { color-scheme: dark; }

/* ─── Buttons ─── */
button {
  padding: 11px 16px; border: none; border-radius: 10px; cursor: pointer;
  font-size: 15px; font-weight: 600; font-family: inherit; color: #0a0a0a;
  background: #f4f4f5;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  transition: transform .14s, box-shadow .18s, filter .18s, background .18s;
}
button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.5); background: #fff; }
button:active { transform: translateY(0) scale(.985); }
button.ghost {
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); box-shadow: none;
}
button.ghost:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-2); transform: translateY(-1px); }
button.ghost.icone { border: none; background: transparent; font-size: 20px; padding: 6px 10px; }
button.pequeno { padding: 7px 12px; font-size: 13px; }
.erro { color: var(--vermelho); font-size: 13.5px; min-height: 18px; margin: 2px 0 0; }
.ok-msg { color: var(--verde); font-size: 13.5px; min-height: 18px; }

/* ─── Layout ─── */
.layout { display: flex; min-height: 100vh; }
.sidebar-backdrop { display: none; }
.tabela-wrap { width: 100%; }

.sidebar {
  width: 254px; flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden;
  background: #0a0a0c;
  border-right: 1px solid var(--border);
  transition: width .22s cubic-bezier(.2,.8,.2,1);
}
.layout.recolhido .sidebar { width: 70px; }
.sidebar-top {
  display: flex; align-items: center; gap: 12px; padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-text { display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.layout.recolhido .brand-text { display: none; }
/* Logo oficial no menu */
.sidebar-top .brand-logo { width: 152px; height: auto; display: block; }
.sidebar-top .logo-mark.mini { display: none; }
.layout.recolhido .sidebar-top .brand-logo { display: none; }
.layout.recolhido .sidebar-top .logo-mark.mini { display: inline-flex; }

.menu { padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.menu .item {
  display: flex; align-items: center; gap: 13px; padding: 11px 12px;
  color: var(--muted); text-decoration: none; border-radius: 11px; cursor: pointer;
  font-size: 14px; background: none; border: none; width: 100%; text-align: left;
  white-space: nowrap; position: relative; transition: background .16s, color .16s, transform .12s;
}
.menu .item:hover { background: var(--surface-2); color: var(--text); }
.menu .item.ativo {
  background: var(--accent-soft); color: #fff;
}
.menu .item.ativo::before {
  content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px;
  border-radius: 3px; background: linear-gradient(var(--accent), var(--accent-2));
}
.menu .ic { width: 30px; text-align: center; font-size: 26px; flex-shrink: 0; line-height: 1; color: var(--muted); transition: color .16s; }
.menu .item:hover .ic, .menu .item.ativo .ic { color: #fff; }
.grupo-head { font-weight: 600; color: var(--text); font-family: 'Poppins', sans-serif; }
.grupo-head.com-aniv { color: #fff; }
.grupo-head.com-aniv .ic { color: var(--amarelo); }
.grupo-head.com-aniv .seta { margin-left: 8px; }
.aniv-badge {
  margin-left: auto; background: var(--amarelo); color: #1a1300; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap; animation: pulse 1.8s ease-in-out infinite;
}
.layout.recolhido .aniv-badge { display: none; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,.5); } 50% { box-shadow: 0 0 0 5px rgba(251,191,36,0); } }

/* Aviso de conta vencida no item Contas a Pagar */
.aviso-badge {
  margin-left: auto; background: var(--vermelho); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  animation: pulse-red 1.8s ease-in-out infinite;
}
.layout.recolhido .aviso-badge { display: none; }
@keyframes pulse-red { 0%,100% { box-shadow: 0 0 0 0 rgba(248,113,113,.5); } 50% { box-shadow: 0 0 0 5px rgba(248,113,113,0); } }
.grupo-head .seta { margin-left: auto; transition: transform .18s; font-size: 11px; color: var(--faint); }
.grupo.aberto .grupo-head .seta { transform: rotate(90deg); }
.grupo .sub { display: none; flex-direction: column; padding-left: 16px; margin: 2px 0; }
.grupo.aberto .sub { display: flex; animation: fade .2s ease; }
.grupo .sub .item { padding: 9px 12px; font-size: 13.5px; }
.layout.recolhido .tx, .layout.recolhido .seta { display: none; }
.layout.recolhido .grupo .sub { display: none !important; }
.layout.recolhido .menu .item { justify-content: center; padding: 12px 0; }
.layout.recolhido .menu .ic { width: auto; }

.principal { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topo {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8,8,10,.72); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); padding: 13px 24px;
  display: flex; align-items: center; gap: 14px;
}
.topo h1 { font-size: 19px; margin: 0; }
.topo-dir { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.conteudo { padding: 26px; width: 100%; }
.conteudo:not(:has(.dash)) { max-width: 1300px; }

/* ─── Panels ─── */
.painel {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
  animation: rise .42s cubic-bezier(.2,.8,.2,1) both;
}
.painel h2 { margin: 0 0 18px; font-size: 17px; font-weight: 600; }
.painel h2 small { color: var(--faint); font-weight: 400; font-size: 13px; margin-left: 6px; font-family: 'Inter'; }
.painel .desc { color: var(--muted); font-size: 13px; margin: -12px 0 18px; line-height: 1.5; }

form.form-grid { display: flex; flex-direction: column; gap: 15px; max-width: 560px; }
.linha { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.linha-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .cresce { flex: 1; min-width: 160px; }

/* ─── Tables ─── */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--faint); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
tbody tr { transition: background .14s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
.val-entrada { color: var(--verde); font-weight: 600; }
.val-saida { color: var(--vermelho); font-weight: 600; }
.acao-link { background: none; border: none; cursor: pointer; padding: 4px 8px; font-size: 13.5px; color: var(--muted); border-radius: 7px; box-shadow: none; font-weight: 500; transition: background .14s, color .14s; }
.acao-link:hover { background: var(--surface-3); color: var(--text); transform: none; }
.acao-del:hover { color: var(--vermelho); }
.acao-ok { color: var(--verde); font-weight: 600; }

/* Botões quadrados de ação (Contas a Pagar etc.) */
.acoes { display: flex; gap: 8px; align-items: center; }
.btn-ico {
  width: 34px; height: 34px; padding: 0; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); box-shadow: none; cursor: pointer;
  transition: background .14s, color .14s, border-color .14s, transform .12s;
}
.btn-ico:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-2); transform: translateY(-1px); }
.btn-ico.pagar { background: var(--verde-bg); border-color: rgba(74,222,128,.3); color: var(--verde); }
.btn-ico.pagar:hover { background: var(--verde); border-color: var(--verde); color: #06140b; }
.btn-ico.pago { background: var(--verde-bg); border-color: transparent; color: var(--verde); cursor: default; opacity: .65; }
.btn-ico.pago:hover { transform: none; }
.btn-ico.excluir:hover { background: var(--vermelho-bg); border-color: rgba(248,113,113,.3); color: var(--vermelho); }
.vazio { color: var(--faint); padding: 20px 0; text-align: center; }

/* ─── Badges ─── */
.badge { padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; display: inline-block; }
.badge.pendente { background: var(--amarelo-bg); color: var(--amarelo); }
.badge.pago { background: var(--verde-bg); color: var(--verde); }
.badge.recebido { background: var(--azul-bg); color: var(--azul); }
.badge.ativo { background: var(--verde-bg); color: var(--verde); }
.badge.inativo { background: var(--vermelho-bg); color: var(--vermelho); }

.check-linha { flex-direction: row; align-items: center; gap: 9px; color: var(--text); font-size: 14px; }
.check-linha input { width: auto; accent-color: var(--accent); }

/* ─── Inline add (select + botão) ─── */
.inline-add { display: flex; gap: 8px; align-items: stretch; }
.inline-add select { flex: 1; }
.inline-add button { white-space: nowrap; }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(3,6,12,.66); backdrop-filter: blur(6px); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .16s ease;
}
.modal-box {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-2); border-radius: 18px; width: 100%; max-width: 460px;
  box-shadow: var(--shadow); animation: rise .24s cubic-bezier(.2,.8,.2,1);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-x { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 8px; box-shadow: none; }
.modal-x:hover { color: var(--text); transform: none; }
.modal-body { padding: 22px; }

/* ─── Abas ─── */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tab {
  background: none; border: none; color: var(--muted); font-weight: 600; font-size: 14px;
  padding: 11px 18px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  box-shadow: none; border-radius: 8px 8px 0 0; transition: color .16s, background .16s;
}
.tab:hover { color: var(--text); background: var(--surface-2); transform: none; }
.tab.ativo { color: #fff; border-bottom-color: var(--accent); background: transparent; }

.placeholder { text-align: center; color: var(--faint); padding: 60px 20px; }

/* Relatório de despesas (pizza + legenda) */
.mes-nav { display: flex; align-items: center; gap: 10px; }
.mes-nav #mes-label { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 16px; min-width: 150px; text-align: center; }
.rel-pizza { display: flex; gap: 28px; align-items: center; }
.rd-legenda { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; align-content: center; }
.rd-grafico { width: 300px; max-width: 40%; }
.leg-item2 { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.leg-cor { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.leg-nome { flex: 1; }
.lista-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 10px 0; margin-top: 6px; border-top: 1px solid var(--border); font-weight: 600; }
.lista-total strong { font-size: 18px; font-family: 'Poppins', sans-serif; }
@media (max-width: 720px) {
  .rel-pizza { flex-direction: column-reverse; }
  .rd-legenda { grid-template-columns: 1fr; }
  .rd-grafico { width: 220px; max-width: 80%; }
}

/* Resumo do extrato bancário */
.extrato-resumo { display: flex; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.er-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.er-box span { color: var(--muted); font-size: 12px; }
.er-box strong { font-size: 20px; font-family: 'Poppins', sans-serif; }

/* ─── Versículo do dia ─── */
.versiculo-box { max-width: 460px; }
.versiculo { text-align: center; padding: 30px 28px 26px; }
.vs-saud { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 22px; color: #fff; margin-bottom: 18px; }
.vs-frase { margin: 0 0 12px; font-size: 18px; line-height: 1.6; font-style: italic; color: var(--text); }
.vs-ref { color: var(--muted); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 24px; }
.vs-fechar { width: 100%; padding: 13px; font-size: 16px; }

/* ════════════════════════════════════════════════
   Dashboard
   ════════════════════════════════════════════════ */
.strip-wrap { display: flex; align-items: stretch; gap: 8px; margin-bottom: 18px; }
.strip-arrow {
  flex: 0 0 auto; width: 40px; background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: 22px; border-radius: 11px; padding: 0; box-shadow: none;
}
.strip-arrow:hover { background: var(--surface-2); color: var(--text); transform: none; }
.month-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px; flex: 1; scroll-behavior: smooth; }
.month-strip::-webkit-scrollbar { height: 6px; }
.month-strip::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
.ms {
  flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 13px 22px; min-width: 116px; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; align-items: center; font-weight: 600;
  box-shadow: none; transition: transform .14s, box-shadow .16s, border-color .16s;
}
.ms:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.ms.ativo {
  background: #fff; color: #0a0a0a; border-color: transparent;
  box-shadow: 0 8px 22px rgba(0,0,0,.5);
}
.ms-nome { font-size: 17px; font-family: 'Poppins', sans-serif; }
.ms-tot { font-size: 13px; font-weight: 600; display: flex; gap: 7px; }
.ms .up { color: var(--verde); } .ms .down { color: var(--vermelho); }
.ms.ativo .up { color: #15803d; } .ms.ativo .down { color: #b91c1c; }

.dash-grid-1 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; margin-bottom: 18px; align-items: stretch; }
.dash-grid-2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin-bottom: 18px; align-items: stretch; }
.dash .painel { margin-bottom: 0; display: flex; flex-direction: column; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.kpi {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm);
  animation: rise .42s cubic-bezier(.2,.8,.2,1) both;
}
.kpi span { color: var(--muted); font-size: 14px; }
.kpi strong { font-size: 22px; font-family: 'Poppins', sans-serif; }

.momento-row { display: flex; align-items: center; gap: 12px; }
.momento-itens { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.mi { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; }
.mi-entrou { background: var(--verde-bg); border-color: rgba(52,211,153,.2); }
.mi-saiu { background: var(--vermelho-bg); border-color: rgba(248,113,113,.2); }
.mi-sobrou { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.mi > div { flex: 1; display: flex; flex-direction: column; }
.mi b { font-size: 14px; } .mi small { color: var(--faint); font-size: 11px; }
.mi strong { font-size: 16px; font-family: 'Poppins', sans-serif; }
.mi .seta { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.mi .seta.up { background: rgba(52,211,153,.2); color: var(--verde); }
.mi .seta.down { background: rgba(248,113,113,.2); color: var(--vermelho); }
.mi .seta.eq { background: rgba(255,255,255,.14); color: #fff; }
.mi-saldo { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); margin-top: 4px; }
.mi-saldo .seta.sal { background: #fff; color: #0a0a0a; font-size: 14px; font-weight: 700; }
.mi-saldo strong { font-size: 18px; color: #fff; }
.donut-wrap { width: 132px; height: 132px; }

.lista-mini { display: flex; flex-direction: column; gap: 8px; min-height: 120px; flex: 1; }
.lm-item { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.lm-nome small { color: var(--faint); }
.saldo-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-weight: 600; }
.saldo-total strong { font-size: 18px; color: #fff; font-family: 'Poppins', sans-serif; }

/* ─── Scrollbar global ─── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a465f; }

/* ─── Animations ─── */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

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

@media (max-width: 980px) {
  .dash-grid-1, .dash-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  /* Menu vira drawer (off-canvas) */
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 60; height: 100%; width: 264px;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .layout.drawer-open .sidebar { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.6); }
  /* no celular o menu nunca fica "recolhido" — neutraliza o colapso do desktop */
  .layout.recolhido .sidebar { width: 264px; }
  .layout.recolhido .tx, .layout.recolhido .seta { display: inline !important; }
  .layout.recolhido .grupo.aberto .sub { display: flex !important; }
  .layout.recolhido .menu .item { justify-content: flex-start !important; padding: 11px 12px !important; }
  .layout.recolhido .menu .ic { width: 30px; }
  .sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 55; display: none;
    animation: fade .2s ease;
  }
  .layout.drawer-open .sidebar-backdrop { display: block; }

  .conteudo { padding: 16px; }
  .linha, .linha-3 { grid-template-columns: 1fr; }
  form.form-grid { max-width: none; }

  /* Inputs em 16px evitam o zoom automático do iOS ao focar */
  input, select, textarea { font-size: 16px; }

  /* Tabelas largas rolam na horizontal em vez de quebrar o layout */
  .tabela-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabela-wrap table { min-width: 560px; }

  /* Alvos de toque maiores */
  .btn-ico { width: 40px; height: 40px; }
  .acao-link { padding: 8px 10px; }
  .topo { padding: 12px 16px; }
  .topo h1 { font-size: 17px; }
}
