:root {
  --bg: #eef2fb;
  --panel: #ffffff;
  --panel-soft: #f8faff;
  --text: #1b2540;
  --text-soft: #6e7a97;
  --line: #dfe5f3;
  --accent: #3f69f5;
  --accent-2: #7a5cf5;
  --accent-dark: #182640;
  --ok: #41ba60;
  --warn: #e2a51a;
  --err: #e05252;
  --radius: 18px;
  --shadow: 0 12px 34px rgba(18, 36, 83, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef2fb 0%, #e8edf9 100%);
}

.surface-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(44rem 22rem at -5% -10%, rgba(64, 119, 248, 0.2), transparent),
    radial-gradient(38rem 24rem at 100% 0%, rgba(123, 93, 245, 0.18), transparent),
    radial-gradient(28rem 18rem at 45% 100%, rgba(93, 232, 162, 0.1), transparent);
}

.wrap {
  width: min(1440px, 96vw);
  margin: 0 auto;
  padding: 26px;
  position: relative;
  z-index: 1;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

label {
  display: block;
  margin: 11px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #344466;
}

input,
select {
  width: 100%;
  border: 1px solid #d7deef;
  border-radius: 10px;
  background: #f9fbff;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #a8baf6;
  box-shadow: 0 0 0 3px rgba(84, 121, 247, 0.14);
}

button {
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #476dff);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

button.secondary {
  background: #e8edf9;
  color: #233256;
}

button.dark {
  background: #14213c;
}

button.ghost {
  background: #fff;
  border: 1px solid #d9e2f6;
  color: #26365e;
}

button.github {
  background: #fff;
  border: 1px solid #d9e2f6;
  color: #18202f;
}

button:hover {
  transform: translateY(-1px);
}

.muted {
  color: var(--text-soft);
}

.mini {
  margin-top: 8px;
  font-size: 12px;
}

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

.stack-gap {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.stack-gap-sm {
  margin-top: 12px;
}

.brand-icon {
  width: 84px;
  height: 68px;
}

.brand-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-icon.small {
  width: 56px;
  height: 46px;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.04fr 1.36fr;
  gap: 20px;
}

.auth-brand {
  min-height: 760px;
  padding: 30px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.94));
  border-color: #dbe2f3;
  position: relative;
  overflow: hidden;
}

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

.brand-logo {
  display: block;
  width: min(360px, 100%);
  height: auto;
}

.brand-wordmark {
  font-size: 53px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.9;
  color: #1f2b47;
}

.brand-wordmark span {
  color: #4a6df6;
}

.brand-subtitle {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: #7b8aa9;
  font-weight: 700;
}

.auth-brand h1 {
  margin-top: 34px;
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.auth-brand h1 span {
  color: #4e68f7;
}

.auth-brand .lead {
  margin-top: 18px;
  max-width: 62ch;
  font-size: 19px;
  line-height: 1.55;
  color: #586987;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 15px;
}

.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e9f1ff;
  color: #4668f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.feature-list strong {
  display: block;
  font-size: 15px;
}

.feature-list p {
  margin-top: 3px;
  font-size: 13px;
  color: #7484a4;
}

.cube-stage {
  width: min(380px, 100%);
  height: auto;
  border-radius: 24px;
  margin-top: 34px;
  box-shadow: 0 24px 30px rgba(58, 103, 246, 0.16);
}

.auth-card {
  min-height: 760px;
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 24px;
  align-items: start;
}

.auth-divider {
  background: #e3e8f5;
  width: 1px;
  height: 100%;
}

.auth-column h3 {
  font-size: 32px;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

.auth-column .muted {
  margin-top: 7px;
  font-size: 14px;
}

.auth-badge {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #e8efff;
  color: #486af6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.auth-card.auth-card--github {
  grid-template-columns: 1fr;
  place-items: center;
  align-items: center;
}

.auth-column.auth-column--github {
  width: min(440px, 100%);
  padding: 6px 4px;
}

.auth-badge.auth-badge--github {
  background: #111827;
  color: #fff;
  border-radius: 14px;
}

button.github-cta {
  width: 100%;
  background: linear-gradient(180deg, #111827, #0b1020);
  border: 1px solid rgba(17, 24, 39, 0.12);
  padding: 12px 14px;
}

button.github-cta:hover {
  transform: translateY(-1px);
}

/* --- New login page (GitHub-only) --- */
.login-shell {
  display: grid;
  gap: 22px;
  padding: 6px 2px 26px;
}

.login-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.login-brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-brand-qtmesh {
  color: #1b2540;
}

.login-brand-cloud {
  color: #3f69f5;
}

.login-docs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: #5b6a89;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
}

.login-docs:hover {
  background: rgba(63, 105, 245, 0.08);
  color: #2b3a5e;
}

.login-hero {
  display: grid;
  grid-template-columns: 0.98fr 1.42fr;
  gap: 26px;
  align-items: start;
}

.login-title {
  font-size: 58px;
  line-height: 1.03;
  letter-spacing: -0.04em;
  margin-top: 22px;
}

.login-title span {
  color: #3f69f5;
}

.login-subtitle {
  margin-top: 16px;
  max-width: 56ch;
  font-size: 16px;
  line-height: 1.6;
  color: #5d6d8a;
}

.login-bullets {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
  color: #4b5b7a;
  font-size: 14px;
}

.login-check {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(65, 186, 96, 0.14);
  color: #1e7a39;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-weight: 900;
}

.login-github-btn {
  margin-top: 18px;
  width: min(320px, 100%);
  background: #0b1220;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
  padding: 12px 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-github-btn:hover {
  transform: translateY(-1px);
}

.login-perms {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #6b7a99;
  font-size: 12px;
}

.login-perms-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: #3f69f5;
  text-decoration: none;
  font-weight: 700;
}

.login-perms-link:hover {
  text-decoration: underline;
}

.login-hero-right {
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}

.login-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.login-preview-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  color: #223156;
}

.login-preview-brand img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.login-preview-brand .login-brand-text {
  font-size: 16px;
}

.login-preview-project .muted.mini {
  margin-top: 0;
}

.login-preview-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-preview-avatar {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c9d6ff, #e2e8ff);
  border: 1px solid rgba(100, 116, 139, 0.25);
  color: rgba(34, 49, 86, 0.55);
  overflow: hidden;
}

.login-preview-avatar svg {
  display: block;
  position: absolute;
  inset: 0;
}

.login-preview-user-meta strong {
  display: block;
  font-size: 12px;
  line-height: 1.1;
}

.login-preview-user-meta span {
  display: block;
  font-size: 11px;
}

.login-preview-body {
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.login-preview-title {
  font-weight: 800;
  color: #223156;
  margin-bottom: 12px;
}

.login-preview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.login-metric {
  border: 1px solid #e7ecfa;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
}

.login-metric-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
}

.login-metric-icon.ok {
  background: rgba(65, 186, 96, 0.14);
  color: #1e7a39;
}
.login-metric-icon.warn {
  background: rgba(226, 165, 26, 0.16);
  color: #8a6400;
}
.login-metric-icon.err {
  background: rgba(224, 82, 82, 0.14);
  color: #a62222;
}
.login-metric-icon.blue {
  background: rgba(63, 105, 245, 0.14);
  color: #2b49c7;
}

.login-metric-label {
  font-size: 11px;
  color: #6a7897;
  font-weight: 800;
}

.login-metric-value {
  font-size: 18px;
  font-weight: 900;
  margin-top: 1px;
}

.login-metric-sub {
  font-size: 11px;
  margin-top: 0;
  color: #6a7897;
}

.login-metric-sub.ok {
  color: #1e7a39;
}

.login-preview-row {
  margin-top: 14px;
  border: 1px solid #e7ecfa;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-preview-project {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-preview-cube {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 255, 0.9);
  border: 1px solid #e7ecfa;
}

.login-preview-cube img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.login-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pill {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #e6ebfa;
  background: #f7f9ff;
  color: #223156;
  white-space: nowrap;
}

.pill.ok {
  background: rgba(65, 186, 96, 0.14);
  border-color: rgba(65, 186, 96, 0.18);
  color: #1e7a39;
}
.pill.warn {
  background: rgba(226, 165, 26, 0.16);
  border-color: rgba(226, 165, 26, 0.2);
  color: #8a6400;
}
.pill.err {
  background: rgba(224, 82, 82, 0.14);
  border-color: rgba(224, 82, 82, 0.18);
  color: #a62222;
}
.pill.blue {
  background: rgba(63, 105, 245, 0.14);
  border-color: rgba(63, 105, 245, 0.18);
  color: #2b49c7;
}

.login-preview-row--snippet {
  background: transparent;
  border: 0;
  padding: 0;
}

.login-snippet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.login-snippet-badge {
  height: 20px;
  width: auto;
  display: block;
  filter: drop-shadow(0 10px 14px rgba(15, 23, 42, 0.12));
}

.login-how {
  margin-top: 6px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.login-how h2 {
  font-size: 14px;
  letter-spacing: -0.01em;
  color: #223156;
}

.login-steps {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(44px, 64px) minmax(0, 1fr) minmax(44px, 64px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.login-step {
  position: relative;
  border-radius: 16px;
}

/* .panel sets padding: 14px later; needs higher specificity for asymmetric top padding */
.login-step.panel {
  padding: 8px 14px 14px 14px;
}

.login-step-num {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(63, 105, 245, 0.12);
  color: #2b49c7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  z-index: 1;
}

.login-step-main {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.login-step-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(63, 105, 245, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2b49c7;
  flex-shrink: 0;
}

.login-step-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.login-step-body h4 {
  font-size: 13px;
  font-weight: 900;
  color: #223156;
}

.login-step-body p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
}

.login-step-connector {
  display: flex;
  align-items: center;
  align-self: center;
  width: 100%;
  min-width: 0;
  padding: 0 2px;
}

.login-step-connector-line {
  flex: 1;
  min-width: 0;
  height: 0;
  border-top: 1px dashed rgba(63, 105, 245, 0.35);
}

.login-step-connector-hub {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(63, 105, 245, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #3f69f5;
}

.login-step-connector-hub svg {
  width: 14px;
  height: 14px;
  display: block;
}

.login-footer {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.login-footer-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 10px;
  border-radius: 14px;
}

.login-footer-ico {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(63, 105, 245, 0.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2b49c7;
  font-weight: 900;
}

.login-footer-item strong {
  font-size: 12px;
}

@media (max-width: 1100px) {
  .login-hero {
    grid-template-columns: 1fr;
  }
  .login-title {
    font-size: 48px;
  }
  .login-preview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-steps {
    grid-template-columns: 1fr;
  }
  .login-step-connector {
    display: none;
  }
  .login-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .wrap {
    padding: 18px;
  }
  .login-title {
    font-size: 40px;
  }
  .login-footer {
    grid-template-columns: 1fr;
  }
}

.app-layout {
  display: none;
  grid-template-columns: 286px 1fr;
  gap: 18px;
}

/* First-time onboarding: full-width wizard without sidebar or page header */
.app-layout.app-layout--onboarding {
  grid-template-columns: 1fr;
}

.app-layout.app-layout--onboarding .app-sidebar,
.app-layout.app-layout--onboarding .app-topbar {
  display: none;
}

.app-sidebar {
  padding: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7ff 100%);
}

.sidebar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.sidebar-brand-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sidebar-brand-title span {
  color: #4b6ef5;
}

.sidebar-brand-subtitle {
  margin-top: 2px;
  color: #7f8faf;
  font-size: 12px;
  font-weight: 600;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.sidebar-nav a {
  padding: 9px 10px;
  border-radius: 9px;
  color: #49597a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  background: #e8efff;
  color: #2f4fd8;
}

.create-project-panel {
  margin-top: 8px;
  border-top: 1px solid #dde4f4;
  padding-top: 12px;
}

.sidebar-create-heading {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6e7a97;
  margin-bottom: 8px;
}

.create-project-open-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid #d0daf0;
  background: linear-gradient(180deg, #fff 0%, #f4f7ff 100%);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.create-project-open-btn:hover {
  border-color: #a8baf6;
  box-shadow: 0 4px 14px rgba(63, 105, 245, 0.14);
  transform: translateY(-1px);
}

.create-project-modal {
  padding: 0;
  border: none;
  max-width: min(520px, 94vw);
  width: 100%;
  background: transparent;
  box-shadow: none;
}

.create-project-modal::backdrop {
  background: rgba(24, 36, 83, 0.38);
  backdrop-filter: blur(4px);
}

.create-project-modal__sheet {
  position: relative;
  padding: 24px 24px 20px;
  border-radius: var(--radius);
  max-height: min(90vh, 900px);
  overflow-y: auto;
}

.create-project-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 0;
  background: #eef2fb;
  color: #5b6a89;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.create-project-modal__close:hover {
  background: #e0e7fa;
  color: var(--text);
}

.create-project-modal__head {
  padding-right: 40px;
  margin-bottom: 16px;
}

.create-project-modal__title {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.create-project-modal__sub {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.create-project-modal__tabs {
  margin-bottom: 8px;
}

.create-project-modal__github {
  margin-bottom: 0;
}

.create-project-modal__repo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.create-project-modal__repo-label {
  line-height: 1.3;
  font-weight: 800;
}

.create-project-modal__manual-intro {
  margin-bottom: 12px;
}

.create-project-modal__footnote {
  margin-top: 14px;
}

.create-project-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.app-main {
  display: grid;
  gap: 14px;
}

.app-page[hidden] {
  display: none !important;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel.prose {
  padding: 1.25rem 1.35rem;
}

.prose h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #2a385a;
}

.prose ul,
.prose ol {
  margin: 8px 0 0;
  padding-left: 1.25rem;
}

.prose li {
  margin: 4px 0;
}

.code-block {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f4f6fc;
  border: 1px solid #e4eaf7;
  color: var(--text);
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block--markdown {
  margin-top: 12px;
  padding: 14px 16px;
  background: #141b2d;
  border: 1px solid #2a3550;
  color: #e8ecf7;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.badge-page-intro {
  margin-bottom: 14px;
}

.badge-page-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.badge-page-toolbar .field-inline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(420px, 100%);
}

.badge-page-toolbar .field-inline label {
  margin: 0;
}

.badge-project-select {
  width: 100%;
  max-width: 420px;
}

.badge-help {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.badge-help code {
  font-size: 12px;
  word-break: break-all;
}

.badge-catalog {
  padding: 4px 0 2px;
}

.badge-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.badge-catalog-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.badge-catalog-preview {
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.badge-catalog-preview img {
  display: block;
  max-width: 100%;
  height: auto;
}

.badge-catalog-meta {
  padding: 10px 12px 12px;
}

.badge-catalog-meta h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #2a385a;
}

.badge-catalog-meta .muted {
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 8px;
}

.badge-catalog-linkrow {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  position: relative;
}

.badge-catalog-path {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  padding: 8px 34px 8px 10px;
  border-radius: 8px;
  background: #eef1f9;
  border: 1px solid #dfe5f3;
  color: #3d4d73;
  word-break: break-all;
}

.badge-catalog-copyicon {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #3d4d73;
  cursor: pointer;
}

.badge-catalog-copyicon:hover {
  background: rgba(63, 105, 245, 0.08);
  border-color: rgba(63, 105, 245, 0.22);
}

.badge-catalog-copyicon__check {
  display: none;
  color: var(--ok);
}

.badge-catalog-copyicon.copied .badge-catalog-copyicon__copy {
  display: none;
}

.badge-catalog-copyicon.copied .badge-catalog-copyicon__check {
  display: block;
}

.scans-page-mount {
  margin-top: 4px;
}

.scans-table-wrap {
  overflow-x: auto;
  margin: 0 -2px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pagination-bar__meta {
  font-size: 13px;
  min-width: 8rem;
  text-align: center;
}

.pagination-bar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.token-table-intro {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
}

.ingest-tokens-table .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ingest-tokens-table .data-table th,
.ingest-tokens-table .data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.ingest-tokens-table .data-table th {
  color: #5a6a8a;
  font-weight: 700;
  font-size: 12px;
}

.ingest-tokens-table .token-actions {
  white-space: nowrap;
  text-align: right;
}

.ingest-tokens-table .token-actions-col {
  width: 1%;
}

button.sm {
  padding: 6px 10px;
  font-size: 12px;
}

button.danger-outline {
  border-color: rgba(224, 82, 82, 0.55);
  color: #b83232;
}

button.danger-outline:hover {
  background: rgba(224, 82, 82, 0.08);
}

button.btn-remove-project {
  background: linear-gradient(135deg, #e05252, #c53d3d);
  color: #fff;
  border: 0;
  font-weight: 700;
}

button.btn-remove-project:hover {
  filter: brightness(0.94);
}

button.btn-remove-project:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.remove-project-dialog-label {
  margin-top: 12px;
  margin-bottom: 6px;
}

.remove-project-slug-hint {
  font-size: 0.95em;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f0f3fb;
  border: 1px solid #d7deef;
}

.remove-project-confirm-input {
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
}

.remove-project-confirm-error {
  margin-top: 10px;
  margin-bottom: 0;
}

.token-dialog {
  max-width: min(480px, 94vw);
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#createProjectTokenDialog {
  max-width: min(720px, 96vw);
}

.token-dialog::backdrop {
  background: rgba(18, 36, 83, 0.35);
}

.token-dialog h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.token-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.token-reveal-wrap {
  position: relative;
  margin-top: 10px;
}

.token-reveal-wrap .token-reveal-pre {
  margin-top: 0;
  padding-right: 40px;
  min-height: 44px;
}

.scan-report-dialog {
  max-width: min(920px, 96vw);
  width: min(920px, 96vw);
}

.scan-report-dialog .muted-tight {
  margin: 0 0 10px;
  font-size: 13px;
}

/* Global `pre` uses light text for dark panels; force readable dark-on-light here. */
.scan-report-dialog pre.code-block.scan-report-pre,
.scan-report-pre.code-block {
  max-height: min(70vh, 640px);
  overflow: auto;
  margin: 0;
  text-align: left;
  background: #ffffff;
  color: #141b2d;
  border: 1px solid #d0d9ee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  white-space: pre;
  word-break: normal;
  font-size: 12px;
  line-height: 1.5;
}

.app-topbar {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  min-height: 86px;
  max-height: 86px;
  overflow: hidden;
}

.app-topbar h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar p {
  margin-top: 4px;
  color: #7183a5;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.user-card {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #dce4f7;
  border-radius: 12px;
  background: #fff;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #cfd8ec;
  object-fit: cover;
  display: none;
}

.user-meta {
  min-width: 130px;
}

.user-primary {
  font-size: 13px;
  font-weight: 700;
}

.user-secondary {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7d8da9;
  font-size: 12px;
}

.github-mark {
  display: none;
  line-height: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  border: 1px solid #e0e6f4;
  border-radius: 14px;
  background: #fff;
  padding: 13px;
}

.metric-card p {
  color: #7083a4;
  font-size: 13px;
  font-weight: 600;
}

.metric-card strong {
  display: block;
  margin-top: 5px;
  font-size: 35px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric-card span {
  display: block;
  margin-top: 3px;
  color: #8392ac;
  font-size: 12px;
}

.scans-empty {
  margin: 80px 0;
}

#dashboardDataPanels {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* `hidden` must win over `#dashboardDataPanels { display: flex }` (ID beats attribute alone). */
#dashboardDataPanels[hidden] {
  display: none !important;
}

.dashboard-grid {
  display: grid;
  gap: 12px;
}

.dashboard-grid.two-col {
  grid-template-columns: 1.2fr 1fr;
}

.panel {
  padding: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.panel-head h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.quality-chart-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: nowrap;
}

.quality-chart-toolbar-label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  margin: 0;
}

.quality-chart-toolbar select {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  max-width: 200px;
  padding: 6px 10px;
  font-size: 13px;
}

.rules-editor-head {
  gap: 12px;
}

.rules-project-select {
  width: 100%;
  max-width: 420px;
  margin-top: 6px;
}

.rules-form {
  margin-top: 10px;
}

.rules-form-empty {
  margin-top: 8px;
}

.rules-fieldset {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.rules-fieldset legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #344466;
}

.rules-field-hint {
  margin: 0 0 8px;
  font-size: 12px;
}

.rules-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 14px;
  align-items: end;
}

.rules-form-span2 {
  grid-column: 1 / -1;
}

.rules-form-stack label {
  margin-top: 8px;
}

.rules-form-stack label:first-child {
  margin-top: 0;
}

.rules-form-checks {
  align-items: center;
  margin-bottom: 8px;
}

.rules-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #2a385a;
  margin: 0;
}

.rules-check input {
  width: auto;
  margin: 0;
}

.rules-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
  min-height: 72px;
  margin-top: 4px;
}

.rules-textarea--code {
  font-family: ui-monospace, "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  background: #f8faff;
  color: #141b2d;
  border: 1px solid #d7deef;
}

.score-pill {
  color: #2f4fd8;
  background: #e8efff;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}

.score-pill.score-good {
  color: #1f6b3a;
  background: rgba(65, 186, 96, 0.18);
}

.score-pill.score-mid {
  color: #8a5a00;
  background: rgba(226, 165, 26, 0.2);
}

.score-pill.score-low {
  color: #a12c2c;
  background: rgba(224, 82, 82, 0.16);
}

.quality-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 156px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(87, 186, 105, 0.12), rgba(87, 186, 105, 0.02));
  overflow: visible;
}

.quality-chart-svg {
  display: block;
  width: 100%;
  height: 156px;
}

.quality-chart-svg .quality-grid-line {
  stroke: rgba(120, 140, 180, 0.35);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.quality-chart-svg .quality-grid-line-strong {
  stroke: rgba(100, 120, 170, 0.5);
  stroke-width: 1.25;
}

.quality-chart-svg .quality-axis-label {
  fill: #8a96b0;
  font-size: 9px;
  font-family: inherit;
  font-weight: 600;
}

.quality-chart-svg .quality-chart-line {
  fill: none;
  stroke: #3a9d55;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quality-chart-svg .quality-chart-point {
  stroke: #ffffff;
  stroke-width: 2;
  cursor: pointer;
  transition: filter 0.12s ease;
}

.quality-chart-svg .quality-chart-point:hover,
.quality-chart-svg .quality-chart-point:focus {
  outline: none;
  filter: brightness(0.88);
}

.quality-chart-portal {
  position: absolute;
  z-index: 40;
  min-width: 220px;
  max-width: min(320px, 92vw);
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #d7e0f4;
  box-shadow: 0 16px 40px rgba(18, 36, 83, 0.18);
  pointer-events: auto;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.quality-chart-portal[hidden] {
  display: none !important;
}

.quality-chart-portal-inner {
  display: grid;
  gap: 8px;
}

.quality-chart-portal-kicker {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.quality-chart-portal-meta {
  font-size: 12px;
  color: #6e7a97;
}

.quality-chart-portal-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 12px;
}

.quality-chart-portal-dl dt {
  margin: 0;
  color: #8090ae;
  font-weight: 600;
}

.quality-chart-portal-dl dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.spark-caption {
  margin-top: 8px;
  color: #8090ae;
  font-size: 12px;
}

.list-stack {
  display: grid;
  gap: 9px;
}

.scan-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #e4e9f5;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fafcff;
}

.scan-item strong {
  font-size: 14px;
}

.scan-item small {
  color: #7b8baa;
  font-size: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  text-transform: lowercase;
}

/* Keep status chips on one line in dense tables (e.g. project list). */
.projects-mount table td.td-status,
.scans-table-wrap table td.td-status {
  white-space: nowrap;
  vertical-align: middle;
}

.status-chip.pass {
  background: rgba(65, 186, 96, 0.16);
  color: #24893f;
}

.status-chip.warning,
.status-chip.warn {
  background: rgba(226, 165, 26, 0.18);
  color: #9f7000;
}

.status-chip.error,
.status-chip.fail {
  background: rgba(224, 82, 82, 0.17);
  color: #b73838;
}

.status-chip.no-data {
  background: rgba(128, 145, 176, 0.18);
  color: #5e6d8b;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #e6ebf7;
}

th {
  color: #7383a4;
  font-size: 12px;
  font-weight: 700;
}

button.project-row-name {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: #3f69f5;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

button.project-row-name:hover {
  text-decoration-color: rgba(63, 105, 245, 0.45);
  color: #2f56d8;
}

.badges img {
  margin-right: 7px;
  vertical-align: middle;
}

.badges--score img {
  margin-right: 0;
}

a.badges-score-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  border-radius: 10px;
  text-decoration: none;
  outline-offset: 3px;
}

a.badges-score-link:hover img {
  opacity: 0.92;
}

a.badges-score-link:focus-visible {
  outline: 2px solid #3f69f5;
}

.badges.clickable img {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
}

.badges.clickable {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badges.clickable img {
  margin-right: 0;
}

.badges.clickable img.active {
  border-color: #3f69f5;
}

.issue-rule {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
}

.issue-rule .bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #edf2fb;
  overflow: hidden;
  margin-top: 4px;
}

.issue-rule .bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #58bc65, #f0ad25, #e05252);
}

.integration-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.integration-card h4 {
  font-size: 16px;
}

.integration-card p {
  margin-top: 6px;
  color: #7384a5;
  font-size: 13px;
  line-height: 1.45;
}

.integration-card--supporter {
  background: linear-gradient(145deg, #f6f8ff 0%, #eef2ff 55%, #f0f4ff 100%);
  border-color: #d9e2fc;
  box-shadow: 0 10px 28px rgba(63, 105, 245, 0.07), var(--shadow);
  padding: 16px 18px;
}

.integration-supporter-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}

.integration-supporter-copy {
  flex: 1 1 160px;
  min-width: 0;
}

.integration-supporter-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.integration-supporter-icon-badge {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #fff 0%, #e8edff 100%);
  border: 1px solid #cdd8f5;
  color: #1b2540;
  box-shadow: 0 4px 14px rgba(63, 105, 245, 0.12);
}

.integration-supporter-github {
  width: 22px;
  height: 22px;
  display: block;
}

.integration-supporter-star-pin {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: linear-gradient(145deg, #fff8e6, #ffe8a8);
  border: 1px solid #f0d78c;
  color: #b8860b;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.2);
}

.integration-supporter-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.integration-supporter-desc {
  margin: 8px 0 0;
  color: #5b6a89;
  font-size: 13px;
  line-height: 1.5;
  max-width: 48ch;
}

.integration-supporter-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-sizing: border-box;
  width: 80px;
  padding: 4px 5px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #476dff);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  text-align: center;
  line-height: 1.25;
  box-shadow: 0 4px 14px rgba(63, 105, 245, 0.28);
  border: 0;
  cursor: pointer;
}

.integration-supporter-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(63, 105, 245, 0.38);
}

.integration-supporter-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(63, 105, 245, 0.35), 0 6px 18px rgba(63, 105, 245, 0.32);
}

.integration-supporter-cta-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

@media (max-width: 520px) {
  .integration-supporter-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .integration-supporter-aside {
    align-self: flex-end;
  }
}

pre {
  background: #111a2f;
  color: #e6ecff;
  border-radius: 11px;
  padding: 12px;
  font-size: 12px;
  overflow-x: auto;
  margin: 8px 0 0;
}

.status {
  margin-top: 12px;
  min-height: 22px;
  font-size: 14px;
  font-weight: 600;
}

.status.ok {
  color: #229946;
}

.status.err {
  color: #c13d3d;
}

/* —— First project onboarding —— */
.onboarding-shell {
  max-width: 920px;
  margin: 0 auto;
  display: block;
  width: 100%;
}

.onboarding-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.onboarding-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 52px;
  color: #8a96b3;
  font-size: 11px;
  font-weight: 700;
}

.onboarding-progress-step span {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef2fb;
  border: 1px solid #dfe5f3;
  color: #5b6a89;
  font-weight: 800;
  font-size: 13px;
}

.onboarding-progress-step.is-active {
  color: #223156;
}

.onboarding-progress-step.is-active span {
  background: rgba(63, 105, 245, 0.14);
  border-color: rgba(63, 105, 245, 0.35);
  color: #2b49c7;
}

.onboarding-progress-step.is-done span {
  background: rgba(65, 186, 96, 0.14);
  border-color: rgba(65, 186, 96, 0.25);
  color: #1e7a39;
}

.onboarding-progress-line {
  flex: 1;
  min-width: 12px;
  height: 2px;
  background: linear-gradient(90deg, #dfe5f3, #e7ecfa);
  border-radius: 2px;
}

.onboarding-card {
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.onboarding-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.onboarding-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(63, 105, 245, 0.12);
  color: #2b49c7;
  display: grid;
  place-items: center;
  font-weight: 900;
  flex-shrink: 0;
}

.onboarding-card h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #223156;
}

.onboarding-sub {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.onboarding-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.onboarding-tab {
  padding: 8px 14px;
  border-radius: 16px 16px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  font-weight: 700;
  font-size: 13px;
  color: #5b6a89;
  cursor: pointer;
}

.onboarding-tab.is-active {
  border-color: var(--line);
  background: #fff;
  color: #2b49c7;
}

.onboarding-tab-panel {
  margin-bottom: 16px;
}

.onboarding-github-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  margin-bottom: 4px;
}

.onboarding-register-hint {
  margin: 0 0 12px;
  line-height: 1.45;
}

.onboarding-repo-url-group {
  display: block;
}

.onboarding-repo-url-group[hidden] {
  display: none !important;
}

.onboarding-repo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  margin-top: 8px;
  padding: 12px;
  background: #f8faff;
  border-radius: 14px;
  border: 1px solid #e7ecfa;
}

.onboarding-repo-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 13px;
  color: #223156;
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e7ecfa;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.onboarding-repo-item:hover {
  border-color: rgba(63, 105, 245, 0.35);
}

.onboarding-repo-item.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem rgba(63, 105, 245, 0.12);
}

