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

.sidebar {
  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: visible;
}

.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: visible;
  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;
}

.scanning-panel {
  justify-items: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(47, 111, 237, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(243, 247, 252, 0.9));
}

.scan-hero {
  position: relative;
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  margin-bottom: 8px;
}

.scan-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(229, 238, 255, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 16px 40px rgba(47, 111, 237, 0.14);
}

.scan-core-ring {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(47, 111, 237, 0.18);
  border-radius: 50%;
}

.scan-core-ring.secondary {
  inset: 22px;
  border-color: rgba(16, 24, 40, 0.08);
}

.scan-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(47, 111, 237, 0.12);
}

.orbit-one {
  animation: scan-spin 10s linear infinite;
}

.orbit-two {
  inset: 18px;
  border-color: rgba(37, 99, 235, 0.18);
  animation: scan-spin-reverse 7.5s linear infinite;
}

.scan-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f6fed, #7db4ff);
  box-shadow: 0 0 0 6px rgba(47, 111, 237, 0.1);
}

.dot-one {
  top: -4px;
}

.dot-two {
  right: 6px;
  bottom: 14px;
  width: 8px;
  height: 8px;
}

.dot-three {
  left: 10px;
  bottom: 10px;
  width: 7px;
  height: 7px;
}

.state-panel h2,
.empty-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
}

.state-panel p,
.empty-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.loading-steps {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.loading-steps span {
  width: 36px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(47, 111, 237, 0.16), rgba(47, 111, 237, 0.44));
  animation: loading-pulse 1.6s ease-in-out infinite;
}

.loading-steps span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-steps span:nth-child(3) {
  animation-delay: 0.4s;
}

.empty-card {
  min-height: 220px;
  place-content: center;
  justify-items: center;
  padding: 28px;
  border: 1px dashed rgba(148, 163, 184, 0.26);
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(47, 111, 237, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(244, 247, 251, 0.78));
  text-align: center;
}

.empty-card p {
  max-width: 460px;
  font-size: 0.94rem;
}

.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));
}

@keyframes scan-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes scan-spin-reverse {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-360deg);
  }
}

@keyframes loading-pulse {
  0%,
  100% {
    transform: scaleX(0.82);
    opacity: 0.4;
  }

  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

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

  .scan-hero {
    width: 132px;
    height: 132px;
  }

  .empty-card {
    min-height: 180px;
    padding: 22px;
  }
}
