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

/* ================================================================
   Painel INCTOP — estilo compartilhado (painel, Equipe, Meus
   resultados, login e a casca da planta). Marca BoxWise: verde #16A34A + preto #0E1013 (21/10/2026).
   ================================================================ */
:root {
  color-scheme: dark;
  /* paleta da página de vendas (conheca/, 20/10/2026) */
  --bg: #0e1013; --bg2: #12151a; --card: #161a20; --card2: #1b2028;
  --line: rgba(255, 255, 255, 0.08); --line2: rgba(255, 255, 255, 0.14);
  --tx: #f5f7fa; --mut: #94a3b8; --mut2: #64748b;
  --blue: #22c55e; --blue2: #16a34a; --grad: linear-gradient(180deg, #1fb257, #138a3e);
  --green: #34d399; --red: #f87171; --amber: #fbbf24;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* nomes antigos (o resto do arquivo e as páginas usam estes) apontando pra paleta nova */
  --navy: var(--blue);
  --navy-dark: var(--tx);
  --navy-light: rgba(34, 197, 94, 0.12);
  --navy-grad: var(--grad);
  --gray-light: var(--card2);
  --border: var(--line);
  --card-bg: var(--card);
  --input-bg: var(--bg2);
  --hover: rgba(255, 255, 255, 0.04);
  --text: var(--tx);
  --text-muted: var(--mut);
  --ok: var(--green);
  --ok-bg: rgba(52, 211, 153, 0.12);
  --pending-bg: rgba(251, 191, 36, 0.12);
  --pending-text: var(--amber);
  --progress-bg: rgba(91, 155, 255, 0.13);
  --progress-text: #93c5fd;
  --danger: var(--red);
  --danger-bg: rgba(248, 113, 113, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
  --shadow-hover: 0 16px 36px -16px rgba(0, 0, 0, 0.9);
  --shadow-btn: 0 8px 24px -8px rgba(22, 163, 74, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --ring: 0 0 0 3px rgba(34, 197, 94, 0.3);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(22, 163, 74, 0.12), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(22, 163, 74, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: clip; /* o fundo do cabeçalho usa 100vw; clip não quebra o sticky */
}
::selection { background: rgba(34, 197, 94, 0.3); }
.hidden { display: none !important; }

/* ---- Animações base ---- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.45); } 80%, 100% { box-shadow: 0 0 0 7px rgba(248, 113, 113, 0); } }
@keyframes shine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }

/* ---- Telas de login / aguardando ---- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--card);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line2); border-radius: 20px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(34, 197, 94, 0.06);
  padding: 32px 30px; animation: rise .5s var(--ease) both;
}
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-logo .mark {
  width: 42px; height: 42px; border-radius: 12px; background: var(--navy-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
  box-shadow: var(--shadow-btn); letter-spacing: .02em;
}
.auth-logo div b { display: block; font-size: 15px; color: var(--navy-dark); }
.auth-logo div span { font-size: 12.5px; color: var(--text-muted); }
.auth-card h1 { font-size: 22px; letter-spacing: -.02em; margin: 4px 0 18px; }
.auth-card label { display: block; font-size: 12.5px; font-weight: 600; margin: 14px 0 6px; color: var(--text); }
.auth-card input {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px;
  font-size: 14px; font-family: inherit; background: var(--input-bg); color: var(--text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.auth-card input:focus { outline: none; border-color: var(--navy); box-shadow: var(--ring); }
.auth-btn {
  position: relative; overflow: hidden;
  width: 100%; margin-top: 22px; background: var(--navy-grad); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 12px; font-size: 14.5px; font-weight: 700; cursor: pointer;
  font-family: inherit; box-shadow: var(--shadow-btn);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.auth-btn:hover { filter: brightness(1.08); }
.auth-btn:active { transform: translateY(0) scale(.98); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 16px; }
.auth-switch a { color: var(--navy); font-weight: 600; cursor: pointer; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 16px; }

.pending-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center;
}
.pending-card {
  max-width: 400px; background: var(--card); border: 1px solid var(--line2); border-radius: 20px; padding: 32px 30px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); animation: rise .5s var(--ease) both;
}
.pending-card .icon { font-size: 40px; margin-bottom: 12px; animation: pop .5s var(--spring) both .1s; color: var(--navy); display: flex; justify-content: center; }
/* ícones de linha (icones.js) no lugar dos emojis */
.ic { flex-shrink: 0; vertical-align: -3px; }
.tool-link .ic { opacity: .85; }
.spin { display: inline-block; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--navy-light); border-top-color: var(--navy); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.theme-toggle { color: var(--navy-dark); }
.pending-card h2 { font-size: 19px; letter-spacing: -.01em; margin: 0 0 8px; color: var(--navy-dark); }
.pending-card p { font-size: 14px; color: var(--text-muted); }
.pending-card button {
  margin-top: 18px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 18px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--navy-dark); font-family: inherit;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.pending-card button:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--line2); }
.pending-card a { color: var(--navy); font-weight: 600; }

/* ---- Estrutura das páginas ---- */
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 80px; }
header.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 22px; padding: 14px 0;
  animation: rise .4s var(--ease) both;
}
/* fundo de vidro ocupando a largura toda da tela, atrás do cabeçalho */
header.top::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  z-index: -1; background: rgba(14, 16, 19, 0.8);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
/* com o menu lateral, a faixa ocupa só a área do conteúdo (antes passava 128 px da tela e a página rolava pro lado) */
body.has-sidenav header.top::before { width: calc(100vw - var(--sn-w)); }
@media (min-width: 901px) { body.has-sidenav.sn-is-mini header.top::before { width: calc(100vw - var(--sn-mini)); } }
@media (max-width: 900px) { body.has-sidenav header.top::before { width: 100vw; } }
html { overflow-x: clip; } /* nada passa da largura da tela */
header.top h1 { font-size: 20px; margin: 0; color: var(--navy-dark); font-weight: 800; letter-spacing: -.02em; }
header.top .sub { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px; background: var(--navy-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0;
  box-shadow: var(--shadow-btn); letter-spacing: .02em;
}
.whoami { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.whoami-id { display: inline-flex; flex-direction: column; line-height: 1.15; }
.whoami-id .tenant { font-size: 10.5px; font-weight: 600; color: var(--navy); letter-spacing: .01em; }
.whoami .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--navy-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}
.logout-link { color: var(--navy-dark); cursor: pointer; font-weight: 600; padding: 6px 8px; border-radius: 8px; transition: background .2s; }
.logout-link:hover { background: var(--navy-light); }
.tool-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--navy-dark); font-weight: 600; text-decoration: none; padding: 8px 13px;
  border: 1px solid var(--border); border-radius: 999px; white-space: nowrap;
  background: var(--card-bg); font-size: 13px; cursor: pointer; font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s, background .2s, color .2s;
}
.tool-link:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); border-color: var(--line2); }
.tool-link:active { transform: translateY(0) scale(.97); }
.tool-link:focus-visible { outline: none; box-shadow: var(--ring); }
.tool-link.active { border-color: rgba(34, 197, 94, 0.35); color: var(--navy); background: var(--navy-light); }
.tool-link:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.tool-link:disabled:hover { background: var(--card-bg); }

/* ---- Painéis e formulários ---- */
.panel {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
  animation: rise .5s var(--ease) both;
}
.wrap > .panel:nth-of-type(2) { animation-delay: .04s; }
.wrap > .panel:nth-of-type(3) { animation-delay: .08s; }
.wrap > .panel:nth-of-type(4) { animation-delay: .12s; }
.wrap > .panel:nth-of-type(5) { animation-delay: .16s; }
.panel h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 14px; color: var(--navy-dark); }
label { display: block; font-size: 12.5px; font-weight: 600; margin: 12px 0 6px; color: var(--text); }
input[type="text"], input[type="number"], input[type="date"], textarea, select {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 14px; font-family: inherit; background: var(--input-bg); color: var(--text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
input[type="text"]:hover, input[type="number"]:hover, input[type="date"]:hover, textarea:hover, select:hover { border-color: var(--line2); }
textarea { resize: vertical; min-height: 60px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--navy); background: var(--input-bg); box-shadow: var(--ring); }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.file-row {
  margin-top: 10px; border: 1.5px dashed var(--line2); border-radius: 14px; padding: 18px;
  text-align: center; background: var(--gray-light); cursor: pointer; font-weight: 600; color: var(--navy-dark);
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.file-row:hover { border-color: var(--navy); background: var(--navy-light); }
.file-row input { display: none; }
.file-row.dragover { border-color: var(--navy); background: var(--navy-light); transform: scale(1.01); }
/* arrastar arquivo em cima de um botão de anexar (arrastar.js) */
label.dragover:not(.file-row), [data-drop].dragover { outline: 2px dashed var(--navy); outline-offset: 3px; background: var(--navy-light); }
.file-row .hint { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; font-weight: 400; }
.file-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: flex; align-items: center; gap: 6px; background: var(--navy-light); color: var(--navy-dark); border-radius: 999px; padding: 5px 10px 5px 9px; font-size: 12.5px; max-width: 220px; animation: pop .3s var(--spring) both; }
.chip span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { background: none; border: none; cursor: pointer; color: var(--navy-dark); font-size: 14px; line-height: 1; padding: 0; transition: transform .2s; }
.chip button:hover { transform: scale(1.25); }

/* ---- Botões ---- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm); padding: 10px 18px;
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--navy-grad); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary::after, .auth-btn::after {
  content: ''; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-120%) skewX(-20deg); pointer-events: none;
}
.btn-primary:hover::after, .auth-btn:hover::after { animation: shine .75s var(--ease); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary:disabled::after { display: none; }
.btn-ghost { background: var(--card-bg); color: var(--navy-dark); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.btn-ghost:hover { border-color: var(--line2); box-shadow: var(--shadow-hover); }
.btn-ghost:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 9px; }
.btn-danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.4); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-row { margin-top: 16px; display: flex; gap: 10px; align-items: center; }
.err { color: var(--danger); font-size: 13px; margin-top: 8px; }

/* ---- Abas ---- */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; padding: 5px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; width: fit-content; max-width: 100%; }
.tab {
  padding: 8px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--text-muted);
  display: flex; align-items: center; gap: 7px; user-select: none;
  transition: background .25s var(--ease), color .25s, box-shadow .25s, transform .2s var(--ease);
}
.tab:hover { color: var(--navy-dark); background: var(--navy-light); }
.tab:active { transform: scale(.96); }
.tab.active { background: var(--navy-grad); color: #fff; box-shadow: var(--shadow-btn); }
.tab .count { background: rgba(255,255,255,0.25); border-radius: 999px; padding: 0 7px; font-size: 11.5px; min-width: 20px; text-align: center; transition: background .25s; }
.tab:not(.active) .count { background: var(--gray-light); color: var(--text-muted); }
.tab-revision.blink { color: var(--danger); animation: revisionBlink 1.2s infinite; }
.tab-revision.blink .count { background: var(--danger); color: #fff; }
@keyframes revisionBlink { 0%, 100% { background: transparent; } 50% { background: var(--danger-bg); } }

.revision-note { margin-top: 12px; background: var(--danger-bg); border: 1px solid rgba(248, 113, 113, 0.35); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; color: var(--danger); }
.revision-note b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.btn-warn { color: var(--danger); border-color: rgba(248, 113, 113, 0.4); }
.btn-warn:hover { background: var(--danger-bg); border-color: var(--danger); }

/* ---- Cartões dos estudos ---- */
.card {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--line2); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 3px; }
.card-desc { font-size: 13.5px; color: var(--text); margin: 4px 0 0; white-space: pre-wrap; }
.badge { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge.pendente { background: var(--pending-bg); color: var(--pending-text); }
.badge.andamento { background: var(--progress-bg); color: var(--progress-text); }
.badge.concluido { background: var(--ok-bg); color: var(--ok); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13px; }
.fact { display: flex; gap: 5px; }
.fact b { color: var(--text-muted); font-weight: 600; }
.approve-tag { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.approve-tag.sim { background: var(--ok-bg); color: var(--ok); }
.approve-tag.nao { background: var(--danger-bg); color: var(--danger); }
.approve-tag.definir { background: var(--gray-light); color: var(--text-muted); }
.meta { font-size: 12px; color: var(--text-muted); margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.att-img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s; }
.att-img:hover { transform: scale(1.05); box-shadow: var(--shadow-hover); }
.att-file { display: flex; align-items: center; gap: 6px; width: 76px; height: 76px; border-radius: 12px; border: 1px solid var(--border); background: var(--gray-light); color: var(--navy-dark); text-decoration: none; font-size: 11px; text-align: center; padding: 6px; flex-direction: column; justify-content: center; transition: transform .25s var(--ease), box-shadow .25s; }
.att-file:hover { transform: scale(1.05); box-shadow: var(--shadow-hover); }
.att-file svg { width: 22px; height: 22px; }
.card-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--text-muted); padding: 40px 10px; font-size: 14px; }
.lightbox { position: fixed; inset: 0; background: rgba(5, 6, 8, 0.85); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; animation: pop .3s var(--ease) both; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 16px) scale(.96);
  background: var(--card2); color: var(--tx); border: 1px solid var(--line2); padding: 11px 20px; border-radius: 12px;
  font-size: 13.5px; font-weight: 500; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); z-index: 60;
  opacity: 0; pointer-events: none; max-width: calc(100vw - 32px);
  transition: opacity .25s var(--ease), transform .35s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.approval-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px; margin: 0 -10px; border-radius: 12px; border-bottom: 1px solid var(--border); transition: background .2s; }