.onboarding-repo-name {
  font-weight: 800;
}

.onboarding-repo-desc {
  font-size: 12px;
  color: #6a7897;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
}

.onboarding-fields {
  display: grid;
  gap: 0;
}

.onboarding-fields label {
  font-size: 12px;
  font-weight: 700;
  color: #5b6a89;
}

.onboarding-fields input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 14px;
}

.onboarding-hint,
.onboarding-footnote {
  margin-top: 10px;
}

.onboarding-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.onboarding-actions--split {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.onboarding-actions-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.onboarding-success-msg {
  font-weight: 800;
  padding: 4px 0 0;
  margin-bottom: 12px;
  color: #1e7a39;
}

.onboarding-token-card {
  border: 1px solid #e7ecfa;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  margin-bottom: 14px;
}

.onboarding-token-label {
  font-size: 11px;
  font-weight: 800;
  color: #6a7897;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.onboarding-token-row {
  display: flex;
  gap: 10px;
  align-items: start;
}

.onboarding-token-pre {
  flex: 1;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  word-break: break-all;
  background: #0f172a;
  color: #e2e8ff;
}

.create-project-token-pre {
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  word-break: normal;
}

.create-project-token-sub {
  margin-bottom: 4px;
}

.onboarding-warn-box {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(226, 165, 26, 0.12);
  border: 1px solid rgba(226, 165, 26, 0.28);
  color: #6a5500;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.onboarding-secret-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}

.onboarding-secret-table th,
.onboarding-secret-table td {
  border: 1px solid #e7ecfa;
  padding: 8px 10px;
  text-align: left;
}

.onboarding-secret-table th {
  background: #f8faff;
  font-weight: 800;
  font-size: 11px;
  color: #6a7897;
}

.onboarding-code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #5b6a89;
}

.onboarding-yaml {
  margin-top: 0;
  max-height: 320px;
  overflow: auto;
  font-size: 11px;
  line-height: 1.45;
}

.code-block--dark {
  background: #0b1224;
  color: #e8edf9;
  border-radius: 14px;
  padding: 14px 16px;
}

.onboarding-qtmesh-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.onboarding-info-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e7ecfa;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.panel--soft {
  background: rgba(248, 250, 255, 0.9);
  border: 1px solid #e7ecfa;
}

.onboarding-next-list {
  margin: 10px 0 0;
  padding-left: 1.1rem;
  color: #4a5568;
  font-size: 13px;
  line-height: 1.55;
}

.onboarding-checklist {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}

.onboarding-checklist li {
  padding: 8px 14px 8px 36px;
  border-radius: 12px;
  border: 1px solid #e7ecfa;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  position: relative;
}

.onboarding-checklist li::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #dfe5f3;
}

