:root {
  --bg: #eef2f6;
  --panel: #ffffff;
  --ink: #162231;
  --muted: #667085;
  --line: #d9e0e7;
  --primary: #155fa8;
  --primary-dark: #0e477e;
  --tech: #34d3d2;
  --accent: #1f7a5b;
  --warm: #b7791f;
  --ok: #0f7b4c;
  --bad: #b42318;
  --sidebar: #172536;
  --shadow: 0 18px 48px rgba(22, 34, 49, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef3f8;
  color: #1d3557;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.hash {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

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

.sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: var(--sidebar);
  color: #f8fafc;
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.12);
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e8f2ff;
  color: #0e477e;
  font-weight: 800;
}

.brand-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(2, 12, 27, 0.28);
}

.brand-icon-large {
  width: 62px;
  height: 62px;
  flex-basis: 62px;
}

.brand-title {
  font-weight: 750;
}

.brand-subtitle,
.page-kicker,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.sidebar .brand-subtitle {
  color: #b8c4d2;
}

.nav {
  display: grid;
  gap: 6px;
  margin-top: 28px;
}

.nav a {
  position: relative;
  padding: 10px 12px;
  border-radius: 6px;
  color: #dfe7f1;
  font-weight: 650;
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, 0.12);
}

.nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: #8fd3b5;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 28px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 430px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px;
  display: grid;
  align-content: center;
  gap: 14px;
}

.hero-copy h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

.hero-copy p {
  margin: 0;
  max-width: 780px;
  color: #465668;
  line-height: 1.7;
}

.hero-label {
  width: fit-content;
  border: 1px solid #b8d7ca;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--accent);
  background: #f3fbf7;
  font-weight: 700;
  font-size: 13px;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.process-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.process-strip div {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(22, 34, 49, 0.05);
}

.process-strip strong {
  color: var(--primary);
  font-size: 13px;
}

.process-strip span {
  color: #344054;
  font-weight: 700;
}

.main-login {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(7, 16, 28, 0.96), rgba(13, 31, 45, 0.88)),
    url("/static/project-campus.png") center / cover no-repeat;
}

.main-login::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(52, 211, 210, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 211, 210, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: authGridDrift 22s linear infinite;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 86%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 86%);
  pointer-events: none;
}

.main-login > * {
  position: relative;
}

@keyframes authGridDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 44px 44px, 44px 44px;
  }
}

@keyframes authVisualFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes authScanLine {
  0% {
    opacity: 0;
    transform: translateY(-125%);
  }
  14%,
  70% {
    opacity: 0.58;
  }
  100% {
    opacity: 0;
    transform: translateY(140%);
  }
}

@keyframes authTagPulse {
  0%,
  100% {
    border-color: rgba(157, 230, 222, 0.26);
    box-shadow: 0 0 0 rgba(104, 215, 206, 0);
  }
  50% {
    border-color: rgba(168, 255, 244, 0.58);
    box-shadow: 0 0 24px rgba(104, 215, 206, 0.18);
  }
}

.auth-shell,
.help-shell {
  width: min(1180px, 100%);
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 34px;
}

.auth-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: #edf7fb;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

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

.auth-actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(216, 232, 239, 0.20);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(9, 24, 38, 0.42);
  color: #e5f2f7;
  font-size: 13px;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.auth-actions .auth-action-primary {
  border-color: rgba(104, 215, 206, 0.42);
  background: rgba(37, 178, 169, 0.18);
  color: #a8fff4;
}

.auth-stage {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(420px, 1fr);
  gap: 42px;
  align-items: center;
}

.auth-card {
  padding: 34px;
  border: 1px solid rgba(182, 212, 224, 0.28);
  border-radius: 8px;
  background: rgba(245, 250, 252, 0.94);
  box-shadow: 0 28px 68px rgba(0, 7, 15, 0.24);
  backdrop-filter: blur(18px);
}

