/* ============================================================
   Shell do WorkTI Platform — sidebar + topo + conteúdo
   ============================================================ */

.wt-shell { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */
.wt-sidebar {
  width: 250px; flex-shrink: 0;
  background: linear-gradient(180deg, #0a1f4d, #16307a);
  color: #fff; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow: visible;
  transition: width 0.2s ease;
}
.wt-sidebar-topo { padding: 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.wt-logo { max-height: 44px; width: auto; filter: brightness(0) invert(1); }
.wt-logo-mini { display: none; filter: brightness(0) invert(1); }
.wt-menu { padding: 12px 10px; flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.wt-menu::-webkit-scrollbar { width: 0; height: 0; }

/* botão redondo de recolher/expandir o menu (na borda da sidebar) */
.wt-recolher {
  position: absolute; right: -13px; top: 72px; z-index: 6;
  width: 26px; height: 26px; border-radius: 50%;
  background: #1d4ed8; color: #fff; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 40, 100, 0.3); transition: background 0.15s;
}
.wt-recolher:hover { background: #2563eb; }
.wt-recolher svg { transition: transform 0.25s; }
.wt-shell.recolhido .wt-recolher svg { transform: rotate(180deg); }

/* modo recolhido — só ícones */
.wt-shell.recolhido .wt-sidebar { width: 74px; }
.wt-shell.recolhido .wt-logo { display: none; }
.wt-shell.recolhido .wt-logo-mini { display: block; height: 38px; width: auto; margin: 0 auto; }
.wt-shell.recolhido .wt-sidebar-topo { height: 62px; padding: 12px 0; display: flex; align-items: center; justify-content: center; }
.wt-shell.recolhido .wt-grupo-titulo { display: none; }
.wt-shell.recolhido .wt-grupo { margin-bottom: 6px; }
.wt-shell.recolhido .wt-item { justify-content: center; padding: 11px 0; }
.wt-shell.recolhido .wt-item span { display: none; }
.wt-grupo { margin-bottom: 12px; }
.wt-grupo-titulo {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
  color: #93a7d4; padding: 6px 12px; font-weight: 700;
}
.wt-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  color: #cdd8f0; text-decoration: none; font-weight: 500; font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
}
.wt-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.wt-item.ativo {
  background: linear-gradient(135deg, #1d4ed8, #2563eb); color: #fff;
  box-shadow: 0 3px 10px rgba(29, 78, 216, 0.4);
}
.wt-item svg { flex-shrink: 0; }

/* ---------- área principal + topo ---------- */
.wt-principal { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wt-topo {
  height: 62px; background: var(--superficie); border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; gap: 14px; padding: 0 20px; position: sticky; top: 0; z-index: 20;
}
.wt-toggle { display: none; }
.wt-topo-empresa { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-weight: 600; }
.wt-topo-empresa svg { color: #1d4ed8; }
.wt-topo-dir { margin-left: auto; position: relative; }
.wt-user {
  display: flex; align-items: center; gap: 9px; background: transparent;
  border: 1px solid var(--borda); border-radius: 999px; padding: 5px 12px 5px 5px; color: var(--tinta);
}
.wt-user:hover { background: var(--pagina); }
.wt-avatar, .wt-avatar-g {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #2563eb); color: #fff; font-weight: 700; overflow: hidden;
}
.wt-avatar { width: 30px; height: 30px; font-size: 12px; }
.wt-avatar-g { width: 44px; height: 44px; font-size: 15px; }
.wt-avatar img, .wt-avatar-g img { width: 100%; height: 100%; object-fit: cover; }
.wt-user-nome { font-weight: 600; font-size: 13.5px; }

.wt-user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 252px; background: var(--superficie);
  border: 1px solid var(--borda); border-radius: 12px; box-shadow: var(--sombra-alta); padding: 8px; z-index: 30;
}
.wt-user-cab {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px;
  border-bottom: 1px solid var(--borda); margin-bottom: 6px;
}
.wt-user-cab strong { display: block; font-size: 13.5px; }
.wt-user-cab span { display: block; font-size: 12px; color: var(--muted); }
.wt-menu-acao {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  border: 0; background: transparent; border-radius: 8px; color: var(--tinta);
  text-decoration: none; font-size: 13.5px;
}
.wt-menu-acao:hover { background: var(--pagina); }

/* ---------- conteúdo ---------- */
.wt-conteudo { flex: 1; padding: 24px; max-width: 1280px; width: 100%; margin: 0 auto; }
.wt-cabecalho-tela h1 { display: flex; align-items: center; gap: 10px; font-size: 21px; color: var(--tinta); margin-bottom: 20px; }
.wt-cabecalho-tela h1 svg { color: #1d4ed8; }

.wt-vazio {
  text-align: center; padding: 56px 20px; color: var(--muted);
  background: var(--superficie); border: 1px dashed var(--borda); border-radius: var(--raio);
}
.wt-vazio svg { color: #93a7d4; margin-bottom: 12px; }
.wt-vazio h2 { color: var(--ink-2); font-size: 18px; margin-bottom: 6px; }

/* ---------- início ---------- */
.wt-boas-vindas {
  background: linear-gradient(135deg, #16307a, #1d4ed8); color: #fff;
  padding: 28px 30px; border-radius: 16px; margin-bottom: 22px; box-shadow: 0 8px 24px rgba(29, 78, 216, 0.25);
}
.wt-boas-vindas h1 { font-size: 24px; margin-bottom: 6px; }
.wt-boas-vindas p { opacity: 0.92; }
.wt-atalhos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.wt-atalho {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 14px;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: 14px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13px; text-align: center;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
}
.wt-atalho:hover { transform: translateY(-3px); box-shadow: var(--sombra); border-color: #1d4ed8; color: #1d4ed8; }
.wt-atalho svg { color: #1d4ed8; }

/* ---------- responsivo (mobile: menu off-canvas) ---------- */
@media (max-width: 860px) {
  .wt-sidebar {
    position: fixed; left: 0; top: 0; z-index: 50; height: 100vh;
    transform: translateX(-100%); transition: transform 0.25s;
  }
  .wt-shell.menu-aberto .wt-sidebar { transform: translateX(0); box-shadow: var(--sombra-alta); }
  .wt-toggle { display: inline-flex; }
  .wt-conteudo { padding: 16px; }
  .wt-user-nome { display: none; }
  /* no mobile o menu é off-canvas completo — o recolher não se aplica */
  .wt-recolher { display: none; }
  .wt-shell.recolhido .wt-sidebar { width: 250px; }
  .wt-shell.recolhido .wt-logo { display: block; }
  .wt-shell.recolhido .wt-logo-mini { display: none; }
  .wt-shell.recolhido .wt-grupo-titulo { display: block; }
  .wt-shell.recolhido .wt-item { justify-content: flex-start; padding: 9px 12px; }
  .wt-shell.recolhido .wt-item span { display: inline; }
}
