/* Contas Bancárias — Posto Minas Gerais × AraujoIA · interface v3 */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --marca: #C8102E;            /* vermelho do posto */
  --marca-forte: #A50D25;
  --marca-suave: #FDECEF;
  --marca-tinta: #8A0B1F;
  --navy: #0F172A;
  --bg: #F3F4F7;
  --surface: #FFFFFF;
  --surface-2: #F8F9FB;
  --surface-3: #EEF0F4;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #E4E7EC;
  --line-2: #D0D5DD;
  --ok: #047857; --ok-suave: #E7F7EF; --ok-borda: #A7E3C6;
  --aviso: #B45309; --aviso-suave: #FFF6E5;
  --erro: #B42318; --erro-suave: #FEF0EE; --erro-borda: #F8C3BD;
  --azul: #2563EB; --azul-suave: #EBF2FF;
  --sidebar: #FFFFFF;
  --sidebar-ink: #475467;
  --sidebar-hover: #F2F4F7;
  --foco: color-mix(in srgb, var(--marca) 35%, transparent);
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --sombra-1: 0 1px 2px rgb(16 24 40 / .05);
  --sombra-2: 0 1px 3px rgb(16 24 40 / .08), 0 1px 2px rgb(16 24 40 / .04);
  --sombra-3: 0 12px 32px -8px rgb(16 24 40 / .16), 0 4px 8px -4px rgb(16 24 40 / .06);
  --fonte: "Inter", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --marca: #F04B63; --marca-forte: #FF6B80; --marca-suave: #3A0F17; --marca-tinta: #FFB3BF;
  --bg: #0A0F1C; --surface: #111827; --surface-2: #0F1625; --surface-3: #1A2335;
  --ink: #F1F5F9; --ink-2: #CBD5E1; --muted: #94A3B8; --line: #1F2A3D; --line-2: #2C3A52;
  --ok: #34D399; --ok-suave: #0B2A20; --ok-borda: #14532D;
  --aviso: #FBBF24; --aviso-suave: #2B2008;
  --erro: #F87171; --erro-suave: #2D1215; --erro-borda: #5B1A1F;
  --azul: #60A5FA; --azul-suave: #0F1E3D;
  --sidebar: #0D1424; --sidebar-ink: #A3B0C2; --sidebar-hover: #162036;
  --sombra-1: none; --sombra-2: 0 0 0 1px rgb(255 255 255 / .02); --sombra-3: 0 16px 40px -12px rgb(0 0 0 / .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --marca: #F04B63; --marca-forte: #FF6B80; --marca-suave: #3A0F17; --marca-tinta: #FFB3BF;
    --bg: #0A0F1C; --surface: #111827; --surface-2: #0F1625; --surface-3: #1A2335;
    --ink: #F1F5F9; --ink-2: #CBD5E1; --muted: #94A3B8; --line: #1F2A3D; --line-2: #2C3A52;
    --ok: #34D399; --ok-suave: #0B2A20; --ok-borda: #14532D;
    --aviso: #FBBF24; --aviso-suave: #2B2008;
    --erro: #F87171; --erro-suave: #2D1215; --erro-borda: #5B1A1F;
    --azul: #60A5FA; --azul-suave: #0F1E3D;
    --sidebar: #0D1424; --sidebar-ink: #A3B0C2; --sidebar-hover: #162036;
    --sombra-1: none; --sombra-2: 0 0 0 1px rgb(255 255 255 / .02); --sombra-3: 0 16px 40px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14.5px/1.5 var(--fonte); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
a { color: var(--marca); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; line-height: 1.2; margin: 0; letter-spacing: -.02em; font-weight: 750; }
h2 { font-size: 1rem; margin: 0 0 14px; font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
h2 small { font-weight: 500; }
small { font-size: .82em; }
code { font: 500 .8em/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--surface-3); color: var(--ink-2); padding: 2px 7px; border-radius: 6px; }
.mudo { color: var(--muted); margin: 0; }
.centro { text-align: center; display: block; }
.dir { text-align: right; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.ic { width: 18px; height: 18px; flex: none; }
.ic-lg { width: 22px; height: 22px; flex: none; }
::selection { background: var(--marca-suave); }

/* ------------------------------------------------------------------ layout */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--sidebar); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px 14px; position: sticky; top: 0; height: 100vh; z-index: 30;
  overflow-y: auto; scrollbar-width: thin;
}
@media (max-height: 820px) and (min-width: 821px) {
  .sidebar { padding-top: 12px; }
  .marca-topo { padding-bottom: 10px; }
  .marca-topo .selo { padding: 6px 10px; }
  .marca-topo img { max-width: 150px; }
  .nav-titulo { padding-top: 8px; }
  .sidebar nav a { padding: 7px 12px; }
  .acao-lateral { padding: 6px 12px; }
  .perfil { padding: 4px 8px 6px; }
}
.marca-topo { display: block; padding: 4px 4px 18px; }
.marca-topo .selo {
  display: flex; align-items: center; justify-content: center; background: #fff; border-radius: var(--r);
  padding: 10px 14px; border: 1px solid var(--line); box-shadow: var(--sombra-1);
}
.marca-topo img { width: 100%; max-width: 190px; height: auto; display: block; }
.marca-topo .sub { display: block; text-align: center; margin-top: 8px; font-size: .74rem; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.nav-titulo { font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; color: var(--sidebar-ink); padding: 9px 12px;
  border-radius: 10px; font-weight: 550; text-decoration: none; transition: background .15s, color .15s;
}
.sidebar nav a:hover { background: var(--sidebar-hover); color: var(--ink); }
.sidebar nav a.ativo { background: var(--marca-suave); color: var(--marca-tinta); }
.sidebar nav a.ativo .ic { color: var(--marca); }
.sidebar-pe { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.perfil { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--marca), #7A0A1C); color: #fff; font-weight: 700; font-size: .85rem;
}
.perfil strong { display: block; font-size: .9rem; line-height: 1.2; }
.perfil small { color: var(--muted); }
.acao-lateral {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 9px; border: 0;
  background: none; color: var(--sidebar-ink); font: 500 .88rem var(--fonte); cursor: pointer; text-decoration: none; text-align: left;
}
.acao-lateral:hover { background: var(--sidebar-hover); color: var(--ink); text-decoration: none; }
.acao-lateral .ic { width: 17px; height: 17px; }
.acao-lateral .selo-ok { margin-left: auto; color: var(--ok); font-size: .75rem; font-weight: 700; }
.assinatura { color: var(--muted); font-size: .72rem; padding: 6px 12px 0; opacity: .8; }
form.sem-margem { margin: 0; }

.veu { display: none; }
.conteudo { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 14px 32px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid transparent;
}
.topbar.rolou { border-bottom-color: var(--line); }
.topbar .trilha { color: var(--muted); font-size: .86rem; font-weight: 500; }
.topbar .trilha strong { color: var(--ink); font-weight: 600; }
.topbar .data-hoje { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.menu-btn { display: none; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; place-items: center; }
main { padding: 8px 32px 40px; max-width: 1320px; width: 100%; }

/* ------------------------------------------------------------------ cabeçalho de página */
.cabecalho { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 6px 0 22px; flex-wrap: wrap; }
.cabecalho p { margin-top: 4px; }
.cabecalho .botoes { margin: 0; }
.cabecalho-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cabecalho-card h2 { margin: 0; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--sombra-2); margin-bottom: 20px; min-width: 0;
}
.card.estreito { max-width: 760px; }
.card.plano { box-shadow: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.cards .card { margin: 0; }
.kpi { display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.kpi .kpi-topo { display: flex; align-items: center; justify-content: space-between; }
.kpi span { color: var(--muted); font-size: .84rem; font-weight: 550; }
.kpi .kpi-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.kpi strong { font-size: 1.7rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.kpi small { color: var(--muted); }
.kpi.destaque { background: linear-gradient(135deg, var(--marca) 0%, #7A0A1C 100%); border-color: transparent; color: #fff; }
.kpi.destaque span, .kpi.destaque small { color: rgb(255 255 255 / .8); }
.kpi.destaque .kpi-ic { background: rgb(255 255 255 / .16); color: #fff; }
.kpi.verde .kpi-ic { background: var(--ok-suave); color: var(--ok); }
.kpi.azul .kpi-ic { background: var(--azul-suave); color: var(--azul); }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grade-2 .card { margin-bottom: 0; }
.grade-inicio { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.botoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.atalhos { display: grid; gap: 10px; }
.atalho {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line);
  color: var(--ink); background: var(--surface-2); font-weight: 600; text-decoration: none; transition: border-color .15s, transform .15s;
}
.atalho:hover { border-color: var(--marca); text-decoration: none; transform: translateY(-1px); }
.atalho .atalho-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--marca-suave); color: var(--marca); flex: none; }
.atalho small { display: block; color: var(--muted); font-weight: 500; }
.atalho .ic:last-child { margin-left: auto; color: var(--muted); }

/* ------------------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: 600 .9rem var(--fonte); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 17px; height: 17px; }
.btn-p { min-height: 32px; padding: 0 11px; font-size: .82rem; border-radius: 8px; gap: 6px; }
.btn-p .ic { width: 15px; height: 15px; }
.btn-largo { width: 100%; min-height: 48px; font-size: .98rem; }
.btn-primario { background: var(--marca); color: #fff; box-shadow: 0 1px 2px rgb(16 24 40 / .1), inset 0 1px 0 rgb(255 255 255 / .12); }
.btn-primario:hover { background: var(--marca-forte); }
.btn-fantasma { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); box-shadow: var(--sombra-1); }
.btn-fantasma:hover { background: var(--surface-2); color: var(--ink); }
.btn-perigo { background: transparent; color: var(--erro); border-color: var(--erro-borda); }
.btn-perigo:hover { background: var(--erro-suave); }
.btn-icone { padding: 0; width: 32px; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, button:focus-visible {
  outline: none; box-shadow: 0 0 0 4px var(--foco);
}
form.inline { display: inline; }

/* ------------------------------------------------------------------ formulários */
input, select, textarea {
  width: 100%; font: 500 .93rem var(--fonte); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; min-height: 42px;
  box-shadow: var(--sombra-1); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); font-weight: 400; }
input:focus, select:focus, textarea:focus { border-color: var(--marca); outline: none; box-shadow: 0 0 0 4px var(--foco); }
input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; accent-color: var(--marca); box-shadow: none; }
input[type="file"] { padding: 7px; cursor: pointer; }
input[type="search"] { padding-left: 38px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center / 17px; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 18px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.form .largo { grid-column: 1 / -1; }
.form .acoes { margin-top: 6px; display: flex; gap: 10px; }
.secao-form { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.secao-form::after { content: ""; flex: 1; height: 1px; background: var(--line); }
label.check { flex-direction: row !important; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; }
.busca-linha { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.busca-linha input[type="search"] { flex: 1 1 260px; width: auto; }
.busca-linha select { width: auto; flex: 0 1 220px; }
.busca-linha .check { white-space: nowrap; }
.card > .busca-linha:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ avisos e toasts */
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); margin-bottom: 16px; font-weight: 500; white-space: pre-line; border: 1px solid; }
.aviso-ok { background: var(--ok-suave); color: var(--ok); border-color: var(--ok-borda); }
.aviso-erro { background: var(--erro-suave); color: var(--erro); border-color: var(--erro-borda); }
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sombra-3); font-weight: 500;
  white-space: pre-line; animation: entra .25s ease-out;
}
.toast.ok .ic { color: var(--ok); }
.toast.erro { border-left: 4px solid var(--erro); }
.toast.erro .ic { color: var(--erro); }
.toast.ok { border-left: 4px solid var(--ok); }
.toast .fechar { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
.toast.saindo { opacity: 0; transform: translateY(6px); transition: .3s; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }
.vazio { color: var(--muted); padding: 28px 12px; margin: 0; text-align: center; list-style: none; display: grid; gap: 8px; justify-items: center; }
.vazio .ic { width: 34px; height: 34px; color: var(--line-2); }

/* ------------------------------------------------------------------ tabelas */
.tabela-wrap { overflow-x: auto; margin: 0 -20px -20px; border-top: 1px solid var(--line); }
.card h2 + .tabela-wrap, .cabecalho-card + .tabela-wrap, .busca-linha + .tabela-wrap { margin-top: 0; }
.card > .tabela-wrap:first-child { margin-top: -20px; border-top: 0; }
.card:has(> .tabela-wrap) { overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
thead th {
  text-align: left; color: var(--muted); font-weight: 650; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  background: var(--surface-2); position: sticky; top: 0;
}
th, td { padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
td .acoes-linha { gap: 4px; }
.btn-icone.btn-p { width: 32px; padding: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--surface-2); }
td.dir, th.dir { font-variant-numeric: tabular-nums; }
td .acoes-linha { display: inline-flex; gap: 6px; align-items: center; }
.valor { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.chip img { width: 20px; height: 20px; border-radius: 6px; object-fit: contain; background: #fff; padding: 2px; border: 1px solid var(--line); }
.chip.so-texto { padding-left: 9px; }
.chip.so-texto::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cor); }
.logo-mini { vertical-align: middle; border-radius: 6px; background: #fff; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 650; padding: 3px 10px; border-radius: 999px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok { background: var(--ok-suave); color: var(--ok); }
.status.off { background: var(--erro-suave); color: var(--erro); }
.status.neutro { background: var(--surface-3); color: var(--muted); }
.status.pendente { background: var(--aviso-suave); color: var(--aviso); }
h1 .status { vertical-align: middle; margin-left: 6px; font-size: .8rem; }
.codigo {
  display: inline-block; font: 700 .76rem/1.5 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--ink-2);
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin-right: 4px; vertical-align: 1px;
}
h1 .codigo { font-size: .85rem; margin-left: 8px; }
.pessoa { display: flex; align-items: center; gap: 10px; }
.pessoa .avatar { width: 32px; height: 32px; font-size: .75rem; }

/* ------------------------------------------------------------------ depósitos */
.seletor-impressora {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 5px 6px 5px 12px; box-shadow: var(--sombra-1); font-size: .85rem;
}
.seletor-impressora > span { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.seletor-impressora label { position: relative; cursor: pointer; }
.seletor-impressora input { position: absolute; opacity: 0; pointer-events: none; }
.seletor-impressora label { padding: 6px 12px; border-radius: 8px; font-weight: 600; color: var(--ink-2); transition: background .15s; }
.seletor-impressora label:hover { background: var(--surface-3); }
.seletor-impressora label:has(input:checked) { background: var(--marca); color: #fff; }
.seletor-impressora label:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--foco); }
.passos { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px !important; }
.passo { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.passo b {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-3); color: var(--muted); font-size: .74rem;
}
.passo.feito b { background: var(--ok); color: #fff; }
.passo.atual { color: var(--ink); }
.passo.atual b { background: var(--marca); color: #fff; box-shadow: 0 0 0 4px var(--marca-suave); }
.passo-sep { width: 22px; height: 2px; background: var(--line-2); border-radius: 2px; }
.grade-deposito { display: grid; grid-template-columns: minmax(290px, 380px) 1fr; gap: 20px; align-items: start; }
.lista-contas { position: sticky; top: 84px; }
.lista-contas input { margin-bottom: 12px; }
.contas { list-style: none; margin: 0 -8px; padding: 0 8px; max-height: calc(100vh - 290px); min-height: 200px; overflow-y: auto; display: grid; gap: 4px; align-content: start; }
.contas a {
  display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r);
  color: var(--ink); text-decoration: none; border: 1px solid transparent; transition: background .12s, border-color .12s;
}
.contas a:hover { background: var(--surface-2); border-color: var(--line); }
.contas a.selecionada { border-color: var(--marca); background: var(--marca-suave); box-shadow: inset 3px 0 0 var(--marca); }
.contas img { border-radius: 10px; flex: none; background: #fff; border: 1px solid var(--line); object-fit: contain; padding: 5px; }
.contas strong { display: block; font-size: .9rem; font-weight: 650; }
.contas small { color: var(--muted); }
.contas li[hidden] { display: none; }
.conta-escolhida {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r); margin-bottom: 18px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--cor) 12%, var(--surface)) 0%, var(--surface-2) 70%);
  border: 1px solid var(--line); border-left: 5px solid var(--cor);
}
.conta-escolhida img { border-radius: 12px; background: #fff; border: 1px solid var(--line); object-fit: contain; padding: 6px; }
.conta-escolhida div { flex: 1; min-width: 0; }
.conta-escolhida strong { display: block; font-size: 1.05rem; font-weight: 700; }
.conta-escolhida small { display: block; color: var(--muted); }
.total-grande {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line-2);
}
.total-grande span { color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.total-grande strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.card.sucesso {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border-color: var(--ok-borda); background: linear-gradient(90deg, var(--ok-suave), var(--surface) 80%);
}
.card.sucesso > .ic-lg { color: var(--ok); width: 30px; height: 30px; }
.card.sucesso > div { flex: 1; }
.card.sucesso strong { display: block; font-size: 1.02rem; }
.frame-impressao { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }

/* ------------------------------------------------------------------ baixas de depósitos */
a.link-card { color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.link-card:hover { transform: translateY(-2px); box-shadow: var(--sombra-3); text-decoration: none; }
.form.filtros { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.paginacao { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px 0; margin: 0 -20px; border-top: 1px solid var(--line); }
.card:has(> .tabela-wrap) .paginacao { padding-bottom: 0; }
.det-linha { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.det-linha span { color: var(--muted); }
.det-linha strong { text-align: right; font-weight: 600; }
.det-linha.total strong { font-size: 1.25rem; font-weight: 800; }
.linha-tempo { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.linha-tempo li { position: relative; }
.linha-tempo li::before { content: ""; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--marca); box-shadow: 0 0 0 3px var(--surface); }
dialog.janela {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; width: min(560px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink); box-shadow: var(--sombra-3);
}
dialog.janela:focus, dialog.janela:focus-visible { outline: none; }
dialog.janela::backdrop { background: rgb(10 15 28 / .5); backdrop-filter: blur(2px); }
dialog.janela h2 { margin: 0; }
.resumo-baixa { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.resumo-baixa span { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.resumo-baixa strong { font-size: .95rem; }
@media (max-width: 1100px) { .form.filtros { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print { .filtros-baixa, .paginacao, .acoes-linha, .cabecalho .botoes { display: none !important; } .card { box-shadow: none; } }

/* ------------------------------------------------------------------ login / páginas públicas */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.auth-marca {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px;
  color: #fff; background:
    radial-gradient(1200px 500px at -10% 110%, rgb(200 16 46 / .55), transparent 60%),
    radial-gradient(800px 400px at 120% -10%, rgb(200 16 46 / .35), transparent 60%),
    linear-gradient(160deg, #111a2e 0%, #0A0F1C 100%);
}
.auth-marca::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 460px; height: 460px; opacity: .07;
  background: conic-gradient(from 210deg at 50% 50%, #fff 0 60deg, transparent 60deg); clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.auth-marca .selo { background: #fff; border-radius: var(--r-lg); padding: 14px 20px; width: fit-content; box-shadow: 0 10px 30px rgb(0 0 0 / .3); }
.auth-marca .selo img { width: 210px; height: auto; display: block; }
.auth-marca h2 { font-size: 2rem; line-height: 1.15; letter-spacing: -.03em; font-weight: 800; margin: 0 0 12px; display: block; }
.auth-marca p { color: rgb(255 255 255 / .72); max-width: 420px; margin: 0; font-size: 1rem; }
.auth-marca ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.auth-marca li { display: flex; align-items: center; gap: 10px; color: rgb(255 255 255 / .86); font-weight: 500; }
.auth-marca li .ic { color: #FF8597; }
.auth-marca .rodape { color: rgb(255 255 255 / .5); font-size: .8rem; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.login-card {
  width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px;
}
.login-card h1 { font-size: 1.7rem; }
.login-card .mudo { margin-top: -8px; }
.login-card label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.login-card .logo-movel { display: none; }
.auth-icone { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--marca-suave); color: var(--marca); }
.campo-icone { position: relative; }
.campo-icone > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 17px; height: 17px; }
.campo-icone input { padding-left: 38px; }
.campo-icone .campo-senha input { padding-left: 38px; }
.erro-pagina { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.erro-pagina .card { max-width: 420px; text-align: center; display: grid; gap: 10px; justify-items: center; }

/* ------------------------------------------------------------------ senha com olho */
.campo-senha { position: relative; display: block; }
.campo-senha input { padding-right: 48px; }
.olho {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 36px; height: 32px; border: 0; background: none; color: var(--muted);
  cursor: pointer; border-radius: 8px; display: grid; place-items: center;
}
.olho:hover { color: var(--ink); background: var(--surface-3); }
.olho svg { width: 19px; height: 19px; }

/* ------------------------------------------------------------------ verificação em duas etapas */
.campo-codigo { font-size: 1.45rem !important; letter-spacing: .32em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700 !important; max-width: 230px; }
.login-card .campo-codigo { max-width: none; }
.passos-2fa { margin: 0; padding: 0; list-style: none; display: grid; gap: 22px; counter-reset: p; }
.passos-2fa li { display: grid; grid-template-columns: 34px 1fr; gap: 4px 14px; counter-increment: p; }
.passos-2fa li::before {
  content: counter(p); grid-row: span 9; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--marca-suave); color: var(--marca); font-weight: 750;
}
.passos-2fa li > strong { display: block; }
.passos-2fa li > span { display: block; }
.qr { background: #fff; padding: 12px; border-radius: var(--r); width: 210px; margin: 10px 0; border: 1px solid var(--line); }
.qr svg { display: block; width: 100%; height: auto; }
.chave { display: inline-block; margin-top: 6px; font-size: .95rem; letter-spacing: .06em; user-select: all; }
.status-2fa { display: flex; gap: 10px; align-items: center; margin: 0 0 18px; }

/* ------------------------------------------------------------------ responsivo */
/* colunas que somem em telas menores (o dado continua nos detalhes / no Excel) */
@media (max-width: 1440px) { .so-largo, .so-largo-inline { display: none; } }
@media (max-width: 1200px) { .so-medio { display: none; } }
@media (max-width: 1100px) and (min-width: 821px) { .shell { grid-template-columns: 206px 1fr; } th, td { padding-left: 7px; padding-right: 7px; } .marca-topo .selo { padding: 8px 10px; } main { padding: 6px 18px 32px; } }
@media (max-width: 1280px) {
  .shell { grid-template-columns: 228px 1fr; }
  main { padding: 6px 24px 36px; }
  .topbar { padding: 12px 24px; }
  .kpi strong { font-size: 1.45rem; }
  .grade-deposito { grid-template-columns: minmax(260px, 330px) 1fr; }
}
@media (max-width: 1100px) { .grade-inicio { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .grade-deposito, .grade-2 { grid-template-columns: 1fr; }
  .lista-contas { position: static; }
  .contas { max-height: 320px; }
  .auth { grid-template-columns: 1fr; }
  .auth-marca { display: none; }
  .login-card .logo-movel { display: block; background: #fff; border-radius: var(--r); padding: 10px 14px; width: fit-content; border: 1px solid var(--line); }
  .login-card .logo-movel img { width: 170px; display: block; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--sombra-3); }
  .sidebar.aberta { transform: none; }
  .veu { display: block; position: fixed; inset: 0; background: rgb(10 15 28 / .45); z-index: 25; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar.aberta + .veu { opacity: 1; pointer-events: auto; }
  .menu-btn { display: grid; }
  .topbar { padding: 12px 16px; }
  .topbar .data-hoje { display: none; }
  main { padding: 6px 16px 32px; }
  .form { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: var(--r); }
  .tabela-wrap { margin: 0 -16px -16px; }
  .card > .tabela-wrap:first-child { margin-top: -16px; }
  th:first-child, td:first-child { padding-left: 16px; }
  h1 { font-size: 1.3rem; }
  .toasts { right: 16px; bottom: 16px; }
}
@media (max-width: 820px) {
  .tabela-wrap { overflow: visible; border-top: 0; margin: 0; padding: 0; }
  .card > .tabela-wrap:first-child { margin-top: 0; }
  .tabela-wrap table, .tabela-wrap tbody { display: block; }
  .tabela-wrap thead { display: none; }
  .tabela-wrap tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; margin-bottom: 10px;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
  }
  .tabela-wrap tbody tr:hover { background: var(--surface-2); }
  .tabela-wrap td { display: block; padding: 0 !important; border: 0; text-align: left !important; min-width: 0; overflow-wrap: anywhere; }
  .tabela-wrap td[data-rotulo]::before {
    content: attr(data-rotulo); display: block; font-size: .68rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1px;
  }
  .tabela-wrap td.celula-acoes { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 8px !important; }
  .tabela-wrap td.celula-acoes .acoes-linha { display: flex; flex-wrap: wrap; gap: 6px; }
  .tabela-wrap .so-largo, .tabela-wrap .so-medio { display: block; }
  .tabela-wrap td.nowrap { white-space: normal; }
  .paginacao { margin: 0; padding: 12px 0 0; }
  .cabecalho { align-items: stretch; }
  .cabecalho > .btn, .cabecalho > .botoes { width: 100%; }
  .cabecalho > .btn { justify-content: center; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cards .kpi.destaque { grid-column: 1 / -1; }
  .kpi strong { font-size: 1.2rem; }
  .form.filtros { grid-template-columns: 1fr 1fr; }
  .seletor-impressora { width: 100%; }
  .busca-linha > * { flex: 1 1 100%; }
  .busca-linha select { flex: 1 1 100%; max-width: none; }
  .resumo-baixa { grid-template-columns: 1fr; }
  .conta-escolhida { flex-wrap: wrap; }
  .card.sucesso .btn { width: 100%; }
}
@media (max-width: 820px) {
  .tabela-wrap td[data-rotulo="Empresa"], .tabela-wrap td[data-rotulo="Descrição"], .tabela-wrap td[data-rotulo="Nome"] { grid-column: 1 / -1; }
  .tabela-wrap td[data-rotulo="Empresa"] { font-size: .95rem; }
}
@media (max-width: 420px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .form.filtros { grid-template-columns: 1fr; }
}
@media (max-width: 340px) { .tabela-wrap tr, .cards { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .sidebar, .topbar, .toasts { display: none !important; } .shell { display: block; } }

/* ------------------------------------------------------------------ modo suporte AraujoIA (só aparece nesse modo) */
.faixa-suporte {
  display: flex; align-items: center; gap: 10px; margin: 0 28px; padding: 10px 14px; border-radius: var(--r);
  background: #EEF0FF; color: #3730A3; border: 1px solid #C7D2FE; font-size: .88rem;
}
:root[data-theme="dark"] .faixa-suporte { background: #1E1B4B; color: #C7D2FE; border-color: #3730A3; }
@media (max-width: 820px) { .faixa-suporte { margin: 0 16px; } }

/* ------------------------------------------------------------------ cargos e permissões */
.matriz-cargos .botoes { align-items: center; }
.matriz th.centro-col, .matriz td.centro-col { text-align: center; white-space: nowrap; }
.matriz tr.grupo td { background: var(--surface-2); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chave { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; vertical-align: middle; }
.chave input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chave span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .15s; pointer-events: none; }
.chave span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
.chave input:checked + span { background: var(--ok); }
.chave input:checked + span::after { transform: translateX(16px); }
.chave input:disabled + span { opacity: .55; }
.chave input:focus-visible + span { outline: 3px solid var(--foco); outline-offset: 2px; }
