/* Estrutura comum (vm-shell.js). Cores em tokens: troque aqui para seguir o brandbook. */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");
/* Cores e fonte do Brandbook Valmarc: Azul #005baa, Preto #212121, Branco #ffffff, Roboto. */
:root {
  --vs-side-w: 252px;
  --vs-brand: #005baa; --vs-brand-dark: #004a8c; --vs-black: #212121;
  --vs-page: #181818; --vs-surface: #212121; --vs-raised: #2a2a2a; --vs-line: #333333; --vs-line-strong: #454545;
  --vs-text: #f2f2f2; --vs-muted: #a8a8a8; --vs-accent: #005baa; --vs-accent-strong: #0a6cc4; --vs-accent-text: #5aa7ec; --vs-accent-soft: #00305a;
  --vs-danger: #e5534b; --vs-success: #34b27b;
  --vs-side-bg: #141414; --vs-side-text: #c9c9c9; --vs-side-strong: #ffffff; --vs-side-hover: #ffffff0f; --vs-side-active: #005baa; --vs-side-line: #ffffff14;
  --vs-hero: linear-gradient(120deg, #004a8c, #005baa 60%, #0a6cc4);
  --vs-radius: 10px; --vs-radius-sm: 8px;
  --vs-shadow: 0 1px 2px #0004;
  --vs-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
html[data-vm-theme=light] {
  --vs-page: #f4f5f7; --vs-surface: #ffffff; --vs-raised: #f7f8fa; --vs-line: #e3e5e8; --vs-line-strong: #cfd3d8;
  --vs-text: #212121; --vs-muted: #5f6368; --vs-accent: #005baa; --vs-accent-strong: #004a8c; --vs-accent-text: #005baa; --vs-accent-soft: #e5eff8; --vs-success: #1b7f50;
  --vs-side-bg: #005baa; --vs-side-text: #dceaf7; --vs-side-strong: #ffffff; --vs-side-hover: #ffffff1a; --vs-side-active: #212121; --vs-side-line: #ffffff26;
  --vs-shadow: 0 1px 2px #2121210d, 0 1px 3px #2121210a;
}

/* Fica tudo escondido até o login ser confirmado */
.vs-side, .vs-bar, .vs-scrim { display: none; }
body.vs-ready .vs-side { display: flex; }
body.vs-ready { padding-left: var(--vs-side-w) !important; }

.vs-side { position: fixed; z-index: 900; inset: 0 auto 0 0; width: var(--vs-side-w); flex-direction: column; gap: 4px;
  padding: 18px 12px 14px; overflow-y: auto; background: var(--vs-side-bg); color: var(--vs-side-text); font: 14px/1.4 var(--vs-font);
  border-right: 1px solid var(--vs-side-line); }
.vs-side svg, .vs-bar svg { width: 20px; height: 20px; flex: none; }
.vs-brand { display: block; padding: 4px 10px 18px; }
.vs-brand img { display: block; width: 138px; height: auto; filter: none !important; background: none !important; padding: 0 !important; }
.vs-nav { display: flex; flex-direction: column; gap: 2px; }
.vs-group { margin: 16px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--vs-side-text) !important; opacity: .62; }
.vs-link { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: var(--vs-radius-sm);
  color: var(--vs-side-text) !important; text-decoration: none !important; font-weight: 500; }
.vs-link:hover { background: var(--vs-side-hover); color: var(--vs-side-strong) !important; }
.vs-link.active { background: var(--vs-side-active); color: var(--vs-side-strong) !important; font-weight: 600; }
.vs-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--vs-side-line); }
.vs-user { display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px; }
.vs-user strong { display: block; color: var(--vs-side-strong) !important; font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-user small { display: block; color: var(--vs-side-text) !important; opacity: .75; font-size: 12px; }
.vs-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--vs-side-active); color: #fff; font-weight: 700; }
.vs-theme, .vs-out { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: var(--vs-radius-sm);
  background: transparent !important; color: var(--vs-side-text) !important; font: 500 14px var(--vs-font) !important; cursor: pointer; text-align: left; box-shadow: none !important; }
