/* ========== PRAXMATE APP SHELL ========== */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.app-sidebar {
  background: #0a0e1a;
  color: white;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sb-brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
  font-family: 'Playfair Display', 'Instrument Serif', serif;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(14,165,233,0.3);
}
.sb-brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 3px; background: white; border-radius: 9px; }
.sb-brand-text { line-height: 1.2; min-width: 0; flex: 1; }
.sb-brand-name { font-family: 'Playfair Display', 'Instrument Serif', serif; font-size: 17px; font-weight: 700; color: white; }
.sb-brand-sub { font-size: 10.5px; color: rgba(255,255,255,0.5); letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.sb-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: all 0.15s;
}
.sb-nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: white;
}
.sb-nav-item.active {
  background: rgba(14,165,233,0.15);
  color: white;
  box-shadow: inset 2px 0 0 #0ea5e9;
}
.sb-nav-item.active .sb-nav-icon { color: #0ea5e9; }
.sb-nav-icon {
  width: 18px;
  font-size: 15px;
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
  text-align: center;
  font-family: inherit;
}

.sb-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 8px;
}
.sb-user:hover { background: rgba(255,255,255,0.08); }
.sb-user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.sb-user-info { flex: 1; min-width: 0; line-height: 1.2; }
.sb-user-name { font-size: 13px; font-weight: 600; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-role { font-size: 10.5px; color: rgba(255,255,255,0.5); margin-top: 1px; }
.sb-logout { color: rgba(255,255,255,0.4); font-size: 14px; flex-shrink: 0; }
.sb-user:hover .sb-logout { color: white; }

.app-main {
  min-width: 0;
  background: var(--bg, #f4f8fa);
}

/* Mobile toggle */
.sb-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 60;
  width: 40px; height: 40px;
  background: #0a0e1a;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(10,14,26,0.2);
}
.sb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,14,26,0.5);
  z-index: 40;
  backdrop-filter: blur(4px);
}
.sb-backdrop.visible { display: block; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .app-sidebar.open { transform: translateX(0); }
  .sb-toggle { display: flex; align-items: center; justify-content: center; }
  .app-main { padding-top: 60px; }
}