.approval-row:hover { background: var(--hover); }
.approval-row:last-child { border-bottom: none; }
.approval-row .who b { display: block; font-size: 13.5px; }
.approval-row .who span { font-size: 12px; color: var(--text-muted); }
.approval-actions { display: flex; gap: 6px; }

/* ---- Equipe e acessos ---- */
.access-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.access-head h2 { margin: 0; }
.access-count { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.access-sub { font-size: 13px; color: var(--text-muted); margin: 6px 0 10px; }
.access-row { display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin: 0 -10px; border-radius: 12px; border-bottom: 1px solid var(--border); transition: background .2s; }
.access-row:hover { background: var(--hover); }
.access-row:last-child { border-bottom: none; }
.access-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy-light); color: var(--navy-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.access-who { flex: 1; min-width: 0; }
.access-who b { display: block; font-size: 14px; }
.access-who span { display: block; font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-pill { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.access-pill.on { background: var(--ok-bg); color: var(--ok); }
.access-pill.off { background: var(--gray-light); color: var(--text-muted); }
.access-pill.admin { background: var(--navy-light); color: var(--navy-dark); }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; margin: 0; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #2a3038; border-radius: 26px; cursor: pointer; transition: background .3s var(--ease); }
.switch span::before {
  content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff;
  border-radius: 50%; transition: transform .35s var(--spring), width .2s var(--ease); box-shadow: 0 2px 5px rgba(0,0,0,0.18);
}
.switch span:active::before { width: 24px; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:checked + span:active::before { transform: translateX(14px); }
.switch input:disabled + span { opacity: 0.55; cursor: default; }
.switch input:focus-visible + span { box-shadow: var(--ring); }

/* ---- Documentos gerados pela planta ---- */
.docs-filters { display: grid; grid-template-columns: 210px 1fr; gap: 8px; margin-bottom: 6px; }
.docs-filters.with-consultant { grid-template-columns: 190px 210px 1fr; }
@media (max-width: 560px) { .docs-filters, .docs-filters.with-consultant { grid-template-columns: 1fr; } }
.docs-more { display: flex; justify-content: center; padding-top: 12px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin: 0 -10px; border-radius: 12px; border-bottom: 1px solid var(--border); transition: background .2s; }
.doc-row:hover { background: var(--hover); }
.doc-row:last-child { border-bottom: none; }
.doc-type { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; min-width: 88px; text-align: center; flex-shrink: 0; }
.doc-type.proposta { background: var(--navy-light); color: var(--navy-dark); }
.doc-type.contrato { background: var(--ok-bg); color: var(--ok); }
.doc-type.analise { background: var(--progress-bg); color: var(--progress-text); }
.doc-type.tecnico { background: var(--gray-light); color: var(--text-muted); }
.doc-type.video { background: var(--pending-bg); color: var(--pending-text); }
.doc-type.apresentacao { background: var(--navy-light); color: var(--navy-dark); }
.doc-main { flex: 1; min-width: 0; }
.doc-main b { display: block; font-size: 14px; }
.doc-main span { display: block; font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-main .doc-summary { font-size: 12px; }
@media (max-width: 560px) {
  .doc-row { flex-wrap: wrap; }
  .doc-row .tool-link { width: 100%; justify-content: center; }
}

/* ---- Equipe: função e remover ---- */
.role-select { width: auto; padding: 7px 30px 7px 10px; font-size: 12.5px; margin: 0; flex-shrink: 0; border-radius: 9px; }
.remove-link { background: none; border: none; color: var(--danger); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 5px 8px; border-radius: 8px; flex-shrink: 0; font-family: inherit; transition: background .2s; }
.remove-link:hover { background: var(--danger-bg); }
.access-pill.manager { background: var(--progress-bg); color: var(--progress-text); }
@media (max-width: 560px) {
  .access-row { flex-wrap: wrap; }
  .access-row .access-who { flex-basis: calc(100% - 50px); }
}

/* ---- Conferência de contratos ---- */
.review-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review-row:last-child { border-bottom: none; padding-bottom: 2px; }
.review-top { display: flex; align-items: center; gap: 12px; }
.review-status { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; min-width: 98px; text-align: center; flex-shrink: 0; }
.review-status.pending { background: var(--pending-bg); color: var(--pending-text); }
.review-status.approved { background: var(--ok-bg); color: var(--ok); }
.review-status.returned { background: var(--danger-bg); color: var(--danger); }
.review-status.generated { background: var(--gray-light); color: var(--text-muted); }
.review-status.partial { background: var(--progress-bg); color: var(--progress-text); }
.review-details { display: grid; grid-template-columns: 150px 1fr; gap: 5px 12px; margin: 12px 0 0; padding: 12px 14px; background: var(--gray-light); border-radius: 12px; font-size: 12.5px; }
.review-details dt { color: var(--text-muted); }
.review-details dd { margin: 0; word-break: break-word; }
.review-note { margin-top: 8px; font-size: 12.5px; color: var(--danger); }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.review-return { display: flex; gap: 8px; margin-top: 10px; animation: rise .3s var(--ease) both; }
.review-return input { margin: 0; flex: 1; }
.review-toggle { background: none; border: none; color: var(--navy); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; margin-top: 8px; font-family: inherit; }
.review-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) {
  .review-top { flex-wrap: wrap; }
  .review-details { grid-template-columns: 1fr; }
  .review-details dt { margin-top: 4px; }
  .review-return { flex-direction: column; }
}

/* ---- Página Equipe / Meus resultados ---- */
.tool-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center; animation: pop .35s var(--spring) both, ping 2s 1s infinite; }
/* Tabela cabe inteira no painel (sem barra de rolagem): títulos quebram em
   duas linhas e no celular cada consultor vira um cartão. */
.stats-scroll { border-radius: 12px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.stats-table th { text-align: left; vertical-align: bottom; font-size: 10.5px; line-height: 1.3; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 8px 10px; border-bottom: 1px solid var(--border); }
.stats-table td { padding: 11px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; transition: background .2s; }
.stats-table td:first-child { white-space: normal; min-width: 110px; }
.stats-table tbody tr:hover td { background: var(--hover); }
.stats-table td:first-child { font-weight: 600; }
.stats-table tfoot td { font-weight: 700; border-bottom: none; background: var(--gray-light); }
.stats-table tfoot td:first-child { background: var(--gray-light); border-radius: 10px 0 0 10px; }
.stats-table tfoot td:last-child { border-radius: 0 10px 10px 0; }
.access-head .role-select { align-self: center; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 16px; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; min-width: 0;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
  animation: rise .45s var(--ease) both;
}
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--navy-grad); opacity: .8; }
.kpi:nth-child(2) { animation-delay: .05s; }
.kpi:nth-child(3) { animation-delay: .1s; }
.kpi:nth-child(4) { animation-delay: .15s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--line2); }
.kpi span { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.kpi b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--navy-dark); margin: 4px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kpi small { display: block; font-size: 11.5px; color: var(--text-muted); }
/* caixinha do resumo que é botão (filtra a lista) */
button.kpi-btn { font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer; }
button.kpi-btn:focus-visible { outline: none; box-shadow: var(--ring); }
button.kpi-btn:active { transform: scale(.98); }
.kpi-btn.selected { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14); }
.kpi-btn.selected.bad { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14); }
.kpi.ok { background: linear-gradient(180deg, rgba(52, 211, 153, 0.08), var(--card-bg) 70%); border-color: rgba(52, 211, 153, 0.3); }
.kpi.ok::before { background: var(--ok); }
.kpi.ok b { color: var(--ok); }
@media (max-width: 700px) { .kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) {
  .kpis { gap: 8px; }
  .kpi { padding: 12px 12px 12px 14px; }
  .kpi b { font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
}
.stats-table small { display: block; font-size: 11px; color: var(--text-muted); font-weight: 400; }
.stats-table .muted { color: var(--text-muted); }
.stats-table input.pct-input { width: 58px; min-width: 58px; padding: 6px 8px; margin: 0; font-size: 13px; text-align: right; }
@media (max-width: 900px) {
  .stats-table, .stats-table tbody, .stats-table tfoot, .stats-table tr, .stats-table td { display: block; width: 100%; }
  .stats-table thead { display: none; }
  .stats-table tr { border: 1px solid var(--border); border-radius: 12px; padding: 4px 12px; margin-bottom: 10px; }
  .stats-table tfoot tr { background: var(--gray-light); }
  .stats-table td { padding: 9px 0; text-align: right; white-space: normal; background: none !important; border-radius: 0 !important; }
  .stats-table td::after { content: ''; display: block; clear: both; }
  .stats-table tr td:last-child { border-bottom: none; }
  .stats-table td:first-child { font-size: 14px; padding-top: 10px; }
  .stats-table td[data-label]::before { content: attr(data-label); float: left; font-size: 12px; font-weight: 500; color: var(--text-muted); text-align: left; padding-right: 12px; }
  .stats-table td:first-child { text-align: left; }
  .stats-table td.empty-cell { display: none; }
  .stats-table small { display: inline; margin-left: 6px; }
}
.sale-row { padding: 16px 0; border-bottom: 1px solid var(--border); }
.sale-row:last-child { border-bottom: none; padding-bottom: 2px; }
.sale-top { display: flex; align-items: center; gap: 12px; }
.pay-list { list-style: none; margin: 10px 0 0; padding: 10px 14px; background: var(--gray-light); border-radius: 12px; font-size: 12.5px; }
.pay-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; }
.sale-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.sale-actions:empty { display: none; }
.sale-actions input[type=date] { width: auto; margin: 0; padding: 6px 9px; font-size: 12.5px; }
.pay-field { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.sale-actions input.pay-pct { width: 66px; margin: 0; padding: 6px 8px; font-size: 13px; text-align: right; }
.pay-preview { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .sale-top { flex-wrap: wrap; }
  .pay-list li { flex-wrap: wrap; }
}
.sale-terms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }
.sale-terms label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; font-size: 12.5px; color: var(--text-muted); }
.sale-terms .mode-select, .sale-actions .pay-kind { width: auto; margin: 0; padding: 5px 30px 5px 9px; font-size: 12.5px; }
.sale-actions input.pay-vehicle { width: 190px; margin: 0; padding: 6px 9px; font-size: 12.5px; }
.pay-item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pay-item-actions input.sold-date { width: auto; margin: 0; padding: 4px 7px; font-size: 12px; }
.warn-text { color: var(--pending-text); font-weight: 600; }
.neg-summary { margin-top: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 12.5px; display: grid; gap: 5px; background: var(--hover); }
.neg-summary > div > span:first-child { color: var(--text-muted); }
.neg-summary .review-toggle { margin: 0 0 0 8px; }
.neg-summary input.sold-date { width: auto; margin: 0 4px; padding: 4px 7px; font-size: 12px; }
.neg-form { margin-top: 12px; padding: 14px 16px; background: var(--navy-light); border: 1px solid rgba(34, 197, 94, 0.12); border-radius: 14px; font-size: 13px; animation: rise .35s var(--ease) both; }
.neg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; margin-top: 10px; }
.neg-grid label { margin: 0; font-size: 12px; font-weight: 600; color: var(--navy-dark); }
.neg-grid input, .neg-grid select { margin: 5px 0 0; padding: 8px 10px; font-size: 13px; background: var(--input-bg); }
.neg-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--text-muted); }
.neg-hint:empty { display: none; }
@media (max-width: 700px) { .neg-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .neg-grid { grid-template-columns: 1fr; } }

