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

:root {
  --sigmo-nav: #10101c;
  --sigmo-nav-deep: #0b0b14;
  --sigmo-brand: #b51f49;
  --sigmo-brand-light: #e04f73;
  --sigmo-text: #f8f8fb;
  --sigmo-topbar-height: 58px;
  --sigmo-sidebar-width: 78px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Poppins", "Segoe UI", sans-serif; }
html, body { min-height: 100%; }
body { background: #f4f5f7; }

/* BARRA SUPERIOR */
body .topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--sigmo-topbar-height);
  display: grid; grid-template-columns: 230px minmax(0, 1fr) 150px;
  align-items: center; padding: 0 14px 0 10px;
  color: var(--sigmo-text);
  background: linear-gradient(90deg, rgba(181,31,73,.12), transparent 22%), linear-gradient(180deg, #131321 0%, #0e0e19 100%);
  border-bottom: 1px solid rgba(255,255,255,.075);
  box-shadow: 0 8px 24px rgba(7,7,13,.18);
  z-index: 10010;
  transition: top .28s cubic-bezier(.2,.8,.2,1), left .3s ease-in-out;
}

body .topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--sigmo-brand), rgba(181,31,73,0) 20%, rgba(255,255,255,.07) 70%, transparent);
  pointer-events: none;
}

body .topbar.hidden { top: calc(var(--sigmo-topbar-height) * -1 - 5px); }
.topbar-left, .topbar-center, .topbar-right { min-width: 0; }

.sigmo-top-brand {
  display: inline-flex; align-items: center; gap: 11px; height: 46px;
  padding: 0 13px 0 4px; border-radius: 15px; user-select: none;
}

.sigmo-top-brand-mark {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px;
  color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.7px;
  background: linear-gradient(145deg, #911337, #c52b55 62%, #e65275);
  box-shadow: 0 8px 18px rgba(181,31,73,.31), inset 0 1px rgba(255,255,255,.28);
}

.sigmo-top-brand-mark i, .sidebar-brand-mark i {
  position: absolute; right: 6px; bottom: 6px; width: 5px; height: 5px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.16);
}

.sigmo-top-brand-name {
  display: inline-flex; align-items: baseline; gap: 7px;
  color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 1.1px;
}

