/* SSTfácil — estilos
   Direção: papel quente, verde profundo, números em mono, movimento calmo e preciso. */

/* Fontes Barlow e Barlow Semi Condensed (SIL Open Font License), servidas pelo próprio site */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/barlow-semi-condensed-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/barlow-semi-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/barlow-semi-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  /* Concreto, grafite e verde de sinalização de segurança */
  --bg: #ECEFF2;
  --surface: #FFFFFF;
  --surface-2: #F6F8F9;
  --surface-3: #E6EAEE;
  --line: #DCE2E7;
  --line-2: #C6CED6;
  --ink: #1A2530;
  --ink-2: #3D4A57;
  --muted: #5F6C79;
  --accent: #0A7C58;
  --accent-2: #07674A;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1F2EA;
  --ok-bg: #E1F2EA;    --ok-ink: #075E43;
  --warn-bg: #FFF3D1;  --warn-ink: #7A5200;  --warn: #E0A100;
  --bad-bg: #FBE6E3;   --bad-ink: #A3241B;   --bad: #CF3A2E;
  --neu-bg: #E9EDF0;   --neu-ink: #3D4A57;
  --info: #2C5E95;
  --side: #1A2530; --side-ink: #C9D3DC; --side-muted: #8494A3; --side-line: #2A3743; --side-hover: #22303C;
  --shadow-1: 0 1px 0 rgba(26, 37, 48, .04);
  --shadow-2: 0 12px 32px -14px rgba(26, 37, 48, .28), 0 2px 6px rgba(26, 37, 48, .06);
  --shadow-3: 0 30px 70px -24px rgba(26, 37, 48, .45);
  --r-sm: 6px; --r: 8px; --r-lg: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --font: 'Barlow', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Barlow Semi Condensed', 'Barlow', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Barlow Semi Condensed', 'Barlow', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Barlow Semi Condensed', 'Barlow', ui-sans-serif, system-ui, sans-serif;
  --top-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-tema]) {
    --bg: #0F151A; --surface: #161E25; --surface-2: #1A232B; --surface-3: #212C35;
    --line: #26323C; --line-2: #34424E;
    --ink: #E6ECF1; --ink-2: #B5C1CB; --muted: #8E9BA7;
    --accent: #34C48E; --accent-2: #5AD3A5; --accent-ink: #062218; --accent-soft: #143528;
    --ok-bg: #143528; --ok-ink: #7FDBB5;
    --warn-bg: #352A0C; --warn-ink: #F3C55A; --warn: #E8B23A;
    --bad-bg: #3A1915; --bad-ink: #FF9E92; --bad: #EE6B5E;
    --neu-bg: #212C35; --neu-ink: #C3CDD6;
    --info: #86B3E3;
    --side: #0B1014; --side-ink: #C3CDD6; --side-muted: #7B8995; --side-line: #1C252D; --side-hover: #151D24;
    --shadow-1: 0 1px 0 rgba(0, 0, 0, .3);
    --shadow-2: 0 12px 30px -12px rgba(0, 0, 0, .6);
    --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
    --bg: #0F151A; --surface: #161E25; --surface-2: #1A232B; --surface-3: #212C35;
    --line: #26323C; --line-2: #34424E;
    --ink: #E6ECF1; --ink-2: #B5C1CB; --muted: #8E9BA7;
    --accent: #34C48E; --accent-2: #5AD3A5; --accent-ink: #062218; --accent-soft: #143528;
    --ok-bg: #143528; --ok-ink: #7FDBB5;
    --warn-bg: #352A0C; --warn-ink: #F3C55A; --warn: #E8B23A;
    --bad-bg: #3A1915; --bad-ink: #FF9E92; --bad: #EE6B5E;
    --neu-bg: #212C35; --neu-ink: #C3CDD6;
    --info: #86B3E3;
    --side: #0B1014; --side-ink: #C3CDD6; --side-muted: #7B8995; --side-line: #1C252D; --side-hover: #151D24;
    --shadow-1: 0 1px 0 rgba(0, 0, 0, .3);
    --shadow-2: 0 12px 30px -12px rgba(0, 0, 0, .6);
    --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 500 15px/1.5 var(--font); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; display: block; margin-inline: auto; }
.block { display: block; }
.mono, .num { font-family: var(--mono); font-feature-settings: 'tnum'; letter-spacing: -0.02em; }
.grow { flex: 1; min-width: 0; }
.row-gap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-gap.end { justify-content: flex-end; }

/* ---------- Ícones e logo ---------- */
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.logo { width: 30px; height: 30px; flex: none; }
.logo-bg { fill: var(--accent); }
.logo-cross { stroke: var(--accent-ink); stroke-width: 3.2; stroke-linecap: round; fill: none; }

/* ---------- Botões ---------- */
.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 16px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 700; font-size: 14.5px; white-space: nowrap; position: relative;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease), color .2s;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn.lg { --h: 48px; font-size: 15px; }
.btn.sm { --h: 36px; padding: 0 12px; font-size: 13.5px; }
.btn.block { width: 100%; display: flex; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 16px -8px var(--accent); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-soft { background: var(--accent-soft); color: var(--ok-ink); }
.btn-soft:hover { filter: brightness(.97); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--bad-ink); border-color: transparent; }
.btn-danger-ghost:hover { background: var(--bad-bg); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.loading { color: transparent !important; }
.btn.loading::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2.2px solid currentColor; border-color: var(--accent-ink) var(--accent-ink) transparent transparent;
  animation: spin .7s linear infinite;
}
.btn-ghost.loading::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-icon {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 0; background: transparent; color: var(--ink-2); transition: background .2s, color .2s;
}
.btn-icon.sm { width: 34px; height: 34px; }
.btn-icon:hover { background: var(--surface-3); color: var(--ink); }
.btn-link { background: none; border: 0; padding: 6px 2px; color: var(--accent); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; min-height: 36px; }
.btn-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn-link.danger { color: var(--bad-ink); }