.onboarding-checklist li.is-done::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #1e7a39;
  border-color: rgba(65, 186, 96, 0.45);
  background: rgba(65, 186, 96, 0.12);
}

.onboarding-checklist li.is-pending::before {
  content: '';
  background: #f7f9ff;
}

.onboarding-done-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.onboarding-done-title {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.dashboard-empty-state {
  margin-top: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.dashboard-empty-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.dashboard-empty-copy {
  flex: 1;
  min-width: 0;
}

.dashboard-empty-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-empty-state h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.dashboard-empty-status {
  margin: 8px 0 0;
}

.status-chip--muted {
  background: #eef2fb;
  color: #5b6a89;
  border-color: #dfe5f3;
}

.dashboard-empty-lead {
  margin: 30px 0;
  font-size: 15px;
  color: #4a5568;
  line-height: 1.5;
}

.dashboard-empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.dashboard-empty-actions a.secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 11px;
  background: #e8edf9;
  color: #233256;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.dashboard-empty-actions a.secondary:hover {
  transform: translateY(-1px);
}

.dashboard-empty-actions button.dashboard-empty-action-btn {
  padding: 10px 12px;
}

.dashboard-empty-art svg {
  width: min(220px, 40vw);
  height: auto;
}

@media (max-width: 900px) {
  .onboarding-qtmesh-grid,
  .onboarding-done-grid {
    grid-template-columns: 1fr;
  }
  .onboarding-progress-line {
    display: none;
  }
}

#authPanel {
  display: grid;
}

#appPanel {
  display: none;
}

#githubRepoPanel {
  display: none;
}

@media (max-width: 1250px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand,
  .auth-card {
    min-height: auto;
  }

  .auth-brand h1 {
    font-size: 44px;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    order: 2;
  }
}

@media (max-width: 920px) {
  .wrap {
    width: min(1280px, 98vw);
    padding: 12px;
  }

  .auth-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .auth-divider {
    width: 100%;
    height: 1px;
  }

  .metric-grid,
  .dashboard-grid.two-col,
  .integration-row {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .user-card {
    width: 100%;
    justify-content: space-between;
  }

  .row {
    flex-wrap: wrap;
  }

  .row > button,
  .row > select {
    width: 100%;
  }
}
