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

:root {
  --lx-sidebar-width: 214px;
  --lx-border: #e5e7eb;
  --lx-bg: #f7f7f8;
  --lx-text: #0a0a0a;
  --lx-muted: #6b7280;
}

* { box-sizing: border-box; }

html { background: var(--lx-bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--lx-bg);
  color: var(--lx-text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }

.lx-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--lx-sidebar-width) minmax(0, 1fr);
}

.lx-shell-main {
  min-width: 0;
  grid-column: 2;
}

.lx-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--lx-sidebar-width);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--lx-border);
}

.lx-sidebar-logo {
  min-height: 76px;
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--lx-border);
}

.lx-sidebar-logo > a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.lx-logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #0a0a0a;
  color: #fff;
  font-family: Manrope, Inter, sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.lx-logo-copy strong {
  display: block;
  font-family: Manrope, Inter, sans-serif;
  font-size: 17px;
  line-height: 1;
}

.lx-logo-copy small {
  display: block;
  margin-top: 8px;
  color: #9ca3af;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .18em;
}

.lx-sidebar-close {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
}

.lx-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 9px 16px;
}

.lx-sidebar-nav a {
  position: relative;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-radius: 11px;
  color: #748091;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}

.lx-sidebar-nav a:hover {
  color: #111827;
  background: #f7f7f8;
}

.lx-sidebar-nav a.is-active {
  color: #111;
  background: #f1f1f2;
  font-weight: 800;
}

.lx-sidebar-nav a.is-active::before {
  content: "";
  position: absolute;
  left: -9px;
  width: 3px;
  height: 24px;
  border-radius: 999px;
  background: #0a0a0a;
}

.lx-sidebar-nav a svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.7;
}

.lx-sidebar-group {
  margin: 16px 12px 7px;
  color: #94a0b0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

.lx-sidebar-bottom {
  padding: 10px 9px 14px;
  border-top: 1px solid var(--lx-border);
}

.lx-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #0a0a0a;
  color: #fff;
}

.lx-user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #29292c;
  font-size: 11px;
  font-weight: 800;
}

.lx-user-card strong {
  display: block;
  font-size: 11px;
}

.lx-user-card small {
  display: block;
  margin-top: 3px;
  color: #a1a1aa;
  font-size: 9px;
}

.lx-logout-form { margin-top: 7px; }

.lx-logout-form button {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
}

.lx-logout-form button:hover {
  background: #f7f7f8;
  color: #111;
}

.lx-logout-form svg { width: 16px; height: 16px; }

.lx-page-content {
  padding: 0 32px 42px;
}

.lx-mobile-nav,
.lx-mobile-sheet,
.lx-mobile-hello {
  display: none;
}

.lx-sidebar-overlay { display: none; }

@media (max-width: 1023px) {
  .lx-shell { display: block; }

  .lx-shell-main { width: 100%; }

  .lx-sidebar {
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: 28px 0 70px -34px rgba(0,0,0,.5);
  }

  .lx-sidebar.is-open { transform: translateX(0); }

  .lx-sidebar-close {
    display: grid;
    place-items: center;
  }

  .lx-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0,0,0,.35);
  }

  .lx-sidebar-overlay.is-open { display: block; }

  .lx-page-content {
    padding: 0 14px 94px;
  }

  .lx-mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    height: calc(64px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: 4px 8px env(safe-area-inset-bottom);
    background: rgba(255,255,255,.98);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -12px 30px -25px rgba(0,0,0,.35);
    backdrop-filter: blur(18px);
  }

  .lx-mobile-nav a,
  .lx-mobile-nav button {
    height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: #9ca3af;
    text-decoration: none;
  }

  .lx-mobile-nav a.is-active { color: #111; }

  .lx-mobile-nav svg { width: 19px; height: 19px; }

  .lx-mobile-nav span,
  .lx-mobile-nav small {
    font-size: 9px;
    font-weight: 700;
  }

  .lx-mobile-main-action {
    position: relative;
    top: -16px;
  }

  .lx-mobile-main-action > span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #0a0a0a;
    color: #fff;
    box-shadow: 0 10px 18px -9px rgba(0,0,0,.6);
  }

  .lx-mobile-sheet.is-open { display: block; }

  .lx-mobile-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0,0,0,.35);
  }

  .lx-mobile-sheet-card {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 61;
    padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -30px 70px -40px rgba(0,0,0,.5);
  }

  .lx-mobile-sheet-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: #d1d5db;
  }

  .lx-mobile-sheet-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .lx-mobile-sheet-card h2 {
    margin: 0;
    font: 800 18px/1.2 Manrope, Inter, sans-serif;
  }

  .lx-mobile-sheet-card header button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
  }

  .lx-mobile-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
  }

  .lx-mobile-actions-grid a {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 8px;
    border: 1px solid #ececee;
    border-radius: 15px;
    color: #111;
    text-align: center;
    text-decoration: none;
  }

  .lx-mobile-actions-grid svg { width: 22px; height: 22px; }
  .lx-mobile-actions-grid span { font-size: 10px; font-weight: 700; }
}