/* ---------- Campos ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field .opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  min-height: 46px; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); width: 100%;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; }
.field input:hover, .field select:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.field.invalid input, .field.invalid select, .field.invalid .sig { border-color: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 14%, transparent); animation: shake .35s var(--ease); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.hint { color: var(--muted); font-size: 12.5px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-erro { color: var(--bad-ink); background: var(--bad-bg); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: 14px; }
.form-ok { color: var(--ok-ink); background: var(--ok-bg); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: 14px; }
.file-drop {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px;
  border: 1.5px dashed var(--line-2); border-radius: 12px; cursor: pointer; color: var(--ink-2); font-weight: 600;
  transition: border-color .2s, background .2s;
}
.file-drop:hover, .file-drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.file-drop.has-file { border-style: solid; border-color: var(--accent); color: var(--ok-ink); background: var(--accent-soft); }

/* ---------- Splash ---------- */
.splash { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 16px; color: var(--muted); font-weight: 700; }
.splash .logo { width: 48px; height: 48px; animation: pulse 1.4s var(--ease) infinite; }
.dots::after { content: '…'; display: inline-block; width: 1em; animation: dots 1.2s steps(4) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .7; } }
@keyframes dots { from { width: 0; } to { width: 1em; } }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); animation: fadeUp .6s var(--ease-out) both; }
.leaving { animation: fadeOut .22s var(--ease) both !important; }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-6px) scale(.995); } }
.auth-art {
  position: relative; overflow: hidden; padding: 40px clamp(28px, 5vw, 64px);
  display: flex; flex-direction: column; gap: 32px;
  background:
    radial-gradient(1200px 600px at 110% -10%, color-mix(in srgb, #9FD9BC 26%, transparent), transparent 60%),
    radial-gradient(800px 500px at -20% 120%, color-mix(in srgb, #0B3B2A 70%, transparent), transparent 60%),
    #123E2E;
  color: #EAF3EE;
}
.auth-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 70% 40%, #000 0, transparent 70%);
}
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; position: relative; z-index: 1; }
.auth-art .logo-bg { fill: #EAF3EE; }
.auth-art .logo-cross { stroke: #123E2E; }
.auth-copy { position: relative; z-index: 1; max-width: 560px; margin-top: auto; }
.auth-copy h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -0.01em; }
.auth-copy h1 em { color: #9FD9BC; }
.auth-copy p { margin-top: 16px; font-size: 17px; color: #C2D7CB; max-width: 440px; }
.auth-float { position: relative; z-index: 1; height: 190px; }
.float-card {
  position: absolute; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px;
  background: rgba(255,255,255,.96); color: #16201B; box-shadow: 0 24px 50px -20px rgba(0,0,0,.55);
  animation: floaty 7s ease-in-out infinite;
}
.float-card small { color: #606B64; font-size: 12.5px; }
.fc-1 { left: 0; top: 10px; width: 230px; }
.fc-2 { left: 250px; top: 0; width: 150px; animation-delay: -2s; }
.fc-num { font-family: var(--mono); font-size: 30px; font-weight: 600; color: #1F6B4F; line-height: 1; }
.fc-bar { height: 6px; border-radius: 6px; background: #E2EEE7; overflow: hidden; margin-top: 6px; }
.fc-bar i { display: block; height: 100%; width: 96%; background: #1F6B4F; border-radius: inherit; transform-origin: left; animation: grow 1.6s .4s var(--ease-out) both; }
.fc-3 { left: 120px; top: 108px; flex-direction: row; align-items: center; gap: 12px; width: 280px; animation-delay: -4s; }
.fc-3 .ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: #E2EEE7; color: #1F6B4F; }
.fc-3 div { display: flex; flex-direction: column; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes grow { from { transform: scaleX(0); } }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; position: relative; z-index: 1; color: #D5E5DC; font-weight: 600; }
.auth-points li { display: flex; gap: 10px; align-items: center; }
.auth-points .ic { color: #9FD9BC; }
.auth-panel { display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 410px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h2 { font-size: 30px; font-weight: 800; margin-top: 12px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- Onboarding ---------- */
.onboard { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.onboard-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 12px; animation: fadeUp .6s var(--ease-out) both; }
.onboard-card h1 { font-size: 30px; font-weight: 800; }
.onboard-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.auth-brand.dark { color: var(--ink); margin-bottom: 12px; }

/* ---------- Estrutura do app ---------- */
.app { min-height: 100vh; }
.app.ready { animation: fadeUp .55s var(--ease-out) both; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; height: var(--top-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.tabs { position: relative; display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 13px; }
.tab {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 14.5px;
  transition: color .3s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"] .ic { color: var(--accent); }
.tab-ind {
  position: absolute; top: 4px; left: 0; height: calc(100% - 8px); width: var(--w, 0); transform: translateX(var(--x, 0));
  background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-1), 0 0 0 1px var(--line);
  transition: transform .45s var(--ease-out), width .45s var(--ease-out);
  view-transition-name: tab-ind;
}
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.emp-name { font-weight: 700; color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.emp-select { min-height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 10px; font-weight: 700; max-width: 240px; }
.user { position: relative; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 13px; transition: transform .2s var(--ease); }
.avatar-btn:hover { transform: scale(1.05); }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 260px; padding: 6px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); z-index: 40;
  transform-origin: top right; animation: pop .22s var(--ease-out);
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.menu-head { padding: 10px 12px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head small { color: var(--muted); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; text-align: left; }
.menu-item:hover { background: var(--surface-3); }
.demo-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px;
  background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; text-align: center;
}
.main { max-width: 1320px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 32px) 64px; view-transition-name: page; outline: none; }
.view { display: flex; flex-direction: column; gap: 22px; }

/* ---------- Transições entre abas (View Transitions API) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(tab-ind) { animation-duration: .45s; animation-timing-function: var(--ease-out); }
::view-transition-old(page) { animation: .28s var(--ease) both pageOutFwd; }
::view-transition-new(page) { animation: .5s var(--ease-out) both pageInFwd; }
html[data-dir="back"]::view-transition-old(page) { animation-name: pageOutBack; }
html[data-dir="back"]::view-transition-new(page) { animation-name: pageInBack; }
@keyframes pageOutFwd { to { opacity: 0; transform: translateX(-28px); filter: blur(2px); } }
@keyframes pageInFwd { from { opacity: 0; transform: translateX(40px); filter: blur(2px); } }
@keyframes pageOutBack { to { opacity: 0; transform: translateX(28px); filter: blur(2px); } }
@keyframes pageInBack { from { opacity: 0; transform: translateX(-40px); filter: blur(2px); } }

/* Entrada escalonada dos blocos quando a aba abre */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.view.anim > * { animation: fadeUp .55s var(--ease-out) both; }
.view.anim > :nth-child(2) { animation-delay: 50ms; }
.view.anim > :nth-child(3) { animation-delay: 100ms; }
.view.anim > :nth-child(4) { animation-delay: 150ms; }
.view.anim > :nth-child(n+5) { animation-delay: 200ms; }
.view.anim .stagger > * { animation: fadeUp .6s var(--ease-out) both; }
.view.anim .stagger > :nth-child(1) { animation-delay: 60ms; }
.view.anim .stagger > :nth-child(2) { animation-delay: 110ms; }
.view.anim .stagger > :nth-child(3) { animation-delay: 160ms; }
.view.anim .stagger > :nth-child(4) { animation-delay: 210ms; }
.view.anim .stagger > :nth-child(5) { animation-delay: 260ms; }
.view.anim .stagger > :nth-child(n+6) { animation-delay: 310ms; }
.view.anim .stagger-rows > * { animation: rowIn .5s var(--ease-out) both; animation-delay: calc(180ms + var(--i, 0) * 28ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Cabeçalho da aba ---------- */
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.view-head h1 { font-size: clamp(30px, 3.4vw, 40px); font-weight: 800; margin: 6px 0 6px; }
.lead { color: var(--ink-2); font-size: 16px; }
.lead strong { color: var(--ink); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi {
  --kc: var(--ink-2);
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; text-align: left;
  padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
button.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--kc); opacity: .9; transform: scaleX(.0); transform-origin: left; transition: transform .45s var(--ease-out); }
.kpi.active::before, .kpi-static::before { transform: scaleX(1); }
.kpi.active { border-color: var(--kc); }
.kpi-vencido { --kc: var(--bad); }
.kpi-vencendo { --kc: var(--warn); }
.kpi-sem { --kc: var(--info); }
.kpi-ok { --kc: var(--accent); }
.kpi-static:not(.kpi-vencido):not(.kpi-vencendo):not(.kpi-ok) { --kc: var(--line-2); }
.kpi-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.kpi-top .ic { color: var(--kc); }
.kpi-val { font-family: var(--mono); font-size: 34px; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.kpi-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ---------- Controle segmentado ---------- */
.seg { position: relative; display: inline-flex; gap: 2px; padding: 4px; background: var(--surface-3); border-radius: 12px; align-self: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: color .3s; }
.seg-btn.on { color: var(--ink); }
.seg-ind { position: absolute; top: 4px; left: 0; height: calc(100% - 8px); width: var(--w, 0); transform: translateX(var(--x, 0)); background: var(--surface); border-radius: 9px; box-shadow: var(--shadow-1), 0 0 0 1px var(--line); transition: transform .42s var(--ease-out), width .42s var(--ease-out); }
.seg-sm .seg-btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
.count { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 800; }
.auth-seg { align-self: stretch; display: flex; }
.auth-seg .seg-btn { flex: 1; justify-content: center; }

/* ---------- Cartões ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-1); min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head.pad { padding: 18px 20px 0; margin-bottom: 10px; }
.card-head h2 { font-size: 18px; font-weight: 800; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.two-col.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }

/* ---------- Toolbar, busca e chips ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search { flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.search input { flex: 1; border: 0; background: transparent; outline: none; min-height: 40px; color: var(--ink); min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 13px; color: var(--ink-2); transition: all .2s var(--ease); }
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table.mini { min-width: 0; margin-top: 8px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14.5px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr[data-act] { cursor: pointer; transition: background .18s; }
.table tbody tr[data-act]:hover { background: var(--surface-2); }
.table tbody tr[data-act]:hover .go { color: var(--accent); transform: translateX(3px); }
.table tbody tr:focus-visible { outline-offset: -3px; }
.table small { color: var(--muted); font-size: 12.5px; }
.table small.block { display: block; }
.go { width: 40px; color: var(--line-2); transition: color .2s, transform .25s var(--ease); }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.person small { color: var(--muted); font-size: 12.5px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--ok-ink); font-weight: 800; font-size: 12.5px; letter-spacing: .02em; }

/* ---------- Selos de status (sempre com texto) ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-ok { background: var(--ok-bg); color: var(--ok-ink); }
.b-vencendo { background: var(--warn-bg); color: var(--warn-ink); }
.b-vencido { background: var(--bad-bg); color: var(--bad-ink); }
.b-sem { background: color-mix(in srgb, var(--info) 14%, var(--surface)); color: var(--info); }
.b-neutral { background: var(--neu-bg); color: var(--neu-ink); }
.b-neutral::before { display: none; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 20px; color: var(--muted); text-align: center; font-weight: 600; grid-column: 1 / -1; }
.empty .ic { width: 28px; height: 28px; color: var(--accent); }

/* ---------- Matriz do PCMSO ---------- */
.matriz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.func-card, .epi-card { display: flex; flex-direction: column; gap: 14px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.func-card:hover, .epi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.func-card header, .epi-card header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.func-card h3, .epi-card h3 { font-size: 17px; font-weight: 800; }
.func-card header p, .epi-card header p { font-size: 13.5px; margin-top: 3px; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 4px 10px; border-radius: 8px; background: var(--surface-3); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.func-foot { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.func-foot .ic { color: var(--accent); }

/* ---------- EPIs ---------- */
.stock { display: flex; flex-direction: column; gap: 10px; }
.stock-num { display: flex; align-items: baseline; gap: 8px; }
.stock-num strong { font-family: var(--mono); font-size: 32px; font-weight: 600; line-height: 1; }
.stock-num span { color: var(--muted); font-size: 13px; font-weight: 600; }
.meter { position: relative; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: visible; }
.meter span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--accent); transform-origin: left; }
.view.anim .meter span { animation: grow .9s .25s var(--ease-out) both; }
.meter-low span { background: var(--warn); }
.meter i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); border-radius: 2px; }
.epi-card footer { margin-top: auto; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list li .person { flex: 1 1 240px; }
.list.compact li { gap: 12px; padding: 12px 18px; flex-wrap: nowrap; }
.list.compact li > span.grow { display: flex; flex-direction: column; }
.list.compact small { color: var(--muted); font-size: 12.5px; }
.sig-thumb { width: 96px; height: 32px; display: block; }
.sig-thumb path, .sig-big path { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.sig-big { width: 100%; height: 160px; }
.sig-view { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); padding: 12px; }
.sig { --ink: var(--ink); position: relative; height: 170px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: var(--surface-2); touch-action: none; transition: border-color .2s; }
.sig canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.sig-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; pointer-events: none; transition: opacity .2s; }
.sig.filled .sig-hint { opacity: 0; }
.sig.filled { border-style: solid; border-color: var(--accent); }
.sig::after { content: ''; position: absolute; left: 20px; right: 20px; bottom: 36px; border-bottom: 1px solid var(--line-2); pointer-events: none; }
.sig-clear { position: absolute; right: 8px; top: 4px; z-index: 2; }
.declaracao { font-size: 13px; color: var(--ink-2); background: var(--surface-3); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }

/* ---------- Painel de RH ---------- */
.ind-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ind-card { display: flex; flex-direction: column; gap: 14px; }
.ind-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-2); font-size: 14px; }
.ind-main { display: flex; align-items: center; gap: 16px; }
.ind-val { font-family: var(--mono); font-size: 30px; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.ind-val.big { font-size: 52px; }
.ind-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: auto; }
.ind-hero { background: linear-gradient(160deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, #000) 100%); color: var(--accent-ink); border-color: transparent; }
.ind-hero header, .ind-hero .muted { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--accent-ink) 22%, transparent); }
.hero-split div { display: flex; flex-direction: column; }
.hero-split strong { font-family: var(--mono); font-size: 22px; font-weight: 600; }
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 6; }
.ring-fg { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dashoffset: var(--off); transition: stroke-dashoffset .9s var(--ease-out); }
.view.anim .ring-fg { animation: ringIn 1.1s .2s var(--ease-out) both; }
@keyframes ringIn { from { stroke-dashoffset: var(--full); } }
.ring-ok .ring-fg { stroke: var(--accent); }
.ring-vencido .ring-fg { stroke: var(--bad); }
.ring-neutral .ring-fg { stroke: var(--line-2); }
.spark { flex: none; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark circle { fill: var(--accent); }
.draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.view.anim .draw { animation: draw 1.2s .25s var(--ease-out) both; }
@keyframes draw { from { stroke-dashoffset: 1; } }

.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .tick line { stroke: var(--line); stroke-width: 1; }
.chart .tick text, .chart .xlab { fill: var(--muted); font: 600 11.5px var(--font); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; transition: r .2s var(--ease); }
.chart .dot.last, .chart .dot.on { fill: var(--accent); }
.chart .dot.on { r: 6; }
.chart .last-lab { fill: var(--ink); font: 700 13px var(--mono); }
.chart.hovering .last-lab { opacity: 0; }
.chart .meta-line line { stroke: var(--ink-2); stroke-width: 1.4; stroke-dasharray: 5 5; }
.chart .meta-line text { fill: var(--ink-2); font: 700 11.5px var(--font); }
.chart .cross { stroke: var(--line-2); stroke-width: 1; opacity: 0; transition: opacity .15s; }
.chart.hovering .cross { opacity: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.view.anim .chart .area { animation: fadeIn .9s .5s var(--ease) both; }
.view.anim .chart .dot { animation: fadeIn .4s 1s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } }
.tip { position: absolute; left: 0; top: 0; pointer-events: none; padding: 8px 11px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 12.5px; display: flex; flex-direction: column; box-shadow: var(--shadow-2); white-space: nowrap; transition: transform .12s var(--ease); z-index: 3; }
.tip strong { font-family: var(--mono); font-size: 15px; }
.table-toggle { margin-top: 10px; font-size: 13.5px; }
.table-toggle summary { cursor: pointer; color: var(--accent); font-weight: 700; min-height: 32px; display: inline-flex; align-items: center; }

.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.bars li { display: grid; grid-template-columns: minmax(90px, 130px) 1fr 34px; gap: 12px; align-items: center; }
.bar-lab { font-size: 13.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 14px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 0 4px 4px 0; transform-origin: left; }
.view.anim .bar-fill { animation: grow .9s var(--ease-out) both; animation-delay: calc(250ms + var(--d, 0ms)); }
.bar-val { font-family: var(--mono); font-weight: 600; text-align: right; }
.oc-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.oc-falta { background: var(--muted); }
.oc-atestado { background: var(--warn); }
.oc-acidente { background: var(--bad); transform: rotate(45deg); }

/* ---------- Camadas: gaveta e modal ---------- */
.layer { position: fixed; inset: 0; z-index: 60; }
.scrim { position: absolute; inset: 0; background: rgba(12, 18, 15, .42); backdrop-filter: blur(3px); opacity: 0; transition: opacity .35s var(--ease); }
.layer.open .scrim { opacity: 1; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface);
  display: flex; flex-direction: column; box-shadow: var(--shadow-3); outline: none;
  transform: translateX(104%); transition: transform .48s var(--ease-out);
}
.layer.open .drawer { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 22px; font-weight: 800; }
.drawer-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 28px; display: flex; flex-direction: column; gap: 12px; }
.drawer-body > * { animation: fadeUp .5s var(--ease-out) both; animation-delay: .12s; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.status-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.status-banner.b-ok { background: var(--ok-bg); }
.status-banner.b-vencendo { background: var(--warn-bg); }
.status-banner.b-vencido { background: var(--bad-bg); }
.status-banner.b-sem { background: color-mix(in srgb, var(--info) 12%, var(--surface)); }
.status-banner .badge { background: var(--surface); }
h3.sub { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; margin-top: 12px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: flex; gap: 14px; padding: 6px 0 14px; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); flex: none; margin-top: 4px; z-index: 1; }
.timeline li:not(:first-child) .tl-dot { border-color: var(--line-2); }
.tl-body { flex: 1; display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.tl-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.tl-actions { display: flex; gap: 12px; margin-top: 2px; }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.dl div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.dl dt { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.dl dd { margin: 2px 0 0; font-weight: 700; }

.layer-modal { display: grid; place-items: center; padding: 16px; }
.modal {
  position: relative; width: min(600px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-3); outline: none; overflow: hidden;
  opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .3s var(--ease), transform .45s var(--ease-out);
}
.layer.open .modal { opacity: 1; transform: none; }
.modal-form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; padding: 22px 22px 6px; }
.modal-head h2 { font-size: 22px; font-weight: 800; }
.modal-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.modal-body { padding: 14px 22px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-form .full { grid-column: 1 / -1; }
.calc:empty { display: none; }
.calc { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ok-ink); font-size: 14px; animation: fadeUp .35s var(--ease-out); }
.calc > span, .calc { line-height: 1.4; }
.calc .ic { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.modal-confirm { padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.modal-confirm h2 { font-size: 20px; font-weight: 800; }
.modal-confirm p { color: var(--muted); margin-bottom: 12px; }
.confirm-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bad-bg); color: var(--bad-ink); margin-bottom: 6px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; box-shadow: var(--shadow-3); opacity: 0; transform: translateY(16px) scale(.96); transition: opacity .3s var(--ease), transform .45s var(--ease-out); }
.toast.in { opacity: 1; transform: none; }
.toast-ok .ic { color: #8EDCB7; }
.toast-erro { background: var(--bad); color: #fff; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .two-col.wide-left { grid-template-columns: minmax(0, 1fr); }
  .emp-name { display: none; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-mobile-brand { display: flex; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --top-h: 58px; }
  /* backdrop-filter criaria um bloco de contenção e prenderia a barra de abas fixa */
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .topbar-in { gap: 12px; }
  .tabs {
    position: fixed; z-index: 35; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line); box-shadow: var(--shadow-3); border-radius: 18px; padding: 6px;
  }
  .tab { flex: 1; flex-direction: column; gap: 2px; min-height: 52px; padding: 0 6px; font-size: 11.5px; justify-content: center; }
  .tab .ic { width: 20px; height: 20px; }
  .tab-ind { top: 6px; height: calc(100% - 12px); background: var(--accent-soft); box-shadow: none; }
  .tab[aria-selected="true"] { color: var(--ok-ink); }
  .main { padding-bottom: 120px; padding-top: 20px; }
  .view-head > .row-gap, .view-head > .btn { width: 100%; }
  .view-head > .row-gap .btn { flex: 1; }
  .view-head > .btn { justify-content: center; }
  .ind-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-val { font-size: 28px; }
  .grid-form { grid-template-columns: 1fr; }
  .layer-modal { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: 22px 22px 0 0; max-height: 92vh; transform: translateY(40px); }
  .modal-foot { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .modal-foot > .row-gap { width: 100%; }
  .modal-foot > .row-gap .btn { flex: 1; }
  .toasts { bottom: 96px; }
  .list.compact li { flex-wrap: wrap; }
  .dl { grid-template-columns: 1fr; }
  .bars li { grid-template-columns: minmax(80px, 110px) 1fr 30px; }
  .hide-m { display: none; }
  .table { min-width: 0; }
  .table th, .table td { padding: 12px 10px; }
  .table th:first-child, .table td:first-child { padding-left: 16px; }
  .go { width: 28px; }
  .demo-bar { font-size: 12.5px; padding: 6px 12px; gap: 4px 8px; }
  .demo-bar .ic { display: none; }
  .demo-bar .btn-link { min-height: 28px; padding: 0; }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .toolbar .chip { flex: none; }
  .toolbar .chips { flex: 1 1 100%; }
}
@media (max-width: 420px) {
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .search { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important;
  }
}
@media (forced-colors: active) {
  .badge, .kpi, .card { border: 1px solid CanvasText; }
}

/* ======================================================================
   Novas abas: PCMSO, Treinamentos, NRs e certificados
   ====================================================================== */
.t-short { display: none; }
@media (max-width: 1780px) {
  .tab { padding: 0 11px; }
  .tab .t-long { display: none; }
  .tab .t-short { display: inline; }
  .emp-name { display: none; }
}
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 20px; font-weight: 800; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.btn-ghost[for] { cursor: pointer; }

/* PCMSO */
.doc-card { display: flex; flex-direction: column; gap: 16px; }
.doc-file { display: flex; gap: 18px; align-items: flex-start; }
.doc-ic { width: 64px; height: 76px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; position: relative; }
.doc-ic .ic { width: 32px; height: 32px; }
.doc-ic::after { content: 'PDF'; position: absolute; bottom: 6px; font: 800 10px var(--font); letter-spacing: .08em; color: var(--ok-ink); }
.doc-meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.doc-meta h2 { font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }
.doc-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 0; }
.doc-dl dt { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.doc-dl dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.vig { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vig-bar { flex: 1 1 200px; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.vig-bar span { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: inherit; transform-origin: left; }
.vig-bar .vig-vencendo { background: var(--warn); }
.vig-bar .vig-vencido { background: var(--bad); }
.view.anim .vig-bar span { animation: grow 1s .3s var(--ease-out) both; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 44px 24px;
  border: 2px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.dropzone:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.dropzone strong { font-size: 19px; }
.dropzone .muted { max-width: 520px; }
.dz-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.dz-ic .ic { width: 28px; height: 28px; }
.leitura { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--ok-ink); animation: fadeUp .35s var(--ease-out); }
.leitura p { margin-top: 4px; }
.leitura-warn { background: var(--warn-bg); color: var(--warn-ink); }
.leitura-load { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.field.auto input, .field.auto textarea, .field.auto select { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.table.rev { min-width: 620px; }
.table.rev td { vertical-align: top; padding: 10px; }
.table.rev input[type=checkbox] { width: 20px; height: 20px; margin-top: 10px; accent-color: var(--accent); }
.cell { width: 100%; min-height: 40px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.cell:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.num-cell { width: 76px; }
small.novo { color: var(--accent); font-weight: 700; }
.modal.modal-lg { width: min(880px, 100%); }

/* Seleção de participantes */
.pick { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--surface); }
.pick-tools { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pick-tools .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pick-tools .chip { flex: none; min-height: 32px; font-size: 12.5px; }
.search.sm { max-width: none; min-height: 40px; }
.pick-list { list-style: none; margin: 0; padding: 6px; max-height: 260px; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.pick-item { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.pick-item:hover { background: var(--surface-3); }
.pick-item input { width: 19px; height: 19px; accent-color: var(--accent); flex: none; }
.pick-item:has(input:checked) { background: var(--accent-soft); }
.pick-txt { display: flex; flex-direction: column; min-width: 0; }
.pick-txt strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-count { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); background: var(--surface-2); }

/* Calendário */
.cal-card { display: flex; flex-direction: column; gap: 14px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-head h2 { font-size: 22px; font-weight: 800; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); gap: 1px; }
.cal-wd { background: var(--surface-2); text-align: center; padding: 8px 4px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.cal-cell { background: var(--surface); min-height: 104px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; }
.cal-cell.fora { background: var(--surface-2); }
.cal-cell.fora .cal-day { opacity: .45; }
.cal-day { display: flex; }
.cal-add { position: relative; display: inline-flex; align-items: center; gap: 4px; min-width: 32px; height: 28px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font: 700 13px var(--mono); color: var(--ink-2); }
.cal-add span { display: inline-flex; opacity: 0; transition: opacity .15s; }
.cal-add .ic { width: 14px; height: 14px; }
.cal-cell:hover .cal-add span, .cal-add:focus-visible span { opacity: 1; }
.cal-add:hover { background: var(--surface-3); color: var(--accent); }
.cal-cell.hoje .cal-add, .cal-cell.hoje .cal-day > span { background: var(--accent); color: var(--accent-ink); }
.cal-day > span { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; font: 700 13px var(--mono); color: var(--ink-2); }
.cal-ev {
  display: block; width: 100%; text-align: left; border: 0; border-radius: 7px; padding: 4px 7px; font-size: 12px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: transform .15s var(--ease), filter .15s;
}
.cal-ev b { font-family: var(--mono); font-weight: 600; opacity: .8; }
.cal-ev:hover { transform: translateY(-1px); filter: brightness(.97); }
.ev-agendado { background: color-mix(in srgb, var(--info) 15%, var(--surface)); color: var(--info); }
.ev-concluido { background: var(--ok-bg); color: var(--ok-ink); }
.ev-cancelado { background: var(--neu-bg); color: var(--muted); text-decoration: line-through; }
.cal-more { font-size: 11.5px; font-weight: 700; color: var(--muted); padding-left: 6px; }
.cal-dots { display: none; }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg-agendado { background: var(--info); }
.lg-concluido { background: var(--accent); }
.lg-cancelado { background: var(--line-2); }
.view.anim .cal-ev { animation: fadeUp .45s var(--ease-out) both; animation-delay: .3s; }
.agenda li { cursor: pointer; transition: background .15s; }
.agenda li:hover { background: var(--surface-2); }
.date-chip { width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 5px 0; border-radius: 10px; background: var(--accent-soft); color: var(--ok-ink); line-height: 1.1; }
.date-chip strong { font: 600 18px var(--mono); }
.date-chip small { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.date-chip.late { background: var(--warn-bg); color: var(--warn-ink); }
.part-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.part-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.part-list li:last-child { border-bottom: 0; }
.pres { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-3); }
.pres-btn { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-weight: 700; font-size: 13px; color: var(--ink-2); transition: background .2s, color .2s; }
.pres-btn.on.ok { background: var(--accent); color: var(--accent-ink); }
.pres-btn.on.bad { background: var(--bad); color: #fff; }
.foot-actions { justify-content: flex-start; }
.drawer-foot .foot-actions .btn-primary { flex: 1 1 200px; }

/* NRs */
.nr-tools { display: flex; flex-direction: column; gap: 12px; }
.search.lg { max-width: 640px; min-height: 50px; background: var(--surface); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll .chip { flex: none; }
.nr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.nr-card {
  display: flex; gap: 16px; align-items: flex-start; text-align: left; padding: 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.nr-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.nr-num { flex: none; width: 64px; height: 64px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--ink); color: var(--bg); font: 600 26px/1 var(--mono); letter-spacing: -0.04em; }
.nr-num small { font: 800 10px var(--font); letter-spacing: .14em; opacity: .7; margin-bottom: 2px; }
.nr-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nr-body strong { font-size: 15.5px; line-height: 1.3; }
.nr-resumo { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nr-card.revogada { opacity: .7; }
.nr-card.revogada .nr-num { background: var(--surface-3); color: var(--muted); }
.disclaimer { max-width: 760px; }
.nr-lead { font-size: 16px; line-height: 1.55; }
.nr-pontos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nr-pontos li { display: flex; gap: 10px; align-items: flex-start; }
.nr-pontos .ic { color: var(--accent); margin-top: 2px; }
.nr-treino { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }

/* Certificados */
.modal.modal-cert { width: min(1220px, 100%); height: calc(100vh - 32px); max-height: none; }
.cert-modal { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.cert-modal .modal-head { border-bottom: 1px solid var(--line); padding-bottom: 14px; flex-wrap: wrap; }
.cert-scroll { flex: 1; overflow: auto; padding: 24px; background: var(--surface-3); display: flex; flex-direction: column; align-items: center; gap: 24px; }
.cert-scroll .cert { zoom: var(--z, .8); box-shadow: 0 20px 50px -20px rgba(0,0,0,.4); flex: none; }
.cert {
  width: 1123px; height: 794px; background: #FFFFFF; color: #16201B; padding: 34px; box-sizing: border-box;
  font-family: var(--font); position: relative;
}
.cert-frame {
  height: 100%; border: 2px solid #1F6B4F; outline: 1px solid #1F6B4F; outline-offset: -10px; border-radius: 6px;
  padding: 40px 56px 26px; display: flex; flex-direction: column; gap: 18px; box-sizing: border-box;
  background: radial-gradient(900px 400px at 50% 0%, #EEF5F1 0%, transparent 70%);
}
.cert-top { display: flex; justify-content: space-between; align-items: center; }
.cert-brand { display: flex; align-items: center; gap: 12px; }
.cert-brand .logo { width: 38px; height: 38px; }
.cert-brand .logo-bg { fill: #1F6B4F; }
.cert-brand .logo-cross { stroke: #FFFFFF; }
.cert-brand div { display: flex; flex-direction: column; }
.cert-brand strong { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.cert-brand small { font-size: 12.5px; color: #55605A; }
.cert-nr { font: 600 15px var(--mono); padding: 6px 14px; border-radius: 99px; background: #16201B; color: #FFFFFF; }
.cert-main { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 6px; }
.cert-kicker { font-size: 13px; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; color: #1F6B4F; }
.cert-name { font-family: var(--serif); font-weight: 400; font-size: 60px; line-height: 1.05; letter-spacing: -0.01em; margin: 4px 0 2px; }
.cert-text { font-size: 17px; line-height: 1.6; max-width: 820px; color: #2B3530; }
.cert-data { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 4px 0 0; border-top: 1px solid #D5DDD8; border-bottom: 1px solid #D5DDD8; }
.cert-data div { padding: 10px 14px; border-right: 1px solid #D5DDD8; }
.cert-data div:last-child { border-right: 0; }
.cert-data dt { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6A746E; }
.cert-data dd { margin: 3px 0 0; font-weight: 700; font-size: 14.5px; }
.cert-prog { font-size: 11px; line-height: 1.5; color: #3B4640; }
.cert-prog strong { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #6A746E; }
.cert-prog p { margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cert-signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: auto; }
.cert-signs div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.cert-signs .line { width: 100%; height: 1px; background: #16201B; margin-bottom: 8px; }
.cert-signs strong { font-size: 13.5px; }
.cert-signs small { font-size: 11.5px; color: #6A746E; }
.cert-foot { display: flex; justify-content: space-between; font: 600 10.5px var(--mono); color: #7A847E; letter-spacing: .02em; }

#print-area { display: none; }
@media print {
  body.printing { background: #FFFFFF; }
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 900px) {
  .doc-dl { grid-template-columns: 1fr 1fr; }
  .kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tab { padding: 0 2px; font-size: 10.5px; min-width: 0; }
  .tab .ic { width: 19px; height: 19px; }
  .doc-file { flex-direction: column; }
  .doc-dl { grid-template-columns: 1fr; }
  .kpis-3 { grid-template-columns: minmax(0, 1fr); }
  .pick-list { grid-template-columns: minmax(0, 1fr); max-height: 300px; }
  .cal-cell { min-height: 56px; padding: 3px; align-items: center; }
  .cal-ev, .cal-more { display: none; }
  .cal-dots { display: flex; gap: 3px; }
  .cal-dots i { width: 6px; height: 6px; border-radius: 50%; }
  .cal-dots i.ev-agendado { background: var(--info); }
  .cal-dots i.ev-concluido { background: var(--accent); }
  .cal-dots i.ev-cancelado { background: var(--line-2); }
  .cal-add { padding: 0 4px; min-width: 28px; justify-content: center; }
  .cal-add span { display: none; }
  .cal-wd { font-size: 10px; letter-spacing: .02em; padding: 6px 0; }
  .cal-card { padding: 14px; }
  .nr-grid { grid-template-columns: minmax(0, 1fr); }
  .nr-num { width: 54px; height: 54px; font-size: 22px; }
  .modal.modal-cert { height: 92vh; }
  .cert-scroll { padding: 12px; }
}
.nr-tools .search, .pick-tools .search { flex: none; width: 100%; }
a.btn { text-decoration: none; }

/* ======================================================================
   Rodada 3: navegação com "Mais", conta, CAT, psicossocial, parceiro,
   admin, páginas públicas e documentos impressos
   ====================================================================== */

/* Navegação */
.tab.mais { display: none; }
.modo-tag { font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--ok-ink); }
@media (max-width: 1340px) and (min-width: 761px) {
  .tab { padding: 0 10px; }
  .tab .t-short { display: none; }
}
.tab { white-space: nowrap; }
@media (max-width: 760px) {
  .tab.sec { display: none; }
  .tab.mais { display: flex; }
}
.bell { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; transition: background .2s, color .2s; }
.bell:hover { background: var(--surface-3); color: var(--ink); }
.bell-n { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font: 800 11px/20px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--bg); animation: pop .3s var(--ease-out); }
.plan-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; font-size: 14px; text-align: center; }
.plan-aviso { background: color-mix(in srgb, var(--info) 12%, var(--bg)); color: var(--info); }
.plan-bloq { background: var(--bad-bg); color: var(--bad-ink); }
.plan-bar .btn-link { color: inherit; text-decoration: underline; min-height: 28px; padding: 0; }
.modal.modal-sheet { width: min(520px, 100%); }
.mais-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 8px 22px 24px; }
.mais-item { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; text-align: left; transition: background .2s, border-color .2s; }
.mais-item .ic { width: 22px; height: 22px; color: var(--accent); }
.mais-item:hover, .mais-item.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.splash.inline { min-height: 40vh; }

/* Formulários longos */
.form-sec { margin: 10px 0 -4px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 800; padding-top: 12px; border-top: 1px solid var(--line); }
.grid-form > .form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.calc.calc-warn { background: var(--warn-bg); color: var(--warn-ink); }
.ref-note { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ok-ink); font-size: 14px; }

/* Avisos */
.notice { display: flex; gap: 14px; align-items: flex-start; background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); color: var(--warn-ink); }
.notice-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--warn); }
.notice-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.notice-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.kpi-hero { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.kpi-hero .kpi-top, .kpi-hero .kpi-sub, .kpi-hero .kpi-top .ic { color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
.kpi-hero .kpi-val { font-size: 28px; }
.hero-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 40px 24px; }
.hero-empty h2 { font-size: 22px; font-weight: 800; }
.hero-empty p { max-width: 620px; }

/* Pendências */
.pend-sec { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.pend-sec header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pend-sec strong.grave { color: var(--bad-ink); }
.pend-sec ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
.pend-sec .btn-link { align-self: flex-start; }

/* Alertas e plano */
.alert-prev, .alert-hist { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2); }
.alert-prev header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.alert-prev ul, .alert-hist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.alert-prev li, .alert-hist li { display: flex; justify-content: space-between; gap: 10px; }
.alert-hist strong { display: block; margin-bottom: 8px; }
.planos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0; }
.plano { cursor: pointer; }
.plano input { position: absolute; opacity: 0; pointer-events: none; }
.plano-box { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.plano:hover .plano-box { transform: translateY(-2px); }
.plano input:checked + .plano-box { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.plano input:focus-visible + .plano-box { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.plano.pequeno { opacity: .5; cursor: not-allowed; }
.plano-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.plano-preco { font: 600 26px var(--mono); letter-spacing: -0.03em; }
.plano-preco small { font: 600 13px var(--font); color: var(--muted); margin-left: 2px; }
.plano ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.plano li { display: flex; gap: 6px; align-items: flex-start; }
.plano li .ic { width: 16px; height: 16px; color: var(--accent); margin-top: 2px; }
.plano-modal .modal-body { gap: 14px; }

/* QR e links */
.qr { width: 100%; height: auto; display: block; }
.qr rect { fill: #FFFFFF; }
.qr path { fill: #16201B; }
.psi-qr { width: 150px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 14px; background: #FFFFFF; border: 1px solid var(--line); }

.psi-qr small { color: #4A5650; font-size: 11.5px; text-align: center; }
.link-colab { display: flex; flex-direction: column; gap: 14px; }
.link-qr { width: 180px; align-self: center; padding: 14px; background: #FFFFFF; border-radius: 16px; border: 1px solid var(--line); }
.link-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.ref-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ref-card h2 { font-size: 20px; font-weight: 800; }
.ref-card > .grow { display: flex; flex-direction: column; gap: 10px; min-width: 260px; }
.ref-row input { flex: 1 1 260px; min-height: 44px; padding: 8px 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); font: 600 13.5px var(--mono); color: var(--ink); min-width: 0; }
.mini-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.mini-dl dt { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.mini-dl dd { margin: 2px 0 0; font-weight: 800; }

/* Psicossocial */
.psi-top { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.psi-share { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.psi-share-main { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.psi-share-main input { min-height: 44px; font: 600 13px var(--mono); }
.psi-count { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.psi-count strong { font: 600 40px/1 var(--mono); letter-spacing: -0.04em; }
.psi-count span { color: var(--muted); font-weight: 600; }
.psi-indice { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.psi-big { display: flex; align-items: baseline; gap: 4px; }
.psi-big strong { font: 600 60px/1 var(--mono); letter-spacing: -0.05em; }
.psi-big span { font: 600 18px var(--mono); color: var(--muted); }
.psi-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.psi-legend span { display: inline-flex; align-items: center; gap: 6px; }
.psi-dims { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.psi-dims li { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 2fr) 44px 130px; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.psi-dims li:first-child { border-top: 0; }
.psi-dim-txt { display: flex; flex-direction: column; }
.psi-dim-txt small { color: var(--muted); font-size: 12.5px; }
.psi-bar { position: relative; height: 12px; border-radius: 99px; background: var(--surface-3); }
.psi-bar span { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; transform-origin: left; }
.view.anim .psi-bar span { animation: grow 1s .3s var(--ease-out) both; }
.psi-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--line-2); }
.pb-ok { background: var(--accent); } .pb-vencendo { background: var(--warn); } .pb-vencido { background: var(--bad); }
.psi-val { font: 600 17px var(--mono); text-align: right; }
.psi-dims .badge { justify-self: start; }
.psi-acoes { display: flex; flex-direction: column; gap: 12px; }
.psi-acao { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.psi-acao ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.psi-itens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.psi-itens li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-size: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.psi-itens li:first-child { border-top: 0; }
.table.heatmap { min-width: 760px; }
.table.heatmap th { text-align: center; font-size: 11px; }
.table.heatmap th:first-child { text-align: left; }
.heat { text-align: center; font: 600 14px var(--mono); }
.heat-ok { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--ok-ink); }
.heat-vencendo { background: var(--warn-bg); color: var(--warn-ink); }
.heat-vencido { background: var(--bad-bg); color: var(--bad-ink); }
.heat-neutral { color: var(--muted); }
.lg.heat-ok { background: var(--accent); } .lg.heat-vencendo { background: var(--warn); } .lg.heat-vencido { background: var(--bad); }

/* Prévia de páginas públicas dentro do app */
.pub-preview { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.pub-frame { flex: 1; overflow: auto; background: var(--surface-3); display: flex; justify-content: center; padding: 20px; }
.pub-phone { width: 400px; max-width: 100%; border-radius: 28px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow-3); border: 8px solid var(--ink); height: fit-content; }

/* Páginas públicas */
.pub { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.pub-phone .pub { min-height: 0; }
.pub-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.pub-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.pub-brand .logo { width: 26px; height: 26px; }
.pub-sub { font-size: 12.5px; color: var(--muted); font-weight: 700; text-align: right; }
.pub-main { width: 100%; max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; flex: 1; }
.pub-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 16px; }
.pub-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-1); animation: fadeUp .5s var(--ease-out) both; }
.pub-card h1 { font-size: 26px; font-weight: 800; }
.pub-card h2 { font-size: 18px; font-weight: 800; }
.center-card { align-items: center; text-align: center; padding: 36px 22px; }
.big-ic { width: 52px; height: 52px; padding: 12px; border-radius: 16px; }
.big-ic.ok { background: var(--accent-soft); color: var(--accent); }
.big-ic.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pub-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.pub-points li { display: flex; gap: 10px; align-items: flex-start; }
.pub-points .ic { color: var(--accent); margin-top: 2px; }
.pub-warn { padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; }
.pub-progress { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 58px); z-index: 4; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pub-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s var(--ease-out); }
.pub-form { display: flex; flex-direction: column; gap: 14px; }
.pub-dim { border: 1px solid var(--line); margin: 0; }
.pub-dim legend { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--accent); padding: 0 6px; }
.pub-q { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); transition: background .2s; }
.pub-q:first-of-type { border-top: 0; }
.pub-q p { font-weight: 700; font-size: 15.5px; }
.pub-q.falta p { color: var(--bad-ink); }
.pub-q.falta .likert { box-shadow: 0 0 0 2px var(--bad); border-radius: 12px; }
.likert { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.likert label { position: relative; cursor: pointer; }
.likert input { position: absolute; opacity: 0; }
.likert span { overflow-wrap: anywhere; hyphens: auto; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 6px 4px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.2; transition: all .15s; }
.likert input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.03); }
.likert input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.pub-hello h1 { font-size: 30px; font-weight: 800; margin: 4px 0 2px; }
.pub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pub-stat { gap: 4px; }
.pub-stat strong { font: 600 24px var(--mono); letter-spacing: -0.03em; }
.pub-stat.ok { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pub-stat.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.pub-stat.bad { background: var(--bad-bg); color: var(--bad-ink); border-color: transparent; }
.pub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pub-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.pub-list li:first-child { border-top: 0; }
.pub-list li > div { display: flex; flex-direction: column; min-width: 0; }
.pub-list small { color: var(--muted); font-size: 12.5px; }
.pub-sign { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.pub-signed { display: flex; align-items: center; gap: 12px; color: var(--ok-ink); font-weight: 700; }
.pub-signed span { display: inline-flex; gap: 6px; align-items: center; }
.verify-top { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; }
.verify-top div { display: flex; flex-direction: column; }
.verify-top.ok { background: var(--ok-bg); color: var(--ok-ink); }
.verify-top.warn { background: var(--warn-bg); color: var(--warn-ink); }
.verify-top .ic { width: 28px; height: 28px; }
.verify h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; }
@media (max-width: 480px) {
  .likert span { font-size: 10.5px; min-height: 52px; }
  .pub-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Certificado: QR */
.cert-foot { align-items: flex-end; }
.cert-qr { display: flex; align-items: center; gap: 10px; font: 600 10px/1.35 var(--font); color: #5A645E; letter-spacing: 0; }
.cert-qr strong { font-family: var(--mono); color: #16201B; }
.qr-cert { width: 64px; height: 64px; }
.qr-cert rect { fill: #FFFFFF; }
.qr-cert path { fill: #16201B; }

/* Documentos A4 (pasta, fichas, CAT, relatório) */
.doc-scroll { flex: 1; overflow: auto; padding: 24px; background: var(--surface-3); display: flex; flex-direction: column; align-items: center; gap: 24px; }
.pdoc { width: 794px; max-width: 100%; min-height: 1000px; box-sizing: border-box; padding: 48px 52px; background: #FFFFFF; color: #16201B; box-shadow: 0 20px 50px -20px rgba(0,0,0,.35); font-family: var(--font); font-size: 12.5px; line-height: 1.5; display: flex; flex-direction: column; gap: 12px; flex: none; }
.pdoc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #1F6B4F; margin-top: 10px; }
.pdoc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid #1F6B4F; }
.pdoc-brand { display: flex; align-items: center; gap: 10px; }
.pdoc-brand .logo { width: 34px; height: 34px; }
.pdoc-brand .logo-bg { fill: #1F6B4F; } .pdoc-brand .logo-cross { stroke: #fff; }
.pdoc-brand div { display: flex; flex-direction: column; }
.pdoc-brand strong { font-size: 14px; }
.pdoc-brand small { color: #5A645E; }
.pdoc-title { text-align: right; }
.pdoc-head .pdoc-title:only-child { text-align: left; }
.pdoc-title h1 { font-size: 20px; font-weight: 800; }
.pdoc-title p { color: #5A645E; }
.pdoc-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid #D5DDD8; border-radius: 8px; overflow: hidden; }
.pdoc-dl div { padding: 8px 12px; border-bottom: 1px solid #E5EAE6; }
.pdoc-dl div:nth-child(odd) { border-right: 1px solid #E5EAE6; }
.pdoc-dl dt { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #6A746E; font-weight: 800; }
.pdoc-dl dd { margin: 2px 0 0; font-weight: 700; }
.pdoc-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.pdoc-table th { text-align: left; background: #EEF3F0; color: #3B4640; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 7px 8px; border-bottom: 1px solid #C9D3CD; }
.pdoc-table td { padding: 7px 8px; border-bottom: 1px solid #E5EAE6; vertical-align: middle; }
.pdoc-table tr { break-inside: avoid; }
.pdoc .st-vencido, .pdoc .st-sem { color: #9A2318; font-weight: 800; }
.pdoc .st-vencendo { color: #7E4B00; font-weight: 800; }
.pdoc .st-ok { color: #1C5E45; font-weight: 800; }
.pdoc-decl, .pdoc-text { color: #2B3530; }
.pdoc-decl { padding: 10px 12px; background: #F3F6F4; border-radius: 8px; }
.pdoc-alerta { color: #9A2318; font-weight: 700; }
.sig-cell { width: 120px; }
.sig-print { width: 110px; height: 36px; }
.sig-print path { fill: none; stroke: #16201B; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.pend { color: #7E4B00; font-weight: 700; font-size: 10.5px; }
.pdoc-resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.pdoc-resumo div { padding: 14px; border-radius: 10px; background: #F3F6F4; display: flex; flex-direction: column; }
.pdoc-resumo strong { font: 600 26px var(--mono); color: #1F6B4F; }
.pdoc-resumo span { color: #4A5650; }
.pdoc-toc { margin: 0; padding-left: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.pdoc-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; text-align: center; color: #4A5650; }
.pdoc-signs .line { display: block; height: 1px; background: #16201B; margin-bottom: 6px; }
.pdoc-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #E5EAE6; color: #7A847E; font-size: 10px; }

@media print {
  #print-area.pa-portrait .pdoc { width: auto; min-height: 0; padding: 0; box-shadow: none; break-after: page; page-break-after: always; }
  #print-area.pa-portrait .pdoc:last-child { break-after: auto; page-break-after: auto; }
  #print-area.pa-landscape .cert { width: 297mm; height: 210mm; page-break-after: always; break-after: page; zoom: 1; box-shadow: none; padding: 9mm; }
  #print-area.pa-landscape .cert:last-child { page-break-after: auto; break-after: auto; }
}

@media (max-width: 900px) {
  .psi-top { grid-template-columns: minmax(0, 1fr); }
  .planos { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .psi-dims li { grid-template-columns: minmax(0, 1fr) 44px; gap: 8px 12px; }
  .psi-dims .psi-bar { grid-column: 1 / -1; grid-row: 2; }
  .psi-dims .badge { grid-column: 1 / -1; }
  .psi-qr { width: 130px; }
  .pdoc { padding: 24px 18px; font-size: 11px; }
  .pdoc-dl { grid-template-columns: minmax(0, 1fr); }
  .pdoc-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .doc-scroll { padding: 10px; }
  .layer-modal .modal.modal-sheet { border-radius: 22px 22px 0 0; }
}

/* ======================================================================
   Rodada 4: cargos, recomendação de treinamentos e holerite digital
   ====================================================================== */

/* Cargos */
.func-desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.func-desc-vazia { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 7px 11px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--warn) 55%, var(--line-2)); background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; font-size: 13px; text-align: left; transition: transform .2s var(--ease); }
.func-desc-vazia:hover:not(:disabled) { transform: translateY(-1px); }
.func-desc-vazia .ic { width: 16px; height: 16px; flex: none; }
.emp-faixa { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.emp-faixa > div { display: flex; flex-direction: column; min-width: 0; }
.emp-faixa strong { font-size: 15px; }
.emp-faixa small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desc-rev { display: flex; flex-direction: column; gap: 14px; }
.desc-item { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.desc-item textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; background: var(--surface); resize: vertical; font-size: 14px; }

/* Recomendação de treinamentos */
.rec-card { display: flex; flex-direction: column; gap: 14px; padding: 0; overflow: hidden; }
.rec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 20px 0; }
.rec-head .eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.rec-head .eyebrow .ic { width: 15px; height: 15px; }
.rec-head h2 { font-size: 20px; font-weight: 800; margin: 4px 0 6px; }
.rec-resumo { display: flex; flex-direction: column; align-items: center; padding: 10px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--ok-ink); flex: none; }
.rec-n { font: 600 15px var(--mono); }
.rec-n strong { font-size: 26px; }
.rec-resumo small { font-size: 12px; font-weight: 700; }
.rec-gaps { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 20px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 13.5px; font-weight: 700; }
.rec-gaps > .ic { width: 18px; height: 18px; }
.chip-warn { min-height: 30px; font-size: 12.5px; border-color: color-mix(in srgb, var(--warn) 50%, transparent); color: var(--warn-ink); background: var(--surface); }
.rec-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rec-item { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(170px, 1fr) auto; gap: 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); transition: background .2s; }
.rec-item:hover { background: var(--surface-2); }
.rec-item:last-child { border-bottom: 0; }
.rec-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rec-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-title strong { font-size: 15.5px; }
.rec-tag { font: 600 12px var(--mono); padding: 3px 8px; border-radius: 7px; background: var(--ink); color: var(--bg); }
.rec-why { line-height: 1.45; }
.tags.sm li { padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.rec-cov { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cov-bar { display: flex; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.cov-bar span { display: block; height: 100%; width: var(--w); transform-origin: left; }
.cov-ok { background: var(--accent); }
.cov-ag { background: color-mix(in srgb, var(--info) 55%, var(--surface)); }
.view.anim .cov-bar span { animation: grow .9s .25s var(--ease-out) both; }
.rec-act { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.rec-foot { padding: 0 20px; }
.rec-aviso { padding: 0 20px 18px; }
.rec-list .empty { padding: 24px; }
.rec-motivos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rec-motivos li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.rec-motivos .ic { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 2px; }

/* Holerites */
.hol-passos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: passo; }
.hol-passos li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.hol-passos li::before { counter-increment: passo; content: counter(passo); position: absolute; top: 14px; right: 16px; font: 600 28px var(--serif); color: var(--line-2); }
.hol-passos .ic { width: 26px; height: 26px; color: var(--accent); }
.hol-passos span { font-size: 13.5px; color: var(--muted); }
.hol-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.comp-select { min-height: 40px; padding: 0 36px 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 800; }
.funil { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.funil-step { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; padding-right: 10px; }
.funil-bar { flex: 0 0 100%; height: 10px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.funil-bar::after { content: ''; position: absolute; inset: 0; width: var(--w); background: var(--accent); opacity: .85; transform-origin: left; }
.funil-step:first-child .funil-bar { border-radius: 99px 3px 3px 99px; }
.funil-step:last-child .funil-bar { border-radius: 3px 99px 99px 3px; }
.view.anim .funil-bar::after { animation: grow 1s .3s var(--ease-out) both; }
.funil-step small { color: var(--muted); font-weight: 700; font-size: 12px; }
.funil-step strong { font: 600 14px var(--mono); }
.etapas { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.etapas .et { width: 18px; height: 6px; border-radius: 3px; background: var(--surface-3); }
.etapas .et.on { background: var(--accent); }
.etapas small { margin-left: 6px; color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.hol-table td.acts { white-space: nowrap; text-align: right; }
.btn-icon.wa { color: #1DA851; }
.wa-auto { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 14px; background: var(--accent-soft); color: var(--ok-ink); }
.wa-auto > div { display: flex; gap: 10px; align-items: flex-start; flex: 1 1 260px; }
.wa-auto > div span { display: flex; flex-direction: column; }
.wa-auto small { font-weight: 600; opacity: .85; }
.wa-auto .ic { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.wa-ou { margin: 14px 0 8px; }
.wa-prev { margin-bottom: 10px; }
.wa-prev summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--accent); }
.wa-prev pre { white-space: pre-wrap; font: 500 13.5px/1.5 var(--font); background: #DCF8C6; color: #16201B; padding: 12px 14px; border-radius: 4px 14px 14px 14px; margin: 8px 0 0; max-width: 420px; }
.wa-fila { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.wa-fila li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); transition: background .25s; }
.wa-fila li:last-child { border-bottom: 0; }
.wa-fila .person { flex: 1; min-width: 0; }
.wa-fila li.feito { background: var(--accent-soft); }
.wa-fila li.feito [data-um] { background: transparent; color: var(--ok-ink); }
.file-drop.big { min-height: 84px; justify-content: center; }
.hol-rev tr.off td { opacity: .55; }
.hol-rev select.cell { min-width: 200px; }

/* Holerite de exemplo (demonstração) */
.hol-ex { border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; background: #fff; color: #16201B; display: flex; flex-direction: column; gap: 14px; font-size: 13.5px; }
.hol-ex-tag { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: #FBEFD8; color: #7E4B00; }
.hol-ex-tag .ic { width: 14px; height: 14px; }
.hol-ex header, .hol-ex-pessoa { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hol-ex header > div, .hol-ex-pessoa > div { display: flex; flex-direction: column; }
.hol-ex small { color: #606B64; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.hol-ex-ref { text-align: right; }
.hol-ex table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hol-ex th, .hol-ex td { padding: 7px 6px; border-bottom: 1px solid #E3E1D8; text-align: left; }
.hol-ex th { font-size: 11.5px; color: #606B64; text-transform: uppercase; letter-spacing: .04em; }
.hol-ex .r { text-align: right; font-family: var(--mono); }
.hol-ex tfoot td { font-weight: 800; border-bottom: 0; }
.hol-ex-liq { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 10px; background: #E2EEE7; color: #1C5E45; }
.hol-ex-liq strong { font: 600 20px var(--mono); }
.hol-ex-base { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.hol-ex-base dt { font-size: 11px; color: #606B64; font-weight: 700; }
.hol-ex-base dd { margin: 0; font-family: var(--mono); }

/* Área do colaborador: holerites */
.pub-hol h2 { display: flex; align-items: center; gap: 8px; }
.pub-hol h2 .ic { width: 22px; height: 22px; color: var(--accent); }
.pub-hol li { flex-wrap: wrap; }
.pub-hol li.novo { margin: 0 -12px; padding: 12px; border-radius: 12px; background: var(--accent-soft); border-top-color: transparent; }
.pub-hol .badge .ic { width: 14px; height: 14px; }
.pub-hol .badge:has(.ic)::before { display: none; }

@media (max-width: 900px) {
  .emp-faixa { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .emp-faixa .btn { grid-column: 1 / -1; justify-self: start; }
  .rec-item { grid-template-columns: minmax(0, 1fr) auto; }
  .rec-cov { grid-column: 1 / -1; grid-row: 2; }
  .rec-act { grid-column: 2; grid-row: 1; align-self: start; }
}
@media (max-width: 760px) {
  .rec-head { flex-direction: column; padding: 16px 16px 0; }
  .rec-resumo { flex-direction: row; gap: 8px; align-items: baseline; }
  .rec-gaps { margin: 0 16px; }
  .rec-item { padding: 14px 16px; gap: 10px; grid-template-columns: minmax(0, 1fr); }
  .rec-cov { grid-row: auto; grid-column: 1; }
  .rec-act { grid-column: 1; grid-row: auto; justify-content: space-between; }
  .rec-act .btn { padding: 0 10px; }
  .rec-foot, .rec-aviso { padding-left: 16px; padding-right: 16px; }
  .hol-passos { grid-template-columns: 1fr; }
  .funil { padding: 14px; gap: 2px; }
  .funil-step strong { font-size: 13px; }
  .etapas small { display: block; width: 100%; margin: 4px 0 0; }
  .hol-bar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .hol-bar .chip { flex: none; }
  .wa-fila li { flex-wrap: wrap; }
  .hol-ex-base { grid-template-columns: 1fr 1fr; }
}

/* Certificados emitidos */
.cert-sec .card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cert-sec .search { flex: 0 1 320px; }
.cert-table td.acts { text-align: right; white-space: nowrap; }
.cert-table td strong.block { font-size: 14px; }
.pad-b { padding-bottom: 16px; }
@media (max-width: 760px) { .cert-sec .search { flex: 1 1 100%; } }

/* ======================================================================
   Rodada 5: custos, LGPD, relatório mensal e tour
   ====================================================================== */
:root { --c1: #1F6B4F; --c2: #4E9C7A; --c3: #8CC4A8; --c4: #C9A24A; --c5: #2C5E86; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-tema]) { --c1: #5CC596; --c2: #3F9A73; --c3: #2B6B50; --c4: #D9B25C; --c5: #6FA3D0; } }
:root[data-theme="dark"] { --c1: #5CC596; --c2: #3F9A73; --c3: #2B6B50; --c4: #D9B25C; --c5: #6FA3D0; }

.gasto-faixa { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.gasto-faixa > .ic { width: 20px; height: 20px; color: var(--accent); }
.gasto-faixa .btn-link { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.gasto-faixa .btn-link .ic { width: 16px; height: 16px; }

.comp-card { display: flex; flex-direction: column; gap: 14px; }
.comp-bar { display: flex; height: 22px; border-radius: 8px; overflow: hidden; gap: 2px; background: var(--surface-3); }
.comp-bar span { width: var(--w); height: 100%; transform-origin: left; }
.view.anim .comp-bar span { animation: grow .9s .2s var(--ease-out) both; }
.c1 { background: var(--c1); } .c2 { background: var(--c2); } .c3 { background: var(--c3); } .c4 { background: var(--c4); } .c5 { background: var(--c5); }
.comp-leg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.comp-leg li { display: grid; grid-template-columns: 12px 1fr; gap: 2px 8px; align-items: center; }
.comp-leg i { width: 12px; height: 12px; border-radius: 4px; grid-row: 1 / 4; align-self: start; margin-top: 4px; }
.comp-leg span { font-size: 13px; color: var(--muted); font-weight: 700; }
.comp-leg strong { font: 600 17px var(--mono); }
.comp-leg small { color: var(--muted); font-size: 12px; }

.colunas { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 200px; padding-top: 8px; }
.col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.col-bar { width: 100%; max-width: 34px; height: var(--h); min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--c5); transform-origin: bottom; }
.view.anim .col-bar { animation: growY .8s var(--ease-out) both; }
@keyframes growY { from { transform: scaleY(0); } }
.col-val { font: 600 10.5px var(--mono); color: var(--muted); white-space: nowrap; }
.col-lab { font-size: 12px; color: var(--muted); font-weight: 700; }

.custo-table th.r, .custo-table td.r { text-align: right; }
.custo-table tfoot td { border-top: 2px solid var(--line-2); padding-top: 12px; padding-bottom: 12px; background: var(--surface-2); }
.custo-hero { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 14px; background: var(--accent-soft); color: var(--ok-ink); }
.custo-hero span { font-weight: 700; font-size: 13px; }
.custo-hero strong { font: 600 30px var(--mono); }
.custo-lista { list-style: none; margin: 0; padding: 0; }
.custo-lista li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.custo-lista li span { display: flex; flex-direction: column; }
.custo-lista small { color: var(--muted); font-size: 12px; }
.mini-asos li { padding: 8px 0 !important; }

.precos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.precos li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.precos li > span { display: flex; flex-direction: column; min-width: 0; }
.precos small { color: var(--muted); font-size: 12px; }
.preco-in { display: flex; align-items: center; gap: 6px; flex: none; }
.preco-in span { font-weight: 700; color: var(--muted); font-size: 13px; }
.preco-in input, .novo-exame input { width: 110px; min-height: 38px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; background: var(--surface); text-align: right; font-family: var(--mono); }
.novo-exame { margin-top: 14px; }
.novo-exame input[type=text] { width: 220px; text-align: left; font-family: var(--font); }

@media (max-width: 900px) { .comp-leg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .comp-leg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .colunas { height: 160px; gap: 3px; }
  .col-val { display: none; }
  .precos { grid-template-columns: 1fr; }
  .novo-exame input[type=text] { width: 100%; }
  .gasto-faixa .btn-link { margin-left: 0; }
}
.calc { flex-direction: row; align-items: center; gap: 10px; }
.calc > .ic { flex: none; margin: 0; }
.bars.bars-moeda li { grid-template-columns: minmax(90px, 130px) 1fr auto; }
.bars.bars-moeda .bar-val { white-space: nowrap; font-size: 13px; }
.kpi-pre { font-size: .5em; margin-right: 4px; color: var(--muted); font-weight: 600; vertical-align: .35em; }

/* Relatório mensal */
.rel .pdoc-resumo .alerta strong { color: #9A2318; }
.rel .r { text-align: right; }
.rel .tot td { font-weight: 800; background: #F3F6F4; }
.rel .small-print { font-size: 10.5px; color: #6A746E; }
.rel-pend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rel-pend li { display: flex; flex-direction: column; padding: 8px 12px; border-left: 3px solid #C27A0E; background: #FBF6EC; border-radius: 0 8px 8px 0; }
.rel-pend li.grave { border-left-color: #C2402F; background: #FBEFEC; }
.rel-pend span { color: #4A5650; font-size: 11.5px; }
.rel-custos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rel-custos strong { font-size: 20px !important; }

/* LGPD */
.legal-links a, .aceite a { color: var(--accent); font-weight: 700; }
.lgpd-docs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lgpd-doc { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s var(--ease); }
.lgpd-doc:hover { border-color: var(--accent); transform: translateY(-1px); }
.lgpd-doc .ic { width: 24px; height: 24px; color: var(--accent); flex: none; }
.lgpd-doc span { display: flex; flex-direction: column; }
.lgpd-doc small { color: var(--muted); }
.lgpd-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-legal { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.doc-legal h1 { font-size: 30px; }
.doc-legal section { display: flex; flex-direction: column; gap: 8px; }
.doc-legal h2 { font-size: 17px; font-weight: 800; }
.doc-legal h2 span { color: var(--accent); font-family: var(--mono); }
.doc-legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc-legal p, .doc-legal li { color: var(--ink-2); line-height: 1.6; }
.doc-legal a { color: var(--accent); font-weight: 700; }
.legal-meta { font: 500 14px var(--display); color: var(--muted); }
.doc-lead { font-size: 16px; color: var(--ink) !important; }
.pub-foot a { color: inherit; font-weight: 700; }
@media (max-width: 760px) { .lgpd-docs { grid-template-columns: 1fr; } }

/* Tour guiado */
.tour { position: fixed; inset: 0; z-index: 400; opacity: 0; transition: opacity .3s var(--ease); }
.tour.on { opacity: 1; }
.tour.saindo { opacity: 0; }
.tour-spot { position: fixed; top: 0; left: 0; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(10, 18, 14, .62); outline: 2px solid color-mix(in srgb, var(--accent) 70%, #fff); transition: transform .45s var(--ease-out), width .45s var(--ease-out), height .45s var(--ease-out), opacity .3s; pointer-events: none; }
.tour-pop { position: fixed; width: min(360px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow-3); display: flex; flex-direction: column; gap: 8px; transition: top .45s var(--ease-out), left .45s var(--ease-out), opacity .2s; }
.tour-pop.troca { opacity: .35; }
.tour-top { display: flex; justify-content: space-between; align-items: center; }
.tour-n { font: 600 12px var(--mono); color: var(--accent); }
.tour-pop h3 { font-size: 18px; font-weight: 800; }
.tour-pop p { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.tour-dots { display: flex; gap: 4px; margin-top: 4px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--line-2); transition: width .3s var(--ease), background .3s; }
.tour-dots i.on { width: 18px; background: var(--accent); }
.tour-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.demo-bar [data-tour] { display: inline-flex; align-items: center; gap: 4px; }
.demo-bar [data-tour] .ic { width: 15px; height: 15px; }

/* ======================================================================
   Identidade visual v2
   Concreto, grafite e verde de sinalização. Tipografia Barlow (desenhada a
   partir das placas de rodovia), números em Barlow Semi Condensed tabular.
   Superfícies planas com borda de 1 px; sombra só em camadas sobrepostas.
   Status como etiqueta de inspeção: faixa de cor na borda esquerda.
   ====================================================================== */
body { font: 400 15px/1.5 var(--font); letter-spacing: 0; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.005em; font-weight: 600; }
strong, b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Sem entradas escalonadas: o único movimento automático é a troca de aba */
.view.anim > *, .view.anim .stagger > *, .view.anim .stagger-rows > * { animation: none; }
.app.ready { animation: none; }
.func-card:hover, .epi-card:hover, button.kpi:hover, .lgpd-doc:hover, .dropzone:hover:not(:disabled), .func-desc-vazia:hover:not(:disabled) { transform: none; }
::view-transition-old(page) { animation: .16s var(--ease) both fadeOutQuick; }
::view-transition-new(page) { animation: .26s var(--ease-out) both pageInQuick; }
html[data-dir="back"]::view-transition-old(page), html[data-dir="back"]::view-transition-new(page) { animation-name: fadeOutQuick, none; }
html[data-dir="back"]::view-transition-new(page) { animation-name: pageInQuick; }
@keyframes fadeOutQuick { to { opacity: 0; } }
@keyframes pageInQuick { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Estrutura: barra lateral grafite ---------- */
.side { display: none; }
@media (min-width: 1100px) {
  .app { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .side {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--side); color: var(--side-ink); padding: 18px 14px 14px; gap: 18px; scrollbar-width: thin;
  }
  .topbar .brand, .topbar .tabs { display: none; }
  .topbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }
  .topbar.rolou { border-bottom-color: var(--line); }
  .topbar-in, .main { max-width: 1240px; margin: 0; }
  .topbar-in { padding: 0 36px; }
  .main { padding: 8px 36px 72px; }
  .topbar .emp-name, .topbar .emp-select { display: none; }
  .demo-bar, .plan-bar { justify-content: flex-start; padding-left: 36px; }
}
.shell { min-width: 0; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; color: #FFFFFF; text-decoration: none; font: 600 21px/1 var(--display); letter-spacing: .005em; }
.side-brand .logo { width: 28px; height: 28px; }
.side-emp { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--r); background: var(--side-hover); border: 1px solid var(--side-line); }
.side-emp strong { color: #FFFFFF; font-weight: 600; font-size: 14.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.side-emp small { color: var(--side-muted); font-size: 12.5px; }
.side-emp .btn-link { color: var(--side-ink); justify-content: flex-start; font-size: 13.5px; }
.side-select { width: 100%; min-height: 34px; border-radius: 6px; border: 1px solid var(--side-line); background: var(--side); color: #FFFFFF; font-weight: 600; padding: 0 8px; }
.side-nav { display: flex; flex-direction: column; gap: 16px; }
.side-grupo { display: flex; flex-direction: column; gap: 1px; }
.side-grupo p { font-size: 12.5px; color: var(--side-muted); padding: 0 10px 6px; font-weight: 500; }
.side-item {
  position: relative; display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--side-ink); font-size: 15px; font-weight: 500; text-align: left; transition: background .15s, color .15s;
}
.side-item .ic { width: 18px; height: 18px; color: var(--side-muted); transition: color .15s; }
.side-item:hover { background: var(--side-hover); color: #FFFFFF; }
.side-item[aria-current="page"] { background: color-mix(in srgb, var(--accent) 22%, var(--side)); color: #FFFFFF; }
.side-item[aria-current="page"]::before { content: ''; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: #2FD08F; }
.side-item[aria-current="page"] .ic { color: #6FE0B0; }
.side-item:focus-visible { outline-color: #6FE0B0; }
.side-foot { margin-top: auto; padding: 12px 10px 2px; border-top: 1px solid var(--side-line); color: var(--side-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .logo-bg { fill: #0A7C58; }
.side .logo-cross { stroke: #FFFFFF; }

/* ---------- Barra superior (tablet e celular) ---------- */
.brand { font: 600 20px/1 var(--display); letter-spacing: .005em; }
.tabs { border-radius: 8px; padding: 3px; gap: 2px; }
.tab { border-radius: 6px; font-weight: 500; font-size: 14.5px; min-height: 36px; }
.tab-ind { border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.avatar-btn { border-radius: 8px; width: 38px; height: 38px; font-weight: 600; }
.avatar-btn:hover { transform: none; background: var(--ink-2); }
.bell { border-radius: 8px; width: 38px; height: 38px; }
.bell-n { border-radius: 5px; font: 600 11px/20px var(--display); }
.menu { border-radius: var(--r-lg); }
.menu-item { border-radius: 6px; font-weight: 500; }
.demo-bar { font-size: 13.5px; background: #FFF3D1; color: #6B4800; border-bottom: 1px solid #F1DFA6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-tema]) .demo-bar { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; } }

/* ---------- Tipografia das telas ---------- */
.view { gap: 20px; }
.view-head { align-items: flex-end; padding-top: 6px; }
.eyebrow { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.view-head h1 { font-size: clamp(30px, 3vw, 38px); font-weight: 600; line-height: 1.05; margin: 2px 0 8px; letter-spacing: -0.01em; }
.lead { font-size: 16px; color: var(--ink-2); max-width: 70ch; }
.lead strong { font-weight: 600; }
.card-head h2, .section-head h2 { font-size: 19px; font-weight: 600; }
.sub { font-family: var(--display); font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.form-sec { text-transform: none; letter-spacing: 0; font: 600 15px var(--display); color: var(--ink); }

/* ---------- Superfícies ---------- */
.card { border-radius: var(--r-lg); box-shadow: none; }
.onboard-card { box-shadow: none; border-radius: 12px; }
.modal, .drawer { border-radius: 12px; }
.tags li { border-radius: 4px; font-weight: 500; background: var(--surface-3); padding: 3px 8px; }

/* ---------- Botões e campos ---------- */
.btn { border-radius: 7px; font-weight: 600; font-size: 15px; letter-spacing: .005em; }
.btn:active { transform: translateY(1px); }
.btn.sm { font-size: 14px; }
.btn-primary { box-shadow: none; }
.btn-ghost { border-color: var(--line-2); }
.btn-soft { background: var(--accent-soft); color: var(--ok-ink); }
.btn-icon { border-radius: 6px; }
.btn-link { font-weight: 600; }
.field label { font-weight: 600; font-size: 13.5px; }
.field input, .field select, .field textarea, .search, .emp-select, .comp-select { border-radius: 7px; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.chip { border-radius: 6px; font-weight: 500; font-size: 14px; min-height: 34px; padding: 0 12px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.seg, .seg-btn, .seg-ind { border-radius: 7px; }
.seg-btn { font-weight: 500; }
.file-drop, .dropzone { border-radius: var(--r-lg); }
.check { font-weight: 500; }

/* ---------- KPIs como etiquetas de inspeção ---------- */
.kpis { gap: 12px; }
.kpi { border-radius: var(--r); box-shadow: none; padding: 14px 16px 14px 18px; gap: 4px; }
.kpi::before { left: 0; top: 0; bottom: 0; right: auto; width: 4px; height: auto; transform: none; opacity: 1; background: var(--kc); }
.kpi-static:not(.kpi-vencido):not(.kpi-vencendo):not(.kpi-ok)::before { background: var(--line-2); }
button.kpi:not(.active)::before { opacity: .55; }
button.kpi:hover { border-color: var(--line-2); background: var(--surface-2); }
.kpi.active { border-color: var(--kc); box-shadow: inset 0 0 0 1px var(--kc); }
.kpi-top { font-weight: 500; font-size: 14px; color: var(--ink-2); }
.kpi-val { font-family: var(--display); font-weight: 600; font-size: 38px; letter-spacing: -0.01em; line-height: 1; margin-top: 4px; }
.kpi-sub { font-weight: 400; font-size: 13px; }
.kpi-pre { font-family: var(--display); vertical-align: .55em; }
.ind-val, .stock-num strong, .fc-num, .rec-n strong, .custo-hero strong, .hol-ex-liq strong, .pub-stat strong { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Tabelas ---------- */
.table th { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.table td { font-size: 15px; }
.mono { font-family: var(--display); font-weight: 500; letter-spacing: .01em; }
.avatar { border-radius: 6px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); }
.go { color: var(--line-2); }
.table tbody tr[data-act]:hover .go { transform: none; }

/* ---------- Selos: etiqueta retangular com faixa ---------- */
.badge { border-radius: 4px; font-weight: 600; font-size: 13px; min-height: 24px; padding: 0 8px 0 0; gap: 7px; overflow: hidden; }
.badge::before { width: 4px; height: 24px; border-radius: 0; flex: none; }
.b-neutral { padding-left: 8px; }
.badge:has(.ic) { padding-left: 8px; }

/* ---------- Definições, documentos e listas ---------- */
.doc-dl dt, .dl dt, .pdoc-dl dt, .hol-ex small, .hol-ex th, .cert-data dt { text-transform: none !important; letter-spacing: 0 !important; }
.doc-dl dt, .dl dt { font-size: 13px; font-weight: 500; color: var(--muted); }
.ref-note, .leitura, .calc, .status-banner, .form-erro, .form-ok, .gasto-faixa, .rec-gaps, .wa-auto, .emp-faixa, .custo-hero { border-radius: var(--r); }
.status-banner { font-weight: 500; }

/* ---------- Recomendação de treinamentos ---------- */
.rec-head .eyebrow { color: var(--accent); font-weight: 600; }
.rec-tag { font-family: var(--display); font-weight: 600; font-size: 13px; border-radius: 4px; background: var(--ink); color: var(--surface); }
.rec-resumo { border-radius: var(--r); }
.chip-warn { border-radius: 5px; }

/* ---------- Gráficos ---------- */
.bar-val, .col-val, .comp-leg strong, .funil-step strong { font-family: var(--display); font-weight: 600; }
.comp-bar { border-radius: 4px; }
.col-bar { border-radius: 3px 3px 0 0; }

/* ---------- Login ---------- */
.auth { animation: none; grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr); }
.auth-art { background: var(--side); color: #E6ECF1; gap: 40px; }
.auth-art::after {
  opacity: 1; mask-image: none; background-size: auto;
  background-image: repeating-linear-gradient(-45deg, #E0A100 0 14px, #1A2530 14px 28px);
  inset: auto 0 0 0; height: 10px;
}
.auth-art .logo-bg { fill: #0A7C58; }
.auth-art .logo-cross { stroke: #FFFFFF; }
.auth-brand { font: 600 23px/1 var(--display); }
.auth-copy { margin-top: auto; max-width: 600px; }
.auth-copy h1 { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -0.015em; color: #FFFFFF; }
.auth-copy h1 em { color: inherit; font-style: normal; }
.auth-copy p { color: #A9B7C3; font-size: 18px; max-width: 480px; }
.auth-float { height: auto; display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.float-card { position: relative; inset: auto; width: auto !important; animation: none; border-radius: 6px; box-shadow: none; padding: 12px 16px 12px 20px; background: #223140; color: #E6ECF1; flex-direction: row !important; align-items: center; gap: 14px !important; }
.float-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 6px 0 0 6px; background: var(--fc, #2FD08F); }
.float-card small { color: #9AA9B6; }
.float-card strong { font-weight: 600; }
.float-card .badge { background: transparent; color: #FFB4AA; padding: 0; }
.float-card .badge::before { display: none; }
.fc-1 { --fc: #E5584B; }
.fc-2 { --fc: #2FD08F; }
.fc-2 .fc-num { color: #FFFFFF; font-size: 30px; }
.fc-2 .fc-bar { display: none; }
.fc-3 { --fc: #2FD08F; }
.fc-3 .ic { background: transparent; color: #6FE0B0; padding: 0; width: 22px; height: 22px; }
.auth-points { color: #C9D3DC; font-weight: 500; }
.auth-points .ic { color: #6FE0B0; }
.auth-card h2 { font-size: 32px; font-weight: 600; }
.auth-seg { border-radius: 8px; }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  .tabs { border-radius: 10px; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); background: var(--side); border-color: var(--side-line); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tab { color: var(--side-muted); font-weight: 500; border-radius: 7px; }
  .tab:hover { color: #FFFFFF; }
  .tab[aria-selected="true"], .tab[aria-selected="true"] .ic { color: #FFFFFF; }
  .tab-ind { background: color-mix(in srgb, var(--accent) 30%, var(--side)); box-shadow: none; }
  .view-head h1 { font-size: 30px; }
  .kpi-val { font-size: 32px; }
  .modal { border-radius: 14px 14px 0 0; }
}
@media (max-width: 1099px) {
  .topbar { background: var(--surface); }
}
.auth-hoje { font-size: 14px; color: #8494A3; margin-bottom: 4px; }
.float-card > div { display: flex; flex-direction: column; }
.fc-4 { --fc: #E0A100; }
.auth-points { display: none; }
:root { --top-h: 56px; }
.auth-copy p { margin-top: 20px; }
@media (max-width: 760px) {
  .view-head > .row-gap { display: grid; grid-template-columns: 1fr 1fr; }
  .view-head > .row-gap > .btn-primary:last-child { grid-column: 1 / -1; }
  .view-head > .row-gap > .btn:only-child { grid-column: 1 / -1; }
  .view-head > .row-gap .btn { font-size: 14px; padding: 0 10px; white-space: normal; text-align: center; line-height: 1.15; }
}

/* Rótulos em caixa normal (sem versalete espaçado) */
h3.sub { font: 600 15px var(--display); text-transform: none; letter-spacing: 0; color: var(--ink); margin-top: 14px; }
.dl dt, .doc-dl dt, .mini-dl dt, .cal-wd, .date-chip small, .form-sec, .pub-dim legend, .pdoc-dl dt, .pdoc-table th, .hol-ex small, .hol-ex th, .cert-data dt, .cert-prog strong { text-transform: none; letter-spacing: 0; }
.dl dt, .doc-dl dt, .mini-dl dt { font-size: 13px; font-weight: 500; }
.cal-wd { font-size: 13px; font-weight: 500; color: var(--muted); }
.date-chip strong { font-family: var(--display); }
.pub-dim legend { font: 600 17px var(--display); color: var(--ink); }
.pdoc h2 { text-transform: none; letter-spacing: 0; font: 600 16px var(--display); color: #0A7C58; }
.pdoc-dl dt, .pdoc-table th { font-size: 10.5px; font-weight: 600; }
.cert-data dt, .cert-prog strong { font-size: 11.5px; font-weight: 600; }
.cert-kicker, .pdoc-resumo strong { color: #0A7C58; }
.cert-name { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
.pdoc-head { border-bottom-color: #0A7C58; }
.pdoc-brand .logo-bg, .cert-brand .logo-bg { fill: #0A7C58; }
.doc-meta h2 { font: 600 20px var(--display); }
.doc-dl dd { font-weight: 600; }

.ind-hero { background: var(--accent); }

/* ======================================================================
   Identidade visual v3: tela branca, navegação preta e verde vivo
   ====================================================================== */
:root, :root[data-theme="dark"] {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F7F8F9; --surface-3: #EFF1F3;
  --line: #E8EAED; --line-2: #D5D9DE;
  --ink: #0E1116; --ink-2: #3A414B; --muted: #6B7380;
  --brand: #1FE07B; --brand-2: #14C96A; --brand-ink: #04170C;
  --accent: #0A8F48; --accent-2: #077A3D; --accent-ink: #04170C; --accent-soft: #E6F9EE;
  --ok-bg: #E6F9EE; --ok-ink: #067338;
  --warn-bg: #FFF6DB; --warn-ink: #8A5A00; --warn: #F2B008;
  --bad-bg: #FDECEA; --bad-ink: #B42318; --bad: #E5483B;
  --neu-bg: #F0F2F4; --neu-ink: #3A414B;
  --info: #2D63C8;
  --side: #08090B; --side-ink: #C7CCD3; --side-muted: #727A86; --side-line: #1B1E23; --side-hover: #15181C;
  --shadow-1: 0 1px 2px rgba(14, 17, 22, .05);
  --shadow-2: 0 14px 34px -16px rgba(14, 17, 22, .25), 0 2px 6px rgba(14, 17, 22, .05);
  --shadow-3: 0 30px 70px -24px rgba(14, 17, 22, .4);
  --r-sm: 8px; --r: 12px; --r-lg: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-tema]) {
    --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F7F8F9; --surface-3: #EFF1F3;
    --line: #E8EAED; --line-2: #D5D9DE;
    --ink: #0E1116; --ink-2: #3A414B; --muted: #6B7380;
    --accent: #0A8F48; --accent-2: #077A3D; --accent-ink: #04170C; --accent-soft: #E6F9EE;
    --ok-bg: #E6F9EE; --ok-ink: #067338;
    --warn-bg: #FFF6DB; --warn-ink: #8A5A00; --warn: #F2B008;
    --bad-bg: #FDECEA; --bad-ink: #B42318; --bad: #E5483B;
    --neu-bg: #F0F2F4; --neu-ink: #3A414B;
    --info: #2D63C8;
    --side: #08090B; --side-ink: #C7CCD3; --side-muted: #727A86; --side-line: #1B1E23; --side-hover: #15181C;
    --shadow-1: 0 1px 2px rgba(14, 17, 22, .05);
    --shadow-2: 0 14px 34px -16px rgba(14, 17, 22, .25), 0 2px 6px rgba(14, 17, 22, .05);
    --shadow-3: 0 30px 70px -24px rgba(14, 17, 22, .4);
    color-scheme: light;
  }
  :root:not([data-theme="light"]):not([data-tema]) .demo-bar { background: #FFF6DB; color: #6B4800; }
  :root:not([data-theme="light"]):not([data-tema]) { --c1: #0E1116; --c2: #1FE07B; --c3: #9BEFC2; --c4: #F2B008; --c5: #2D63C8; }
}
:root { --c1: #0E1116; --c2: #1FE07B; --c3: #9BEFC2; --c4: #F2B008; --c5: #2D63C8; }
body { background: #FFFFFF; }

/* ---------- Navegação lateral preta ---------- */
@media (min-width: 1100px) {
  .app { grid-template-columns: 264px minmax(0, 1fr); background: var(--side); }
  .shell { background: #FFFFFF; border-radius: 22px 0 0 22px; margin: 8px 0 8px 0; min-height: calc(100vh - 16px); overflow: clip; }
  .side { padding: 22px 16px 16px; height: 100vh; }
  .topbar { background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); top: 0; }
  .topbar.rolou { border-bottom-color: var(--line); }
  .topbar-in, .main { max-width: 1280px; }
  .topbar-in { padding: 0 40px; }
  .main { padding: 28px 40px 80px; }
  .demo-bar, .plan-bar { padding-left: 40px; }
  .crumb { display: flex; }
}
.crumb { display: none; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); min-width: 0; }
.crumb strong { color: var(--ink); font-weight: 600; }
.crumb .ic { width: 14px; height: 14px; color: var(--line-2); }
.side { background: var(--side); gap: 22px; }
.side-brand { font-size: 22px; padding: 2px 10px; }
.side-brand .logo { width: 30px; height: 30px; }
.side .logo-bg, .brand .logo-bg, .auth-art .logo-bg, .auth-mobile-brand .logo-bg { fill: var(--brand); }
.side .logo-cross, .brand .logo-cross, .auth-art .logo-cross, .auth-mobile-brand .logo-cross { stroke: var(--brand-ink); }
.side-emp { background: #111317; border: 1px solid #1E2126; border-radius: 12px; padding: 12px 14px; }
.side-emp small { display: inline-flex; align-items: center; gap: 6px; color: var(--side-muted); }
.side-emp small::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(31, 224, 123, .18); }
.side-select { background: #08090B; border-color: #262A30; border-radius: 8px; }
.side-nav { gap: 20px; }
.side-grupo p { color: #5E6672; font-size: 12.5px; padding: 0 12px 6px; }
.side-item { min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 15px; color: #B9C0C8; gap: 12px; }
.side-item .ic { color: #6B7380; }
.side-item:hover { background: #15181C; color: #FFFFFF; }
.side-item:hover .ic { color: #FFFFFF; }
.side-item[aria-current="page"] { background: var(--brand); color: var(--brand-ink); font-weight: 600; box-shadow: 0 8px 22px -10px rgba(31, 224, 123, .65); }
.side-item[aria-current="page"] .ic { color: var(--brand-ink); }
.side-item[aria-current="page"]::before { display: none; }
.side-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.side-foot { border-top-color: #1B1E23; color: #5E6672; }

/* ---------- Barra superior e abas (tablet e celular) ---------- */
.topbar { background: #FFFFFF; }
.bell, .avatar-btn { border-radius: 10px; }
.bell { border-color: var(--line); }
.avatar-btn { background: var(--ink); color: var(--brand); }
.avatar-btn:hover { background: #1B1F26; }
.bell-n { background: var(--bad); border-radius: 6px; }
@media (max-width: 1099px) {
  .topbar { background: #08090B; border-bottom: 0; }
  .topbar .brand { color: #FFFFFF; }
  .tabs { background: #15181C; border-radius: 12px; padding: 4px; }
  .tab { color: #9AA2AD; border-radius: 9px; }
  .tab:hover { color: #FFFFFF; }
  .tab[aria-selected="true"], .tab[aria-selected="true"] .ic { color: var(--brand-ink); }
  .tab-ind { background: var(--brand); box-shadow: 0 6px 18px -8px rgba(31, 224, 123, .7); }
  .bell { background: #15181C; border-color: #22262C; color: #E4E7EB; }
  .bell:hover { background: #1E2227; color: #FFFFFF; }
  .avatar-btn { background: var(--brand); color: var(--brand-ink); }
  .emp-select { background: #15181C; color: #FFFFFF; border-color: #22262C; }
}
@media (max-width: 760px) {
  .tabs { background: #08090B; border: 1px solid #1B1E23; border-radius: 16px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55); padding: 6px; }
  .tab { color: #8C95A0; }
  .tab-ind { background: var(--brand); }
  .tab[aria-selected="true"] { color: var(--brand-ink); }
}
.demo-bar { background: #FFF6DB; color: #6B4800; border-bottom: 1px solid #F6E3A6; }
.demo-bar .btn-link { color: #0E1116; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tipografia ---------- */
.view { gap: 24px; }
.eyebrow { color: var(--muted); font-size: 14px; }
.view-head h1 { font-size: clamp(32px, 3.2vw, 42px); font-weight: 700; letter-spacing: -0.015em; }
.lead { color: var(--ink-2); }
.card-head h2, .section-head h2 { font-size: 20px; font-weight: 600; }

/* ---------- Botões ---------- */
.btn { border-radius: 10px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 20px -10px rgba(31, 224, 123, .75), inset 0 -1px 0 rgba(0, 0, 0, .08); }
.btn-primary:hover { background: var(--brand-2); }
.btn-primary.loading::after { border-color: var(--brand-ink) var(--brand-ink) transparent transparent; }
.btn-ghost { background: #FFFFFF; border-color: var(--line-2); box-shadow: var(--shadow-1); }
.btn-ghost:hover { border-color: #B8BEC6; background: #FAFBFB; }
.btn-soft { background: var(--ink); color: #FFFFFF; }
.btn-soft:hover { filter: none; background: #20252D; }
.btn-soft .ic { color: var(--brand); }
.btn-link { color: var(--accent); }
.chip { border-radius: 999px; background: #FFFFFF; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.field input, .field select, .field textarea, .search { border-radius: 10px; background: #FFFFFF; }
.search { background: var(--surface-2); border-color: var(--line); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 224, 123, .35); }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 224, 123, .35); }
.check input { accent-color: #0E1116; }
.seg { background: var(--surface-3); border-radius: 10px; }
.seg-ind { border-radius: 8px; box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.seg-btn { border-radius: 8px; }

/* ---------- Cartões ---------- */
.card { border-radius: var(--r-lg); border-color: var(--line); box-shadow: 0 1px 2px rgba(14, 17, 22, .04), 0 4px 16px -8px rgba(14, 17, 22, .08); }
.card-flush .toolbar { background: #FFFFFF; }
.tags li { border-radius: 6px; background: var(--surface-3); }

/* ---------- KPIs: ícone em selo colorido ---------- */
.kpi { border-radius: var(--r-lg); padding: 18px 20px; gap: 6px; box-shadow: 0 1px 2px rgba(14, 17, 22, .04), 0 4px 16px -8px rgba(14, 17, 22, .08); }
.kpi::before { display: none; }
.kpi-top { gap: 10px; font-size: 14px; color: var(--ink-2); }
.kpi-top .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--surface-3); color: var(--ink-2); }
.kpi-ok .kpi-top .ic { background: var(--ok-bg); color: var(--ok-ink); }
.kpi-vencendo .kpi-top .ic { background: var(--warn-bg); color: var(--warn-ink); }
.kpi-vencido .kpi-top .ic { background: var(--bad-bg); color: var(--bad-ink); }
.kpi-sem .kpi-top .ic { background: #E9F0FC; color: var(--info); }
.kpi-val { font-size: 40px; font-weight: 700; margin-top: 10px; }
.kpi-sub { color: var(--muted); }
button.kpi:hover { background: #FFFFFF; border-color: var(--line-2); box-shadow: var(--shadow-2); }
button.kpi:not(.active)::before { opacity: 1; }
.kpi.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 10px 26px -14px rgba(14, 17, 22, .35); }
.kpi-hero, .ind-hero { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.kpi-hero .kpi-top, .kpi-hero .kpi-sub { color: #AEB5BE; }
.kpi-hero .kpi-top .ic { background: rgba(31, 224, 123, .14); color: var(--brand); }
.ind-hero .ind-val, .ind-hero strong { color: #FFFFFF; }
.ind-hero .hero-split { border-top-color: #252A31; }

/* ---------- Tabelas ---------- */
.table th { background: #FFFFFF; color: var(--muted); font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--line); }
.table td { border-bottom-color: #F0F2F4; }
.table tbody tr[data-act]:hover { background: #F8FAF9; }
.table tbody tr[data-act]:hover .go { color: var(--ink); }
.avatar { border-radius: 50%; background: #EEF0F3; color: var(--ink-2); font-weight: 600; }

/* ---------- Selos ---------- */
.badge { border-radius: 999px; padding: 0 10px 0 8px; gap: 6px; font-weight: 600; min-height: 26px; }
.badge::before { width: 7px; height: 7px; border-radius: 50%; }
.b-ok::before { background: #12B860; }
.b-vencendo::before { background: var(--warn); }
.b-vencido::before { background: var(--bad); }
.b-neutral { padding-left: 10px; }

/* ---------- Faixas e destaques ---------- */
.gasto-faixa, .emp-faixa { background: var(--surface-2); border-color: var(--line); }
.gasto-faixa > .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--ink); color: var(--brand); }
.status-banner, .leitura, .calc, .ref-note, .rec-gaps, .wa-auto, .custo-hero { border-radius: 12px; }
.custo-hero { background: var(--ink); color: #FFFFFF; }
.custo-hero span, .custo-hero small { color: #AEB5BE; }
.custo-hero strong { color: var(--brand); }
.rec-tag { background: var(--ink); color: var(--brand); border-radius: 6px; }
.rec-resumo { background: var(--ink); color: #FFFFFF; }
.rec-resumo small { color: #AEB5BE; }
.rec-n strong { color: var(--brand); }
.rec-head .eyebrow { color: var(--accent); }

/* ---------- Gráficos em verde vivo ---------- */
.bar-fill, .cov-ok, .vig-bar span, .funil-bar::after, .etapas .et.on { background: #14C96A; }
.funil-bar::after { opacity: 1; }
.col-bar { background: var(--ink); }
.col:hover .col-bar { background: #14C96A; }
.ring-fg { stroke: #14C96A; }
.line-path, .chart path.linha { stroke: #0E1116; }

/* ---------- Gaveta e modais ---------- */
.drawer, .modal { border-radius: 16px; }
.layer .scrim { background: rgba(8, 9, 11, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

/* ---------- Login ---------- */
.auth { grid-template-columns: minmax(0, 1fr) minmax(440px, .85fr); background: #FFFFFF; }
.auth-art { background: #08090B; }
.auth-art::before { content: ''; position: absolute; width: 620px; height: 620px; right: -220px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(31, 224, 123, .28), transparent 65%); pointer-events: none; }
.auth-art::after { display: none; }
.auth-copy h1 { font-weight: 700; }
.auth-copy p { color: #9AA2AD; }
.float-card { background: #121519; border: 1px solid #1E2227; border-radius: 12px; }
.float-card::before { border-radius: 12px 0 0 12px; }
.fc-3 { --fc: var(--brand); }
.auth-panel { background: #FFFFFF; }
.auth-seg { background: var(--surface-3); border-radius: 12px; }
.auth-card h2 { font-weight: 700; }

/* ---------- Tour ---------- */
.tour-spot { border-radius: 14px; outline-color: var(--brand); }
.tour-dots i.on { background: var(--ink); }
.tour-n { color: var(--accent); }
@media (min-width: 1100px) { .crumb { display: flex; } }
.ind-hero header, .ind-hero .muted, .ind-hero small, .ind-hero span { color: #AEB5BE; }
.ind-hero header .ic { color: var(--brand); }
.ind-hero .ind-val { color: var(--brand); }
.ind-hero .hero-split strong { color: #FFFFFF; }
.ind-hero .ind-val, .ind-hero .ind-val span, .ind-hero .hero-split strong span { color: #FFFFFF; }
@media (min-width: 1100px) { .topbar .modo-tag { display: none; } }

/* =====================================================================
   v4 · marca nova, busca rápida e acabamento
   ===================================================================== */
/* Marca: escudo com visto que passa da borda */
.logo { width: 30px; height: 30px; flex: none; overflow: visible; color: var(--ink); --logo-check: #12B866; }
.logo-shield { fill: none; stroke: currentColor; stroke-width: 4.4; stroke-linejoin: round; }
.logo-check { fill: none; stroke: var(--logo-check); stroke-width: 5.4; stroke-linecap: round; stroke-linejoin: round; }
.wordmark { font-family: var(--display); font-weight: 700; letter-spacing: -.015em; color: inherit; }
.wordmark b { font-weight: 600; color: #0A8F48; }
.side .logo, .topbar .brand .logo, .auth-art .logo { color: #FFFFFF; --logo-check: #1FE07B; }
.side .wordmark b, .topbar .brand .wordmark b, .auth-art .wordmark b { color: #1FE07B; }
.side-brand { gap: 11px; font-size: 24px; }
.side-brand .logo { width: 32px; height: 32px; }
.auth-brand { gap: 11px; }
.auth-brand .logo { width: 34px; height: 34px; }
.splash .logo { width: 56px; height: 56px; }
.pdoc-brand .logo, .cert-brand .logo { color: #0E1116; --logo-check: #12B866; }

/* Área de trabalho em cinza bem claro: os cartões brancos ganham profundidade */
@media (min-width: 1100px) {
  .shell { background: #F5F6F8; }
  .topbar { background: rgba(245, 246, 248, .86); border-bottom-color: transparent; }
  .topbar.rolou { border-bottom-color: var(--line); background: rgba(255, 255, 255, .9); }
}
@media (max-width: 1099px) { .shell, body { background: #F5F6F8; } }
.gasto-faixa, .emp-faixa { background: #FFFFFF; }
.card, .kpi { border-color: #E4E7EB; }
.card { box-shadow: 0 1px 2px rgba(14, 17, 22, .04); }
.kpi { box-shadow: 0 1px 2px rgba(14, 17, 22, .04); transition: box-shadow .2s var(--ease), border-color .2s, transform .2s var(--ease); }
button.kpi:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(14, 17, 22, .35); }
.kpi-val { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.table th { background: #FAFBFC; }
.toolbar { background: #FFFFFF; }

/* Cabeçalho das páginas mais compacto */
.view-head h1 { font-size: clamp(30px, 2.8vw, 38px); }
.view-head .eyebrow { font-size: 13.5px; }

/* Faixa da demonstração discreta */
.demo-bar { background: #FFFFFF; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.demo-bar .ic { color: #0A8F48; }
.demo-bar strong { color: var(--ink); }
.demo-bar .btn-link { color: #0A8F48; text-decoration: none; font-weight: 700; }
.demo-bar .btn-link:hover { text-decoration: underline; }

/* Rodapé da barra lateral: quem está conectado */
.side-foot { display: flex; align-items: center; gap: 10px; padding: 14px 6px 2px; }
.side-foot .avatar { background: #1B1E23; color: #1FE07B; flex: none; }
.side-user { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.side-user strong { color: #E4E7EB; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { color: #6B7380; font-size: 12.5px; }
.side-item[aria-current="page"] { box-shadow: 0 6px 18px -10px rgba(31, 224, 123, .6); }

/* Botão de busca na barra superior */
.busca-btn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; color: var(--muted); font: 500 14px var(--font); cursor: pointer; min-width: 300px; transition: border-color .15s, color .15s, box-shadow .15s; }
.busca-btn .ic { width: 16px; height: 16px; }
.busca-btn span { flex: 1; text-align: left; }
.busca-btn:hover { border-color: var(--line-2); color: var(--ink); box-shadow: var(--shadow-1); }
.busca-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
kbd { font: 600 11.5px/1 var(--font); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
@media (min-width: 1100px) { .topbar .emp-name { display: none; } }
@media (max-width: 1340px) { .busca-btn { min-width: 0; } .busca-btn span { display: none; } }
@media (max-width: 1099px) {
  .busca-btn { width: 40px; padding: 0; justify-content: center; background: #15181C; border-color: #22262C; color: #E4E7EB; }
  .busca-btn kbd { display: none; }
}

/* Paleta de busca */
.layer-modal.modal-busca { place-items: start center; padding: 11vh 16px 16px; }
.modal-busca .modal { width: 100%; max-width: 620px; padding: 0; overflow: hidden; border-radius: 16px; }
.busca { display: flex; flex-direction: column; }
.busca-campo { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 62px; border-bottom: 1px solid var(--line); }
.busca-campo > .ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.busca-campo input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 17px var(--font); }
.busca-campo input::-webkit-search-cancel-button { display: none; }
.busca-res { max-height: min(430px, 56vh); overflow: auto; padding: 6px 8px 10px; }
.busca-grupo { margin: 0; padding: 12px 10px 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.busca-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.busca-item:hover, .busca-item.on { background: #F1F3F5; }
.busca-item > .ic { width: 16px; height: 16px; color: var(--muted); opacity: 0; flex: none; }
.busca-item.on > .ic { opacity: 1; }
.busca-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: #0E1116; color: #1FE07B; }
.busca-ic .ic { width: 16px; height: 16px; }
.busca-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.busca-txt strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busca-txt small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busca-vazio { padding: 32px 16px; text-align: center; color: var(--muted); margin: 0; }
.busca-pe { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); background: #FAFBFC; font-size: 12.5px; color: var(--muted); }
.busca-pe kbd { margin-right: 3px; background: #FFFFFF; }
@media (max-width: 760px) { .busca-pe { display: none; } .layer-modal.modal-busca { padding-top: 12px; } }

/* Login: selos de confiança */
.auth-selos { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; position: relative; z-index: 1; }
.auth-selos li { display: inline-flex; align-items: center; gap: 8px; color: #C9D0D7; font-size: 14.5px; font-weight: 500; }
.auth-selos .ic { width: 16px; height: 16px; color: #1FE07B; }
.auth-art { background-image: linear-gradient(#15181C 1px, transparent 1px), linear-gradient(90deg, #15181C 1px, transparent 1px); background-size: 56px 56px; background-color: #08090B; }

/* Importação por planilha */
.imp-passos { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.imp-passos li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; }
.imp-passos li > span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #0E1116; color: #1FE07B; font: 700 15px var(--display); }
.imp-passos strong { display: block; font-size: 15.5px; }
.imp-passos p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.imp-passos .btn { margin-top: 10px; }
.imp-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 28px 16px; border: 1.5px dashed var(--line-2); border-radius: 14px; background: #FAFBFC; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.imp-drop .ic { width: 26px; height: 26px; color: #0A8F48; margin-bottom: 4px; }
.imp-drop small { color: var(--muted); }
.imp-drop:hover, .imp-drop.sobre { border-color: #0A8F48; background: #F0FCF5; }
.imp-drop:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.imp-drop.lendo { opacity: .6; pointer-events: none; }
.imp-arquivo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.imp-arquivo > .ic { width: 22px; height: 22px; color: #0A8F48; flex: none; }
.imp-arquivo > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.imp-arquivo small { color: var(--muted); }
.imp-resumo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.imp-resumo > div { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; }
.imp-resumo > div .ic { width: 18px; height: 18px; color: #0A8F48; margin-bottom: 6px; }
.imp-resumo strong { font: 700 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.imp-resumo span { font-size: 14px; color: var(--ink-2); }
.imp-resumo small { font-size: 12.5px; color: var(--bad-ink); }
.imp-resumo > .vazio { opacity: .5; }
.imp-sec { border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; overflow: hidden; }
.imp-sec summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; background: #FAFBFC; }
.imp-sec summary::-webkit-details-marker { display: none; }
.imp-sec summary span { color: var(--muted); font-size: 13.5px; }
.imp-sec[open] summary { border-bottom: 1px solid var(--line); }
.imp-sec .table td { padding-top: 9px; padding-bottom: 9px; }
.imp-sec .table-wrap { max-height: 300px; overflow: auto; }
.imp-sit { text-align: right; white-space: nowrap; }
@media (max-width: 640px) { .imp-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); } .imp-sit { white-space: normal; } }
.imp .modal-body > * { flex-shrink: 0; }
.imp .status-banner { flex-wrap: nowrap; align-items: flex-start; font-weight: 500; }
.imp .status-banner .ic { flex: none; margin-top: 2px; }
.avatar-btn { border-radius: 50%; }

/* PGR e eSocial */
.pgr-lista { display: flex; flex-direction: column; gap: 14px; }
.pgr-vazio { padding: 4px 20px 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--ink-2); font-size: 14px; }
.pgr-vazio p { margin: 0; }
.risco-tipo { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.risco-tipo::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--rt, #8A949D); flex: none; }
.risco-tipo.t-fisico { --rt: #12B866; } .risco-tipo.t-quimico { --rt: #CF3A2E; } .risco-tipo.t-biologico { --rt: #8A5A2B; }
.risco-tipo.t-ergonomico { --rt: #E0A100; } .risco-tipo.t-acidente { --rt: #2D63C8; } .risco-tipo.t-psicossocial { --rt: #8B5CF6; }
.pgr-table td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }
.pgr-psico, .esocial-pend { flex-wrap: nowrap; align-items: center; font-weight: 500; }
.pgr-psico > span, .esocial-pend > span { flex: 1; min-width: 0; }
.pgr-psico .ic, .esocial-pend .ic { flex: none; }
@media (max-width: 760px) { .pgr-psico, .esocial-pend { flex-wrap: wrap; } }
.pdoc-ass { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: 34px; }
.pdoc-ass > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pdoc-ass span { width: 100%; border-top: 1px solid #16201B; }
.pdoc-ass small { color: #5A645E; }
.pdoc h2 small { font-weight: 500; text-transform: none; letter-spacing: 0; color: #5A645E; }
.pdoc ul.pdoc-text { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }

/* =====================================================================
   v5 · Central escura (padrão) com opção de modo claro, fonte Geist,
   menu recolhível e tela Hoje
   ===================================================================== */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/geist-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/geist-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/geist-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/geist-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/geist-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/geist-mono-latin-600-normal.woff2') format('woff2'); }
:root {
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
body { font-family: var(--font); }
.view-head h1, .hoje-head h1 { font-family: var(--display); font-weight: 600; letter-spacing: -0.025em; }
.kpi-val { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; }
.mono { font-family: var(--mono); }
.wordmark { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; }
.wordmark b { font-weight: 600; }

/* ---------- Menu lateral no estilo da Central (vale nos dois temas: o menu é sempre escuro) ---------- */
.side { border-right: 1px solid #1A1E24; }
.side-item { font-size: 14.5px; }
.side-item[aria-current="page"] { background: #15211B; color: #FFFFFF; box-shadow: inset 2px 0 0 #1FE07B; font-weight: 600; }
.side-item[aria-current="page"] .ic { color: #1FE07B; }
.side-grupo p { color: #6F7A85; }
.side-recolher { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #8C97A2; font-size: 13.5px; margin-top: auto; }
.side-recolher:hover { background: #15181C; color: #FFFFFF; }
.side-recolher:focus-visible { outline: 2px solid #1FE07B; outline-offset: 2px; }
.side-recolher .ic { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.side-nav { flex: 1 1 auto; overflow-y: auto; }
@media (min-width: 1100px) {
  .app { transition: grid-template-columns .25s var(--ease); }
  html.menu-recolhido .app { grid-template-columns: 76px minmax(0, 1fr); }
  html.menu-recolhido .side { padding-left: 12px; padding-right: 12px; }
  html.menu-recolhido .side .wordmark, html.menu-recolhido .side-item span, html.menu-recolhido .side-grupo p,
  html.menu-recolhido .side-emp, html.menu-recolhido .side-user, html.menu-recolhido .side-recolher span { display: none; }
  html.menu-recolhido .side-brand { justify-content: center; padding: 2px 0; }
  html.menu-recolhido .side-item { justify-content: center; padding: 0; }
  html.menu-recolhido .side-grupo { padding-top: 8px; border-top: 1px solid #1A1E24; }
  html.menu-recolhido .side-grupo:first-child { border-top: 0; }
  html.menu-recolhido .side-recolher { justify-content: center; padding: 9px 0; }
  html.menu-recolhido .side-recolher .ic { transform: scaleX(-1); }
  html.menu-recolhido .side-foot { justify-content: center; padding-left: 0; padding-right: 0; }
}
@media (max-width: 1099px) { .side-recolher { display: none; } }

/* ---------- Botão de tema ---------- */
.tema-btn { all: unset; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); flex: none; }
.tema-btn:hover { color: var(--ink); border-color: var(--line-2); }
.tema-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tema-btn .ic { width: 18px; height: 18px; }
@media (max-width: 1099px) { .tema-btn { background: #15181C; border-color: #22262C; color: #E4E7EB; } }

/* ---------- Tema escuro (padrão) ---------- */
html[data-tema="escuro"] {
  color-scheme: dark;
  --bg: #0B0D10; --surface: #13161B; --surface-2: #171B21; --surface-3: #1F242B;
  --line: #232931; --line-2: #313841;
  --ink: #E8ECEF; --ink-2: #B9C2CB; --muted: #8C97A2;
  --accent: #4BEA97; --accent-2: #6CF0A8; --accent-soft: #15241C; --accent-ink: #04170C;
  --ok-bg: #13261C; --ok-ink: #6FE7A8;
  --warn-bg: #2A2210; --warn-ink: #F5C25A; --warn: #F5B83D;
  --bad-bg: #2C1614; --bad-ink: #FF8A7D; --bad: #FF7A6B;
  --neu-bg: #1E232A; --neu-ink: #C3CDD6; --info: #8DB8FF;
  --shadow-1: 0 1px 0 rgba(0, 0, 0, .25);
  --shadow-2: 0 14px 34px -14px rgba(0, 0, 0, .7);
  --shadow-3: 0 30px 70px -24px rgba(0, 0, 0, .85);
  --c1: #E8ECEF;
}
html[data-tema="escuro"] body { background: #0B0D10; color: var(--ink); }
@media (min-width: 1100px) {
  html[data-tema="escuro"] .app { background: #08090B; }
  html[data-tema="escuro"] .shell { background: #0B0D10; margin: 0; border-radius: 0; min-height: 100vh; }
  html[data-tema="escuro"] .topbar { background: rgba(11, 13, 16, .86); border-bottom-color: transparent; }
  html[data-tema="escuro"] .topbar.rolou { background: rgba(11, 13, 16, .94); border-bottom-color: var(--line); }
}
@media (max-width: 1099px) { html[data-tema="escuro"] .shell { background: #0B0D10; } }
html[data-tema="escuro"] .demo-bar { background: #0F1216; color: var(--ink-2); border-bottom-color: var(--line); }
html[data-tema="escuro"] .demo-bar strong { color: var(--ink); }
html[data-tema="escuro"] .demo-bar .ic, html[data-tema="escuro"] .demo-bar .btn-link { color: #4BEA97; }
html[data-tema="escuro"] .card, html[data-tema="escuro"] .kpi { background: var(--surface); border-color: var(--line); box-shadow: none; }
html[data-tema="escuro"] button.kpi:hover { background: #171B21; border-color: var(--line-2); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .8); }
html[data-tema="escuro"] .kpi.active { border-color: #1FE07B; box-shadow: 0 0 0 1px #1FE07B; }
html[data-tema="escuro"] .kpi-sem .kpi-top .ic { background: #141A24; color: #8DB8FF; }
html[data-tema="escuro"] .kpi-top .ic { background: #1F242B; color: var(--ink-2); }
html[data-tema="escuro"] .kpi-hero, html[data-tema="escuro"] .ind-hero, html[data-tema="escuro"] .custo-hero, html[data-tema="escuro"] .rec-resumo { background: radial-gradient(120% 90% at 100% 0%, #123323 0%, #13161B 60%); border-color: #1F3A2C; color: #FFFFFF; }
html[data-tema="escuro"] .btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); box-shadow: none; }
html[data-tema="escuro"] .btn-ghost:hover { background: #1A1F25; border-color: #3A424C; }
html[data-tema="escuro"] .btn-soft { background: #232A31; color: #FFFFFF; }
html[data-tema="escuro"] .btn-soft:hover { background: #2C343C; }
html[data-tema="escuro"] .btn-primary { box-shadow: 0 8px 22px -12px rgba(31, 224, 123, .55); }
html[data-tema="escuro"] .btn-link { color: #4BEA97; }
html[data-tema="escuro"] .chip { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
html[data-tema="escuro"] .chip:hover { color: var(--ink); border-color: #3A424C; }
html[data-tema="escuro"] .chip.on { background: #1FE07B; border-color: #1FE07B; color: #04170C; }
html[data-tema="escuro"] .field input, html[data-tema="escuro"] .field select, html[data-tema="escuro"] .field textarea { background: #0F1216; border-color: var(--line-2); color: var(--ink); }
html[data-tema="escuro"] .field input:focus, html[data-tema="escuro"] .field select:focus, html[data-tema="escuro"] .field textarea:focus { border-color: #1FE07B; }
html[data-tema="escuro"] .search { background: #0F1216; border-color: var(--line-2); }
html[data-tema="escuro"] .search:focus-within { border-color: #1FE07B; }
html[data-tema="escuro"] .search input { color: var(--ink); }
html[data-tema="escuro"] .check input { accent-color: #1FE07B; }
html[data-tema="escuro"] .toolbar, html[data-tema="escuro"] .card-flush .toolbar { background: var(--surface); }
html[data-tema="escuro"] .table th { background: #171B21; color: var(--muted); border-bottom-color: var(--line); }
html[data-tema="escuro"] .table td { border-bottom-color: #1C2128; }
html[data-tema="escuro"] .table tbody tr[data-act]:hover { background: #181D23; }
html[data-tema="escuro"] .avatar { background: #232A31; color: var(--ink-2); }
html[data-tema="escuro"] .avatar-btn { background: #1E232A; color: #1FE07B; }
html[data-tema="escuro"] .avatar-btn:hover { background: #262C34; }
html[data-tema="escuro"] .bell { background: var(--surface); border-color: var(--line); color: var(--ink); }
html[data-tema="escuro"] .busca-btn { background: var(--surface); border-color: var(--line); color: var(--muted); }
html[data-tema="escuro"] .busca-btn:hover { color: var(--ink); border-color: var(--line-2); }
html[data-tema="escuro"] kbd { background: #0F1216; border-color: var(--line-2); color: var(--muted); }
html[data-tema="escuro"] .busca-item:hover, html[data-tema="escuro"] .busca-item.on { background: #1E232A; }
html[data-tema="escuro"] .busca-pe { background: #0F1216; }
html[data-tema="escuro"] .busca-ic { background: #0B0D10; }
html[data-tema="escuro"] .gasto-faixa, html[data-tema="escuro"] .emp-faixa { background: var(--surface); border-color: var(--line); }
html[data-tema="escuro"] .gasto-faixa > .ic { background: #0B0D10; }
html[data-tema="escuro"] .rec-tag { background: #0B0D10; color: #1FE07B; border: 1px solid #1F3A2C; }
html[data-tema="escuro"] .col-bar { background: #3A424C; }
html[data-tema="escuro"] .line-path, html[data-tema="escuro"] .chart path.linha { stroke: #E8ECEF; }
html[data-tema="escuro"] .imp-drop, html[data-tema="escuro"] .imp-sec summary { background: #0F1216; }
html[data-tema="escuro"] .imp-drop:hover, html[data-tema="escuro"] .imp-drop.sobre { background: #13231B; }
html[data-tema="escuro"] .imp-resumo > div, html[data-tema="escuro"] .imp-arquivo { background: var(--surface); border-color: var(--line); }
html[data-tema="escuro"] .imp-passos li > span { background: #1FE07B; color: #04170C; }
html[data-tema="escuro"] .seg { background: #0F1216; }
html[data-tema="escuro"] .seg-ind { background: #232A31; box-shadow: none; }
html[data-tema="escuro"] .layer .scrim { background: rgba(0, 0, 0, .6); }
html[data-tema="escuro"] .modal, html[data-tema="escuro"] .drawer, html[data-tema="escuro"] .menu, html[data-tema="escuro"] .tour-pop { background: #13161B; border: 1px solid var(--line); }
html[data-tema="escuro"] .tour-dots i.on { background: #1FE07B; }
html[data-tema="escuro"] .op-plano, html[data-tema="escuro"] .plano-box { background: var(--surface); }
html[data-tema="escuro"] .pgr-vazio { color: var(--ink-2); }
html[data-tema="escuro"] .logo { color: #FFFFFF; --logo-check: #1FE07B; }
html[data-tema="escuro"] .wordmark b { color: #1FE07B; }
html[data-tema="escuro"] .pdoc .logo, html[data-tema="escuro"] .cert .logo { color: #0E1116; --logo-check: #12B866; }
html[data-tema="escuro"] .doc-scroll { background: #0B0D10; }
/* Telas públicas e login continuam no visual claro */
html[data-tema="escuro"] .auth-panel, html[data-tema="escuro"] .pub, html[data-tema="escuro"] .splash {
  color-scheme: light;
  --bg: #F5F6F8; --surface: #FFFFFF; --surface-2: #F6F8F9; --surface-3: #E6EAEE; --line: #DCE2E7; --line-2: #C6CED6;
  --ink: #0E1116; --ink-2: #3D4A57; --muted: #5F6C79; --accent: #0A8F48; --accent-soft: #E1F2EA;
  --ok-bg: #E1F2EA; --ok-ink: #075E43; --warn-bg: #FFF3D1; --warn-ink: #7A5200; --bad-bg: #FBE6E3; --bad-ink: #A3241B; --neu-bg: #E9EDF0; --neu-ink: #3D4A57; --info: #2C5E95;
  color: var(--ink);
}
html[data-tema="escuro"] .auth-panel .field input { background: #FFFFFF; border-color: #C6CED6; color: #0E1116; }
html[data-tema="escuro"] .auth-panel .btn-ghost { background: #FFFFFF; border-color: #C6CED6; color: #0E1116; }
html[data-tema="escuro"] .auth-panel .btn-link { color: #0A8F48; }
html[data-tema="escuro"] .splash { background: #0B0D10; }
html[data-tema="escuro"] .splash .logo { color: #FFFFFF; --logo-check: #1FE07B; }

/* ---------- Tela Hoje ---------- */
.hoje-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.hoje-head h1 { font-size: clamp(26px, 2.6vw, 32px); margin-top: 4px; max-width: 30em; text-wrap: balance; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.bloco { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bloco h2 { font-size: 16px; font-weight: 600; margin: 0; }
.bloco-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bloco-topo .btn-link { font-size: 13.5px; }
.bloco-rot { margin: 0; font-size: 14px; color: var(--ink-2); }
.bloco-indice { grid-column: span 4; grid-row: span 2; background: radial-gradient(120% 90% at 100% 0%, rgba(31, 224, 123, .13) 0%, var(--surface) 55%); }
.bloco-exames { grid-column: span 5; }
.bloco-semana { grid-column: span 3; grid-row: span 2; }
.bloco-30 { grid-column: span 5; }
.bloco-esocial, .bloco-trein, .bloco-passos { grid-column: span 4; }
.indice-topo { display: flex; align-items: center; gap: 20px; }
.indice-topo > div { display: flex; flex-direction: column; gap: 4px; }
.indice-topo strong { font-size: 19px; font-weight: 600; }
.indice-topo span { font-size: 13.5px; color: var(--muted); }
.anel { width: 128px; height: 128px; flex: none; }
.anel-fundo { fill: none; stroke: var(--surface-3); stroke-width: 12; }
.anel-valor { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .8s var(--ease-out); }
.anel-ok { stroke: #1FE07B; } .anel-aviso { stroke: #F5B83D; } .anel-ruim { stroke: #FF7A6B; }
.anel text { fill: var(--ink); font: 700 30px var(--display); letter-spacing: -0.03em; }
.barras { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.barra { display: flex; flex-direction: column; gap: 6px; }
.barra-rot { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.barra-rot .mono { color: var(--ink); }
.barra-trilho { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.barra-trilho i { display: block; height: 100%; border-radius: inherit; }
.b-ok { --x: 0; } .barra-trilho .b-ok { background: #1FE07B; } .barra-trilho .b-aviso { background: #F5B83D; } .barra-trilho .b-ruim { background: #FF7A6B; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mini { all: unset; cursor: pointer; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.mini:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mini strong { font: 700 30px/1.05 var(--display); letter-spacing: -0.03em; }
.mini > span { font-size: 12.5px; }
.m-ruim { background: var(--bad-bg); } .m-ruim strong { color: var(--bad-ink); } .m-ruim > span { color: var(--bad-ink); opacity: .85; }
.m-info { background: #EEF3FC; } .m-info strong, .m-info > span { color: #2C5E95; }
.m-aviso { background: var(--warn-bg); } .m-aviso strong, .m-aviso > span { color: var(--warn-ink); }
.m-ok { background: var(--ok-bg); } .m-ok strong, .m-ok > span { color: var(--ok-ink); }
html[data-tema="escuro"] .m-info { background: #141A24; } html[data-tema="escuro"] .m-info strong, html[data-tema="escuro"] .m-info span { color: #8DB8FF; }
.mini:hover { filter: brightness(1.08); }
.semana { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.semana li + li { border-top: 1px solid var(--line); }
.semana button { all: unset; cursor: pointer; display: flex; gap: 12px; padding: 11px 0; width: 100%; box-sizing: border-box; }
.semana button:hover strong { color: var(--accent); }
.semana button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.semana span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.semana strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.semana small { font-size: 12.5px; color: var(--muted); }
.pt { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; flex: none; }
.pt-ruim { background: #FF7A6B; } .pt-aviso { background: #F5B83D; } .pt-info { background: #8DB8FF; }
.dias30 { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 6px; }
.dia { height: 30px; border-radius: 6px; background: var(--surface-3); }
.dia.leve { background: #2E5A43; } .dia.forte { background: #1FE07B; }
html[data-tema="claro"] .dia.leve { background: #A6EBC6; } html[data-tema="claro"] .dia.forte { background: #12B866; }
.dia.hoje { box-shadow: inset 0 0 0 2px var(--ink); }
.dias30-leg { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.linha-es { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.verde { color: var(--accent); }
.num-grande { display: flex; align-items: baseline; gap: 8px; }
.num-grande strong { font: 700 34px var(--display); letter-spacing: -0.03em; }
.num-grande > span { font-size: 13.5px; color: var(--muted); }
.agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.agenda li { display: flex; justify-content: space-between; gap: 12px; }
.agenda li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.passos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.passos button { all: unset; cursor: pointer; display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 13.5px; width: 100%; box-sizing: border-box; }
.passos button:hover:not([disabled]) span { color: var(--accent); }
.passos button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.passos button > i { width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; box-sizing: border-box; }
.passos button > .ic { width: 16px; height: 16px; color: #1FE07B; flex: none; }
.passos .feito span { color: var(--muted); text-decoration: line-through; }
.passos button[disabled] { cursor: default; }
.passos small { display: block; color: var(--muted); font-size: 12px; text-decoration: none; }
.atalhos { display: flex; flex-direction: column; gap: 8px; }
.atalhos .btn { justify-content: flex-start; }
@media (max-width: 1340px) {
  .bloco-indice { grid-column: span 5; } .bloco-exames { grid-column: span 7; } .bloco-semana { grid-column: span 7; grid-row: auto; } .bloco-30 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .bento > .bloco { grid-column: span 12; grid-row: auto; }
  .mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dias30 { gap: 4px; } .dia { height: 24px; }
}
.mt-auto { margin-top: auto; }

/* ---------- Central da consultoria ---------- */
.side-voltar { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; margin-bottom: 8px; border-radius: 10px; color: #9BEFC2; font-weight: 600; font-size: 14px; border: 1px dashed #24433A; }
.side-voltar .ic { width: 16px; height: 16px; }
.side-voltar:hover { background: #15211B; color: #FFFFFF; }
.side-voltar:focus-visible { outline: 2px solid var(--brand, #1FE07B); outline-offset: 2px; }
html.menu-recolhido .side-voltar span { display: none; }
html.menu-recolhido .side-voltar { justify-content: center; padding: 9px 0; }
.cons-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.busca-campo-inline { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; max-width: 420px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.busca-campo-inline input { all: unset; flex: 1; min-width: 0; color: var(--ink); font: inherit; }
.busca-campo-inline:focus-within { border-color: var(--accent); }
.busca-campo-inline .ic { width: 16px; height: 16px; }
.cons-table tbody tr { cursor: pointer; }
.cons-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.txt-bad { color: var(--bad-ink, #B42318); font-weight: 700; }
.txt-warn { color: var(--warn-ink, #8A5A00); font-weight: 700; }
.modo-consultoria .side-emp strong { font-size: 15px; }
@media (max-width: 720px) { .cons-head .seg { width: 100%; } .busca-campo-inline { max-width: none; } }
.cons-table .num-col { text-align: center; }
.cons-table td.acts .btn { white-space: nowrap; }
@media (max-width: 1280px) { .hide-l { display: none; } }
@media (max-width: 720px) {
  .cons-table td.acts, .cons-table th:last-child { display: none; }
  .cons-table td, .cons-table th { padding-left: 12px; padding-right: 12px; }
  .modo-tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
}
@media (max-width: 720px) {
  .modo-tag { display: none; }
  .cons-table .nowrap { white-space: normal; }
  .cons-table td:first-child { min-width: 150px; }
}
/* Painéis claros dentro do tema escuro (login, páginas públicas): mantém os controles claros */
html[data-tema="escuro"] .auth-panel .seg, html[data-tema="escuro"] .pub .seg { background: #EEF1F3; }
html[data-tema="escuro"] .auth-panel .seg-ind, html[data-tema="escuro"] .pub .seg-ind { background: #FFFFFF; box-shadow: 0 1px 2px rgba(14, 17, 22, .08), 0 0 0 1px #E2E6EA; }
html[data-tema="escuro"] .auth-panel .seg-btn, html[data-tema="escuro"] .pub .seg-btn { color: #5B6470; }
html[data-tema="escuro"] .auth-panel .seg-btn.on, html[data-tema="escuro"] .pub .seg-btn.on { color: #0E1116; }
html[data-tema="escuro"] .auth-panel .seg-btn:hover, html[data-tema="escuro"] .pub .seg-btn:hover { color: #0E1116; }
