body.app-shell {
  background:
    radial-gradient(circle at top left, rgba(47, 108, 255, 0.12), transparent 24%),
    radial-gradient(circle at 90% 0%, rgba(47, 108, 255, 0.08), transparent 18%),
    linear-gradient(180deg, #020917 0%, #06102b 100%);
}

body.app-shell .dashboard-sidebar {
  background:
    linear-gradient(180deg, rgba(2, 9, 23, 0.98), rgba(3, 12, 30, 0.95)),
    radial-gradient(circle at top, rgba(47, 108, 255, 0.18), transparent 28%);
}

body.app-shell .sidebar-nav-secondary,
body.app-shell .sidebar-divider {
  display: none;
}

body.app-shell .dashboard-main {
  padding-top: 22px;
}

body.app-shell .dashboard-hero {
  margin-bottom: 18px;
}

body.app-shell .dashboard-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

body.app-shell .dashboard-toolbar #manage-billing-button {
  display: none;
}

body.app-shell .toolbar-profile-inline,
body.app-shell .toolbar-signout,
body.app-shell .toolbar-admin-inline {
  display: none !important;
}

body.app-shell .toolbar-menu {
  display: block;
  margin-left: 0;
}

body.app-shell .toolbar-menu-trigger,
body.app-shell .toolbar-button,
body.app-shell .toolbar-upgrade,
body.app-shell .ghost-button,
body.app-shell .dark-ghost {
  background: linear-gradient(180deg, rgba(14, 24, 42, 0.88), rgba(10, 19, 34, 0.82));
  border-color: rgba(94, 138, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.app-shell .toolbar-usage {
  min-width: 0;
  width: 100%;
  gap: 12px;
}

body.app-shell .toolbar-usage-track {
  flex: 1 1 auto;
  width: auto;
  min-width: 160px;
}

body.app-shell .toolbar-usage span {
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
}

body.app-shell .toolbar-upgrade,
body.app-shell .toolbar-button,
body.app-shell .toolbar-menu-link,
body.app-shell .mobile-app-action,
body.app-shell .usage-actions .ghost-button,
body.app-shell .report-actions .ghost-button,
body.app-shell .settings-actions .ghost-button,
body.app-shell .settings-actions .primary-button,
body.app-shell .settings-security-item .ghost-button,
body.app-shell .settings-security-item .primary-button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 14px;
  font-size: 0.87rem;
  font-weight: 650;
  line-height: 1.08;
}

body.app-shell .toolbar-menu-trigger {
  gap: 10px;
  min-height: 50px;
  padding: 6px 10px 6px 12px;
  border-radius: 16px;
}

body.app-shell .toolbar-menu-trigger-copy {
  gap: 0;
}

body.app-shell .toolbar-menu-trigger-copy small {
  display: none;
}

body.app-shell .toolbar-menu-trigger-copy strong {
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
  color: #e3ecff;
}

body.app-shell .toolbar-menu-avatar {
  width: 40px;
  height: 40px;
  font-size: 0.82rem;
}

body.app-shell .toolbar-menu-trigger:hover,
body.app-shell .toolbar-button:hover,
body.app-shell .toolbar-upgrade:hover,
body.app-shell .ghost-button:hover,
body.app-shell .dark-ghost:hover,
body.app-shell .toggle:hover,
body.app-shell .link-button:hover,
body.app-shell .nav-link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
}

