/* Shared header + sidebar matching practices.html design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { -webkit-font-smoothing: antialiased; box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: #101828;
  background: #f8fafc;
  min-height: 100vh;
}

/* Page shell */
.page-bg {
  min-height: 100vh;
  width: 100%;
}
.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 20px 24px;
}

/* ========== HEADER ========== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: transparent !important;
  
 
  padding: 12px 20px;
  
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-logo {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-logo img { width: 44px; height: 44px; object-fit: contain; }
.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0A1931;
  line-height: 1;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #344054;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.header-link:hover,
.header-link:focus-visible { background: #eaf2ff; color: #1646c7; }
.header-link img { width: 20px; height: 20px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #667085;
  transition: background 0.15s;
  position: relative;
}
.icon-btn:hover { background: rgba(0, 0, 0, 0.04); }
.icon-btn svg { width: 20px; height: 20px; }
.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #FF3B30;
  border-radius: 9999px;
 
}
.user-chip {
  display: none;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
}
@media (min-width: 640px) {
  .user-chip { display: flex; }
}
.user-name {
  font-size: 14px;
  font-weight: 500;
  color: #344054;
}
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: #D6E7FF;
  border: 2px solid #fff;

  display: flex;
  align-items: center;
  justify-content: center;
  color: #1570FF;
  font-weight: 700;
  font-size: 14px;
}

/* ========== LAYOUT ========== */
#layout-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
  transition: grid-template-columns 0.3s ease;
}
@media (min-width: 1024px) {
  #layout-container {
    grid-template-columns: 220px 1fr;
  }
  #layout-container.collapsed {
    grid-template-columns: 72px 1fr;
  }
}

/* ========== SIDEBAR ========== */
#sidebar {
  border-radius: 16px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.32) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.56);

  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}
#layout-container:not(.collapsed) #sidebar {
  cursor: default;
}
.toggle-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
  padding: 0 4px;
}
#layout-container.collapsed .toggle-container {
  justify-content: center;
}
.toggle-btn {
  padding: 4px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-btn:hover { background: rgba(255,255,255,0.6); }
.toggle-btn svg { width: 18px; height: 18px; }

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #475467;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.6); color: #344054; }
.nav-item svg,
.nav-item img.nav-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #667085;
  stroke: currentColor;
}
.nav-item.active {
  background: #D6E7FF;
  color: #1646C7;
  font-weight: 700;

  border-left: 4px solid #1570FF;
  padding-left: 10px;
}
.nav-item.active svg,
.nav-item.active img.nav-icon {
  color: #1570FF;
}

#layout-container.collapsed .sidebar-text,
#layout-container.collapsed .pro-plan {
  display: none;
}
#layout-container.collapsed .nav-item {
  justify-content: center;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border-left: none !important;
}

.pro-plan {
  margin-top: auto;
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
}
.pro-plan-title {
  font-size: 14px;
  font-weight: 700;
  color: #1646C7;
}
.pro-plan-desc {
  font-size: 12px;
  line-height: 1.4;
  color: #344054;
  margin-top: 4px;
}
.pro-plan-btn {
  margin-top: 12px;
  width: 100%;
  background: #1570FF;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.pro-plan-btn:hover { background: #0f5fd6; }

/* Main column */
.main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Toast (shared) */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #101828;
  color: #fff;
  padding: 12px 16px;
  border-radius: 11px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s;
  z-index: 40;
  font-size: 14px;
  font-weight: 600;
}
.toast.show { opacity: 1; transform: none; }

/* Utility */
.hidden { display: none !important; }

@media (max-width: 560px) {
  .app-header { padding: 10px 12px; gap: 8px; }
  .brand-row { gap: 8px; }
  .brand-name { font-size: 18px; }
  .brand-logo,
  .brand-logo img { width: 38px; height: 38px; }
  .header-actions { gap: 2px; }
  .header-link { padding: 8px; }
  .header-link span { display: none; }
  .header-link img { width: 21px; height: 21px; }
}