:root {
  --hsp-sidebar-width: 292px;
  --hsp-bg: #eef4f2;
  --hsp-surface: #ffffff;
  --hsp-surface-soft: #f8fafc;
  --hsp-primary: #0f766e;
  --hsp-primary-dark: #083f3a;
  --hsp-text: #10201d;
  --hsp-muted: #65736f;
  --hsp-border: #d8e0df;
  --hsp-shadow: 0 16px 42px rgba(16, 32, 29, .10);
  --hsp-credit-height: 42px;
}

body.hsp-app-shell-body,
body.hsp-app-template {
  width: 100vw;
  height: 100vh;
  overflow: hidden !important;
  margin: 0;
  background: var(--hsp-bg);
}

body.hsp-app-shell-body .site-header,
body.hsp-app-shell-body .site-footer,
body.hsp-app-template .site-header,
body.hsp-app-template .site-footer {
  display: none !important;
}

.hsp-app-shell {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--hsp-sidebar-width) minmax(0, 1fr);
  background: var(--hsp-bg);
  color: var(--hsp-text);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.hsp-sidebar {
  height: 100vh;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(20,184,166,.28), transparent 34%),
    linear-gradient(180deg, #0f766e 0%, #083f3a 100%);
  color: #fff;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 8px 0 30px rgba(8, 63, 58, .22);
  z-index: 20;
}

.hsp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 22px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.hsp-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: -.03em;
}

.hsp-brand strong,
.hsp-brand span {
  display: block;
}

.hsp-brand strong {
  color: #fff;
  line-height: 1.15;
  font-size: 16px;
}

.hsp-brand span {
  color: rgba(255,255,255,.72);
  font-size: 12px;
  margin-top: 3px;
}

.hsp-sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 0;
}

.hsp-sidebar-nav::-webkit-scrollbar,
.hsp-content::-webkit-scrollbar,
.hsp-content-inner *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.hsp-sidebar-nav::-webkit-scrollbar-thumb,
.hsp-content::-webkit-scrollbar-thumb,
.hsp-content-inner *::-webkit-scrollbar-thumb {
  background: rgba(15,118,110,.35);
  border-radius: 999px;
}

.hsp-sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hsp-sidebar-menu li {
  margin: 6px 0;
}

.hsp-sidebar-menu a {
  color: rgba(255,255,255,.88);
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  font-weight: 700;
  transition: .18s ease;
}

.hsp-sidebar-menu a:hover,
.hsp-sidebar-menu .current-menu-item > a {
  background: rgba(255,255,255,.14);
  color: #fff;
  transform: translateX(2px);
}

.hsp-menu-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 10px;
  background: rgba(255,255,255,.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hsp-sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.14);
  padding: 16px 8px 4px;
}

.hsp-sidebar-footer span,
.hsp-sidebar-footer small {
  display: block;
}

.hsp-sidebar-footer span {
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

.hsp-sidebar-footer small {
  color: rgba(255,255,255,.68);
  margin-top: 3px;
}

.hsp-main {
  height: 100vh;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr) var(--hsp-credit-height, 42px);
}

.hsp-topbar {
  height: 76px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hsp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  z-index: 10;
}

.hsp-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.hsp-topbar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  color: var(--hsp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hsp-topbar p {
  margin: 4px 0 0;
  color: var(--hsp-muted);
  font-size: 13px;
}

.hsp-sidebar-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hsp-border);
  background: #fff;
  border-radius: 14px;
  font-size: 20px;
  cursor: pointer;
}

.hsp-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hsp-user-pill,
.hsp-topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--hsp-border);
  background: #fff;
  color: var(--hsp-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
}

.hsp-topbar-link {
  background: var(--hsp-primary);
  color: #fff !important;
  border-color: var(--hsp-primary);
}

.hsp-content {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
}

.hsp-content-inner {
  min-height: calc(100vh - 76px - var(--hsp-credit-height, 42px) - 48px);
  max-width: 1440px;
  margin: 0 auto;
}

.hsp-content-inner .cpe-app {
  max-width: none;
}

.hsp-content-inner .cpe-topo,
.hsp-content-inner .cpe-hero,
.hsp-content-inner .cpe-home-hero {
  margin-top: 0;
}

.hsp-content-inner .cpe-tabela-wrap {
  max-height: 48vh;
  overflow: auto;
  border: 1px solid var(--hsp-border);
  border-radius: 14px;
}

.hsp-content-inner .cpe-tabela thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.hsp-content-inner .elementor-section-wrap,
.hsp-content-inner .elementor,
.hsp-content-inner .elementor-section {
  max-width: 100%;
}

@media (max-width: 960px) {
  .hsp-app-shell {
    grid-template-columns: 1fr;
  }

  .hsp-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    transform: translateX(-102%);
    transition: transform .22s ease;
  }

  body.hsp-sidebar-open .hsp-sidebar {
    transform: translateX(0);
  }

  .hsp-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hsp-topbar {
    padding: 0 14px;
  }

  .hsp-topbar-actions {
    display: none;
  }

  .hsp-content {
    padding: 16px;
  }

  .hsp-topbar h1 {
    font-size: 17px;
  }

  .hsp-topbar p {
    display: none;
  }
}

@media (max-width: 640px) {
  .hsp-content-inner .cpe-tabela-wrap {
    max-height: 54vh;
  }
}






/* Barra de crédito no rodapé - v1.3 */
.hsp-credit-bar {
  min-height: var(--hsp-credit-height, 42px);
  background: #ffffff;
  border-top: 1px solid var(--hsp-border);
  color: var(--hsp-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
}

@media (max-width: 640px) {
  :root {
    --hsp-credit-height: 64px;
  }

  .hsp-credit-bar {
    font-size: 11px;
    line-height: 1.25;
    padding: 6px 12px;
  }

  .hsp-content {
    padding-bottom: 12px;
  }
}
