/* Finan — estilos do app */
:root {
  --brand: #34679a;
  --brand-2: #4f8fd6;
  --brand-soft: #e6eef8;
  --bg: #f2f5fa;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --line: #e2e8f1;
  --text: #0f2034;
  --text-2: #43566e;
  --muted: #6b7f96;
  --pos: #16855a;
  --neg: #c93f3f;
  --warn: #b7791f;
  --pos-soft: #e3f4ec;
  --neg-soft: #fbe8e8;
  --warn-soft: #fbf1df;
  --chart-in: #2a78d6;
  --chart-out: #e0693a;
  --chart-grid: #e6ebf2;
  --shadow: 0 1px 2px rgba(15, 32, 52, .05), 0 4px 16px rgba(15, 32, 52, .06);
  --shadow-lg: 0 20px 60px rgba(15, 32, 52, .22);
  --r: 16px;
  --r-sm: 10px;
  --side: 248px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-h: 'Sora', 'Inter', system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #5b97d6; --brand-2: #8cc4ff; --brand-soft: #16304d;
    --bg: #07111f; --surface: #0f2034; --surface-2: #132a44; --line: #1f3a5a;
    --text: #e9f1fb; --text-2: #b9c8da; --muted: #8aa0ba;
    --pos: #3fcf8e; --neg: #ff7b7b; --warn: #f0b860;
    --pos-soft: #0f3326; --neg-soft: #3a1820; --warn-soft: #3a2c12;
    --chart-in: #3d8ae6; --chart-out: #d9673a; --chart-grid: #1c3553;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #5b97d6; --brand-2: #8cc4ff; --brand-soft: #16304d;
  --bg: #07111f; --surface: #0f2034; --surface-2: #132a44; --line: #1f3a5a;
  --text: #e9f1fb; --text-2: #b9c8da; --muted: #8aa0ba;
  --pos: #3fcf8e; --neg: #ff7b7b; --warn: #f0b860;
  --pos-soft: #0f3326; --neg-soft: #3a1820; --warn-soft: #3a2c12;
  --chart-in: #3d8ae6; --chart-out: #d9673a; --chart-grid: #1c3553;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-h); margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 20px; height: 20px; flex: none; stroke-width: 2; vertical-align: middle; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .warn { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hide-values .money { filter: blur(7px); user-select: none; }
.grow { flex: 1; min-width: 0; } .row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .center { text-align: center; }
.stack > * + * { margin-top: 12px; } .mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------- layout */
.app { display: flex; min-height: 100vh; }
.side {
  width: var(--side); flex: none; background: var(--surface); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font: 800 20px var(--font-h); color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2);
  font-weight: 500; margin-bottom: 2px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav .sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; font-weight: 600; }
