.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  padding: .55rem .7rem;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(135deg, #1492c5 0%, #168dbd 50%, #1176a1 100%);
  box-shadow: 0 8px 18px rgba(16, 35, 59, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.app-topbar__left,
.app-topbar__right {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.app-topbar__right:empty {
  display: none;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 6px 14px rgba(16, 35, 59, 0.08);
}

.icon-btn:hover,
.icon-btn:focus {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}

.icon-btn--muted,
.icon-btn--refresh {
  background: rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.brand--panel {
  padding: .5rem .72rem;
  border-radius: 16px;
  background: rgba(7, 39, 68, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(16, 35, 59, 0.08);
}

.brand:hover,
.brand:focus {
  color: #fff;
}

.brand__logo-shell {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand__logo,
.sidebar-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: .08rem;
}

.brand__name {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.brand__section {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.brand__section i {
  font-size: .88rem;
  color: rgba(255, 255, 255, 0.88);
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: min(88vw, 340px);
  height: 100vh;
  padding: .75rem;
  background: #f4f7fb;
  transform: translateX(-100%);
  transition: transform .22s ease;
  overflow-y: auto;
}

.app-sidebar.active {
  transform: translateX(0);
}

.app-drawer__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
  padding: 1rem 1rem .95rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.3), transparent 24%),
    linear-gradient(135deg, #0f4c81 0%, #123861 58%, #0b2744 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(11, 39, 68, 0.18);
}

.app-drawer__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.app-drawer__eyebrow {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.app-drawer__title {
  display: block;
  margin-top: .18rem;
  font-size: 1.18rem;
  line-height: 1.1;
}

.app-drawer__close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.app-drawer__nav {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.app-drawer__group {
  display: grid;
  gap: .55rem;
}

.app-drawer__group-title {
  padding: 0 .45rem;
  color: #5f6f82;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav-link-drawer {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .82rem .85rem;
  border: 1px solid #dbe4ee;
  border-radius: 20px;
  background: #fff;
  color: #10233b;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(16, 35, 59, 0.05);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.nav-link-drawer:hover,
.nav-link-drawer:focus {
  transform: translateY(-1px);
  color: #10233b;
  border-color: #c7d5e2;
  box-shadow: 0 14px 26px rgba(16, 35, 59, 0.08);
}

.nav-link-drawer.is-active {
  background: linear-gradient(180deg, #eef4f9 0%, #ffffff 100%);
  border-color: #b8cfdf;
  box-shadow: 0 14px 30px rgba(16, 35, 59, 0.08);
}

.nav-link-drawer__icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: #f7fafc;
  border: 1px solid #dbe4ee;
  color: #0f4c81;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-link-drawer.is-active .nav-link-drawer__icon {
  background: #0f4c81;
  border-color: #0f4c81;
  color: #fff;
}

.nav-link-drawer__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.nav-link-drawer__label {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
}

.nav-link-drawer__hint {
  color: #5f6f82;
  font-size: .78rem;
  line-height: 1.25;
}

.app-drawer__footer {
  margin-top: .2rem;
  padding: .9rem;
  border: 1px solid #dbe4ee;
  border-radius: 20px;
  background: #fff;
}

.app-drawer__profile {
  display: grid;
  gap: .18rem;
}

.app-drawer__profile-name {
  font-size: .95rem;
  font-weight: 700;
  color: #10233b;
}

.app-drawer__profile-copy {
  color: #5f6f82;
  font-size: .78rem;
}

.app-drawer__logout {
  display: inline-flex;
  align-items: center;
  margin-top: .85rem;
  padding: .62rem .82rem;
  border-radius: 14px;
  background: #fdf1ef;
  color: #b85c4b;
  font-weight: 700;
  text-decoration: none;
}

.app-overlay {
  position: fixed;
  inset: 0;
  z-index: 1035;
  background: rgba(7, 19, 31, 0.42);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

.app-overlay.show {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 992px) {
  .app-topbar {
    padding: .62rem .9rem;
  }

  .app-sidebar {
    width: min(360px, 28vw);
  }
}

@media (max-width: 767.98px) {
  .app-topbar {
    gap: .55rem;
    padding: .48rem .6rem;
  }

  .app-topbar__left,
  .app-topbar__right {
    gap: .5rem;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .brand--panel {
    padding: .42rem .55rem;
    border-radius: 14px;
  }

  .brand__logo-shell {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .brand__name {
    font-size: .56rem;
  }

  .brand__section {
    gap: .34rem;
    font-size: .88rem;
  }

  .brand__section i {
    font-size: .78rem;
  }

  .app-sidebar {
    width: min(90vw, 320px);
    padding: .55rem;
  }

  .app-drawer__hero {
    padding: .85rem;
    border-radius: 20px;
  }

  .nav-link-drawer {
    padding: .74rem .78rem;
    border-radius: 18px;
  }

  .nav-link-drawer__icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .nav-link-drawer__label {
    font-size: .9rem;
  }

  .nav-link-drawer__hint {
    font-size: .74rem;
  }
}
