.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "topbar topbar"
    "nav content";
}

.topbar {
  grid-area: topbar;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 20, 0.75);
  backdrop-filter: blur(16px);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.4px;
}

.brand-sub {
  color: var(--muted);
  font-size: 13px;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav {
  grid-area: nav;
  padding: 18px 16px;
  border-right: 1px solid var(--border);
  background: rgba(10, 14, 20, 0.8);
}

.nav-group {
  margin-bottom: 18px;
  display: grid;
  gap: 6px;
}

.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
}

.nav-item.active {
  color: var(--text);
  border-color: rgba(255, 122, 61, 0.45);
  background: rgba(255, 122, 61, 0.14);
}

.content {
  grid-area: content;
  padding: 24px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.content-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.4px;
}

.page-sub {
  color: var(--muted);
  font-size: 13px;
}

.page-meta {
  display: flex;
  gap: 10px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.note-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

.stack {
  display: grid;
  gap: 12px;
}

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

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "topbar"
      "nav"
      "content";
  }

  .nav {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .nav-group {
    grid-auto-flow: column;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-status {
    width: 100%;
    flex-wrap: wrap;
  }

  .table-head,
  .table-row {
    grid-template-columns: 1fr;
  }

  .list-item {
    grid-template-columns: 1fr;
  }
}

