:root {
  --bg: #09111d;
  --bg-soft: #16253d;
  --panel: rgba(22, 34, 56, 0.94);
  --panel-solid: #1a2d49;
  --border: rgba(159, 191, 231, 0.28);
  --ink: #f7fbff;
  --muted: #b7c7df;
  --accent: #28dcc0;
  --accent-strong: #67ead2;
  --accent-warm: #ffc46f;
  --danger: #ff8f80;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(40, 220, 192, 0.22), transparent 30%),
    radial-gradient(circle at left 20%, rgba(255, 196, 111, 0.14), transparent 28%),
    linear-gradient(180deg, #08101b 0%, #0b1524 42%, #111c2f 100%);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

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

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(8, 16, 27, 0.78);
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  gap: 0.6rem;
}

.content-shell {
  padding-top: 2rem;
  flex: 1 0 auto;
}

.hero,
.hero-small {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.hero-small {
  margin-top: 1rem;
}

.hero-single {
  grid-template-columns: minmax(0, 1fr);
}

.hero-copy,
.hero-panel,
.surface {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 2.8rem;
}

.hero-panel {
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
  background:
    linear-gradient(145deg, rgba(27, 43, 70, 0.98), rgba(12, 21, 37, 0.9)),
    radial-gradient(circle at top left, rgba(40, 220, 192, 0.18), transparent 45%);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.1rem, 4.1vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 1rem;
}

.hero-text,
.surface p,
.detail-card p,
.audit-entry p {
  color: var(--muted);
  line-height: 1.65;
}

.markdown-document {
  display: grid;
  gap: 1.1rem;
}

.markdown-document h1,
.markdown-document h2,
.markdown-document h3,
.markdown-document h4 {
  color: var(--ink);
  line-height: 1.18;
}

.markdown-document h1 {
  margin-bottom: 0.4rem;
}

.markdown-document h2 {
  margin-top: 1.5rem;
  font-size: 1.5rem;
}

.markdown-document h3 {
  margin-top: 1.1rem;
  font-size: 1.15rem;
}

.markdown-document p,
.markdown-document li {
  color: var(--muted);
  line-height: 1.7;
}

.markdown-document ul,
.markdown-document ol {
  margin: 0;
  padding-left: 1.35rem;
}

.markdown-document li + li {
  margin-top: 0.35rem;
}

.markdown-document blockquote {
  margin: 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0 18px 18px 0;
}

.markdown-document pre,
.markdown-document code {
  font-family: Consolas, "SFMono-Regular", monospace;
}

.markdown-document pre {
  margin: 0;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  border-radius: 18px;
  background: rgba(7, 14, 24, 0.92);
  border: 1px solid var(--border);
}

.markdown-document :not(pre) > code {
  padding: 0.12rem 0.35rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.markdown-document table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.markdown-document th,
.markdown-document td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.markdown-document th {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.markdown-document tr:last-child td {
  border-bottom: none;
}

.metric-card,
.token-card,
.detail-card,
.audit-entry {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1.1rem 1.2rem;
  min-width: 0;
  align-self: start;
}

.detail-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
}

.detail-card > :first-child,
.audit-entry > :first-child {
  margin-top: 0;
}

.detail-card > :last-child,
.audit-entry > :last-child {
  margin-bottom: 0;
}

.link-card {
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 209, 178, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.user-picker.is-selected,
.is-highlighted {
  border-color: rgba(0, 209, 178, 0.4);
  background: rgba(0, 209, 178, 0.08);
}

.compact-card {
  padding: 0.85rem 1rem;
}

.metric-label,
.token-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.surface {
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}

.status-banner {
  padding: 1rem 1.25rem;
}

.status-banner-success {
  border-color: rgba(103, 234, 210, 0.35);
  background: rgba(40, 220, 192, 0.12);
}

.status-banner-error {
  border-color: rgba(255, 143, 128, 0.4);
  background: rgba(255, 143, 128, 0.12);
}

.ops-detail-surface {
  display: grid;
  gap: 1.75rem;
}

.ops-detail-surface > * {
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.ops-detail-surface .info-grid,
.ops-detail-surface .grid-2,
.ops-detail-surface .feature-grid,
.ops-detail-surface .stack-list {
  align-items: start;
  gap: 1.4rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.feature-grid,
.product-grid,
.token-grid,
.deadline-grid,
.attachment-list,
.assignment-grid,
.info-grid,
.document-grid,
.contact-grid,
.stack-list {
  display: grid;
  gap: 1rem;
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.assignment-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.info-grid,
.document-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stack-list {
  grid-template-columns: 1fr;
}

.deadline-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 1rem 0;
}

.product-chip,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(0, 209, 178, 0.3);
  background: rgba(0, 209, 178, 0.1);
  color: var(--ink);
  padding: 0.65rem 0.9rem;
}

.pill.severity {
  border-color: rgba(255, 180, 84, 0.35);
  background: rgba(255, 180, 84, 0.12);
}

.cta-row,
.filters-row,
.report-meta,
.switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.report-form,
.track-form,
.ops-update-form {
  display: grid;
  gap: 1rem;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 1rem;
}

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

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

.form-control,
.form-select {
  background: rgba(8, 16, 27, 0.92);
  border: 1px solid rgba(159, 191, 231, 0.3);
  color: var(--ink);
  border-radius: 18px;
  padding: 0.9rem 1rem;
}

.form-control::placeholder {
  color: #91a5c4;
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-select:-webkit-autofill,
.form-select:-webkit-autofill:hover,
.form-select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px rgba(8, 16, 27, 0.92) inset;
  transition: background-color 9999s ease-in-out 0s;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.18rem rgba(0, 209, 178, 0.18);
}

.form-label,
.form-check-label {
  display: inline-block;
  margin-bottom: 0.95rem;
  color: var(--ink);
}

.form-check-input {
  background-color: rgba(8, 16, 27, 0.92);
  border-color: rgba(159, 191, 231, 0.32);
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.tall-textarea {
  min-height: 220px;
}

.medium-textarea {
  min-height: 140px;
}

.consent-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.form-hint {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-weight: 600;
}

.btn-primary {
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #08231d;
}

.btn-outline-secondary {
  border-color: rgba(135, 168, 210, 0.35);
  color: var(--ink);
}

.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(135, 168, 210, 0.55);
  color: var(--ink);
}

.report-card,
.audit-block {
  margin-top: 1.5rem;
}

.audit-block {
  display: grid;
  gap: 1.35rem;
}

.audit-block h2 {
  margin-bottom: 0;
}

.surface-inner {
  margin: 1.5rem 0;
}

.ops-detail-surface .surface-inner,
.ops-detail-surface .audit-block {
  margin: 0;
}

.ops-detail-surface .detail-card h2 {
  margin-bottom: 1rem;
}

.ops-detail-surface .detail-card h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.9rem;
}

.ops-detail-surface .detail-card p,
.ops-detail-surface .audit-entry p {
  margin: 0.8rem 0 0;
}

.audit-entry {
  display: grid;
  gap: 0.75rem;
  padding: 1.35rem 1.45rem;
}

.audit-block > .audit-entry + .audit-entry {
  margin-top: 0.1rem;
}

.audit-entry strong,
.audit-entry span {
  line-height: 1.3;
}

.attachment-item {
  display: grid;
  gap: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.response-block {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
}

.table-wrap {
  overflow-x: auto;
}

.report-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--border);
  margin-bottom: 0;
}

.report-table a {
  color: var(--accent);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0 2rem;
  margin-top: auto;
  position: static;
  line-height: normal;
  white-space: normal;
}

.footer .container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.subtle {
  color: var(--muted);
}

code {
  color: var(--accent-warm);
  font-size: 1rem;
}

.pgp-block {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}

.mfa-qr-code {
  display: block;
  width: min(100%, 280px);
  height: auto;
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  padding: 1rem;
}

.identity-manage-shell {
  display: grid;
  gap: 1.6rem;
}

.identity-manage-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}

.identity-manage-nav,
.identity-manage-content {
  min-width: 0;
}

.identity-nav {
  display: grid;
  gap: 0.6rem;
}

.identity-nav-link {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.identity-nav-link:hover {
  border-color: rgba(103, 234, 210, 0.25);
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.identity-nav-link.is-active {
  border-color: rgba(103, 234, 210, 0.36);
  background: linear-gradient(135deg, rgba(40, 220, 192, 0.18), rgba(103, 234, 210, 0.12));
  color: var(--ink);
}

.identity-manage-content {
  display: grid;
  gap: 1rem;
}

.identity-readonly-field {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(8, 16, 27, 0.92);
  color: var(--ink);
  padding: 0.9rem 1rem;
  word-break: break-word;
}

.identity-data-list {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 0.9rem 1rem;
  margin: 1.2rem 0 1.5rem;
}

.identity-data-list dt,
.identity-data-list dd {
  margin: 0;
}

.identity-data-list dt {
  color: var(--ink);
  font-weight: 600;
}

.identity-data-list dd {
  color: var(--muted);
}

@media (max-width: 992px) {
  .hero,
  .hero-small,
  .grid-2,
  .grid-3,
  .identity-manage-grid,
  .identity-data-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero-copy,
  .surface {
    padding: 1.2rem;
  }

  h1 {
    font-size: 2.3rem;
  }
}