.nav .badge { margin-left: auto; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  min-height: 64px;
}
.top h1 { font-size: 20px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { padding: 8px 24px 40px; max-width: 1180px; width: 100%; margin: 0 auto; }
.bottom { display: none; }

@media (max-width: 900px) {
  .side { display: none; }
  .top { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .content { padding: 4px 16px calc(96px + env(safe-area-inset-bottom)); }
  .bottom {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom a, .bottom button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted);
    background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 500;
  }
  .bottom a.on { color: var(--brand); }
  .bottom .fab {
    width: 52px; height: 52px; border-radius: 18px; margin: -22px auto 0; background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(52, 103, 154, .45);
  }
  .bottom .fab svg { width: 26px; height: 26px; }
}

/* ---------------------------------------------------------- componentes */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-h h2 { font-size: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.g-hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .g2.keep2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 420px) { .g4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px;
  border: 1px solid transparent; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: filter .15s, background .15s; text-decoration: none;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.sec { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.sec:hover { background: var(--surface-2); filter: none; }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.danger { background: var(--neg); }
.btn.ok { background: var(--pos); }
.btn.sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn.block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; border: 0; background: transparent;
  color: var(--text-2); cursor: pointer; position: relative; flex: none;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--neg); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge.pos { background: var(--pos-soft); color: var(--pos); }
.badge.neg { background: var(--neg-soft); color: var(--neg); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

/* formulários */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px;
  outline: none; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7f96' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.input { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.input.big { height: 60px; font: 700 28px var(--font-h); text-align: center; }
.fields2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .fields2.keep { grid-template-columns: 1fr 1fr; } .fields2:not(.keep) { grid-template-columns: 1fr; } }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; }
.switch input { display: none; }
.switch i { width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--pos); }
.switch input:checked + i::after { transform: translateX(18px); }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; height: 36px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg button.on.despesa { color: var(--neg); } .seg button.on.receita { color: var(--pos); } .seg button.on.transferencia { color: var(--brand); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.colors button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.colors button.on { border-color: var(--text); }
.icons-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; max-height: 180px; overflow: auto; }
.icons-pick button { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.icons-pick button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* listas de lançamentos */
.list { margin: 0 -6px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 12px; cursor: pointer; min-width: 0; }
.item:hover { background: var(--surface-2); }
.item + .item { border-top: 1px solid var(--line); }
.item:hover + .item, .item:hover { border-color: transparent; }
.ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; }
.ico svg { width: 20px; height: 20px; }
.ico.soft { background: var(--surface-2); color: var(--text-2); }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .v { text-align: right; font-weight: 700; }
.check {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none;
  background: var(--surface); cursor: pointer; color: transparent; padding: 0;
}
.check svg { width: 16px; height: 16px; }
.check.on { background: var(--pos); border-color: var(--pos); color: #fff; }
.check:hover:not(.on) { border-color: var(--pos); color: var(--pos); }
.day-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 14px 0 4px; display: flex; justify-content: space-between; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; stroke-width: 1.5; color: var(--brand-2); margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* números grandes */
.stat .l { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .v { font: 700 22px var(--font-h); margin-top: 4px; letter-spacing: -.02em; }
.hero {
  background: linear-gradient(135deg, #1d4a75, var(--brand) 55%, #4f8fd6); color: #fff; border-radius: 20px; padding: 22px;
  position: relative; overflow: hidden; box-shadow: 0 12px 30px rgba(29, 74, 117, .3);
}
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero .l { opacity: .85; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.hero .v { font: 800 34px var(--font-h); letter-spacing: -.02em; margin: 4px 0 14px; }
.hero .sub { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; position: relative; z-index: 1; }
.hero .sub b { display: block; font-size: 16px; font-family: var(--font-h); }
.hero .icon-btn { color: #fff; position: relative; z-index: 1; }
.hero .icon-btn:hover { background: rgba(255,255,255,.15); }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.bar.pos > i { background: var(--pos); } .bar.warn > i { background: var(--warn); } .bar.neg > i { background: var(--neg); }

/* mês */
.month { display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 3px; }
.month b { min-width: 128px; text-align: center; font-size: 14px; text-transform: capitalize; }
.month .icon-btn { width: 34px; height: 34px; }

/* contas */
.acc { display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: transform .15s; position: relative; overflow: hidden; }
.acc:hover { transform: translateY(-2px); }
.acc::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--brand)); }
.ccard {
  border-radius: 18px; padding: 18px; color: #fff; background: linear-gradient(135deg, var(--c, #34679a), color-mix(in srgb, var(--c, #34679a) 55%, #000));
  min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.ccard::after { content: ''; position: absolute; right: -40px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.08); }
.ccard .bar { background: rgba(255,255,255,.25); } .ccard .bar > i { background: #fff; }

/* calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .wd { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; text-transform: uppercase; }
.cal .d { min-height: 64px; border-radius: 10px; background: var(--surface-2); padding: 6px; cursor: pointer; border: 2px solid transparent; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .d.out { visibility: hidden; }
.cal .d.today { border-color: var(--brand); }
.cal .d.sel { background: var(--brand-soft); }
.cal .d .n { font-size: 13px; font-weight: 600; }
.cal .d .dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal .d .dots i { width: 7px; height: 7px; border-radius: 50%; }
.cal .d .amt { font-size: 10.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .cal .d { min-height: 46px; padding: 4px; } .cal .d .amt { display: none; } }

/* modal / folha */
.overlay { position: fixed; inset: 0; background: rgba(5, 14, 26, .5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal.wide { max-width: 760px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
.modal-h h2 { flex: 1; font-size: 18px; }
.modal-b { padding: 8px 18px 18px; overflow-y: auto; overscroll-behavior: contain; }
.modal-f { padding: 12px 18px 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 94vh; animation: up .22s ease-out; }
  .modal-f { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-f .btn { flex: 1; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } }
@keyframes up { from { transform: translateY(40%); opacity: .4; } }

.menu { position: fixed; z-index: 120; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; border: 1px solid var(--line); animation: fade .12s; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 9px; cursor: pointer; text-align: left; font-weight: 500; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--neg); }

.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
@media (max-width: 900px) { .toasts { bottom: calc(90px + env(safe-area-inset-bottom)); } }
.toast { background: #0f2034; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; display: flex; gap: 10px; align-items: center; pointer-events: auto; animation: pop .2s; }
.toast.err { background: #a83232; }
.toast button { background: none; border: 0; color: #8cc4ff; font-weight: 700; cursor: pointer; margin-left: auto; }

/* autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 10; overflow: hidden; }
.ac-list button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 12px; background: none; border: 0; text-align: left; cursor: pointer; }
.ac-list button:hover, .ac-list button.on { background: var(--surface-2); }

/* gráficos */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip {
  position: absolute; pointer-events: none; background: var(--text); color: var(--bg); padding: 8px 10px; border-radius: 10px; font-size: 12.5px;
  white-space: nowrap; transform: translate(-50%, -100%); margin-top: -10px; opacity: 0; transition: opacity .1s; z-index: 5; box-shadow: var(--shadow-lg);
}
.chart .tip.on { opacity: 1; }
.chart .tip b { font-weight: 700; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
.donut-wrap > .grow { min-width: 190px; }
.donut-wrap .chart { width: 170px; flex: none; }
@media (max-width: 480px) { .donut-wrap { flex-direction: column; align-items: stretch; } .donut-wrap .chart { margin: 0 auto; } }

/* tabelas */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }

/* entrar */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: linear-gradient(150deg, #07111f, #173a5e 60%, #34679a); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { font-size: 40px; max-width: 460px; line-height: 1.15; }
.auth-art p { color: #b9cde4; max-width: 420px; font-size: 16px; }
.auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-art li { display: flex; gap: 10px; align-items: center; color: #dce8f6; }
.auth-art li svg { color: #8cc4ff; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--surface); }
.auth-form form { width: 100%; max-width: 380px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-form { background: var(--bg); align-items: flex-start; padding-top: 10vh; } }

.loading { display: grid; place-items: center; padding: 60px; }
.spin { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); color: var(--text); }
.banner.warn { background: var(--warn-soft); } .banner.neg { background: var(--neg-soft); }
.banner svg { flex: none; }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 300; background: var(--warn); color: #fff; text-align: center; font-size: 13px; padding: 4px; font-weight: 600; }
@media (max-width: 600px) { .hide-sm { display: none !important; } }
@media print { .side, .bottom, .top .icon-btn, .btn { display: none !important; } .card { box-shadow: none; border: 1px solid #ddd; } }
