:root {
  --pluso-mobile-topbar-height: 56px;
  --pluso-mobile-nav-height: calc(74px + env(safe-area-inset-bottom, 0px));
  --pluso-mobile-nav-peek: calc(18px + env(safe-area-inset-bottom, 0px));
}

.pluso-mobile-topbar {
  display: none;
}

.pluso-mobile-logo {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-main, rgba(255, 255, 255, 0.92));
  text-decoration: none;
}

.pluso-mobile-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.pluso-mobile-theme-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--glass, rgba(255, 255, 255, 0.08));
  color: var(--text-main, rgba(255, 255, 255, 0.92));
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pluso-mobile-theme-btn:hover {
  background: var(--glass-strong, rgba(255, 255, 255, 0.14));
  border-color: var(--accent, #7eb8ff);
}

.pluso-mobile-bottomnav {
  display: none;
}

.pluso-mobile-nav-handle {
  display: none;
}

@media (max-width: 920px) {
  body.has-mobile-nav {
    min-height: 100svh;
    height: 100svh;
    overflow: hidden;
    position: relative;
  }

  @supports (height: 100dvh) {
    body.has-mobile-nav {
      min-height: 100dvh;
      height: 100dvh;
    }
  }

  body.has-mobile-nav > aside,
  body.has-mobile-nav .desktop-sidebar,
  body.has-mobile-nav .sidebar {
    display: none !important;
  }

  body.has-mobile-nav .pluso-mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--pluso-mobile-topbar-height);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.14));
    background: color-mix(in srgb, var(--bg, #0a0f17) 82%, black 18%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 85;
  }

  [data-theme="light"] body.has-mobile-nav .pluso-mobile-topbar {
    background: rgba(238, 242, 251, 0.92);
  }

  body.has-mobile-nav > main,
  body.has-mobile-nav .app-shell {
    flex: 1;
    min-height: 0;
  }

  body.has-mobile-nav > main,
  body.has-mobile-nav .main-viewport {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: calc(var(--pluso-mobile-topbar-height) + 14px) !important;
    padding-bottom: calc(var(--pluso-mobile-nav-height) + 14px) !important;
  }

  body.has-mobile-nav[data-mobile-nav-mode="reveal"] > main,
  body.has-mobile-nav[data-mobile-nav-mode="reveal"] .main-viewport {
    padding-bottom: calc(var(--pluso-mobile-nav-peek) + 14px) !important;
  }

  body.has-mobile-nav .app-shell {
    display: block;
    height: 100%;
    overflow: hidden;
  }

  body.has-mobile-nav .pluso-mobile-bottomnav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--pluso-mobile-nav-height);
    padding: 0.35rem 0.45rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.14));
    background: rgba(8, 12, 20, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 86;
  }

  body.has-mobile-nav[data-mobile-nav-mode="reveal"] .pluso-mobile-bottomnav {
    left: 0;
    right: 0;
    bottom: 0;
    min-height: var(--pluso-mobile-nav-height);
    height: auto;
    padding-top: 1.1rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.14));
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -16px 36px rgba(0, 0, 0, 0.11);
    transform: translateY(calc(100% - var(--pluso-mobile-nav-peek)));
    transition: transform 0.32s cubic-bezier(.22,1,.36,1), box-shadow 0.25s ease;
    overflow: hidden;
  }

  body.has-mobile-nav[data-mobile-nav-mode="reveal"].mobile-nav-visible .pluso-mobile-bottomnav,
  body.has-mobile-nav[data-mobile-nav-mode="reveal"] .pluso-mobile-bottomnav:hover,
  body.has-mobile-nav[data-mobile-nav-mode="reveal"] .pluso-mobile-bottomnav:focus-within {
    transform: translateY(0);
    box-shadow: 0 -22px 42px rgba(0, 0, 0, 0.14);
  }

  body.has-mobile-nav[data-mobile-nav-mode="reveal"] .pluso-mobile-bottomnav::before {
    display: none;
  }

  body.has-mobile-nav[data-mobile-nav-mode="reveal"] .pluso-mobile-nav-handle {
    display: block;
    position: absolute;
    top: 8px;
    left: 50%;
    width: 52px;
    height: 5px;
    border-radius: 999px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.32);
    pointer-events: auto;
    cursor: ns-resize;
  }

  [data-theme="light"] body.has-mobile-nav[data-mobile-nav-mode="reveal"] .pluso-mobile-nav-handle {
    background: rgba(16, 24, 40, 0.2);
  }

  [data-theme="light"] body.has-mobile-nav .pluso-mobile-bottomnav {
    background: rgba(238, 242, 251, 0.9);
  }

  body.has-mobile-nav .pluso-mobile-bottomnav::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 26px;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, rgba(8, 12, 20, 0.88));
  }

  [data-theme="light"] body.has-mobile-nav .pluso-mobile-bottomnav::before {
    background: linear-gradient(to bottom, transparent, rgba(238, 242, 251, 0.9));
  }

  .pluso-mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    color: var(--text-dim, rgba(255, 255, 255, 0.35));
    min-height: 54px;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .pluso-mobile-tab:hover {
    color: var(--text-muted, rgba(255, 255, 255, 0.65));
  }

  .pluso-mobile-tab.active {
    color: var(--text-main, rgba(255, 255, 255, 0.92));
    background: color-mix(in srgb, var(--glass-strong, rgba(255, 255, 255, 0.14)) 92%, transparent);
    border-radius: 14px;
  }

  [data-theme="light"] body.has-mobile-nav .pluso-mobile-tab {
    color: rgba(17, 24, 39, 0.58);
  }

  [data-theme="light"] body.has-mobile-nav .pluso-mobile-tab:hover {
    color: rgba(17, 24, 39, 0.82);
  }

  [data-theme="light"] body.has-mobile-nav .pluso-mobile-tab.active {
    color: rgba(17, 24, 39, 0.96);
    background: rgba(17, 24, 39, 0.08);
  }

  .pluso-mobile-tab-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .pluso-mobile-tab-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .pluso-mobile-tab-label {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: "Outfit", system-ui, sans-serif;
  }

}