.vs-theme:hover, .vs-out:hover { background: var(--vs-side-hover) !important; color: var(--vs-side-strong) !important; }
.vs-theme i { position: relative; margin-left: auto; width: 34px; height: 20px; border-radius: 10px; background: #ffffff33; transition: background .15s; }
.vs-theme i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.vs-theme[aria-checked=true] i { background: #4ea4ff; }
.vs-theme[aria-checked=true] i::after { transform: translateX(14px); }

.vs-bar { position: fixed; z-index: 880; inset: 0 0 auto 0; height: 56px; align-items: center; gap: 12px; padding: 0 12px;
  background: var(--vs-side-bg); color: #fff; font: 600 15px var(--vs-font); border-bottom: 1px solid var(--vs-side-line); }
.vs-bar img { height: 22px; width: auto; filter: none !important; }
.vs-bar span { margin-left: auto; font-weight: 500; font-size: 14px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-burger { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--vs-radius-sm); background: #ffffff14 !important; color: #fff !important; cursor: pointer; }
.vs-scrim { position: fixed; inset: 0; z-index: 890; background: #0009; }

@media (max-width: 960px) {
  body.vs-ready { padding-left: 0 !important; padding-top: 56px !important; }
  body.vs-ready .vs-bar { display: flex; }
  .vs-side { width: min(290px, 86vw); transform: translateX(-104%); transition: transform .2s ease; box-shadow: 0 0 40px #0008; }
  body.vs-menu-open .vs-side { transform: none; }
  body.vs-menu-open .vs-scrim { display: block; }
}
@media (prefers-reduced-motion: reduce) { .vs-side { transition: none; } }

/* Cabeçalhos antigos de cada página: a navegação agora fica no menu lateral */
body.vs-ready:not(.vs-placas) > header:not(.vs-bar),
body.vs-ready #appShell .catalog-header .brand-logo,
body.vs-ready #appShell .catalog-header .topbar-actions,
body.vs-ready #moduleChooser #chooserThemeSlot,
body.vs-ready #moduleChooser #chooserLogout,
body.vs-ready.vs-placas .topbar .brand-logo-wrap,
body.vs-ready.vs-placas .topbar .brand-name,
body.vs-ready.vs-placas .topbar .module-nav { display: none !important; }

/* ---------- Menu recolhível, grupos e submenu da Gestão ---------- */
.vs-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.vs-collapse { display: grid; place-items: center; width: 34px; height: 34px; margin-top: 2px; border: 0; border-radius: var(--vs-radius-sm);
  background: transparent !important; color: var(--vs-side-text) !important; cursor: pointer; box-shadow: none !important; padding: 0 !important; }
.vs-collapse:hover { background: var(--vs-side-hover) !important; color: var(--vs-side-strong) !important; }
button.vs-group { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 12px); border: 0; padding: 0 !important; margin: 16px 6px 6px 12px;
  background: transparent !important; box-shadow: none !important; cursor: pointer; font: 600 11px var(--vs-font) !important; letter-spacing: .08em; text-transform: uppercase; min-height: 0 !important; }
button.vs-group svg { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .15s; }
.vs-sec.closed button.vs-group svg { transform: none; }
.vs-sec.closed .vs-items { display: none; }
.vs-items { display: flex; flex-direction: column; gap: 2px; }
.vs-link { position: relative; }
.vs-link > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-toggle { display: grid; place-items: center; width: 24px; height: 24px; margin-right: -6px; border-radius: 6px; font-style: normal; }
.vs-toggle:hover { background: var(--vs-side-hover); }
.vs-toggle svg { width: 14px !important; height: 14px !important; transition: transform .15s; }
.vs-tree.open .vs-toggle svg { transform: rotate(90deg); }
.vs-subs { display: none; flex-direction: column; gap: 1px; margin: 2px 0 6px 22px; padding-left: 10px; border-left: 1px solid var(--vs-side-line); }
.vs-tree.open .vs-subs { display: flex; }
.vs-sublink { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 5px 10px; border-radius: 6px; color: var(--vs-side-text) !important;
  text-decoration: none !important; font-size: 13px; }
.vs-sublink span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-sublink:hover { background: var(--vs-side-hover); color: var(--vs-side-strong) !important; }
.vs-sublink.active { background: var(--vs-side-hover); color: var(--vs-side-strong) !important; font-weight: 600; box-shadow: inset 3px 0 0 #4ea4ff; }
.vs-sep { border: 0; border-top: 1px solid var(--vs-side-line); margin: 6px 0; }
.vs-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e5534b; color: #fff;
  font: 700 11px/1 var(--vs-font); flex: none; }
.vs-link .vs-badge { margin-left: auto; }

@media (min-width: 961px) {
  body.vs-ready.vs-collapsed { padding-left: 72px !important; }
  body.vs-collapsed .vs-side { width: 72px; padding: 14px 10px; overflow-x: hidden; }
  body.vs-collapsed .vs-top { flex-direction: column; align-items: center; }
  body.vs-collapsed .vs-brand { padding: 2px 0 8px; }
  body.vs-collapsed .vs-brand img { width: 44px; height: 22px; object-fit: cover; object-position: left center; }
  body.vs-collapsed .vs-link { justify-content: center; padding: 8px 0; }
  body.vs-collapsed .vs-link > span, body.vs-collapsed .vs-toggle, body.vs-collapsed .vs-subs,
  body.vs-collapsed button.vs-group, body.vs-collapsed .vs-user > span:last-child,
  body.vs-collapsed .vs-theme span, body.vs-collapsed .vs-theme i, body.vs-collapsed .vs-out span, body.vs-collapsed .vs-pass span { display: none !important; }
  body.vs-collapsed .vs-sec.closed .vs-items { display: flex; }
  body.vs-collapsed .vs-sec + .vs-sec, body.vs-collapsed .vs-sec { border-top: 1px solid var(--vs-side-line); padding-top: 6px; margin-top: 6px; }
  body.vs-collapsed .vs-link .vs-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  body.vs-collapsed .vs-user { justify-content: center; padding: 6px 0; }
  body.vs-collapsed .vs-theme, body.vs-collapsed .vs-out { justify-content: center; padding: 8px 0; }
}
@media (max-width: 960px) { .vs-collapse { display: none; } }

/* ---------- Nome completo obrigatório ---------- */
.vs-gate { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 16px; background: #000b; font-family: var(--vs-font); }
.vs-gate form { width: min(440px, 100%); display: grid; gap: 12px; padding: 24px; border-radius: 14px; background: var(--vs-surface); color: var(--vs-text); box-shadow: 0 20px 60px #0008; }
.vs-gate h2 { margin: 0; font-size: 20px; }
.vs-gate p { margin: 0; color: var(--vs-muted); }
.vs-gate label { display: grid; gap: 6px; font-weight: 600; }
.vs-gate input { min-height: 44px; padding: 10px 12px; border: 1px solid var(--vs-line-strong); border-radius: 8px; background: var(--vs-raised); color: var(--vs-text); font: inherit; }
.vs-gate button { min-height: 44px; border: 0; border-radius: 8px; background: var(--vs-brand); color: #fff; font: 600 15px var(--vs-font); cursor: pointer; }
.vs-gate-error { color: var(--vs-danger) !important; min-height: 1em; }
.vs-nav, .vs-tree, .vs-subs, .vs-sec, .vs-items { min-width: 0; }
button.vs-group { width: auto !important; margin: 16px 6px 6px 12px !important; border: 0 !important; color: var(--vs-side-text) !important; opacity: .62; }
button.vs-group:hover { opacity: 1; }
.vs-tree { width: 100%; max-width: 100%; }
.vs-sublink { min-width: 0; }
.vs-subs { width: auto; max-width: calc(100% - 22px); }
@media (min-width: 961px) { body.vs-collapsed .vs-brand img { width: 30px; height: 26px; object-fit: cover; object-position: left center; } }
.vs-sec, .vs-items { width: 100%; max-width: 100%; }

/* Alterar senha */
.vs-dlg { border: 1px solid var(--vs-line-strong, #ffffff22); border-radius: 14px; background: var(--vs-surface, #1c1c1c); color: var(--vs-text, #fff); padding: 20px; width: min(400px, calc(100vw - 32px)); }
.vs-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.vs-dlg h2 { margin: 0 0 2px; font-size: 20px; }
.vs-dlg-who { margin: 0 0 12px; color: var(--vs-muted, #999); font-size: 13px; word-break: break-all; }
.vs-dlg label { display: grid; gap: 4px; margin: 10px 0; font-size: 14px; }
.vs-dlg input[type=password], .vs-dlg input[type=text] { min-height: 44px; }
.vs-dlg .vs-dlg-check { display: flex; align-items: center; gap: 8px; }
.vs-dlg .vs-dlg-check input { width: 18px; height: 18px; min-height: 0; }
.vs-dlg-msg { min-height: 1.2em; margin: 6px 0; font-size: 14px; }
.vs-dlg-msg.bad { color: var(--vs-danger, #e5534b); }
.vs-dlg-msg.ok { color: var(--vs-success, #34b27b); }
.vs-dlg-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.vs-subhead { margin: 12px 0 3px; padding: 0 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--vs-side-muted, rgba(255,255,255,.62)); }
.vs-subs > .vs-subhead:first-child { margin-top: 4px; }