.auth-kicker {
  width: fit-content;
  border: 1px solid rgba(13, 103, 114, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  color: #0d6772;
  background: rgba(235, 250, 249, 0.86);
  font-size: 12px;
  font-weight: 850;
}

.auth-card h1 {
  margin: 18px 0 24px;
  color: #0d1b2a;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-form {
  gap: 15px;
}

.auth-form input {
  min-height: 46px;
  background: #fbfdff;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  border-color: #0d6772;
  background: #0d6772;
}

.auth-submit:hover {
  border-color: #0a525b;
  background: #0a525b;
}

.auth-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: #738294;
  font-size: 13px;
}

.auth-foot span {
  font-weight: 850;
  letter-spacing: 0.08em;
}

.auth-visual {
  position: relative;
  isolation: isolate;
  min-height: 470px;
  overflow: hidden;
  border: 1px solid rgba(105, 221, 212, 0.20);
  border-radius: 8px;
  background: rgba(5, 17, 30, 0.46);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 28px 80px rgba(0, 8, 20, 0.22);
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 26, 44, 0.08), rgba(9, 26, 44, 0.72)),
    linear-gradient(rgba(105, 221, 212, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 221, 212, 0.08) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  pointer-events: none;
}

.auth-visual::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 0;
  height: 36%;
  background:
    linear-gradient(to bottom, transparent, rgba(104, 215, 206, 0.16), transparent),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: translateY(-125%);
  animation: authScanLine 7.8s ease-in-out infinite;
  pointer-events: none;
}

.auth-visual img {
  position: absolute;
  inset: 7% auto auto 7%;
  width: 84%;
  max-width: 720px;
  border-radius: 8px;
  opacity: 0.94;
  box-shadow: 0 24px 80px rgba(0, 4, 10, 0.38);
  animation: authVisualFloat 8.6s ease-in-out infinite;
  will-change: transform;
}

.auth-visual-tag {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 20px;
  border: 1px solid rgba(157, 230, 222, 0.26);
  border-radius: 999px;
  padding: 7px 11px;
  color: #dffefa;
  background: rgba(8, 25, 38, 0.70);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: authTagPulse 4.8s ease-in-out infinite;
}

.help-shell {
  width: min(1040px, 100%);
  min-height: auto;
  grid-template-rows: auto auto;
}

.help-panel {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 34px;
  border: 1px solid rgba(182, 212, 224, 0.28);
  border-radius: 8px;
  background: rgba(246, 251, 253, 0.96);
  box-shadow: 0 28px 68px rgba(0, 7, 15, 0.22);
}

.help-intro {
  max-width: 780px;
}

.help-intro h1 {
  margin: 16px 0 10px;
  font-size: 34px;
  line-height: 1.16;
}

.help-intro p,
.help-grid p {
  margin: 0;
  color: #526274;
  line-height: 1.7;
}

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

.help-grid section {
  min-height: 170px;
  padding: 16px;
  border: 1px solid #d8e4eb;
  border-radius: 8px;
  background: #fff;
}

.help-grid span {
  color: #0d6772;
  font-size: 12px;
  font-weight: 850;
}

.help-grid h2 {
  margin: 12px 0 8px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(217, 224, 231, 0.85);
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 26px;
  letter-spacing: 0;
}

.user-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.inline-form {
  display: inline;
  margin: 0;
}

