:root {
  --navbar-height: 74px;
  --sidebar-width: 318px;
}

.app-nav {
  height: var(--navbar-height);
  min-height: var(--navbar-height);
  max-height: var(--navbar-height);
  padding: 0;
  overflow-y: hidden;
  background: rgba(8, 15, 33, 0.86) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(2, 8, 23, 0.28);
}

.app-nav .container-fluid {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 0 18px;
  min-width: 0;
}

.app-nav__left,
.app-nav__right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.app-nav__left {
  flex: 0 1 auto;
}

.app-nav__right {
  flex: 0 1 auto;
  margin-left: auto;
  justify-content: flex-end;
}

.app-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 1 auto;
  color: #ffffff !important;
  text-decoration: none;
}

.app-nav__brand:hover {
  color: #ffffff;
}

.app-nav__logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
}

.app-nav__brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.app-nav__eyebrow {
  color: #93c5fd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}

.app-nav__title {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-nav__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  margin-left: 8px;
  min-width: 0;
  max-width: clamp(160px, 24vw, 260px);
  flex: 0 1 auto;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-nav__status::before {
  content: "";
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.app-nav__toggle {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none !important;
}

.app-nav__toggle:focus {
  box-shadow: none;
}

.app-nav__toggle-icon,
.app-nav__toggle-icon::before,
.app-nav__toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-nav__toggle-icon {
  position: relative;
}

.app-nav__toggle-icon::before,
.app-nav__toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.app-nav__toggle-icon::before {
  top: -6px;
}

.app-nav__toggle-icon::after {
  top: 6px;
}

.app-sidebar {
  top: var(--navbar-height) !important;
  height: calc(100vh - var(--navbar-height)) !important;
  width: var(--sidebar-width) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(9, 15, 31, 0.98), rgba(13, 23, 48, 0.98)) !important;
  color: #e2e8f0;
  backdrop-filter: blur(18px);
}

.app-sidebar .offcanvas-header {
  padding: 18px 18px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar__body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app-sidebar__profile {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: 0 18px 36px rgba(2, 8, 23, 0.24);
}

.app-sidebar__avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
  display: block;
  margin: 0 auto 14px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
}

.app-sidebar__username {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.app-sidebar__email {
  margin-top: 6px;
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.84rem;
  line-height: 1.5;
  text-align: center;
  word-break: break-word;
}

.app-sidebar__menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.app-sidebar__section-title {
  margin: 0 0 8px;
  padding: 0 12px;
  color: #8ca0bf;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.app-sidebar__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  color: #dbe4f3 !important;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.app-sidebar__link:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
}

.app-sidebar__link.is-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(37, 99, 235, 0.18));
  border-color: rgba(96, 165, 250, 0.3);
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.16);
}

.app-sidebar__link--danger {
  color: #fecaca !important;
}

.app-sidebar__link--danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
}

.app-sidebar__link i,
.app-sidebar__link .material-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  font-size: 1.15rem !important;
}

.app-sidebar__footer {
  margin-top: auto;
  padding-top: 6px;
}

.app-sidebar .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.85;
}

body {
  padding-top: var(--navbar-height);
}

@media (max-width: 767.98px) {
  .app-nav__status {
    display: none;
  }

  .app-nav .container-fluid {
    padding: 0 14px;
  }

  .app-sidebar {
    width: min(100vw, 310px) !important;
  }
}

@media (max-width: 1180px) {
  .app-nav__status {
    display: none;
  }
}