.sigmo-top-brand-name small { color: #c9cad2; font-size: 8px; font-weight: 600; letter-spacing: 1.7px; }
.sigmo-top-brand-name small::before {
  content: ""; display: inline-block; width: 1px; height: 13px; margin-right: 8px;
  vertical-align: -3px; background: rgba(255,255,255,.18);
}

.topbar-center { display: flex; align-items: center; justify-content: center; gap: 4px; height: 100%; }
body .topbar .dropdown { position: relative; display: flex; align-items: center; height: 100%; }
body .topbar a { margin: 0; color: #e8e8ee; text-decoration: none; outline: none; }

body .topbar .dropdown > a {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 13px; border: 1px solid transparent; border-radius: 12px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

body .topbar .dropdown > a::after {
  content: ""; position: absolute; left: 50%; bottom: -10px; width: 0; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, #9e173d, #df5074);
  transform: translateX(-50%); transition: width .2s ease;
}

body .topbar .dropdown:hover > a { color: #fff; border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.055); }
body .topbar .dropdown:hover > a::after { width: 30px; }
body .topbar .dropdown > a > i:first-child { margin: 0; color: #d85475; font-size: 17px; }
body .topbar .dropdown > a > i:last-child { margin: 1px 0 0 -3px; color: #898b99; font-size: 15px; transition: transform .2s ease; }
body .topbar .dropdown:hover > a > i:last-child { transform: rotate(180deg); }

body .topbar .dropdown-content, body .topbar .dropdown-sub-content {
  display: block; position: absolute; min-width: 226px; padding: 8px;
  visibility: hidden; opacity: 0; pointer-events: none;
  color: #30333b; background: rgba(255,255,255,.985);
  border: 1px solid rgba(24,27,34,.09); border-radius: 15px;
  box-shadow: 0 22px 55px rgba(10,10,18,.23), 0 5px 15px rgba(10,10,18,.10);
  transform: translateY(7px) scale(.985); transform-origin: top left;
  transition: opacity .16s ease, transform .16s ease, visibility .16s; z-index: 10020;
}

body .topbar .dropdown-content { top: calc(100% - 5px); left: 0; }
body .topbar .dropdown:hover > .dropdown-content,
body .topbar .dropdown-sub:hover > .dropdown-sub-content {
  visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0) scale(1);
}

body .topbar .dropdown-sub { position: relative; }
body .topbar .dropdown-sub-content {
  top: -8px;
  left: calc(100% - 3px);
  transform: translateX(6px) scale(.985);
}

/*
  Ponte invisível entre o item e seu submenu.
  Evita que o :hover seja perdido ao mover o mouse na diagonal.
*/
body .topbar .dropdown-sub-content::before {
  content: "";
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: -18px;
  width: 22px;
  background: transparent;
  pointer-events: auto;
}
body .topbar .dropdown-sub:hover > .dropdown-sub-content { transform: translateX(0) scale(1); }

body .topbar .dropdown-content a, body .topbar .dropdown-sub-content a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 36px; margin: 0; padding: 8px 11px; color: #3b3f48;
  border-radius: 9px; font-size: 11px; font-weight: 500; line-height: 1.25; white-space: nowrap;
  transition: color .15s ease, background .15s ease, padding-left .15s ease;
}

body .topbar .dropdown-content a:hover, body .topbar .dropdown-sub-content a:hover {
  color: #9e173d; padding-left: 14px;
  background: linear-gradient(90deg, rgba(181,31,73,.09), rgba(181,31,73,.025));
}

body .topbar .dropdown-content a i, body .topbar .dropdown-sub-content a i { margin: 0; color: #9a9da7; font-size: 15px; }

/* Seta independente da fonte para itens que realmente possuem submenu. */
body .topbar .dropdown-sub > a:has(> .bx-chevron-right)::after {
  content: "›";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-left: auto;
  color: #8c909a;
  border-radius: 7px;
  background: #f1f2f5;
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}

body .topbar .dropdown-sub:hover > a:has(> .bx-chevron-right)::after {
  color: #fff;
  background: #b51f49;
  transform: translateX(2px);
}

body .topbar .dropdown-sub > a > .bx-chevron-right {
  display: none !important;
}
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

#topbar .topbar-right button {
  display: grid; place-items: center; width: 36px; height: 36px; margin: 0; padding: 0;
  color: #d8d9e0; border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
  background: rgba(255,255,255,.045); cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

#topbar .topbar-right button:hover {
  color: #fff; border-color: rgba(213,58,95,.32); background: rgba(181,31,73,.18); transform: translateY(-1px);
}

#topbar .topbar-right button i { font-size: 18px; }
#topbar .doc-notify { position: relative; margin-right: 2px; }
#topbar .doc-notify.hidden { display: none; }
#topbar .doc-notify span {
  position: absolute; top: -5px; right: -5px; display: flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px; color: #fff; border: 2px solid #11101d;
  border-radius: 999px; background: #e23e62; font-size: 8px; font-weight: 700;
}
#topbar .doc-notify.has-docs { color: #fff; border-color: rgba(226,62,98,.38); background: rgba(181,31,73,.25); filter: drop-shadow(0 0 8px rgba(226,62,98,.35)); }
#topbar .doc-notify.notify-shake { animation: sigmo-notify-shake 1s ease-in-out 0s 2; transform-origin: top center; }

#hoverZoneTop { position: fixed; top: 0; left: 0; right: 0; height: 7px; z-index: 10009; display: none; }

/* MENU LATERAL COMPACTO — NÃO EXPANSÍVEL */
.sidebar {
  position: fixed; top: 0; left: 0; width: var(--sigmo-sidebar-width); height: 100%;
  padding: calc(var(--sigmo-topbar-height) + 14px) 10px 84px; overflow: visible; color: #fff;
  background: radial-gradient(circle at 50% 8%, rgba(181,31,73,.14), transparent 150px), linear-gradient(180deg, #12121f 0%, #0d0d17 100%);
  border-right: 1px solid rgba(255,255,255,.055); box-shadow: 10px 0 30px rgba(9,9,15,.11);
  z-index: 10000; transition: left .28s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}

.sidebar::after {
  content: ""; position: absolute; top: var(--sigmo-topbar-height); right: -1px; width: 1px; height: 110px;
  background: linear-gradient(180deg, var(--sigmo-brand), transparent); opacity: .65;
}

.sidebar.hidden { left: calc(var(--sigmo-sidebar-width) * -1); opacity: 0; }
.sidebar.pinned { left: 0 !important; opacity: 1 !important; }
.sidebar.open { width: var(--sigmo-sidebar-width); }
.hover-area { position: fixed; left: 0; top: var(--sigmo-topbar-height); width: 9px; height: calc(100% - var(--sigmo-topbar-height)); z-index: 9999; }
.hover-area:hover ~ .sidebar.hidden, .sidebar:hover { left: 0; opacity: 1; }
.logo-details { display: none; }

.nav-list {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 100%; height: 100%; margin: 0; padding: 0; list-style: none;
}

.nav-list > li { position: relative; width: 56px; height: 49px; flex: 0 0 49px; list-style: none; }
.nav-list > li > a {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: #c8c9d1; border: 1px solid transparent;
  border-radius: 15px; text-decoration: none; background: transparent;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.nav-list > li > a::before {
  content: ""; position: absolute; left: -11px; width: 3px; height: 0; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #e55275, #a81740); box-shadow: 0 0 12px rgba(224,79,115,.45);
  transition: height .18s ease;
}

.nav-list > li:hover > a, .nav-list > li.sigmo-active > a {
  color: #fff; border-color: rgba(255,255,255,.07);
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.028));
  transform: translateX(2px);
}

.nav-list > li.sigmo-active > a {
  color: #f05d80; border-color: rgba(211,52,91,.20);
  background: linear-gradient(145deg, rgba(181,31,73,.21), rgba(181,31,73,.065));
  box-shadow: inset 0 1px rgba(255,255,255,.055), 0 8px 18px rgba(0,0,0,.12);
}

.nav-list > li.sigmo-active > a::before { height: 25px; }
.nav-list > li > a > i { min-width: auto; font-size: 20px; line-height: 1; }
.sidebar .nav-list > li > a > .sigmo-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  display: inline-grid !important;
  place-items: center !important;
  color: #ffffff !important;
  opacity: 1 !important;
  font-family: initial !important;
  font-style: normal !important;
}
.sidebar .nav-list > li > a > .sigmo-icon::before,
.sidebar .nav-list > li > a > .sigmo-icon::after { content: none !important; display: none !important; }
.sidebar .sigmo-icon svg {
  width: 21px !important;
  height: 21px !important;
  display: block !important;
  overflow: visible !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.sidebar .nav-list > li:hover > a > .sigmo-icon,
.sidebar .nav-list > li.sigmo-active > a > .sigmo-icon { color: #ffffff !important; }
#iconToggleSidebar .icon-pin { display: none !important; }
#iconToggleSidebar.bx-pin .icon-eye { display: none !important; }
#iconToggleSidebar.bx-pin .icon-pin { display: block !important; }
#iconToggleSidebar.bx-low-vision .icon-eye { display: block !important; }
#iconToggleSidebar.bx-low-vision .icon-pin { display: none !important; }
.nav-list .links_name { display: none; }

.nav-list .tooltip {
  position: absolute; left: 70px; top: 50%; z-index: 10030; display: block;
  min-width: max-content; padding: 8px 11px; color: #f6f6f9;
  border: 1px solid rgba(255,255,255,.08); border-radius: 9px;
  background: rgba(20,20,31,.96); box-shadow: 0 12px 25px rgba(0,0,0,.24);
  font-size: 10px; font-weight: 500; line-height: 1; white-space: nowrap;
  visibility: hidden; opacity: 0; pointer-events: none; transform: translate(6px, -50%);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.nav-list .tooltip::before {
  content: ""; position: absolute; left: -4px; top: 50%; width: 8px; height: 8px;
  background: rgba(20,20,31,.96); transform: translateY(-50%) rotate(45deg);
}

.nav-list > li:hover > .tooltip { visibility: visible; opacity: 1; transform: translate(0, -50%); }
.nav-list > li:first-child { margin-bottom: 6px; }
.nav-list > li:first-child::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -6px; height: 1px; background: rgba(255,255,255,.07);
}

.nav-list > li.profile {
  position: absolute; left: 0; bottom: 0; width: 78px; height: 70px; padding: 0 10px;
  background: linear-gradient(180deg, rgba(25,25,39,.96), rgba(13,13,23,1));
  border-top: 1px solid rgba(255,255,255,.06);
}

.profile .profile-details { display: none; }
.nav-list > li.profile > a { width: 56px; height: 49px; margin-top: 10px; }
.nav-list > li.profile > a:hover { color: #ff6d87; border-color: rgba(226,62,98,.22); background: rgba(181,31,73,.15); }

/* Proteção contra regras do tema UniGUI e estilos antigos. */
body .sidebar .nav-list > li > a {
  color: #c8c9d1 !important;
  background-color: transparent !important;
  background-image: none !important;
}

body .sidebar .nav-list > li:hover > a {
  color: #ffffff !important;
  background-color: rgba(255,255,255,.065) !important;
  background-image: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.028)) !important;
}

body .sidebar .nav-list > li.sigmo-active > a {
  color: #f05d80 !important;
  background-color: rgba(181,31,73,.15) !important;
  background-image: linear-gradient(145deg, rgba(181,31,73,.21), rgba(181,31,73,.065)) !important;
}

body .sidebar .nav-list > li.profile > a:hover {
  color: #ff6d87 !important;
  background-color: rgba(181,31,73,.15) !important;
  background-image: none !important;
}

body .sidebar .nav-list > li > a > i,
body .sidebar .nav-list > li > a > i::before,
#topbar .bx,
#topbar .bx::before {
  color: inherit !important;
  font-family: "boxicons" !important;
  font-style: normal !important;
  font-weight: 400 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* SVGs do menu lateral: independentes da fonte Boxicons e do tema ExtJS. */
html body .sidebar .nav-list > li > a > i.sigmo-icon {
  color: #ffffff !important;
  font-family: initial !important;
  font-style: normal !important;
}
html body .sidebar .nav-list > li > a > i.sigmo-icon > svg,
html body .sidebar .nav-list > li > a > i.sigmo-icon > svg * {
  fill: none !important;
  stroke: #ffffff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#topbar #toggleTopbarMode,
#topbar #toggleTopbarMode i,
#topbar #toggleTopbarMode i::before {
  color: #f2f2f6 !important;
}

.home-section {
  position: relative; min-height: 100vh; margin-left: var(--sigmo-sidebar-width);
  padding: var(--sigmo-topbar-height) 20px 20px; background: #f4f5f7;
  transition: margin-left .28s ease, padding-top .28s ease;
}
.home-section .text { display: none; }
.sidebar.hidden ~ .home-section { margin-left: 0; }

/* LOADING */
.vt-menu-loading-overlay {
  position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center;
  background: rgba(16,16,28,.43); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  animation: sigmo-fade-in .18s ease-out;
}

.vt-menu-loading-box {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 17px;
  min-width: 260px; padding: 35px 42px 31px; overflow: hidden; color: #252932;
  border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: rgba(255,255,255,.97);
  box-shadow: 0 28px 75px rgba(9,9,16,.30), inset 0 1px rgba(255,255,255,1);
}

.vt-menu-loading-box::before {
  content: "S"; display: grid; place-items: center; width: 52px; height: 52px;
  color: #fff; border-radius: 17px; background: linear-gradient(145deg, #911337, #c52b55 62%, #e65275);
  box-shadow: 0 12px 25px rgba(181,31,73,.26); font-size: 22px; font-weight: 700;
}

.vt-menu-loading-spinner {
  position: absolute; top: 29px; width: 64px; height: 64px;
  border: 2px solid rgba(181,31,73,.12); border-top-color: var(--sigmo-brand); border-right-color: transparent;
  border-radius: 50%; animation: sigmo-spin .8s linear infinite;
}

.vt-menu-loading-text { margin-top: 5px; color: #343943; font-size: 12px; font-weight: 600; }

@keyframes sigmo-spin { to { transform: rotate(360deg); } }
@keyframes sigmo-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sigmo-notify-shake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  15% { transform: rotate(-13deg) scale(1.08); }
  30% { transform: rotate(11deg) scale(1.08); }
  45% { transform: rotate(-8deg) scale(1.06); }
  60% { transform: rotate(6deg) scale(1.04); }
  75% { transform: rotate(-3deg) scale(1.02); }
}

@media (max-height: 720px) {
  .sidebar { padding-top: calc(var(--sigmo-topbar-height) + 8px); }
  .nav-list { gap: 2px; }
  .nav-list > li { height: 43px; flex-basis: 43px; }
  .nav-list > li > a { border-radius: 13px; }
  .nav-list > li > a > i { font-size: 18px; }
}

@media (max-width: 920px) {
  body .topbar { grid-template-columns: 170px minmax(0, 1fr) 90px; }
  .sigmo-top-brand-name small { display: none; }
  body .topbar .dropdown > a { padding: 0 9px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