.role-badge,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.role-bim { background: #e7f0ff; color: #164b9b; }
.role-owner { background: #e7f7ed; color: #17613a; }
.role-reviewer { background: #fff4dc; color: #8a5a00; }
.role-regulator { background: #f0e8ff; color: #5b36a8; }
.role-admin { background: #fee4e2; color: #9f1d16; }

.status.ok { background: #dcfce7; color: var(--ok); }
.status.bad { background: #fee4e2; color: var(--bad); }

.text-link {
  color: var(--primary);
  font-weight: 650;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.text-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.section,
.metric,
.login-panel,
.login-aside,
.export-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 34, 49, 0.06);
}

.section {
  padding: 18px;
  margin-bottom: 18px;
}

.section.narrow {
  max-width: 920px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  padding: 16px;
  min-height: 92px;
  border-top: 3px solid #d7e8f7;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: #435266;
  font-size: 13px;
  background: #f8fafc;
}

.compact-table {
  min-width: 0;
}

.compact-table th,
.compact-table td {
  padding: 8px;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.form {
  display: grid;
  gap: 14px;
}

.grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-grid-form {
  grid-template-columns: minmax(260px, 1.2fr) minmax(180px, 0.8fr) auto;
  align-items: end;
  margin-bottom: 16px;
}

.span-2 {
  grid-column: span 2;
}

label {
  display: grid;
  gap: 6px;
}

label span {
  font-size: 13px;
  color: #344054;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd7e2;
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(21, 95, 168, 0.13);
}

textarea {
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #bcc8d6;
  border-radius: 6px;
  background: #fff;
  color: #23364d;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.form-actions,
.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-layout {
  width: min(1140px, 100%);
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(390px, 1.05fr);
  gap: 20px;
  align-items: stretch;
}

.public-cert-shell {
  width: min(1120px, 100%);
}

.public-cert-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  color: #fff;
}

.public-cert-brand h1 {
  margin: 4px 0;
  font-size: 30px;
  letter-spacing: 0;
}

.public-cert-brand p {
  margin: 0;
  color: #d7e6f5;
}

.login-panel,
.login-aside {
  padding: 30px;
  backdrop-filter: blur(14px);
  background: rgba(248, 252, 255, 0.95);
  border-color: rgba(125, 153, 178, 0.46);
}

.login-brand {
  margin-bottom: 28px;
}

.login-brand .brand-title {
  color: #0d1b2a;
  font-size: 30px;
  line-height: 1.08;
}

.brand-eyebrow {
  color: #226d76;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-headline {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.system-label {
  width: fit-content;
  border: 1px solid rgba(52, 211, 210, 0.36);
  border-radius: 999px;
  padding: 5px 10px;
  background: #e9fbf8;
  color: #145a61;
  font-size: 13px;
  font-weight: 800;
}

.login-headline h1 {
  margin: 0;
  max-width: 620px;
  color: #0d1b2a;
  font-size: 32px;
  line-height: 1.22;
  letter-spacing: 0;
}

.login-headline p {
  margin: 0;
  color: #47596b;
  line-height: 1.7;
}

.login-panel .form {
  gap: 15px;
}

.login-panel input {
  min-height: 44px;
  background: #f9fcff;
}

.login-panel .btn-primary {
  min-height: 46px;
  border-color: #0d6772;
  background: #0d6772;
}

.login-panel .btn-primary:hover {
  border-color: #0a525b;
  background: #0a525b;
}

.login-trust-strip,
.security-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-trust-strip {
  margin-top: 18px;
}

.login-trust-strip span,
.security-list span {
  border: 1px solid #cfe3e7;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f4fbfc;
  color: #264a58;
  font-size: 12px;
  font-weight: 800;
}

.login-aside {
  display: grid;
  gap: 16px;
  align-content: start;
}

.login-app-image {
  width: 100%;
  aspect-ratio: 1200 / 760;
  object-fit: cover;
  border: 1px solid rgba(52, 211, 210, 0.24);
  border-radius: 8px;
  background: #0b1320;
}

.aside-head {
  display: grid;
  gap: 5px;
}

.aside-head span {
  color: #226d76;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.alert {
  padding: 10px 12px;
  border: 1px solid #fecdca;
  background: #fffbfa;
  color: #b42318;
  border-radius: 6px;
}

.notice {
  padding: 10px 12px;
  border: 1px solid #b8e6cd;
  background: #f0fbf5;
  color: #17613a;
  border-radius: 6px;
}

.login-register-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  color: #465668;
  font-size: 14px;
}

.register-layout {
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 0.72fr);
}

.approval-steps {
  display: grid;
  gap: 10px;
}

.approval-steps div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #cfe3e7;
  border-radius: 8px;
  background: #f7fbfc;
}

.approval-steps strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0d6772;
  color: #fff;
}

.decision-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 360px;
}

.password-reset-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(100px, 0.8fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 360px;
}

.org-create-form {
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr) repeat(4, minmax(140px, 1fr)) auto;
  align-items: end;
  margin-bottom: 16px;
}

.org-update-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(100px, 0.7fr) repeat(4, minmax(110px, 1fr)) auto;
  gap: 8px;
  align-items: center;
  min-width: 860px;
}

