.app-shell {
  min-height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--page-padding);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(12px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-brand strong {
  display: block;
  font-size: 1rem;
}

.header-brand span:last-child {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-chip {
  display: grid;
  justify-items: end;
}

.user-chip span {
  font-weight: 700;
}

.user-chip small {
  color: var(--text-muted);
}

.tab-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 35;
  min-height: var(--nav-height);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px var(--page-padding);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(15, 17, 23, 0.9);
  backdrop-filter: blur(12px);
}

.tab-button {
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-weight: 700;
}

.tab-button.active {
  border-color: transparent;
  color: white;
  background: var(--primary);
}

.content-shell {
  padding: var(--page-padding);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card-main {
  height: calc(100vh - var(--header-height) - var(--nav-height) - (var(--page-padding) * 2));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(26, 29, 39, 0.98);
  box-shadow: var(--shadow);
}

.card-placeholder {
  justify-content: center;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.section-head h1 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-soft);
}

.filter-field {
  min-width: 160px;
}

.filter-search {
  flex: 1 1 320px;
}

.table-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-soft);
}

.pagination-actions,
.pagination-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-size-select {
  width: auto;
  min-width: 90px;
}

.placeholder-state {
  margin: auto;
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 980px) {
  .header,
  .tab-nav,
  .content-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head,
  .filters-row,
  .pagination-bar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head,
  .pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