/* ---- Celular ---- */
@media (max-width: 560px) {
  .wrap { padding: 0 14px 80px; }
  /* no celular o cabeçalho rola junto (fixo, ele comeria 1/3 da tela) */
  header.top { position: relative; margin: 0 0 16px; padding: 12px 0; }
  header.top h1 { font-size: 18px; }
  .brand .logo { width: 36px; height: 36px; border-radius: 10px; }
  .whoami { gap: 6px; }
  .whoami .tool-link { padding: 7px 11px; font-size: 12.5px; }
  .panel { padding: 16px; border-radius: 14px; }
  .tabs { width: 100%; border-radius: 16px; }
}

/* Quem pede menos movimento no sistema não vê animação nenhuma. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .tab-revision.blink { background: var(--danger-bg); }
}

/* ---- Pós-venda ---- */
.muted { color: var(--text-muted); }
.kpi.bad { background: linear-gradient(180deg, rgba(248, 113, 113, 0.08), var(--card-bg) 70%); border-color: rgba(248, 113, 113, 0.3); }
.kpi.bad::before { background: var(--danger); }
.kpi.bad b { color: var(--danger); }
.upcoming-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: 4px 0 6px; }
.upcoming-row { display: grid; grid-template-columns: 10px 170px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; font-size: 13px; transition: background .2s; }
.upcoming-row:hover { background: var(--hover); }
.upcoming-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.upcoming-row.soon .dot { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .18); }
.upcoming-row.late .dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(248, 113, 113, .18); }
.upcoming-row .u-what { font-weight: 600; }
.upcoming-row .u-who { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-row .u-when { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.upcoming-row.late .u-when { color: var(--danger); }
.upcoming-row.soon .u-when { color: var(--pending-text); }
@media (max-width: 640px) {
  .upcoming-row { grid-template-columns: 10px 1fr; }
  .upcoming-row .u-who, .upcoming-row .u-when { grid-column: 2; }
}

.drop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drop-grid .file-row { margin-top: 0; display: block; }
@media (max-width: 560px) { .drop-grid { grid-template-columns: 1fr; } }
.parse-note { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-size: 13px; font-weight: 500; animation: rise .3s var(--ease) both; }
.parse-note.warn { background: var(--pending-bg); color: var(--pending-text); }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; margin-top: 6px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span3 { grid-column: span 3; }
.form-grid label { margin-top: 12px; }
@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span3 { grid-column: span 2; }
}
@media (max-width: 460px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2, .form-grid .span3 { grid-column: auto; }
}
.deadline-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 13px; }

.order-card {
  padding: 16px 18px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--card-bg);
  transition: box-shadow .25s var(--ease), border-color .25s, transform .25s var(--ease);
}
.order-card:hover { box-shadow: var(--shadow-hover); border-color: var(--line2); }
.order-card.is-late { border-color: rgba(248, 113, 113, .35); box-shadow: inset 3px 0 0 var(--danger); }
.order-models { margin-top: 8px; font-size: 12.5px; color: var(--text); }
.chips-dl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
/* quanto o cliente já pagou (cartão do pedido) */
.paid-line { margin-top: 10px; min-height: 26px; }
.paid-line .pl-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 8px; font-size: 11.5px; color: var(--text-muted); }
.paid-line .pl-top span { white-space: nowrap; }
.paid-line .pl-top span:first-child { font-weight: 600; color: var(--ok); }
.paid-line .fin-bar { height: 4px; margin-top: 4px; }
.chip-dl { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gray-light); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.chip-dl::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip-dl.ok { background: var(--ok-bg); color: var(--ok); }
.chip-dl.soon { background: var(--pending-bg); color: var(--pending-text); }
.chip-dl.late { background: var(--danger-bg); color: var(--danger); }

.stepper { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 14px 0 4px; padding: 0; counter-reset: step; }
.stepper li { position: relative; padding-top: 22px; text-align: center; font-size: 11.5px; color: var(--text-muted); }
.stepper li::before { content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--card-bg); border: 2px solid var(--line2); z-index: 1; transition: all .3s var(--ease); }
.stepper li::after { content: ''; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--line2); }
.stepper li:first-child::after { display: none; }
.stepper li b { display: block; font-weight: 600; color: var(--text-muted); }
.stepper li span { display: block; font-size: 11px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.stepper li.done::before { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }
.stepper li.done::after { background: var(--ok); }
.stepper li.done b { color: var(--text); }
.stepper li.current::before { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(34, 197, 94, .15); animation: ping-navy 2s infinite; }
.stepper li.current b { color: var(--navy); }
@keyframes ping-navy { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .35); } 80%, 100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
@media (max-width: 560px) {
  .stepper li { font-size: 10px; }
  .stepper li b { font-weight: 600; line-height: 1.2; }
}

.order-files { display: grid; gap: 6px; margin-top: 12px; padding: 10px 12px; background: var(--gray-light); border-radius: 12px; }
.file-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.fg-title { width: 110px; flex-shrink: 0; font-weight: 600; color: var(--text-muted); }
.fg-empty { color: var(--text-muted); }
.file-pill { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; background: var(--card-bg); overflow: hidden; max-width: 100%; transition: box-shadow .2s, transform .2s var(--ease); }
.file-pill:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.fp-name { border: none; background: none; padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--navy-dark); cursor: pointer; font-family: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.fp-name:disabled { opacity: .5; cursor: wait; }
.fp-x { border: none; border-left: 1px solid var(--border); background: none; padding: 5px 9px; font-size: 14px; line-height: 1; color: var(--text-muted); cursor: pointer; transition: background .2s, color .2s; }
.fp-x:hover { background: var(--danger-bg); color: var(--danger); }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.order-actions .sale-actions { margin-top: 12px; }
.order-actions > .review-toggle { margin-top: 12px; }
.file-pick { cursor: pointer; }
.order-private { margin-top: 4px; }
.private-box { margin-top: 4px; animation: rise .3s var(--ease) both; }
@media (max-width: 560px) {
  .order-card { padding: 14px; }
  .fg-title { width: 100%; }
}
.setting-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; background: var(--gray-light); border-radius: 12px; }
.setting-row .access-who span { white-space: normal; }
.seg-light { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.seg-light button { flex: 1 1 180px; padding: 9px 12px; border: none; border-radius: 9px; background: transparent; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: background .25s var(--ease), color .2s, box-shadow .25s, transform .15s; }
.seg-light button:hover { color: var(--navy-dark); background: rgba(255, 255, 255, .06); }
.seg-light button:active { transform: scale(.97); }
.seg-light button.active { background: var(--card2); color: var(--navy-dark); box-shadow: 0 0 0 1px var(--line2); }
.start-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--text-muted); }
.entry-box { margin-top: 12px; padding: 12px 14px; border: 1px dashed rgba(251, 191, 36, .45); background: var(--pending-bg); border-radius: 12px; font-size: 13px; animation: rise .3s var(--ease) both; }
.entry-box > b { display: block; margin-bottom: 8px; color: var(--pending-text); }
.seg-light.seg-sm { max-width: 520px; }
.seg-light.seg-sm button { flex: 1 1 150px; padding: 7px 10px; font-size: 12.5px; }
.entry-box .sale-actions { margin-top: 10px; }