.user-status-active { background: #dcfce7; color: #0f7b4c; }
.user-status-pending { background: #fff4dc; color: #8a5a00; }
.user-status-rejected,
.user-status-disabled { background: #fee4e2; color: #b42318; }
.org-status-active { background: #dcfce7; color: #0f7b4c; }
.org-status-pending { background: #fff4dc; color: #8a5a00; }
.org-status-suspended { background: #fee4e2; color: #b42318; }
.org-status-archived { background: #e7ecf3; color: #344054; }
.project-status-active,
.member-status-active { background: #dcfce7; color: #0f7b4c; }
.project-status-paused,
.member-status-suspended { background: #fff4dc; color: #8a5a00; }
.project-status-archived { background: #e7ecf3; color: #344054; }

.compact-head {
  margin-bottom: 10px;
}

.status-form {
  grid-template-columns: minmax(120px, 1fr) minmax(130px, 1fr) auto;
  align-items: end;
  margin: 12px 0 16px;
}

.permission-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.permission-tags span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef7f8;
  color: #0d6772;
  font-size: 12px;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.project-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.project-hero img,
.diagram-image {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #eef3f8;
}

.project-hero img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.project-hero p {
  color: #465668;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf4fb;
  color: #264761;
  font-size: 13px;
  font-weight: 700;
}

.detail-list {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 14px 0;
}

.detail-list.compact {
  grid-template-columns: 110px minmax(0, 1fr);
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  min-width: 0;
}

.version-chain {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
}

.version-chain li {
  display: grid;
  grid-template-columns: 18px 80px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
}

.node-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.export-item {
  display: grid;
  gap: 8px;
  padding: 18px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.export-item:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.export-item span {
  color: var(--muted);
}

.error-panel {
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 36px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.error-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #fef3f2;
  color: var(--bad);
  font-weight: 800;
}

.error-panel h2 {
  margin: 16px 0 8px;
  font-size: 26px;
}

.error-panel p {
  margin: 0;
  max-width: 720px;
  color: #465668;
  line-height: 1.7;
}

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

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 16px;
  }
  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .metric-grid,
  .detail-grid,
  .login-layout,
  .auth-stage,
  .help-grid,
  .export-grid,
  .grid-form,
  .inline-grid-form,
  .status-form,
  .org-create-form,
  .hero-panel,
  .project-hero {
    grid-template-columns: 1fr;
  }
  .process-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .span-2 {
    grid-column: span 1;
  }
  .auth-shell,
  .help-shell {
    min-height: auto;
  }
  .auth-visual {
    min-height: 340px;
  }
}

@media (max-width: 620px) {
  .main {
    padding: 16px;
  }
  .auth-topbar,
  .auth-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .auth-card,
  .help-panel {
    padding: 22px;
  }
  .auth-card h1,
  .help-intro h1 {
    font-size: 30px;
  }
  .auth-visual {
    display: none;
  }
  .topbar {
    display: grid;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .process-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .version-chain li {
    grid-template-columns: 18px minmax(0, 1fr);
  }
  .decision-form,
  .password-reset-form,
  .org-update-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-login::before,
  .auth-visual::after,
  .auth-visual img,
  .auth-visual-tag {
    animation: none;
  }
}