/* =========================================================
   AJUSTES MOBILE V3
   ========================================================= */
@media (max-width: 1023px) {
  .lx-mobile-nav {
    height: calc(66px + env(safe-area-inset-bottom));
    z-index: 120;
    align-items: stretch;
    padding: 0 8px env(safe-area-inset-bottom);
  }

  .lx-mobile-nav a,
  .lx-mobile-nav button {
    position: relative;
    top: 0;
    height: 65px;
    min-width: 0;
    gap: 4px;
    padding: 6px 2px 4px;
  }

  .lx-mobile-main-action {
    top: 0 !important;
    transform: none !important;
  }

  .lx-mobile-main-action > span {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
  }

  .lx-mobile-main-action small {
    margin-top: 0;
  }

  .lx-mobile-sheet {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: block;
    pointer-events: none;
    visibility: hidden;
  }

  .lx-mobile-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
  }

  .lx-mobile-sheet-overlay {
    opacity: 0;
    transition: opacity .24s ease;
  }

  .lx-mobile-sheet.is-open .lx-mobile-sheet-overlay {
    opacity: 1;
  }

  .lx-mobile-sheet-card {
    transform: translateY(105%);
    opacity: .98;
    transition:
      transform .32s cubic-bezier(.22,.82,.24,1),
      opacity .22s ease;
    will-change: transform;
  }

  .lx-mobile-sheet.is-open .lx-mobile-sheet-card {
    transform: translateY(0);
    opacity: 1;
  }

  .lx-mobile-menu-card {
    max-height: min(82vh, 680px);
    overflow-y: auto;
  }

  .lx-mobile-menu-card header > div p {
    margin: 4px 0 0;
    color: #7b8492;
    font-size: 10px;
  }

  .lx-mobile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 14px;
  }

  .lx-mobile-menu-list > a {
    min-height: 62px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 9px 6px;
    border-radius: 13px;
    color: #111;
    text-decoration: none;
  }

  .lx-mobile-menu-list > a:hover {
    background: #f6f6f7;
  }

  .lx-mobile-menu-list > a + a {
    border-top: 1px solid #f0f0f1;
  }

  .lx-mobile-menu-list > a > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f4f4f5;
  }

  .lx-mobile-menu-list > a > span svg {
    width: 18px;
    height: 18px;
  }

  .lx-mobile-menu-list strong {
    display: block;
    font-size: 12px;
  }

  .lx-mobile-menu-list small {
    display: block;
    margin-top: 3px;
    color: #8b94a1;
    font-size: 9.5px;
  }

  .lx-mobile-menu-list > a > svg {
    width: 16px;
    height: 16px;
    color: #a4a9b2;
  }

  body.lx-mobile-modal-open {
    overflow: hidden;
    touch-action: none;
  }
}


/* =========================================================
   MENU CLEAN + CARD DE USUÁRIO + LOGO — V4
   ========================================================= */
.lx-sidebar-logo {
  min-height: 82px;
}

.lx-sidebar-logo > a {
  width: 100%;
  min-width: 0;
}

.lx-sidebar-logo-image {
  display: block;
  width: 172px;
  max-width: 100%;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.lx-user-card {
  background: #dedede !important;
  color: #111 !important;
  border: 1px solid #d5d5d5;
  box-shadow: none !important;
}

.lx-user-avatar {
  background: #27272a !important;
  color: #fff !important;
}

.lx-user-card strong {
  color: #111 !important;
}

.lx-user-card small {
  color: #555b66 !important;
}

.lx-user-card:hover {
  background: #d7d7d7 !important;
}

.lx-logout-form button {
  color: #8a93a1;
}

.lx-logout-form button:hover {
  color: #111;
}

@media (max-width: 1023px) {
  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }

  .lx-mobile-nav {
    position: fixed !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 2147483000 !important;
    isolation: isolate;
  }

  .lx-mobile-sheet {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 2147483100 !important;
  }
}