/* ---- Visualizador de arquivos (pós-venda) ---- */
.fp-dl { font-size: 12px; }
.fp-dl:hover { background: var(--navy-light); color: var(--navy-dark); }
.viewer { position: fixed; inset: 0; z-index: 70; display: none; flex-direction: column; background: rgba(5, 6, 8, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.viewer.open { display: flex; animation: fadeIn .2s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.viewer-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(22, 26, 32, .97); border-bottom: 1px solid var(--line); box-shadow: 0 4px 20px rgba(0, 0, 0, .4); }
.viewer-name { flex: 1; min-width: 0; }
.viewer-name b { display: block; font-size: 14px; color: var(--navy-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-name span { display: block; font-size: 12px; color: var(--text-muted); }
.viewer-close { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 10px; background: var(--card-bg); font-size: 22px; line-height: 1; color: var(--text-muted); cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease); }
.viewer-close:hover { background: var(--danger-bg); color: var(--danger); transform: scale(1.05); }
.viewer-body { flex: 1; overflow: auto; padding: 16px 12px 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.viewer-body canvas, .viewer-body img { max-width: 100%; background: #fff; border-radius: 4px; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); animation: rise .3s var(--ease) both; }
.viewer-body img { max-height: none; height: auto; }
.viewer-loading { margin: auto; color: #fff; font-size: 15px; font-weight: 500; }
@media (max-width: 560px) { .viewer-bar { padding: 8px 10px; } .viewer-body { padding: 10px 6px 30px; } }
.order-filters { grid-template-columns: 180px 250px 1fr; }
@media (max-width: 760px) { .order-filters { grid-template-columns: 1fr 1fr; } .order-filters input { grid-column: span 2; } }
@media (max-width: 460px) { .order-filters { grid-template-columns: 1fr; } .order-filters input { grid-column: auto; } }

/* ---- Pátio (produção, ficha do container, briefing) ---- */
.type-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.type-chips:empty { display: none; }
.type-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-right: 2px; }
.back-link { display: inline-block; margin-bottom: 10px; color: var(--navy); font-size: 13px; font-weight: 600; text-decoration: none; }
.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.unit-list { margin-top: 12px; border-top: 1px solid var(--border); }
.unit-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 4px 12px; padding: 11px 8px; margin: 0 -8px; border-bottom: 1px solid var(--border); border-radius: 10px; color: inherit; text-decoration: none; transition: background .2s; }
.unit-row:last-child { border-bottom: none; }
.unit-row:hover { background: var(--hover); }
.u-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--gray-light); }
.u-main { min-width: 0; }
.u-main b { display: block; font-size: 14px; color: var(--text); }
.u-main > span { display: block; font-size: 12.5px; color: var(--text-muted); }
.u-bar { display: block; height: 5px; border-radius: 3px; background: var(--gray-light); margin-top: 6px; overflow: hidden; }
.u-bar i { display: block; height: 100%; border-radius: 3px; background: var(--navy-grad); }
@media (max-width: 560px) {
  .unit-row { grid-template-columns: 40px 1fr; }
  .unit-row .chip-dl { grid-column: 2; justify-self: start; }
}
.setup-list { display: grid; gap: 8px; margin: 14px 0 6px; }
.setup-row { display: grid; grid-template-columns: 28px 170px auto 1fr 34px; align-items: center; gap: 8px; padding: 8px 10px; background: var(--gray-light); border-radius: 12px; }
.setup-row select { margin: 0; padding: 8px 10px; }
.setup-n { font-weight: 800; color: var(--navy-dark); text-align: center; }
.setup-check { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; white-space: nowrap; }
.setup-check input { width: 18px; height: 18px; }
.setup-x { border: 1px solid var(--border); border-radius: 9px; background: var(--card-bg); height: 34px; }
@media (max-width: 640px) {
  .setup-row { grid-template-columns: 28px 1fr 34px; }
  .setup-row select, .setup-row .setup-check { grid-column: 2; }
  .setup-row .setup-x { grid-column: 3; grid-row: 1; }
}
.ficha-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ficha-title { flex: 1 1 260px; min-width: 0; }
.ficha-title .eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.ficha-title h2 { margin: 3px 0 8px; font-size: 20px; letter-spacing: -.02em; }
.ficha-title .chips-dl { margin-top: 0; }
.ficha-head .sale-actions { margin-top: 0; }
.ficha-prog { display: grid; gap: 8px; padding: 12px 14px; margin-bottom: 12px; background: var(--gray-light); border-radius: 12px; }
.prog-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.prog-top span { color: var(--text-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.segbar { display: flex; gap: 2px; height: 10px; }
.segbar i { flex-basis: 0; border-radius: 3px; background: var(--card-bg); border: 1px solid var(--border); }
.segbar i.done { background: var(--ok); border-color: var(--ok); }
.segbar i.current { background: var(--navy); border-color: var(--navy); }
.callout { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; font-size: 18px; animation: rise .3s var(--ease) both; }
.callout > div { flex: 1; min-width: 0; font-size: 13.5px; }
.callout b { display: block; }
.callout > div > span { display: block; font-size: 13px; color: var(--text); opacity: .9; }
.callout.ok { background: var(--ok-bg); color: var(--ok); }
.callout.warn { background: var(--pending-bg); color: var(--pending-text); }
.callout.bad { background: var(--danger-bg); color: var(--danger); }
.callout.info { background: var(--progress-bg); color: var(--progress-text); }
.stage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st { border-radius: 12px; background: var(--card-bg); border: 1px solid var(--border); }
.st.next { background: transparent; border-style: dashed; }
.st.current { border: 2px solid var(--navy); box-shadow: var(--shadow); }
.st.end { background: transparent; border: none; }
.st-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: none; border-radius: 11px; background: transparent; text-align: left; font-family: inherit; color: inherit; }
button.st-row { cursor: pointer; }
button.st-row:hover { background: var(--hover); }
.st-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: var(--gray-light); }
.st.done .st-ic { background: var(--ok-bg); }
.st.current .st-ic { background: var(--navy-light); }
.st-ic .ic, .u-ic .ic { width: 19px; height: 19px; color: var(--navy-dark); }
.st.done .st-ic .ic { color: var(--ok); }
.callout > span[aria-hidden] .ic { width: 20px; height: 20px; }
.st-t { flex: 1; min-width: 0; }
.st-t b { display: block; font-size: 14px; }
.st-t > span { display: block; font-size: 12.5px; color: var(--text-muted); }
.st-d { flex: none; font-size: 12.5px; font-weight: 700; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-d.ok { color: var(--ok); }
.st-d s { font-weight: 500; opacity: .75; }
.tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--progress-bg); color: var(--progress-text); vertical-align: 1px; }
.t-bad { color: var(--danger); }
.t-warn { color: var(--pending-text); }
.st .items { display: grid; padding: 0 12px 8px; }
.item { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.item-q { font-weight: 600; font-size: 15px; line-height: 1.35; }
.okbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.okbar button { min-height: 50px; border-radius: 11px; border: 1.5px solid var(--border); background: var(--card-bg); font-family: inherit; font-weight: 800; font-size: 15px; color: var(--text-muted); cursor: pointer; transition: transform .15s var(--ease), background .2s, border-color .2s; }
.okbar button:active { transform: scale(.97); }
.okbar button.ok.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.okbar button.nok.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.okbar button.na.on { background: var(--text-muted); border-color: var(--text-muted); color: #fff; }
textarea.note-nok { min-height: 60px; margin: 0; border-color: var(--danger); }
.ro { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.ro .r { flex: none; min-width: 42px; padding: 2px 6px; border-radius: 6px; text-align: center; font-size: 11.5px; font-weight: 800; }
.r.ok { background: var(--ok-bg); color: var(--ok); }
.r.nok { background: var(--danger-bg); color: var(--danger); }
.r.na, .r.none { background: var(--gray-light); color: var(--text-muted); }
.ro small { display: block; margin-top: 3px; color: var(--pending-text); font-size: 12.5px; }
.st-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 12px; }
.st-actions .span2 { grid-column: 1 / -1; }
.st-actions .btn { min-height: 48px; font-size: 15px; }
.st-actions .btn-big { min-height: 56px; font-size: 16px; }
.st .hint { margin: 6px 12px 12px; font-size: 12.5px; color: var(--text-muted); }
.st .callout { margin: 4px 12px 12px; }
.pendbox { display: grid; gap: 8px; padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--pending-bg); }
.pendbox > b { color: var(--pending-text); }
.pend { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--card-bg); }
.pend > span { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; }
.pend small { display: block; font-weight: 500; color: var(--text-muted); }
.review-box { padding: 14px; margin-bottom: 12px; border: 1px solid rgba(34, 197, 94, .25); border-radius: 14px; background: rgba(34, 197, 94, 0.06); animation: rise .3s var(--ease) both; }
.review-box > b { display: block; color: var(--navy-dark); }
.timer { display: flex; align-items: center; gap: 14px; color: var(--progress-text); }
.timer .clock { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.timer span { display: block; font-size: 13px; color: var(--text); }
.brief-head { flex-wrap: wrap; align-items: center; row-gap: 12px; margin-bottom: 8px; }
.brief-title { font-size: 13px; line-height: 1.4; color: var(--text-muted); margin-top: 4px; }
.brief-seg { min-width: 240px; }
.brief-sec { padding: 10px 0 6px; border-top: 1px solid var(--border); }
.brief-sec:first-of-type { border-top: none; }
.brief-sec .upcoming-row { text-decoration: none; color: inherit; }
.brief-empty { margin: 2px 0 6px; font-size: 12.5px; }
table.week-grid { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 560px; font-size: 12px; }
.week-grid th { padding: 4px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-align: center; }
.week-grid thead th.today { color: var(--navy); }
.week-grid tbody th { text-align: left; white-space: nowrap; padding-right: 8px; }
.week-grid tbody th b { display: block; color: var(--text); font-size: 12.5px; }
.week-grid tbody th small { font-weight: 500; }
.week-grid td { height: 48px; padding: 3px; border-radius: 8px; text-align: center; vertical-align: middle; background: var(--gray-light); }
.week-grid td span { display: block; font-size: 16px; line-height: 1.1; }
.week-grid td small { display: block; font-size: 10.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-grid td.current { background: var(--navy-light); }
.week-grid td.done { background: var(--ok-bg); }
.week-grid td.rain { box-shadow: inset 0 -3px 0 var(--progress-text); }
.week-grid td.today { outline: 2px solid var(--navy); outline-offset: -2px; }
.week-grid td.none { background: transparent; border: 1px dashed var(--border); }
.week-grid td.none small { color: var(--text-muted); font-weight: 500; }
.patio-filters { margin: 0; }
.patio-filters select, .patio-filters input { margin: 0; }
.filter-note { margin: 8px 0 0; }
.filter-note:empty { display: none; }
#filterBar { padding: 14px 16px; }
@media (max-width: 560px) { .patio-filters { grid-template-columns: 1fr; } }
.compras-table th, .compras-table td { text-align: left; }
.compras-table td:nth-child(2) { white-space: normal; min-width: 160px; }
.compras-table td small { display: block; color: var(--text-muted); font-size: 11.5px; }
.compras-table tr.row-late td { color: var(--danger); }
.compras-table tr.row-late td small { color: var(--danger); opacity: .8; }
.print-only { display: none; }
@media print {
  body { background: #fff !important; }
  header.top, .no-print, .tabs, .toast, .viewer { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .panel { box-shadow: none; border: none; padding: 0; animation: none; }
  .print-only { display: block; font-size: 11px; color: #555; margin-bottom: 8px; }
  .upcoming-row { grid-template-columns: 14px 160px 1fr auto; padding: 3px 0; margin: 0; }
  .upcoming-row .dot { width: 11px; height: 11px; border-radius: 2px; background: #fff !important; border: 1.3px solid #000; box-shadow: none !important; }
  .week-grid td { border: 1px solid #ccc; }
}

/* ---- Equipe: uso da planta ---- */
.usage-row { cursor: pointer; }
.usage-row:focus-visible td { background: var(--hover); outline: none; }
.usage-caret { display: inline-block; margin-right: 6px; color: var(--text-muted); transition: transform .2s var(--ease); }
.usage-row.open .usage-caret { transform: rotate(90deg); }
.usage-flag { display: block; margin-top: 3px; color: var(--amber); font-weight: 600; }
.usage-detail td { white-space: normal; background: var(--hover); padding: 12px 14px 14px; }
.usage-detail:hover td { background: var(--hover); }
.usage-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; animation: rise .25s var(--ease) both; }
.usage-cols h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.usage-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.usage-cols li { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.usage-cols li b { display: block; font-size: 13px; }
.usage-cols li span { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.usage-cols li a { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--navy); }
.usage-cols p { margin: 0; font-size: 12.5px; }
@media (max-width: 900px) {
  .usage-cols { grid-template-columns: 1fr; }
  .usage-detail td { text-align: left; padding: 10px 0; }
  .stats-table .usage-flag { display: block; margin-left: 0; }
}

/* ---- Pós-venda: pedido cancelado ---- */
.review-status.canceled { background: rgba(148, 163, 184, 0.12); color: var(--mut); }
.order-card.is-canceled { opacity: .72; }
.order-card.is-canceled .doc-main b { text-decoration: line-through; text-decoration-color: rgba(107,114,128,.6); }
.review-toggle.danger-link { color: var(--danger); }

/* ================================================================
   Tema único escuro desde 20/10/2026 (igual à página de vendas): o
   botão de tema do menu some (o antigo modo escuro virou o padrão).
   ================================================================ */
.theme-toggle, #themeToggle { display: none !important; }

/* nº de contrato repetido: o nome do cliente é o que identifica */
.dup-name { font-size: 17px; letter-spacing: -.01em; color: var(--navy-dark); }
.dup-warn { display: block; margin-top: 4px; padding: 5px 10px; border-radius: 8px; background: var(--pending-bg); color: var(--pending-text); font-size: 12px; font-weight: 700; }
.ficha-title .dup-warn { display: inline-block; margin: 2px 0 6px; }
.doc-main .dup-warn { color: var(--pending-text); font-size: 12px; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }

/* ---- Pátio no celular: tudo mais compacto e fácil de tocar ---- */
@media (max-width: 600px) {
  .patio-page .wrap { padding: 0 12px 60px; }
  .patio-page header.top { margin-bottom: 12px; padding: 10px 0; }
  .patio-page header.top .sub { display: none; }
  .patio-page .panel { padding: 14px; margin-bottom: 12px; border-radius: 14px; }
  /* resumo: 4 números pequenos em 2×2 */
  .patio-page .kpis { gap: 8px; margin: 6px 0 10px; }
  .patio-page .kpi { padding: 9px 11px; border-radius: 12px; }
  .patio-page .kpi span { font-size: 11.5px; }
  .patio-page .kpi b { font-size: 18px; margin: 2px 0 0; }
  .patio-page .kpi small { font-size: 11px; line-height: 1.3; }
  .patio-page .access-head h2 { font-size: 15px; }
  .patio-page .access-count { font-size: 11.5px; }
  /* abas numa linha só, do tamanho da tela */
  .patio-page .tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; gap: 4px; border-radius: 14px; margin-bottom: 12px; }
  .patio-page .tab { padding: 10px 4px; text-align: center; font-size: 13px; border-radius: 10px; }
  /* briefing: Hoje / Semana / Mês lado a lado, imprimir ao lado */
  .patio-page .brief-head > .sale-actions { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .patio-page .brief-seg { min-width: 0; flex: 1; flex-wrap: nowrap; }
  .patio-page .brief-seg button { flex: 1 1 0; padding: 9px 4px; }
  .patio-page .brief-head .btn-sm { flex: none; padding: 9px 10px; }
  /* itens: título e data na mesma linha, cliente embaixo sem cortar */
  .patio-page .upcoming-row { grid-template-columns: 10px 1fr auto; gap: 2px 10px; padding: 9px 8px; align-items: start; }
  .patio-page .upcoming-row .dot { margin-top: 5px; }
  .patio-page .upcoming-row .u-what { grid-column: 2; line-height: 1.3; }
  .patio-page .upcoming-row .u-when { grid-column: 3; grid-row: 1; font-size: 12px; text-align: right; }
  .patio-page .upcoming-row .u-who { grid-column: 2 / -1; white-space: normal; overflow: visible; font-size: 12.5px; line-height: 1.35; }
  .patio-page .brief-sec { padding: 8px 0 4px; }
  /* cartões de pedido e containers */
  .patio-page .order-card { padding: 12px; }
  .patio-page .stepper li { font-size: 9.5px; }
  .patio-page .unit-row { padding: 10px 6px; margin: 0 -6px; gap: 2px 10px; grid-template-columns: 36px 1fr; }
  .patio-page .u-ic { width: 36px; height: 36px; font-size: 17px; }
  .patio-page .order-actions .sale-actions .btn { flex: 1 1 auto; }
  .patio-page .ficha-title h2 { font-size: 18px; }
  .patio-page .ficha-head .sale-actions { width: 100%; }
  .patio-page .ficha-head .sale-actions .btn { flex: 1; }
  .patio-page .st-row { padding: 8px 10px; gap: 10px; }
  .patio-page .st .items { padding: 0 10px 6px; }
  .patio-page .st-actions { padding: 4px 10px; }
  .patio-page .compras-table td, .patio-page .compras-table th { padding: 8px 6px; }
  /* no celular a coluna do tipo some (12 m / 6 m já dizem a quantidade) */
  .patio-page .compras-clientes th:nth-child(2), .patio-page .compras-clientes td:nth-child(2) { display: none; }
  .patio-page .compras-clientes td:first-child { min-width: 0; }
}

/* ================================================================
   Menu lateral (13/10/2026) — nav.js. Todas as páginas menos a planta.
   ================================================================ */
:root { --sn-w: 256px; --sn-mini: 76px; }
.side-nav {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sn-w); z-index: 40;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card-bg); border-right: 1px solid var(--border); box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  transition: width .25s var(--ease), transform .3s var(--ease), box-shadow .3s;
}
body.has-sidenav { padding-left: var(--sn-w); transition: padding-left .25s var(--ease); }
body.has-sidenav header.top .brand .logo { display: none; } /* o logo fica no menu */
body.has-sidenav .wrap { max-width: 1200px; } /* com o menu do lado, o conteúdo usa mais da tela */
.sn-brand { display: flex; align-items: center; gap: 11px; padding: 18px 16px 12px; }
.sn-logo {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; color: #fff; background: var(--navy-grad);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-btn);
}
.sn-brand-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sn-brand-t b { font-size: 14.5px; font-weight: 800; color: var(--navy-dark); letter-spacing: -.01em; white-space: nowrap; }
.sn-brand-t small { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-close { display: none; }
.sn-groups { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 12px 12px; scrollbar-width: thin; }
.sn-group { margin-top: 10px; }
.sn-gh {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: none; background: none; cursor: pointer; padding: 7px 8px; border-radius: 8px;
  font: inherit; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted);
}
.sn-gh:hover { color: var(--navy-dark); }
.sn-gh:focus-visible { outline: none; box-shadow: var(--ring); }
.sn-gh .ic { transition: transform .25s var(--ease); flex-shrink: 0; }
.sn-group.closed .sn-gh .ic { transform: rotate(-90deg); }
.sn-group.closed .sn-items { display: none; }
.sn-link {
  position: relative; display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 10px 12px;
  border-radius: 12px; border: 1px solid transparent; color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .2s, color .2s, border-color .2s;
}
.sn-link .sn-ic { display: flex; color: var(--text-muted); flex-shrink: 0; transition: color .2s; }
.sn-link .sn-t { overflow: hidden; text-overflow: ellipsis; }
.sn-link:hover { background: var(--gray-light); }
.sn-link:hover .sn-ic { color: var(--navy); }
.sn-link:focus-visible { outline: none; box-shadow: var(--ring); }
.sn-link.active { background: var(--navy-light); border-color: rgba(34, 197, 94, 0.22); color: var(--navy-dark); font-weight: 700; }
.sn-link.active .sn-ic { color: var(--navy); }
.sn-link.active::before { content: ''; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--navy); }
.sn-link .tool-badge { margin-left: auto; }
.sn-foot { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-top: 1px solid var(--border); }
.sn-clock { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 12px; background: var(--gray-light); border: 1px solid var(--border); }
.sn-clock b { font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; color: var(--navy-dark); font-variant-numeric: tabular-nums; }
.sn-clock > span { font-size: 11.5px; color: var(--text-muted); }
.sn-clock-x {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 7px; border: none; padding: 0;
  background: transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transition: opacity .2s, background .2s;
}
.sn-clock:hover .sn-clock-x, .sn-clock-x:focus-visible { opacity: 1; }
.sn-clock-x:hover { background: var(--navy-light); color: var(--navy-dark); }
@media (hover: none) { .sn-clock-x { opacity: .7; } }
.sn-online { display: flex; align-items: center; gap: 7px; margin-top: 3px; }
.sn-online i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
.sn-online em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.sn-online.off i { background: var(--danger); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18); }
.sn-user { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 4px; }
.sn-user .avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; background: var(--navy-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px;
}
.sn-user .whoami-id { min-width: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.sn-user .whoami-id > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.sn-btn {
  height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-bg); color: var(--navy-dark);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font: inherit;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.sn-btn:hover { background: var(--navy-light); border-color: rgba(34, 197, 94, 0.3); }
.sn-btn:active { transform: scale(.95); }
.sn-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.sn-burger, .sn-scrim { display: none; }

/* encolhido: só os ícones (computador) */
@media (min-width: 901px) {
  body.has-sidenav.sn-is-mini { padding-left: var(--sn-mini); }
  body.sn-is-mini .side-nav { width: var(--sn-mini); }
  body.sn-is-mini .sn-brand { justify-content: center; padding: 18px 0 12px; }
  body.sn-is-mini .sn-brand-t, body.sn-is-mini .sn-t, body.sn-is-mini .sn-gh, body.sn-is-mini .sn-clock,
  body.sn-is-mini .sn-user .whoami-id { display: none; }
  body.sn-is-mini .sn-groups { padding: 4px 10px 12px; }
  body.sn-is-mini .sn-group + .sn-group { border-top: 1px solid var(--border); padding-top: 6px; }
  body.sn-is-mini .sn-group.closed .sn-items { display: block; }
  body.sn-is-mini .sn-link { justify-content: center; padding: 11px 0; }
  body.sn-is-mini .sn-link .tool-badge { position: absolute; top: 2px; right: 4px; margin: 0; }
  body.sn-is-mini .sn-foot { padding: 12px 10px; }
  body.sn-is-mini .sn-user { justify-content: center; padding: 0; }
  body.sn-is-mini .sn-btns { grid-auto-flow: row; }
}
/* celular e tablet: o menu vira gaveta */
@media (max-width: 900px) {
  body.has-sidenav { padding-left: 0; }
  .side-nav { width: min(290px, 86vw); transform: translateX(-102%); box-shadow: none; z-index: 60; }
  body.sn-open .side-nav { transform: none; box-shadow: 12px 0 40px rgba(0, 0, 0, 0.25); }
  .sn-scrim {
    display: block; position: fixed; inset: 0; z-index: 59; background: rgba(0, 0, 0, 0.55);
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  body.sn-open .sn-scrim { opacity: 1; pointer-events: auto; }
  .sn-close {
    display: flex; margin-left: auto; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--card-bg); color: var(--navy-dark); align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  }
  .sn-mini { display: none !important; }
  .sn-burger {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 12px; border: 1px solid var(--border); background: var(--card-bg); color: var(--navy-dark); cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  }
}
@media print {
  .side-nav, .sn-scrim, .sn-burger { display: none !important; }
  body.has-sidenav { padding-left: 0 !important; }
}

/* ================================================================
   Recibos (Pós-venda) e Finanças — 16/10/2026
   Vários recibos por pedido, parcelas previstas e o resumo do mês.
   ================================================================ */
.fin-bar { position: relative; display: flex; height: 6px; border-radius: 999px; background: var(--gray-light); overflow: hidden; margin-top: 6px; }
.fin-bar i { display: block; height: 100%; background: var(--ok); transition: width .5s var(--ease); }
.fin-bar i.goods { background: repeating-linear-gradient(135deg, #fbbf24 0 4px, rgba(251, 191, 36, .45) 4px 8px); }
.fin-bar.big { height: 8px; margin-top: 10px; }
.pays-box .fin-bar { background: var(--card-bg); }

/* formulário de recibo (cartão do pedido e Finanças) */
.rc-form, .plan-edit { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card-bg); animation: rise .3s var(--ease) both; }
.entry-box .rc-form { margin-top: 10px; }
.rc-title { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--navy-dark); margin-bottom: 8px; }
.rc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; align-items: end; }
.rc-grid .rc-file { grid-column: 1 / -1; justify-self: start; max-width: 100%; }
.rc-grid .rc-file span { display: inline-flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70vw; }
.rc-f { display: block; margin: 0; font-size: 11.5px; font-weight: 600; color: var(--text-muted); min-width: 0; }
.rc-f > span { display: block; margin-bottom: 4px; }
.rc-f input, .rc-f select { margin: 0; padding: 7px 9px; font-size: 13px; }
.rc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
@media (max-width: 700px) { .rc-grid { grid-template-columns: 1fr 1fr; } .rc-grid .rc-wide { grid-column: 1 / -1; } }

/* recibos escolhidos no cadastro do pedido */
.rc-rows { margin-top: 10px; display: grid; gap: 8px; }
.rc-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 150px 140px 130px 34px; gap: 8px; align-items: end; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--gray-light); animation: rise .3s var(--ease) both; }
.rc-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--navy-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: center; }
.rc-x { border: 1px solid var(--border); border-radius: 9px; height: 34px; background: var(--card-bg); }
.rc-sum { font-size: 12.5px; font-weight: 600; color: var(--text-muted); padding: 2px 2px 0; }
.rc-sum.ok { color: var(--ok); }
.rc-sum.soon { color: var(--pending-text); }
@media (max-width: 700px) {
  .rc-row { grid-template-columns: 1fr 1fr; }
  .rc-name { grid-column: 1 / -1; }
  .rc-x { grid-column: 2; justify-self: end; width: 34px; }
}

/* "Recibos e pagamentos" no cartão do pedido */
.order-pays { margin-top: 2px; }
.pays-box { margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: var(--gray-light); animation: rise .3s var(--ease) both; display: grid; gap: 10px; }
.pays-box > .btn { justify-self: start; }
.pays-note { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.pe-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; }
.pe-top span { font-variant-numeric: tabular-nums; font-weight: 600; }
.pe-top em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-left: auto; }
.pe-top em.ok { color: var(--ok); }
.pe-top em.soon { color: var(--pending-text); }
.pays-goods { display: grid; gap: 6px; }
.pg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border-radius: 10px; background: var(--card-bg); border: 1px solid var(--border); }
.pg-ic { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--pending-bg); color: var(--pending-text); flex-shrink: 0; }
.pg-t { flex: 1 1 200px; min-width: 0; }
.pg-t b { display: block; font-size: 13px; }
.pg-t small { display: block; font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-row .pay-field input { width: auto; margin: 0; padding: 6px 9px; font-size: 12.5px; }
.pays-list { display: grid; gap: 4px; }
.pl-row { display: grid; grid-template-columns: 52px 120px 1fr auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--card-bg); border: 1px solid var(--border); font-size: 12.5px; }
.pl-d { font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pl-v { font-weight: 700; font-variant-numeric: tabular-nums; }
.pl-r { color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-a { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.pl-a:empty { display: none; }
.pl-a .fp-x:first-child { border-left: none; }
.pl-edit { display: grid; grid-template-columns: 150px 140px 130px minmax(0, 1fr); gap: 8px; align-items: end; padding: 10px; border-radius: 10px; background: var(--card-bg); border: 1px solid var(--navy); }
.pl-edit .rc-actions { grid-column: 1 / -1; margin-top: 2px; }
@media (max-width: 560px) {
  .pl-row { grid-template-columns: 46px 1fr auto; }
  .pl-r { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .pl-edit { grid-template-columns: 1fr 1fr; }
}

/* ---- Página Finanças ---- */
.fin-head { align-items: center; flex-wrap: wrap; }
.month-pick { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 12px; background: var(--gray-light); }
.month-pick b { min-width: 150px; text-align: center; font-size: 13.5px; color: var(--navy-dark); }
.mp-btn { width: 32px; height: 32px; border: none; border-radius: 9px; background: transparent; color: var(--navy-dark); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.mp-btn:hover:not(:disabled) { background: var(--card-bg); }
.mp-btn:disabled { opacity: .35; cursor: default; }
.kpis.kpis-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .kpis.kpis-3 { grid-template-columns: 1fr 1fr; } .kpis.kpis-3 > :first-child { grid-column: 1 / -1; } }
.fin-split { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 800px) { .fin-split { grid-template-columns: 1fr; gap: 14px; } }
.fin-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 150px; }
.fc-col { display: grid; grid-template-rows: 16px 1fr 18px; gap: 4px; padding: 0; border: none; background: none; cursor: pointer; font-family: inherit; min-width: 0; }
.fc-v { font-size: 10px; font-weight: 700; color: var(--text-muted); text-align: center; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.fc-bar { display: flex; align-items: flex-end; height: 100%; border-radius: 8px; background: var(--gray-light); overflow: hidden; }
.fc-bar i { display: block; width: 100%; background: linear-gradient(180deg, rgba(34, 197, 94, .55), rgba(22, 163, 74, .3)); border-radius: 8px 8px 0 0; transition: height .5s var(--ease); }
.fc-m { font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: center; text-transform: capitalize; }
.fc-col.on .fc-bar i { background: var(--navy-grad); }
.fc-col.on .fc-m, .fc-col.on .fc-v { color: var(--navy-dark); }
.fc-col:hover .fc-bar { box-shadow: inset 0 0 0 1px var(--border); }
.fc-col:focus-visible { outline: none; }
.fc-col:focus-visible .fc-bar { box-shadow: var(--ring); }
.fin-upcoming .upcoming-row { grid-template-columns: 10px minmax(0, 1.25fr) minmax(0, 1fr) auto; width: 100%; border: none; background: none; font-family: inherit; color: inherit; text-align: left; cursor: pointer; margin: 0; }
.fin-empty { font-size: 13px; margin: 6px 0; }
@media (max-width: 640px) { .fin-upcoming .upcoming-row { grid-template-columns: 10px 1fr; } }
.fin-methods { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.fin-methods:empty { display: none; }
.fin-days { display: grid; }
.fd-day { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: 12px 0 4px; }
.fd-day:first-child { margin-top: 0; }
.fd-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 34px; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; transition: background .2s; }
.fd-row:hover { background: var(--hover); }
.fd-ic { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--ok-bg); color: var(--ok); }
.fd-t { border: none; background: none; padding: 0; text-align: left; font-family: inherit; color: inherit; cursor: pointer; min-width: 0; }
.fd-t b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-t small { display: block; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-t:hover b { color: var(--navy); }
.fd-v { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ok); white-space: nowrap; }
.fd-file.fp-x { border: 1px solid var(--border); border-radius: 999px; height: 30px; }
@media (max-width: 560px) { .fd-row { grid-template-columns: 32px minmax(0, 1fr) auto; } .fd-file { display: none; } }

.fin-card { padding-bottom: 14px; }
.fin-top { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; border: none; background: none; text-align: left; font-family: inherit; color: inherit; cursor: pointer; }
.fin-amt { text-align: right; flex-shrink: 0; }
.fin-amt b { display: block; font-size: 15px; font-weight: 800; color: var(--navy-dark); font-variant-numeric: tabular-nums; }
.fin-amt span { display: block; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.fin-chev { color: var(--text-muted); display: flex; flex-shrink: 0; }
.fin-sub { margin-top: 6px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.fin-detail-in { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 8px; animation: rise .3s var(--ease) both; }
.fin-detail-in > .upcoming-title { margin-top: 6px; }
.fin-plan { display: grid; gap: 4px; }
.fp-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) 130px 150px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--gray-light); font-size: 12.5px; }
.fp-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line2); }
.fp-row.pago .fp-dot { background: var(--ok); border-color: var(--ok); }
.fp-row.parcial .fp-dot { background: linear-gradient(90deg, var(--ok) 50%, transparent 50%); border-color: var(--ok); }
.fp-row.late .fp-dot { background: var(--danger); border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248, 113, 113, .15); }
.fp-l b { display: block; font-size: 13px; }
.fp-l small, .fp-v small { display: block; font-size: 11.5px; color: var(--text-muted); }
.fp-v { text-align: right; font-variant-numeric: tabular-nums; }
.fp-s { justify-self: end; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--card-bg); color: var(--text-muted); white-space: nowrap; }
.fp-row.pago .fp-s { background: var(--ok-bg); color: var(--ok); }
.fp-row.parcial .fp-s { background: var(--pending-bg); color: var(--pending-text); }
.fp-row.late .fp-s { background: var(--danger-bg); color: var(--danger); }
@media (max-width: 560px) {
  .fp-row { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .fp-s { grid-column: 2 / -1; justify-self: start; }
  .fin-top .doc-main span { white-space: normal; }
}
.pe-rows { display: grid; gap: 8px; }
.pe-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 140px 34px; gap: 8px; align-items: end; }
.pe-x { height: 34px; border: 1px solid var(--border); border-radius: 9px; background: var(--card-bg); }
span.pe-x { border: none; background: none; }
.pe-ph { display: flex; align-items: center; height: 34px; font-size: 12px; font-weight: 500; }
.pe-sum { margin: 8px 0 0; font-size: 12.5px; font-weight: 600; }
.pe-sum.ok { color: var(--ok); }
.pe-sum.warn { color: var(--pending-text); }
@media (max-width: 560px) {
  .pe-row { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
  .pe-row .rc-wide { grid-column: 1 / -1; }
  .pe-x { grid-column: 2; justify-self: end; width: 34px; }
}

/* Finanças · gastos (16/10/2026): 5 números no topo, barras recebido × gasto,
   lista de gastos do mês e resultado do pedido */
.kpis.kpis-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis.kpis-5 > * { grid-column: span 2; }
.kpis.kpis-5 > :nth-child(n+4) { grid-column: span 3; }
@media (max-width: 700px) {
  .kpis.kpis-5 { grid-template-columns: 1fr 1fr; }
  .kpis.kpis-5 > *, .kpis.kpis-5 > :nth-child(n+4) { grid-column: auto; }
  .kpis.kpis-5 > :nth-child(3) { grid-column: 1 / -1; }
}
.kpi.kpi-out::before { background: linear-gradient(180deg, #a7afbb, #7d8693); }
.fc-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; min-height: 0; }
.fc-bar.out i { background: linear-gradient(180deg, #5b6472, #454d59); }
.fc-col.on .fc-bar.out i { background: linear-gradient(180deg, #a7afbb, #7d8693); }
.fc-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 11.5px; color: var(--text-muted); }
.fc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fc-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--navy-grad); }
.fc-legend i.out { background: #7d8693; }
#expensesPanel .access-head { align-items: center; flex-wrap: wrap; }
#expensesPanel .access-head h2 { margin-right: auto; }
#expSlot .rc-form { margin: 10px 0 12px; }
.ex-form .rc-grid .rc-wide { grid-column: span 2; }
.ex-form .rc-grid .rc-file { grid-column: 1 / -1; }
@media (max-width: 700px) { .ex-form .rc-grid .rc-wide { grid-column: 1 / -1; } }
.ex-row { grid-template-columns: 32px minmax(0, 1fr) auto auto; }
.ex-ic { background: var(--gray-light); color: var(--text-muted); }
.ex-t button { border: none; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; max-width: 100%; display: block; }
.ex-t button:hover b { color: var(--navy); }
.fd-v.ex-v { color: var(--navy-dark); }
.ex-a { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.ex-a .fp-x:first-child { border-left: none; }
.ex-list .ex-row { margin: 0; background: var(--card-bg); border: 1px solid var(--border); padding: 7px 10px; }
.ex-list { gap: 4px; }
.ex-list + .review-actions { margin-top: 4px; }
.ex-list .rc-form { margin: 0; }
.ex-result { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ex-result span { padding: 8px 10px; border-radius: 10px; background: var(--gray-light); min-width: 0; }
.ex-result small { display: block; font-size: 11px; color: var(--text-muted); }
.ex-result b { display: block; font-size: 14px; font-weight: 800; color: var(--navy-dark); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-result .pos b { color: var(--ok); }
.ex-result .neg b { color: var(--danger); }
@media (max-width: 700px) { .ex-result { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .ex-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .ex-a { grid-column: 2 / -1; justify-self: start; }
  .ex-t small, .ex-t b { white-space: normal; }
  .ex-list .ex-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ex-list .ex-ic { display: none; }
  .ex-list .ex-a { grid-column: 1 / -1; }
}

/* Página Gastos (16/10/2026): gasto por tipo com barra, pedidos com lucro previsto */
.gx-cats { display: grid; gap: 4px; }
.gx-cat { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: none; font-family: inherit; color: inherit; text-align: left; cursor: pointer; transition: background .2s, border-color .2s; }
.gx-cat:hover { background: var(--gray-light); }
.gx-cat.on { border-color: var(--navy); background: var(--gray-light); }
.gx-cat:focus-visible { outline: none; box-shadow: var(--ring); }
.gx-ic { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--gray-light); color: var(--text-muted); }
.gx-l { min-width: 0; }
.gx-l b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-bar { display: block; height: 6px; margin-top: 6px; border-radius: 99px; background: var(--gray-light); overflow: hidden; }
.gx-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7d8693, #a7afbb); }
.gx-v { text-align: right; font-variant-numeric: tabular-nums; }
.gx-v b { display: block; font-size: 13.5px; font-weight: 800; color: var(--navy-dark); white-space: nowrap; }
.gx-v small { display: block; font-size: 11.5px; color: var(--text-muted); }
.gx-filters { grid-template-columns: 240px minmax(0, 1fr); }
@media (max-width: 560px) { .gx-filters { grid-template-columns: 1fr; } }
.gx-obar i { background: linear-gradient(90deg, #7d8693, #a7afbb); }
.gx-pos { color: var(--ok); }
.gx-neg { color: var(--danger); }

/* Pós-venda: vendedor reconhecido no contrato (19/10/2026) */
.seller-hint { display: flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 12px; font-weight: 600; color: var(--ok); line-height: 1.3; }
.seller-hint.warn { color: var(--amber); }

/* Foto do perfil + coroa do 1º em vendas do mês (19/10/2026, nav.js / coroa.js) */
.sn-user button.avatar { border: 0; padding: 0; cursor: pointer; position: relative; overflow: visible; font: inherit; font-weight: 700; font-size: 12.5px; }
.sn-user button.avatar:focus-visible { outline: none; box-shadow: var(--ring); }
.sn-user .avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.sn-user .avatar.crowned { box-shadow: 0 0 0 2px #F5B301; margin-top: 8px; }
.sn-user .av-crown { position: absolute; left: 50%; top: -14px; width: 22px; height: 15px; transform: translateX(-50%) rotate(-8deg); filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); pointer-events: none; }
.sn-user .av-one { position: absolute; left: -5px; bottom: -4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #F5B301; color: #3a2a00; border: 2px solid var(--card-bg); font-size: 10px; font-weight: 800; line-height: 12px; text-align: center; pointer-events: none; }

/* Campeão de vendas do mês (Painel, premio.js) */
.pz-panel .access-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pz-stage { display: flex; align-items: center; justify-content: center; gap: 40px; padding: 18px 8px 8px; flex-wrap: wrap; }
.pz-leaders { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.pz-leader { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pz-face { position: relative; width: 120px; height: 120px; border-radius: 50%; background: var(--navy-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 800; box-shadow: 0 0 0 4px #F5B301, 0 10px 24px rgba(201, 138, 0, .25); margin-top: 26px; }
.pz-face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pz-crown { position: absolute; left: 50%; top: -40px; width: 58px; height: 39px; transform: translateX(-50%) rotate(-8deg); filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.pz-one { position: absolute; left: -4px; bottom: 2px; min-width: 34px; height: 34px; border-radius: 17px; background: #F5B301; color: #3a2a00; border: 3px solid var(--card-bg); font-size: 18px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pz-name { font-size: 17px; color: var(--text); text-align: center; max-width: 180px; }
.pz-empty { max-width: 220px; text-align: center; color: var(--text-muted); font-size: 14px; }
.pz-prize { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; max-width: 260px; }
.pz-prize small { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: 6px; }
.pz-prize b { font-size: 17px; color: var(--navy-dark); }
.pz-prize-img { width: 200px; height: 150px; border-radius: 16px; border: 1px solid var(--border); background: var(--navy-light); color: var(--navy-dark); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pz-prize-img img { width: 100%; height: 100%; object-fit: cover; }
.pz-rules { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: var(--navy-light); font-size: 13.5px; color: var(--text); }
.pz-rules ul { margin: 6px 0 0; padding-left: 18px; }
.pz-rules li + li { margin-top: 3px; }
.pz-form { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.pz-photo-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.pz-photo-pick.dragover .pz-prize-img { outline: 2px dashed var(--navy); }
.pz-fields { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 10px; }
.pz-fields input, .pz-fields textarea { width: 100%; box-sizing: border-box; }
.pz-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 560px) { .pz-stage { gap: 22px; } .pz-face { width: 104px; height: 104px; font-size: 38px; } .pz-prize-img { width: 170px; height: 128px; } }

/* Foto de perfil ao lado dos nomes (fotos.js) */
.face { display: inline-flex !important; margin: 0 2px 0 0 !important; align-items: center; justify-content: center; vertical-align: middle; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--navy-light); color: var(--navy-dark); font-size: 10px; font-weight: 700; font-style: normal; line-height: 1; }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.access-avatar .face { width: 100% !important; height: 100% !important; font-size: 13px !important; background: none; }
/* estatísticas do campeão (só contagens) */
.pz-stats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 320px; }
.pz-stats span { display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-bg); font-size: 11.5px; color: var(--text-muted); line-height: 1.25; text-align: center; }
.pz-stats b { font-size: 20px; color: var(--navy-dark); }

/* Comissões (20/10/2026): Meus resultados + página Comissões (comissao.js) */
.view-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.view-pick .view-lbl { font-weight: 700; color: var(--navy-dark); font-size: 14px; }
.view-pick .access-sub { flex-basis: 100%; margin: 0; }
.pct-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin: 4px 0 12px; border-radius: 12px; background: var(--navy-light); }
.pct-general { font-weight: 700; color: var(--navy-dark); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.pct-hint { font-size: 12.5px; flex-basis: 100%; }
.pct-field { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.pct-field input { width: 72px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg); font: inherit; text-align: right; }
.cm-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 6px; }
.cm-bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.cm-row .pay-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-empty { margin: 8px 0 0; font-size: 13px; }
.cm-note { display: block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.cm-note small { font-weight: 400; color: var(--text-muted); }
.cm-note textarea, .cm-fixform textarea, .cm-answerform textarea { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 13px; background: var(--input-bg); resize: vertical; }
.cm-fixes { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.cm-fix { padding: 8px 12px; border-radius: 10px; background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .25); font-size: 13px; }
.cm-fix.done { background: var(--navy-light); border-color: var(--border); }
.cm-fix p { margin: 4px 0 0; }
.cm-answer { color: var(--navy-dark); }
.cm-fixform { margin-top: 10px; }
.cm-fixbtn { margin-top: 8px; }
.cm-pay-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--navy-light); }
.cm-pay-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.cm-pay-form input { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: var(--card-bg); }
.cm-quick { display: flex; gap: 6px; }

/* ================================================================
   Visual da página de vendas (20/10/2026) — mesmos botões, abas,
   etiquetas, campos e cartões da conheca/. Fica no fim pra valer
   por cima das regras antigas.
   ================================================================ */
html { scrollbar-color: #2a3038 transparent; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { letter-spacing: -.025em; }
header.top h1 { font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
header.top .sub { color: var(--mut); }
.panel h2 { font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; }
.panel, .card, .kpi, .order-card { border-radius: var(--radius); border-color: var(--line); }
.card:hover, .kpi:hover, .order-card:hover { border-color: var(--line2); }
.mono, .eyebrow { font-family: var(--mono); }

/* etiquetas pequenas: letra mono maiúscula com espaçamento (o .eyebrow da página) */
.eyebrow, .ficha-title .eyebrow, .upcoming-title, .fd-day, .stats-table th, .sn-gh, .sn-brand-t small,
.sn-online em, .usage-cols h4, .pz-prize small, .revision-note b, .rc-f > span {
  font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow, .ficha-title .eyebrow { color: var(--blue); }
/* números, datas e códigos pequenos */
.access-count, .meta, .st-d, .pl-d, .pl-v, .fc-v, .fc-m, .chip-dl, .pe-top span,
.timer .clock, .sn-clock > span, .fp-v small, .stats-table small, .fin-sub, .fin-amt span, .rc-sum {
  font-family: var(--mono); letter-spacing: 0;
}
.access-count, .meta { font-size: 11.5px; }
/* selos de situação: fundo escuro com um tom da cor, texto na cor */
.badge, .doc-type, .review-status, .access-pill, .approve-tag, .fp-s, .tag, .r {
  font-family: var(--mono); font-weight: 600; font-size: 11px; letter-spacing: 0;
  border-radius: 7px; border: 1px solid transparent;
}
.badge.pendente, .review-status.pending, .fp-row.parcial .fp-s { border-color: rgba(251, 191, 36, .3); }
.badge.andamento, .review-status.partial, .doc-type.analise, .access-pill.manager, .tag { border-color: rgba(147, 197, 253, .3); }
.badge.concluido, .review-status.approved, .doc-type.contrato, .access-pill.on, .approve-tag.sim, .fp-row.pago .fp-s { border-color: rgba(52, 211, 153, .3); }
.review-status.returned, .approve-tag.nao, .fp-row.late .fp-s { border-color: rgba(248, 113, 113, .35); }
.doc-type.proposta, .doc-type.apresentacao, .access-pill.admin { color: #93c5fd; border-color: rgba(147, 197, 253, .3); }
.doc-type.tecnico, .access-pill.off, .approve-tag.definir, .review-status.generated, .review-status.canceled { border-color: var(--line2); }
.doc-type.video { border-color: rgba(251, 191, 36, .3); }
.chip-dl { border: 1px solid var(--line2); font-size: 11px; }
.chip-dl.ok { border-color: rgba(52, 211, 153, .3); }
.chip-dl.soon { border-color: rgba(251, 191, 36, .3); }
.chip-dl.late { border-color: rgba(248, 113, 113, .35); }
.tab .count { font-family: var(--mono); font-size: 10.5px; }
.tool-badge { font-family: var(--mono); font-weight: 600; }

/* botões: 48 px / raio 12; pequenos 38 px / raio 10; toque encolhe de leve */
.btn { min-height: 48px; padding: 0 22px; border-radius: 12px; font-size: 15px; font-weight: 600; gap: 8px;
  transition: transform .15s, filter .15s, background .15s, border-color .15s, color .15s; }
.btn:hover { transform: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary::after, .auth-btn::after { display: none; }
.btn-ghost { background: rgba(255, 255, 255, .03); color: var(--tx); border: 1px solid var(--line2); box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); border-color: var(--line2); box-shadow: none; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn-danger, .btn-warn { color: var(--red); border-color: rgba(248, 113, 113, .4); }
.btn-danger:hover, .btn-warn:hover { background: var(--danger-bg); border-color: var(--red); }
.tool-link { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; color: var(--tx);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line2); box-shadow: none;
  transition: transform .15s, background .15s, border-color .15s, color .15s; }
.tool-link:hover { transform: none; background: rgba(255, 255, 255, .07); border-color: var(--line2); box-shadow: none; }
.tool-link:active { transform: scale(.98); }
.tool-link.active { background: rgba(34, 197, 94, .12); color: var(--blue); border-color: rgba(34, 197, 94, .4); }
.tool-link:disabled:hover { background: rgba(255, 255, 255, .03); }
.auth-btn { height: 48px; padding: 0 22px; border-radius: 12px; background: var(--grad); font-size: 15px; font-weight: 600; box-shadow: var(--shadow-btn); }
.auth-btn:hover { transform: none; }
.auth-btn:active { transform: scale(.98); }
.pending-card button { min-height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .03); border-color: var(--line2); color: var(--tx); }
.pending-card button:hover { transform: none; background: rgba(255, 255, 255, .07); box-shadow: none; border-color: var(--line2); }
.logout-link:hover { background: rgba(255, 255, 255, .06); }
.review-toggle, .back-link, .auth-switch a, .pending-card a { color: var(--blue); }

/* abas: trilho escuro, aba escolhida um tom acima com contorno (como na página) */
.tabs { gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.tab { min-height: 38px; padding: 0 14px; border-radius: 9px; font-size: 14px; color: var(--mut); }
.tab:hover { color: var(--tx); background: rgba(255, 255, 255, .04); }
.tab:active { transform: scale(.98); }
.tab.active { background: var(--card2); color: var(--tx); box-shadow: 0 0 0 1px var(--line2); }
.tab.active .count { background: rgba(34, 197, 94, .18); color: var(--blue); }
.tab:not(.active) .count { background: rgba(255, 255, 255, .06); color: var(--mut); }

/* campos: fundo um tom abaixo do cartão, borda visível, foco azul */
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="password"],
input[type="tel"], input[type="search"], input[type="month"], input[type="time"], input[type="datetime-local"], textarea, select {
  background-color: var(--input-bg); color: var(--tx); border-color: var(--line2); border-radius: 10px;
}
input[type="text"]:hover, input[type="number"]:hover, input[type="date"]:hover, textarea:hover, select:hover { border-color: rgba(255, 255, 255, .22); }
input:focus, textarea:focus, select:focus { border-color: var(--blue); background-color: var(--input-bg); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: #6b7a90; opacity: 1; }
input:disabled, textarea:disabled, select:disabled {
  color: var(--mut); -webkit-text-fill-color: var(--mut); background-color: rgba(255, 255, 255, .02); border-color: var(--line); cursor: not-allowed; opacity: 1;
}
select option, select optgroup { background: var(--card); color: var(--tx); }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="month"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue2); }
/* autopreenchimento do Chrome/Safari: sem fundo amarelo/branco */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus,
textarea:-webkit-autofill, select:-webkit-autofill {
  -webkit-text-fill-color: var(--tx); caret-color: var(--tx);
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset; box-shadow: 0 0 0 1000px var(--input-bg) inset;
  transition: background-color 9999s ease-out 0s;
}
.file-row { border-color: var(--line2); background: rgba(255, 255, 255, .02); }
.file-row:hover, .file-row.dragover { border-color: var(--blue); background: rgba(34, 197, 94, .08); }

/* listas, tabelas e caixas internas */
.stats-table tfoot td, .stats-table tfoot td:first-child { background: var(--card2); }
.switch span { background: #2a3038; }
.stepper li::before { background: var(--card); }
.stepper li::after { background: #2a3038; }
.fc-col.on .fc-bar i { background: var(--grad); }
.okbar button.ok.on, .okbar button.nok.on, .okbar button.na.on { color: #0e1013; }
.toast { box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); }

/* cabeçalho e menu lateral */
header.top::before { background: rgba(14, 16, 19, 0.8); border-bottom-color: var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.side-nav { background: var(--bg2); border-right-color: var(--line); box-shadow: none; }
.sn-brand-t b { font-weight: 700; letter-spacing: -.01em; }
.sn-brand-t small { color: var(--mut2); font-size: 9.5px; }
.sn-gh { color: var(--mut2); }
.sn-gh:hover { color: var(--tx); }
.sn-link { color: var(--mut); border-radius: 10px; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.sn-link:hover { background: rgba(255, 255, 255, .04); color: var(--tx); }
.sn-link:active { transform: scale(.98); }
.sn-link:hover .sn-ic { color: var(--blue); }
.sn-link.active { background: var(--card2); border-color: var(--line2); color: var(--tx); font-weight: 600; }
.sn-link.active .sn-ic { color: var(--blue); }
.sn-link.active::before { background: var(--blue); }
.sn-clock { background: var(--card); border-color: var(--line); }
.sn-btn { background: rgba(255, 255, 255, .03); border-color: var(--line2); color: var(--tx); border-radius: 10px; }
.sn-btn:hover { background: rgba(255, 255, 255, .07); border-color: var(--line2); }
.sn-btn:active { transform: scale(.98); }
@media (max-width: 900px) {
  body.sn-open .side-nav { box-shadow: 12px 0 40px rgba(0, 0, 0, .6); }
  .sn-close, .sn-burger { background: rgba(255, 255, 255, .03); border-color: var(--line2); color: var(--tx); box-shadow: none; border-radius: 10px; }
}

/* login e telas de espera */
.auth-logo div b { color: var(--tx); font-weight: 700; }
.auth-card h1 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
.auth-card label { color: var(--mut); font-weight: 500; }
.auth-card input { padding: 13px 14px; border-color: var(--line2); border-radius: 12px; font-size: 15px; }
.pending-card h2 { font-weight: 800; letter-spacing: -.02em; }
.spin { border-color: rgba(34, 197, 94, .18); border-top-color: var(--blue); }

@media print {
  :root { color-scheme: light; }
  body { color: #000 !important; }
}
/* logo da plataforma: o mesmo desenho da página de vendas, sem caixa em volta */
.brand .logo, .auth-logo .mark, .sn-logo { background: none; box-shadow: none; }
.doc-type.analise { background: rgba(167, 139, 250, .12); color: #c4b5fd; border-color: rgba(196, 181, 253, .3); }
.st-d, .chip-dl { font-weight: 500; }

/* Marca BoxWise (21/10/2026): ícone "bw" e logo escrito (marca/) */
.bw-mark { width: 100%; height: 100%; border-radius: inherit; display: block; object-fit: cover; }
.sn-logo, .auth-logo .mark, .brand .logo { overflow: hidden; }
.sn-logo { width: 38px; height: 38px; border-radius: 10px; }
.bw-word { display: block; line-height: 0; }
.bw-word img { height: 19px; width: auto; display: block; }
.sn-brand-t .bw-word { margin: 2px 0 5px; }
.auth-logo .bw-word img { height: 22px; }
.auth-logo .bw-word { margin-bottom: 6px; }