body.app-shell .toolbar-menu-panel {
  width: min(304px, 84vw);
  background: linear-gradient(180deg, rgba(9, 18, 38, 0.98), rgba(7, 15, 31, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.28);
  animation: appToolbarMenuIn 180ms ease;
}

body.app-shell .toolbar-menu[open] .toolbar-menu-trigger {
  border-color: rgba(120, 160, 255, 0.28);
  background: linear-gradient(180deg, rgba(19, 33, 59, 0.96), rgba(11, 21, 39, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 34px rgba(0, 0, 0, 0.18);
}

body.app-shell .dashboard-topcopy h1 {
  line-height: 0.98;
}

body.app-shell .summary-card,
body.app-shell .dashboard-card {
  background: rgba(12, 21, 41, 0.84);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

body.app-shell .summary-card {
  min-height: 172px;
}

body.app-shell .summary-card-primary {
  background: linear-gradient(180deg, #2f6cff 0%, #1f53e1 100%);
}

body.app-shell .summary-card-primary p,
body.app-shell .summary-card p {
  color: rgba(232, 240, 255, 0.78);
  max-width: 20ch;
}

body.app-shell .summary-card-primary h2 {
  font-size: 1.85rem;
}

body.app-shell .plans-panel {
  margin-top: 18px;
}

body.app-shell .plans-grid {
  gap: 14px;
}

body.app-shell .plan-card {
  padding: 18px;
  min-height: 0;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

body.app-shell .plan-tag {
  background: rgba(47, 108, 255, 0.14);
  color: #9bbdff;
}

body.app-shell .plan-price {
  font-size: 1.85rem;
}

body.app-shell .plan-copy {
  min-height: 0;
  color: #aab8d1;
}

body.app-shell .plan-select-button {
  width: 100%;
  min-height: 44px;
}

body.app-shell .plan-spotlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.app-shell .plan-spotlight-copy {
  display: grid;
  gap: 10px;
  max-width: 52ch;
}

body.app-shell .plan-spotlight-copy h3 {
  margin: 0;
  color: white;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

body.app-shell .plan-spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

body.app-shell .notification-panel {
  display: none;
  margin-bottom: 20px;
}

body.app-shell .notification-panel[hidden],
body.app-shell .detector-secondary-grid[hidden],
body.app-shell .detector-tertiary-grid[hidden] {
  display: none !important;
}

body.app-shell .notification-panel.has-notifications {
  display: block;
}

body.app-shell .notification-item,
body.app-shell .draft-item,
body.app-shell .version-item,
body.app-shell .checklist-item,
body.app-shell .comparison-stat,
body.app-shell .history-item,
body.app-shell .sentence-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

body.app-shell .detector-inspector-switcher {
  margin-top: -2px;
  padding: 18px 22px;
}

body.app-shell .detector-inspector-copy {
  margin: 10px 0 0;
  max-width: 64ch;
}

body.app-shell .detector-inspector-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.app-shell .detector-inspector-tab {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #d7e5ff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

body.app-shell .detector-inspector-tab:hover,
body.app-shell .detector-inspector-tab:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(122, 166, 255, 0.24);
  background: rgba(47, 108, 255, 0.12);
  color: white;
}

body.app-shell .detector-inspector-tab.active {
  background: linear-gradient(180deg, rgba(47, 108, 255, 0.26), rgba(47, 108, 255, 0.14));
  border-color: rgba(108, 157, 255, 0.34);
  color: white;
}

body.app-shell .detector-secondary-grid,
body.app-shell .detector-tertiary-grid {
  gap: 18px;
}

body.app-shell .detector-result-hero {
  align-items: center;
}

body.app-shell .signal-ring {
  box-shadow: none;
}

body.app-shell .result-summary.dark-surface {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

body.app-shell .detector-empty-state {
  padding: 28px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.05);
}

body.app-shell .detector-empty-button,
body.app-shell .detector-head-button,
body.app-shell .detector-filter-pill {
  background: linear-gradient(180deg, rgba(14, 24, 42, 0.88), rgba(10, 19, 34, 0.82));
}

body.app-shell .detector-head-actions,
body.app-shell .detector-actions {
  gap: 10px;
}

body.app-shell .detector-head-button,
body.app-shell .detector-filter-pill {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 13px;
  font-size: 0.84rem;
  font-weight: 650;
}

body.app-shell .detector-toggle-row-polished {
  padding: 6px;
  border-radius: 16px;
}

body.app-shell .detector-toggle-row .toggle {
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 650;
}

body.app-shell .detector-empty-button {
  min-height: 84px;
  padding: 16px 18px;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 650;
}

body.app-shell .detector-submit-button {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 0.93rem;
  font-weight: 680;
  letter-spacing: 0;
}

body.app-shell .detector-empty-footnote span,
body.app-shell .credits-badge,
body.app-shell .user-chip {
  font-weight: 650;
}

body.app-shell .detector-footer-actions .primary-button {
  min-width: 190px;
}

body.app-shell .settings-identity-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(47, 108, 255, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.app-shell .settings-identity-avatar {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 22px;
}

body.app-shell .settings-identity-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body.app-shell .settings-identity-copy strong {
  color: white;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

body.app-shell .settings-identity-copy .eyebrow {
  margin-bottom: 0;
}

body.app-shell .settings-readonly-grid {
  margin-bottom: 18px;
}

body.app-shell .settings-readonly-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

body.app-shell .admin-toolbar {
  margin-bottom: 18px;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

body.app-shell .admin-toolbar .toolbar-menu {
  display: block;
  margin-left: auto;
}

body.app-shell .admin-toolbar-copy {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--dark-muted);
}

body.app-shell .admin-main .dashboard-hero {
  margin-top: 6px;
}

body.app-shell .admin-main .summary-card {
  min-height: 156px;
}

body.app-shell .admin-main .dashboard-card {
  background: rgba(12, 21, 41, 0.84);
}

body.app-shell .admin-main .history-item,
body.app-shell .admin-main .draft-item {
  background: rgba(255, 255, 255, 0.04);
}

@keyframes appToolbarMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.app-shell *:focus-visible {
  outline: 2px solid rgba(108, 157, 255, 0.34);
  outline-offset: 2px;
}

@media (max-width: 1180px) and (min-width: 821px) {
  body.app-shell .dashboard-toolbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  body.app-shell .toolbar-usage-track {
    width: min(240px, 28vw);
  }

  body.app-shell .toolbar-profile-inline,
  body.app-shell .toolbar-signout {
    display: none !important;
  }

  body.app-shell .toolbar-menu {
    display: block;
  }
}

@media (max-width: 820px) {
  body.app-shell .dashboard-toolbar {
    display: flex;
    flex-wrap: wrap;
  }

  body.app-shell .dashboard-main {
    padding-top: 16px;
  }

  body.app-shell .toolbar-menu {
    margin-left: 0;
  }

  body.app-shell .detector-inspector-switcher {
    padding: 16px 18px;
  }

  body.app-shell .settings-identity-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  body.app-shell .plan-spotlight {
    flex-direction: column;
    align-items: flex-start;
  }

  body.app-shell .plan-spotlight-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body.app-shell .settings-identity-avatar {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 760px) {
  body.app-shell .detector-inspector-tabs {
    width: 100%;
    justify-content: stretch;
  }

  body.app-shell .detector-inspector-tab {
    flex: 1 1 0;
    text-align: center;
  }

  body.app-shell .detector-footer-actions {
    width: 100%;
  }

  body.app-shell .detector-footer-actions .primary-button {
    width: 100%;
  }

  body.app-shell .admin-toolbar-copy {
    width: 100%;
    justify-content: center;
  }
}
