.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: 100vh;
  padding: 14px;
  gap: 14px;
  overflow: hidden;
}

.sidebar,
.content-panel {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.content-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 4px 0;
  overflow: hidden;
}

.content-section,
.state-panel {
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.content-section {
  padding: 16px;
}

.inline-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 12px;
  background: rgba(254, 242, 242, 0.92);
  color: #b42318;
  font-size: 0.86rem;
}

.primary-button,
.secondary-button,
.danger-button {
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(135deg, #10213f 0%, #213f75 100%);
  color: #fff;
}

.secondary-button {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.92));
  color: var(--text);
}

.danger-button {
  border: 1px solid rgba(239, 68, 68, 0.18);
  background: rgba(254, 242, 242, 0.96);
  color: #b42318;
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.sort-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.content-scroll-area {
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.count-pill,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.count-pill {
  min-width: 44px;
  padding: 6px 10px;
}

.badge {
  padding: 6px 10px;
}

.badge.neutral {
  background: var(--badge-bg);
  color: var(--badge-text);
}

.stack-list,
.bookmark-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-action-button {
  padding: 6px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.card-action-button:hover {
  border-color: rgba(100, 116, 139, 0.36);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(226, 232, 240, 0.9));
}

.card-action-button:disabled {
  cursor: default;
  opacity: 0.7;
  border-color: rgba(148, 163, 184, 0.2);
}

.card-action-button:active {
  box-shadow: inset 0 2px 4px rgba(148, 163, 184, 0.18);
}

.state-panel,
.empty-card {
  display: grid;
  gap: 8px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.state-panel {
  min-height: 320px;
  place-content: center;
  padding: 28px;
}

.browser-nav,
.styled-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.42) transparent;
}
.styled-scrollbar::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.styled-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.styled-scrollbar::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.72), rgba(100, 116, 139, 0.58));
  background-clip: padding-box;
}
.styled-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.82), rgba(71, 85, 105, 0.72));
  background-clip: padding-box;
}

.state-panel.error {
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.86));
}

@media (max-width: 720px) {
  .sort-bar {
    justify-content: stretch;
  }
}
