.sa-topbar {
  height: var(--sa-topbar-height);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--sa-border);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.sa-topbar__brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--sa-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sa-topbar__brand .bi {
  color: var(--sa-primary);
}

.sa-shell {
  display: flex;
  min-height: calc(100vh - var(--sa-topbar-height));
}

.sa-sidebar {
  width: var(--sa-sidebar-width);
  flex-shrink: 0;
  background: var(--sa-surface);
  border-right: 1px solid var(--sa-border);
  padding: 1.25rem 0.75rem;
  position: sticky;
  top: var(--sa-topbar-height);
  align-self: flex-start;
  height: calc(100vh - var(--sa-topbar-height));
  overflow-y: auto;
}

.sa-sidebar__section {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sa-text-muted);
  padding: 0.9rem 0.75rem 0.35rem;
}

.sa-sidebar__section:first-child {
  padding-top: 0;
}

.sa-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--sa-radius-sm);
  color: var(--sa-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  position: relative;
  transition: background .15s ease, color .15s ease;
}

.sa-sidebar__link:hover {
  background: var(--sa-surface-secondary);
  color: var(--sa-text);
}

.sa-sidebar__link.active {
  background: var(--sa-primary-light);
  color: var(--sa-primary-dark);
  font-weight: 600;
}

.sa-sidebar__link.active::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--sa-primary);
}

.sa-sidebar__link .bi {
  font-size: 1.05rem;
  width: 1.25rem;
  text-align: center;
}

.sa-main {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 2rem 3rem;
}

.sa-breadcrumbs {
  font-size: 0.85rem;
  color: var(--sa-text-muted);
  margin-bottom: 0.75rem;
}

.sa-breadcrumbs a {
  color: var(--sa-text-secondary);
}

@media (max-width: 991.98px) {
  .sa-sidebar {
    display: none;
  }
  .sa-main {
    padding: 1.25rem 1rem 2.5rem;
  }
  .sa-topbar__search {
    display: none;
  }
}

.sa-topbar__brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--sa-gradient);
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.sa-topbar__search {
  width: 280px;
}

.sa-topbar__search .form-control,
.sa-topbar__search .input-group-text {
  background: var(--sa-surface-secondary);
  border-color: var(--sa-border);
}

.sa-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sa-primary-light);
  color: var(--sa-primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sa-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.sa-page-header h4 {
  font-size: 1.45rem;
  margin-bottom: 0.15rem;
}

.sa-footer {
  border-top: 1px solid var(--sa-border);
  margin-top: 3rem;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--sa-text-muted);
}

.sa-auth {
  min-height: 100vh;
  background:
    radial-gradient(900px 400px at 10% -10%, rgba(79, 70, 229, 0.14), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(124, 58, 237, 0.10), transparent 60%),
    var(--sa-bg);
}

.sa-auth__logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--sa-gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
}

.sa-topbar__brand .sa-topbar__brand-mark .bi {
  color: #fff;
}
