/* ============================================================
   Layout: app shell, header, content area
   ============================================================ */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--bg);
  transition: grid-template-columns 0.18s ease;
}

html.sidebar-collapsed .app {
  grid-template-columns: var(--sidebar-w-collapsed) 1fr;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header {
  height: var(--header-h);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
}

.header-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.crumb-sep {
  color: var(--ink-faint);
}

.crumb-current {
  color: var(--ink);
  font-weight: 600;
}

.header-search {
  flex: 1;
  max-width: 460px;
  margin: 0 8px;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 36px;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
  border: 1px solid transparent;
  color: var(--ink);
  outline: none;
  transition: border-color 0.12s, background 0.12s;
}

.header-search input::placeholder {
  color: var(--ink-faint);
}

.header-search input:focus {
  border-color: var(--accent-line);
  background: var(--bg-elev);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.header-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  position: relative;
  transition: background 0.12s, color 0.12s;
}

.icon-btn:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elev);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  font-size: 13px;
  font-weight: 500;
}

.user-chip:hover {
  background: var(--bg-soft);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.78 0.10 65), oklch(0.62 0.16 45));
  color: white;
  font-size: 11.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.content {
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: 1320px;
  flex: 1;
  margin: auto;
  width: 100%;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 4px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.page-sub {
  font-size: 13.5px;
  color: var(--ink-mute);
  margin-top: 4px;
}

.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
