/* Shell: sidebar + header + layout */
.msp-app {
  display: flex;
  min-height: 100vh;
  background: var(--msp-bg);
}

.msp-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--msp-sidebar-w);
  background: var(--msp-sidebar);
  color: #fff;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  transition: transform 0.25s ease;
}

.msp-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 18px;
}

.msp-sidebar__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.msp-sidebar__brand-text {
  font-weight: 650;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.msp-sidebar__school {
  margin: 0 8px 16px;
  padding: 12px;
  border-radius: var(--msp-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.msp-sidebar__school-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msp-sidebar__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #9CA3AF;
}

.msp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--msp-success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
  animation: msp-pulse 2s ease infinite;
}

.msp-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msp-sidebar__nav::-webkit-scrollbar { width: 4px; }
.msp-sidebar__nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

.msp-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #C7D0DF !important;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.msp-nav-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  opacity: 0.9;
}

.msp-nav-link:hover {
  background: var(--msp-sidebar-hover);
  color: #fff !important;
  transform: translateX(2px);
}

.msp-nav-link.active {
  background: var(--msp-sidebar-active);
  color: #fff !important;
  box-shadow: inset 3px 0 0 var(--msp-primary);
}

.msp-main {
  margin-left: var(--msp-sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.msp-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--msp-header-h);
  background: rgba(247, 249, 252, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--msp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
}

.msp-header__title h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}

.msp-header__meta {
  font-size: 12.5px;
  color: var(--msp-muted);
  margin-top: 2px;
}

.msp-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.msp-search {
  position: relative;
  width: min(320px, 36vw);
}

.msp-search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--msp-border);
  border-radius: 12px;
  background: #fff;
  padding: 0 14px 0 40px;
  font-size: 13.5px;
  color: var(--msp-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.msp-search input:focus {
  outline: none;
  border-color: #93C5FD;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.msp-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--msp-muted);
  font-size: 14px;
}

.msp-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--msp-border);
  background: #fff;
  color: var(--msp-muted);
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.msp-icon-btn:hover {
  color: var(--msp-text);
  border-color: #CBD5E1;
  background: #fff;
  box-shadow: var(--msp-shadow);
}

.msp-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #60A5FA, #2563EB);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 650;
  font-size: 13px;
  border: none;
}

.msp-content {
  padding: 24px 28px 40px;
  animation: msp-fade-up 0.35s ease;
}

.msp-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--msp-border);
  background: #fff;
}

.msp-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1035;
}

@media (max-width: 991.98px) {
  .msp-sidebar { transform: translateX(-105%); }
  .msp-sidebar.is-open { transform: translateX(0); }
  .msp-main { margin-left: 0; }
  .msp-menu-toggle { display: grid; place-items: center; }
  .msp-sidebar-backdrop.is-open { display: block; }
  .msp-search { display: none; }
  .msp-header { padding: 0 16px; }
  .msp-content { padding: 16px; }
}
