/* ==========================================================================
   Catálogo NEXFEL — base visual
   Tokens copiados do NexAgent (public_html/NexAgent/assets/css/style.css)
   para manter a mesma identidade: Inter, dourado #C8922A, navy #111D28/#1E2F42.
   ========================================================================== */

:root,
[data-theme="dark"] {
  --gold: #C8922A;
  --gold-light: #E6AE42;
  --gold-dim: #8A621C;
  --gold-soft: rgba(200, 146, 42, .14);
  --success: #27AE60;
  --danger: #E74C3C;
  --info: #2980B9;

  --bg: #111D28;
  --card: #1E2F42;
  --card-dark: #111D28;
  --hover: #253647;
  --text: #E8EDF2;
  --text-muted: #7A8FA0;
  --border: #243347;
  --input-bg: #1C2B3A;

  --nav-bg: #1C2B3A;
  --nav-border: rgba(255, 255, 255, .07);
  --nav-btn-bg: rgba(255, 255, 255, .07);
  --nav-btn-border: rgba(255, 255, 255, .13);
  --nav-btn-color: rgba(232, 237, 242, .78);

  --sombra: 0 8px 32px rgba(0, 0, 0, .28);
  --sombra-suave: 0 2px 10px rgba(0, 0, 0, .18);

  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --r-pill: 20px;
  --nav-h: 60px;
  --t: .15s;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #EDF3F8;
  --card: #FFFFFF;
  --card-dark: #DCE8F2;
  --hover: rgba(28, 43, 58, .06);
  --text: #1A2635;
  --text-muted: #546E7A;
  --border: #CAD8E4;
  --input-bg: #F5F9FC;

  --nav-bg: #FFFFFF;
  --nav-border: rgba(0, 0, 0, .09);
  --nav-btn-bg: rgba(0, 0, 0, .05);
  --nav-btn-border: rgba(0, 0, 0, .11);
  --nav-btn-color: rgba(26, 38, 53, .70);

  --sombra: 0 8px 28px rgba(26, 38, 53, .10);
  --sombra-suave: 0 2px 8px rgba(26, 38, 53, .06);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-light); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.ic { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: saturate(140%) blur(6px);
}
.topo-in {
  max-width: 1180px; height: 100%; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.marca { display: flex; align-items: center; gap: 10px; color: var(--text); }
.marca:hover { text-decoration: none; }
.marca img { width: 34px; height: 34px; border-radius: var(--r-sm); }
.marca-txt { display: flex; flex-direction: column; line-height: 1.05; }
.marca-txt strong { font-size: 15px; font-weight: 800; letter-spacing: .06em; }
.marca-txt small { font-size: 11.5px; color: var(--gold); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border-radius: var(--r); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: background var(--t), border-color var(--t), transform var(--t);
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-primario { background: var(--gold); color: #111D28; }
.btn-primario:hover { background: var(--gold-light); }
.btn-secundario { background: var(--nav-btn-bg); border-color: var(--nav-btn-border); color: var(--text); }
.btn-secundario:hover { background: var(--hover); }
.btn-icone {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border-radius: var(--r); border: 1px solid var(--nav-btn-border);
  background: var(--nav-btn-bg); color: var(--nav-btn-color);
  cursor: pointer; transition: background var(--t), color var(--t);
}
.btn-icone:hover { background: var(--hover); color: var(--gold-light); }
[data-theme="dark"] .so-claro, [data-theme="light"] .so-escuro { display: none; }
.so-claro, .so-escuro { display: inline-flex; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sombra-suave);
  padding: 22px;
}

/* ---------- Página ---------- */
.pagina { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px 16px 56px; }

.hero { max-width: 760px; margin: 12px auto 44px; text-align: center; animation: subir .5s ease both; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; }
.destaque { color: var(--gold); }
.hero-sub { color: var(--text-muted); font-size: clamp(15px, 2vw, 17px); max-width: 640px; margin: 0 auto; }
.selo {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--gold-soft); color: var(--gold-light);
  font-size: 12.5px; font-weight: 600;
}
[data-theme="light"] .selo { color: var(--gold-dim); }
.selo-ponto { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulsar 2s ease-in-out infinite; }

.grade-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.recurso { animation: subir .5s ease both; }
.recurso:nth-child(2) { animation-delay: .06s; }
.recurso:nth-child(3) { animation-delay: .12s; }
.recurso h2, .faixa-seguranca h2 { font-size: 16.5px; font-weight: 700; margin-top: 14px; }
.recurso p, .faixa-seguranca p { color: var(--text-muted); font-size: 14px; margin: 0; }
.recurso-ic {
  width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: var(--r); background: var(--gold-soft); color: var(--gold);
}
.faixa-seguranca { display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; }
.faixa-seguranca h2 { margin-top: 2px; }

/* ---------- Erros ---------- */
.pagina-erro { display: grid; place-items: center; }
.erro-card { max-width: 520px; width: 100%; text-align: center; padding: 36px 28px; }
.erro-ic { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: rgba(231, 76, 60, .12); color: var(--danger); }
.erro-cod { color: var(--text-muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.erro-card h1 { font-size: 24px; }
.erro-msg { color: var(--text-muted); }
.erro-ref { font-size: 13px; color: var(--text-muted); }
.erro-detalhe { text-align: left; font-size: 12px; overflow: auto; max-height: 300px; background: var(--card-dark); padding: 12px; border-radius: var(--r-sm); margin-top: 18px; }

/* ---------- Rodapé ---------- */
.rodape { border-top: 1px solid var(--border); }
.rodape-in {
  max-width: 1180px; margin: 0 auto; padding: 18px 16px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  color: var(--text-muted); font-size: 13px;
}

/* ==========================================================================
   Formulários
   ========================================================================== */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grade-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-grade-2 > .campo-largo, .form-grade-3 > .campo-largo { grid-column: 1 / -1; }
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo label { font-size: 13px; font-weight: 600; color: var(--text); }
.campo .obr { color: var(--gold); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--input-bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r);
  font: inherit; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 146, 42, .14); }
input[type=file] { font: inherit; font-size: 14px; color: var(--text-muted); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 10px; padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--nav-btn-border); background: var(--nav-btn-bg); color: var(--text); cursor: pointer; }
.tem-erro input, .tem-erro select, .tem-erro textarea { border-color: var(--danger); }
.erro-campo { color: var(--danger); font-size: 12.5px; font-weight: 500; }
.ajuda { color: var(--text-muted); font-size: 12.5px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex-shrink: 0; }
.checks-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 14px; }
.form-linha-acao { display: flex; justify-content: flex-end; margin-top: -4px; }
.form-acoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding-top: 6px; }
.form-secao { font-size: 15px; font-weight: 700; margin: 10px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.form-secao:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.btn-bloco { width: 100%; }
.btn-pequeno { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-perigo { background: rgba(231, 76, 60, .12); color: var(--danger); border-color: rgba(231, 76, 60, .35); }
.btn-perigo:hover { background: rgba(231, 76, 60, .2); }
.btn-sucesso { background: rgba(39, 174, 96, .14); color: var(--success); border-color: rgba(39, 174, 96, .35); }
.btn-sucesso:hover { background: rgba(39, 174, 96, .22); }
.btn-whatsapp { background: #25D366; color: #0B2E17; }
.btn-whatsapp:hover { background: #3be07a; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-sutil { font-size: 13px; color: var(--text-muted); }
.link-sutil:hover { color: var(--gold-light); }
.link-botao { background: none; border: 0; padding: 0; font: inherit; color: var(--gold-light); cursor: pointer; }
.link-botao:hover { text-decoration: underline; }
.link-voltar { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }

/* ---------- Alertas ---------- */
.alerta { padding: 12px 14px; border-radius: var(--r); font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alerta-sucesso { background: rgba(39, 174, 96, .1); border-color: rgba(39, 174, 96, .35); color: var(--success); }
.alerta-erro { background: rgba(231, 76, 60, .1); border-color: rgba(231, 76, 60, .35); color: var(--danger); }
.alerta-aviso { background: var(--gold-soft); border-color: rgba(200, 146, 42, .4); color: var(--gold-light); }
.alerta-info { background: rgba(41, 128, 185, .1); border-color: rgba(41, 128, 185, .35); color: #5DADE2; }
[data-theme="light"] .alerta-aviso { color: var(--gold-dim); }
[data-theme="light"] .alerta-info { color: var(--info); }

/* ---------- Selos de status ---------- */
.selo-st { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-ok { background: rgba(39, 174, 96, .14); color: var(--success); }
.st-aviso { background: var(--gold-soft); color: var(--gold-light); }
.st-erro { background: rgba(231, 76, 60, .14); color: var(--danger); }
.st-info { background: rgba(41, 128, 185, .14); color: #5DADE2; }
.st-neutro { background: var(--nav-btn-bg); color: var(--text-muted); }
[data-theme="light"] .st-aviso { color: var(--gold-dim); }
[data-theme="light"] .st-info { color: var(--info); }

/* ==========================================================================
   Telas de acesso
   ========================================================================== */
.auth-body { display: block; }
.auth { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; min-height: 100vh; }
.auth-marca {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #1C2B3A 0%, #111D28 70%);
  color: #E8EDF2; padding: 32px; display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.auth-marca::after { content: ''; position: absolute; width: 380px; height: 380px; right: -160px; bottom: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(200, 146, 42, .22), transparent 70%); pointer-events: none; }
.auth-marca .marca { color: #E8EDF2; }
.auth-marca .marca img { width: 40px; height: 40px; }
.auth-marca-txt h2 { font-size: 26px; font-weight: 800; line-height: 1.25; }
.auth-marca-txt p { color: #9FB1C1; }
.auth-lista { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.auth-lista li { display: flex; gap: 10px; align-items: center; color: #C9D5E0; font-size: 14px; }
.auth-lista .ic { color: var(--gold); }
.auth-rodape { color: #7A8FA0; font-size: 12px; position: relative; z-index: 1; }
.auth-rodape a { color: #9FB1C1; }
.auth-conteudo { display: flex; flex-direction: column; padding: 20px 16px 40px; }
.auth-topo { display: flex; justify-content: flex-end; align-items: center; gap: 10px; max-width: 520px; width: 100%; margin: 0 auto 8px; }
.marca-mobile { display: none; margin-right: auto; }
.auth-caixa { width: 100%; max-width: 460px; margin: auto; animation: subir .4s ease both; }
.auth-titulo { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.auth-sub { color: var(--text-muted); margin-bottom: 22px; }
.auth-h2 { font-size: 15px; margin-top: 26px; }
.auth-alternativa { text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 18px; }
.opcoes-cadastro { display: grid; gap: 12px; }
.opcoes-cadastro form { margin: 0; }
.opcao-cadastro {
  display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left;
  padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--border);
  background: var(--card); color: var(--text); font: inherit; cursor: pointer;
  transition: border-color var(--t), transform var(--t), background var(--t);
}
.opcao-cadastro:hover, .opcao-cadastro.atual { border-color: var(--gold); text-decoration: none; transform: translateY(-1px); }
.opcao-cadastro strong { display: block; font-size: 15px; margin-bottom: 2px; }
.opcao-cadastro small { color: var(--text-muted); font-size: 13px; line-height: 1.45; display: block; }
.cond-identificado { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--gold-soft); color: var(--text); margin-bottom: 18px; font-size: 14px; }
.cond-identificado .ic { color: var(--gold); }
.plano-destaque { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1px dashed rgba(200, 146, 42, .5); border-radius: var(--r-lg); margin-bottom: 18px; }
.plano-destaque span { color: var(--text-muted); font-size: 14px; }
.plano-destaque strong { font-size: 22px; color: var(--gold); }
.plano-destaque small { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.lista-simples { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lista-simples li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); font-size: 14px; }

/* ---------- Páginas de texto (termos/privacidade) ---------- */
.pagina-texto { max-width: 860px; }
.texto-legal { padding: 32px; }
.texto-legal h1 { font-size: 28px; }
.texto-legal h2 { font-size: 17px; margin-top: 26px; }
.texto-legal .meta { color: var(--text-muted); font-size: 13px; }
.texto-legal p, .texto-legal li { color: var(--text); font-size: 15px; }
.texto-legal ul { padding-left: 20px; }

/* ==========================================================================
   Painel (menu lateral + barra superior)
   ========================================================================== */
.painel-body { display: block; }
.painel { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.lateral {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--nav-bg); border-right: 1px solid var(--nav-border);
  display: flex; flex-direction: column; padding: 14px 12px 20px;
}
.lateral-topo { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 14px; }
.perfil-atual { padding: 12px; margin: 0 0 12px; border-radius: var(--r); background: var(--nav-btn-bg); border: 1px solid var(--nav-border); display: flex; flex-direction: column; gap: 2px; }
.perfil-atual small { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.perfil-atual strong { font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-grupo { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: 14px 10px 6px; }
.menu-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--nav-text, var(--text-muted)); font-size: 14px; font-weight: 500;
  transition: background var(--t), color var(--t);
}
.menu-item:hover { background: var(--nav-btn-bg); color: var(--text); text-decoration: none; }
.menu-item.ativo { background: rgba(200, 146, 42, .16); color: var(--gold-light); font-weight: 600; }
[data-theme="light"] .menu-item.ativo { color: var(--gold-dim); }
.menu-sep { height: 1px; background: var(--nav-border); margin: 12px 4px; }
.principal { min-width: 0; display: flex; flex-direction: column; }
.barra {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.barra-titulo { font-size: 17px; font-weight: 700; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-acoes { display: flex; align-items: center; gap: 8px; }
.sino { position: relative; }
.sino-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.usuario-menu { position: relative; }
.usuario-menu summary { list-style: none; cursor: pointer; }
.usuario-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #111D28; font-weight: 800; font-size: 15px; flex-shrink: 0; object-fit: cover; }
.usuario-menu-caixa { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sombra); padding: 8px; z-index: 60; }
.usuario-menu-nome { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; flex-direction: column; }
.usuario-menu-nome small { color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.usuario-menu-caixa a, .usuario-menu-caixa button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm); color: var(--text); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left; }
.usuario-menu-caixa a:hover, .usuario-menu-caixa button:hover { background: var(--hover); text-decoration: none; }
.usuario-menu-caixa form { margin: 0; }
.conteudo { padding: 24px; width: 100%; max-width: 1320px; }
.so-mobile { display: none; }
.lateral-fundo { display: none; }

/* ---------- Blocos de página ---------- */
.cabecalho { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cabecalho h2 { font-size: 20px; margin: 0; }
.cabecalho p { margin: 2px 0 0; color: var(--text-muted); font-size: 14px; }
.cabecalho-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.secao { margin-bottom: 20px; }
.card-titulo { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-titulo h3 { font-size: 15px; margin: 0; }
.card-titulo a { font-size: 13px; }
.grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grade-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pilha { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--text-muted); }
.pequeno { font-size: 13px; }
.direita { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Indicadores (KPIs) ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--sombra-suave); }
.kpi-topo { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 13px; font-weight: 500; }
.kpi-topo .ic { color: var(--gold); }
.kpi-valor { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-extra { font-size: 12.5px; color: var(--text-muted); }
.kpi-alerta .kpi-valor { color: var(--danger); }
a.kpi:hover { border-color: var(--gold); text-decoration: none; }
a.kpi { color: var(--text); }

/* ---------- Tabelas ---------- */
.tabela-caixa { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow-x: auto; box-shadow: var(--sombra-suave); }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tabela td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr:hover { background: var(--hover); }
.tabela .acoes { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.tabela .acoes form { margin: 0; }
.tabela-sub { display: block; color: var(--text-muted); font-size: 12.5px; }
.vazio { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.vazio .ic { color: var(--gold); margin: 0 auto 10px; }
.vazio strong { display: block; color: var(--text); margin-bottom: 4px; }

/* ---------- Filtros ---------- */
.filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filtros .campo { min-width: 160px; flex: 1; max-width: 280px; }
.filtros .campo-busca { max-width: 360px; flex: 2; }
.abas { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.aba { padding: 10px 14px; font-size: 14px; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.aba:hover { color: var(--text); text-decoration: none; }
.aba.ativa { color: var(--gold-light); border-bottom-color: var(--gold); font-weight: 600; }
.aba .cont { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--nav-btn-bg); font-size: 11.5px; text-align: center; }

/* ---------- Paginação ---------- */
.paginacao { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 4px 0; font-size: 13px; color: var(--text-muted); }
.paginacao-links { display: flex; gap: 6px; }

/* ---------- Detalhes / definições ---------- */
.definicoes { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; font-size: 14px; margin: 0; }
.definicoes dt { color: var(--text-muted); }
.definicoes dd { margin: 0; word-break: break-word; }
.linha-tempo { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.linha-tempo li { position: relative; padding-left: 20px; font-size: 14px; }
.linha-tempo li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.linha-tempo small { color: var(--text-muted); display: block; }

/* ---------- Gráficos ---------- */
.grafico-caixa { position: relative; height: 260px; }

/* ---------- Diálogo de confirmação ---------- */
dialog.confirmar { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); color: var(--text); padding: 22px; max-width: 420px; width: calc(100% - 32px); box-shadow: var(--sombra); }
dialog.confirmar::backdrop { background: rgba(0, 0, 0, .5); }
dialog.confirmar h3 { margin-top: 0; font-size: 17px; }

/* ---------- Notificações ---------- */
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: 0; }
.notif.nao-lida { background: rgba(200, 146, 42, .06); }
.notif-ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 7px; flex-shrink: 0; }
.notif.lida .notif-ponto { background: transparent; }
.notif strong { display: block; font-size: 14px; }
.notif p { margin: 2px 0 0; font-size: 13.5px; color: var(--text-muted); }

/* ---------- Ajustes de componentes ---------- */
.icone-opcao { width: 40px; height: 40px; }
input:checked + .icone-opcao { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
input:focus-visible + .icone-opcao { outline: 2px solid var(--gold); outline-offset: 2px; }
.tabela-detalhe { margin-top: 10px; }
.card .tabela-caixa { border-radius: var(--r); }
.card > .tabela { margin: 0 -4px; width: calc(100% + 8px); }
.usuario-menu .btn { list-style: none; }
td .usuario-menu-caixa { right: 0; }
details > summary.btn::-webkit-details-marker { display: none; }
details > summary.btn { list-style: none; cursor: pointer; }
.alerta a { color: inherit; font-weight: 600; text-decoration: underline; }

/* ==========================================================================
   Catálogo
   ========================================================================== */
.topo-nav { display: flex; align-items: center; gap: 10px; }
.link-topo { color: var(--text); font-size: 14px; font-weight: 500; }
.link-topo:hover { color: var(--gold-light); text-decoration: none; }
.busca-hero { text-align: center; max-width: 820px; margin: 0 auto 26px; }
.busca-hero h2 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; margin-bottom: 4px; }
.busca-form { display: flex; align-items: center; gap: 8px; margin: 18px auto 0; padding: 6px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sombra-suave); max-width: 680px; }
.busca-form:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 146, 42, .14); }
.busca-form input { border: 0 !important; box-shadow: none !important; background: transparent !important; flex: 1; min-width: 0; }
.busca-ic { color: var(--text-muted); padding-left: 8px; display: inline-flex; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; font-weight: 500; transition: border-color var(--t), background var(--t); }
.chip small { color: var(--text-muted); }
.chip:hover { border-color: var(--gold); text-decoration: none; }
.chip.ativo { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-light); }
[data-theme="light"] .chip.ativo { color: var(--gold-dim); }
.chip .ic { color: var(--gold); }
.grade-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card-servico { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sombra-suave); transition: transform var(--t), border-color var(--t), box-shadow var(--t); animation: subir .35s ease both; }
.card-servico:hover { transform: translateY(-2px); border-color: rgba(200, 146, 42, .5); box-shadow: var(--sombra); }
.card-servico-foto { display: block; aspect-ratio: 4 / 3; background: var(--card-dark); position: relative; overflow: hidden; }
.card-servico-foto img { width: 100%; height: 100%; object-fit: cover; }
.card-servico-sem-foto { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); opacity: .7; }
.card-servico-selo { position: absolute; top: 10px; left: 10px; display: inline-flex; gap: 4px; align-items: center; padding: 4px 9px; border-radius: var(--r-pill); background: rgba(17, 29, 40, .85); color: var(--gold-light); font-size: 11.5px; font-weight: 700; }
.card-servico-corpo { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-servico-cat { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); }
[data-theme="light"] .card-servico-cat { color: var(--gold-dim); }
.card-servico h3 { font-size: 15.5px; margin: 0; line-height: 1.3; }
.card-servico h3 a { color: var(--text); }
.card-servico-prest { font-size: 13px; color: var(--text-muted); }
.card-servico-motivo { font-size: 12.5px; color: var(--text-muted); background: var(--gold-soft); border-radius: var(--r-sm); padding: 6px 8px; margin: 6px 0 0; }
.card-servico-rodape { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; }
.card-servico-preco { font-weight: 700; font-size: 14px; }
.card-servico-nota { font-size: 13px; display: inline-flex; align-items: center; gap: 3px; }
.card-servico-nota .ic { color: var(--gold); fill: var(--gold); }
.card-servico-fav { position: absolute; top: 8px; right: 8px; margin: 0; }
.card-servico-fav .btn-icone { width: 36px; height: 36px; background: rgba(17, 29, 40, .7); border-color: transparent; color: #fff; }
.card-servico-fav .btn-icone.ativo { color: #ff6b81; }
.card-servico-fav .btn-icone.ativo .ic { fill: currentColor; }
.servico-detalhe { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.servico-detalhe aside { position: sticky; top: calc(var(--nav-h) + 12px); }
.servico-preco { font-size: 20px; font-weight: 800; color: var(--gold-light); margin: 0 0 14px; }
[data-theme="light"] .servico-preco { color: var(--gold-dim); }
.galeria-principal { width: 100%; max-height: 460px; object-fit: cover; background: var(--card-dark); }
.galeria-miniaturas { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.galeria-mini { padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); background: none; cursor: pointer; flex-shrink: 0; }
.galeria-mini.ativo { border-color: var(--gold); }
.galeria-mini img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; }
.galeria-vazia { height: 220px; display: grid; place-items: center; background: var(--card-dark); color: var(--gold); }
.estrelas { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.estrelas input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.estrelas label { font-size: 32px; line-height: 1; color: var(--border); cursor: pointer; transition: color var(--t); }
.estrelas input:checked ~ label, .estrelas label:hover, .estrelas label:hover ~ label { color: var(--gold); }
.estrelas input:focus-visible + label { outline: 2px solid var(--gold); border-radius: 4px; }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding: 4px; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.chat-eu { align-self: flex-end; background: var(--gold); color: #111D28; border-bottom-right-radius: 4px; }
.chat-ia { align-self: flex-start; background: var(--card-dark); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-carregando { color: var(--text-muted); font-style: italic; }
details.faq { border-bottom: 1px solid var(--border); padding: 10px 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.faq p { margin: 8px 0 0; color: var(--text-muted); }
.ia-sugestao:not([hidden]) { margin-top: 8px; padding: 12px; border: 1px dashed rgba(200, 146, 42, .6); border-radius: var(--r); background: var(--gold-soft); }
.ia-texto { white-space: pre-wrap; font-size: 14px; margin-bottom: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hero-acoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
@media (max-width: 960px) {
  .servico-detalhe { grid-template-columns: 1fr; }
  .servico-detalhe aside { position: static; }
}
@media (max-width: 640px) {
  .grade-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-servico-corpo { padding: 10px 12px 12px; }
  .card-servico h3 { font-size: 14px; }
  .busca-form .btn { padding: 0 12px; }
  .link-topo { display: none; }
}
@media (max-width: 380px) { .grade-cards { grid-template-columns: 1fr; } }

/* ---------- Animações (discretas) ---------- */
@keyframes subir { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulsar { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .grade-3 { grid-template-columns: 1fr; }
  .pagina { padding-top: 28px; }
  .hero { margin-bottom: 28px; }
}
@media (max-width: 1100px) {
  .grade-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-marca { display: none; }
  .marca-mobile { display: flex; }
  .painel { grid-template-columns: 1fr; }
  .lateral { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 80; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--sombra); }
  .menu-aberto .lateral { transform: none; }
  .menu-aberto .lateral-fundo { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 70; }
  .so-mobile { display: inline-grid; }
  .barra { padding: 0 16px; }
  .conteudo { padding: 18px 16px 40px; }
  .grade-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-grade-2, .form-grade-3 { grid-template-columns: 1fr; }
  .definicoes { grid-template-columns: 1fr; gap: 2px 0; }
  .definicoes dd { margin-bottom: 10px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; }
  .kpi-valor { font-size: 21px; }
  .filtros .campo, .filtros .campo-busca { max-width: none; min-width: 100%; }
  .tabela-responsiva thead { display: none; }
  .tabela-responsiva tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .tabela-responsiva td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 14px; text-align: right; }
  .tabela-responsiva td::before { content: attr(data-r); color: var(--text-muted); font-size: 12.5px; text-align: left; flex-shrink: 0; }
  .tabela-responsiva td.acoes { justify-content: flex-end; }
  .tabela-responsiva td.acoes::before { content: none; }
  .barra-titulo { font-size: 15px; }
}
@media (max-width: 480px) {
  .card { padding: 18px; }
  .faixa-seguranca { flex-direction: column; }
  .texto-legal { padding: 20px; }
}
