.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px minmax(0,1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg,#0b2949,#0a2441 70%,#0b2a4b);
  color: #fff;
  padding: 24px 14px 18px;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow: auto;
}

.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.sidebar-close {
  display: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 25, 47, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 45;
}

@media (min-width: 901px) {
  .sidebar-backdrop {
    display: none !important;
  }
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #fff;
  padding: 0 8px 22px;
}

.side-brand strong,.side-brand small {
  display: block;
}

.side-brand strong {
  font-size: 17px;
}

.side-brand small {
  font-size: 11px;
  color: #b7c7db;
  margin-top: 2px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,#0f80ff,#41a8ff);
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(13,110,253,.25);
}

.brand-logo.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 18px;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.25);
}

.brand-logo-img.small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.safer-card-logo {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  object-fit: cover;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #e4eef9;
  padding: 12px 13px;
  border-radius: 11px;
  text-align: left;
}

.nav-item span {
  width: 22px;
  text-align: center;
  font-size: 18px;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
}

.nav-item.active {
  background: linear-gradient(90deg,#0d6efd,#0b79ff);
  color: #fff;
  box-shadow: 0 9px 22px rgba(13,110,253,.25);
}

.sidebar-bottom {
  margin-top: auto;
  padding: 20px 8px 0;
}

.source-badge {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 13px;
  background: rgba(255,255,255,.06);
}

.source-badge strong,.source-badge small {
  display: block;
}

.source-badge strong {
  font-size: 12px;
}

.source-badge small {
  font-size: 10px;
  color: #bfd0e3;
  margin-top: 2px;
}

.source-shield {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #11b981;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
}

.theme-toggle input {
  display: none;
}

.theme-toggle i {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #36516e;
}

.theme-toggle i:after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  left: 3px;
  top: 3px;
  transition: .2s;
}

.theme-toggle input:checked+i {
  background: #0d6efd;
}

.theme-toggle input:checked+i:after {
  transform: translateX(16px);
}

.sidebar-bottom>p {
  font-size: 10px;
  color: #95abc2;
  line-height: 1.55;
  margin: 14px 2px 0;
}

.main-frame {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: 68px;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
}

.header-brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.header-logo {
  height: 48px;
  max-height: 50px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
}

.top-search-wrap {
  margin-left: auto;
  width: min(520px,52vw);
  height: 40px;
  border: 1px solid var(--line);
  background: #f8fbff;
  border-radius: 11px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  gap: 9px;
}

.top-search-wrap input {
  border: 0;
  background: transparent;
  outline: 0;
  min-width: 0;
  flex: 1;
  color: var(--text);
}

kbd {
  font-size: 10px;
  color: #6c7f99;
  border: 1px solid #d7e2ef;
  background: #fff;
  border-radius: 6px;
  padding: 3px 6px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #092f5e;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.content {
  flex: 1;
  padding: 18px 22px 65px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 238px;
  right: 0;
  z-index: 35;
  font-size: 11px;
  color: #637792;
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -4px 16px rgba(13, 42, 77, 0.05);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-logo {
  height: 24px;
  max-height: 24px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
}

.footer-disclaimer {
  font-size: 10.5px;
  color: var(--muted);
}

.footer-credit {
  font-size: 10.5px;
  color: var(--muted);
}

.footer-credit strong {
  color: var(--text);
}

.footer-brand {
  color: var(--blue);
  font-weight: 700;
}
