/* fontes locais (OFL, ver static/fonts/LICENCAS.txt); nada de CDN em execução */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/inter-latin-900-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/inter-latin-ext-900-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* SNAIPER: tema claro. As cores da marca (--red*) chegam do tenant, injetadas em base.html. */
:root {
  --bg: #f6f6f7; --side: #fbfbfb; --card: #fff; --line: #ececef; --line-2: #f3f3f5;
  --text: #111113; --muted: #7a7a82;
  --red: #e3161f; --red-hover: #c4121a; --red-suave: #fdecec;
  --radius: 14px; --side-w: 232px;
  --shadow: 0 1px 2px rgba(17, 17, 19, .03), 0 8px 24px rgba(17, 17, 19, .04);
  --f-cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--f-body); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-cond); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; margin: 0; }
.muted { color: var(--muted); }
.sr, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { width: auto; height: auto; clip: auto; left: 8px; top: 8px; background: var(--red); color: #fff; padding: 8px 12px; z-index: 50; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.ic { flex: none; }

/* menu lateral */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 20; display: flex; flex-direction: column; gap: 22px;
  padding: 22px 18px; background: var(--side); border-right: 1px solid var(--line); overflow: hidden; }
.side-logo { padding: 0 10px; font: 800 24px var(--f-cond); letter-spacing: .08em; text-transform: uppercase; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 10px; font-size: 15px; color: #26262b; }
.side-nav a:hover { background: #f1f1f3; }
.side-nav a[aria-current] { background: var(--red-suave); color: var(--red); font-weight: 600; }

/* topo */
.main { margin-left: var(--side-w); min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 12px 28px; background: var(--bg); border-bottom: 1px solid var(--line); }
.busca { flex: 1; display: flex; align-items: center; gap: 8px; max-width: 460px; height: 40px; padding: 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.busca input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; }
.sino { margin-left: auto; display: flex; align-items: center; position: relative; color: #3a3a40; }
.perfil-menu { position: relative; }
.perfil-menu summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.perfil-menu summary::-webkit-details-marker { display: none; }
.perfil-menu b { display: block; font-weight: 500; font-size: 13.5px; }
.perfil-menu small { display: block; font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.menu-pop button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; }
.menu-pop button:hover { background: var(--line-2); }

main#conteudo { padding: 24px 28px; }
.painel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.flashes { padding: 12px 28px 0; }
.flash { margin: 0 0 8px; padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.flash.error { background: var(--red-suave); border-color: var(--red); color: var(--red-hover); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; font-weight: 600; cursor: pointer; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); }

/* login */
.entrar { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.entrar-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 8px; padding: 28px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.entrar-card h1 { font-size: 34px; color: var(--red); }
.entrar-card label { margin-top: 8px; font-size: 12.5px; font-weight: 600; }
.entrar-card input { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.entrar-card .btn { margin-top: 14px; }
.entrar-link { align-self: center; margin-top: 6px; font-size: 13px; color: var(--muted); text-decoration: underline; }
.entrar-card a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* celular e tablet: o menu lateral vira barra no rodapé (funciona a partir de 360px) */
@media (max-width: 900px) {
  .side { inset: auto 0 0 0; width: auto; flex-direction: row; padding: 6px 8px; border-right: 0; border-top: 1px solid var(--line); }
  .side-logo { display: none; }
  .side-nav { flex: 1; flex-direction: row; justify-content: space-around; }
  .side-nav a { flex-direction: column; gap: 2px; padding: 6px 8px; font-size: 11px; text-align: center; }
  .main { margin-left: 0; padding-bottom: 72px; }
  .topbar, main#conteudo, .flashes { padding-left: 16px; padding-right: 16px; }
  .perfil-menu small { display: none; }
}

/* telas de produto (equipe SNAIPER): tela cheia, sem menu do tenant */
.produto .prod-topo { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--card); }
.prod-logo { font-weight: 800; letter-spacing: .08em; font-size: 20px; color: var(--ink, inherit); text-decoration: none; }
.prod-logo .ai { color: var(--red); }
.prod-main { max-width: 1100px; margin: 0 auto; padding: 28px; }
.prod-cabeca { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.prod-tabela { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.prod-tabela th, .prod-tabela td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.btn-borda { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; text-decoration: none; cursor: pointer; font: inherit; }

/* plataforma: menu lateral + tela Clientes */
.prod-shell { display: flex; min-height: 100vh; }
.lateral { position: sticky; top: 0; align-self: flex-start; height: 100vh; width: var(--side-w); flex: none; display: flex; flex-direction: column; gap: 22px; padding: 22px 18px; background: var(--side); border-right: 1px solid var(--line); }
.lateral .prod-logo { padding: 0 10px; font-size: 24px; }
.lateral-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.lateral-nav a, .lateral-nav .desab { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px; font-size: 15px; }
.lateral-nav a:hover { background: var(--line-2); }
.lateral-nav a[aria-current] { background: var(--red-suave); color: var(--red); font-weight: 600; }
.lateral-nav .desab { color: var(--muted); cursor: default; }
.lateral-nav .desab em { font-style: normal; font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: var(--line-2); }
.lateral-versao { margin: 0; font-size: 12px; color: var(--muted); }
.prod-area { flex: 1; min-width: 0; }
.prod-area .prod-main { max-width: none; margin: 0; }
.topo-busca { flex: 1; max-width: 460px; }
.topo-busca input { width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.topo-usuario { display: flex; align-items: center; gap: 10px; }
.topo-usuario small { display: block; font-size: 11.5px; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #111113; color: #fff; font-size: 12px; font-weight: 600; }
.prod-cabeca p { margin: 4px 0 0; }
.prod-cabeca h1 { font-size: 34px; }
.cartoes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.cartao { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.cartao-rotulo { color: var(--muted); font-size: 13px; }
.cartao-valor { font-size: 30px; line-height: 1.1; }
.cartao small { color: #168a3c; font-weight: 600; }
.clientes-grade { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.filtros { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 14px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.filtros label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
.filtros input, .filtros select { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); }
.tabela-rolagem { overflow-x: auto; }
.tabela-rolagem .prod-tabela { min-width: 760px; }
/* Linha dupla em "Clientes": a 2ª linha traz os números de uso do cliente */
.prod-tabela .cliente-linha td { border-bottom: 0; padding-bottom: 4px; }
.prod-tabela .cliente-stats td { padding-top: 0; padding-bottom: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding-left: 44px; font-size: 12px; color: var(--muted); }
.stats div { display: flex; gap: 6px; align-items: baseline; }
.stats dt { font-weight: 500; }
.stats dd { order: -1; margin: 0; color: var(--red); font-size: 20px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }  /* número antes do rótulo */
.tabela-total { text-align: left; padding: 10px 14px; font-weight: 600; caption-side: top; }
.cliente-id { display: flex; align-items: center; gap: 10px; }
.cliente-id small, .ultimo small { display: block; color: var(--muted); font-size: 12px; }
.logo-mini { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 8px; background: var(--line-2); font-size: 12px; font-weight: 600; object-fit: contain; }
.selo { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-2); color: #3a3a40; }
.selo-ativo { background: #e6f6ec; color: #168a3c; }
.selo-rascunho { background: #fff4de; color: #a96800; }
.paginacao { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; }
.paginas { display: flex; gap: 6px; }
.paginas a { min-width: 30px; padding: 5px 9px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.paginas a[aria-current] { background: var(--red); border-color: var(--red); color: #fff; }
.ultimos { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.ultimos h2 { font-size: 18px; margin-bottom: 10px; }
.ultimos ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ultimo { display: flex; align-items: center; gap: 10px; }
@media (max-width: 1100px) { .clientes-grade { grid-template-columns: 1fr; } .cartoes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .prod-shell { flex-direction: column; }
  .lateral { position: static; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .lateral-nav { flex-direction: row; flex-wrap: wrap; flex-basis: 100%; order: 3; }
  .lateral-versao { margin-left: auto; }
}
@media (max-width: 520px) { .cartoes { grid-template-columns: 1fr; } .topo-usuario span:not(.avatar) { display: none; } }

/* Zona de perigo (exclusão de cliente): borda vermelha */
.painel.zona-perigo { border: 1.5px solid var(--red); }
.zona-perigo .barra { color: var(--red); }
/* Ações da confirmação de exclusão: botões compactos, afastados do campo */
.excluir-campo { max-width: 420px; }
.excluir-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.excluir-acoes .btn { height: 36px; padding: 0 16px; }
.excluir-acoes .btn[disabled] { opacity: .5; cursor: not-allowed; }
.excluir-acoes .btn-borda { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; }

/* SweetAlert2: toasts e confirmações no tema do app */
.swal2-popup { font-family: var(--f-body); border-radius: var(--radius); color: var(--text); }
.swal2-popup.swal2-toast { padding: 10px 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.swal2-title { font-family: var(--f-body); font-weight: 700; color: var(--text); }
.swal2-popup.swal2-toast .swal2-title { font-size: 14px; font-weight: 600; }
.swal2-html-container { color: var(--muted); }
.swal2-styled.swal2-confirm { background: var(--red); border-radius: 999px; font-weight: 600; }
.swal2-styled.swal2-confirm:hover { background: var(--red-hover); }
.swal2-styled.swal2-cancel { background: var(--line-2); color: var(--text); border-radius: 999px; font-weight: 600; }
.swal2-styled:focus-visible { box-shadow: 0 0 0 3px var(--red-suave); }
.swal2-timer-progress-bar { background: var(--red); }
