:root {
  --bg: #101c2d;
  --bg-soft: #233754;
  --panel: rgba(35, 51, 78, 0.96);
  --panel-solid: #2a4266;
  --input-bg: #0f1c2e;
  --border: rgba(184, 208, 238, 0.38);
  --ink: #f7fbff;
  --muted: #d1def0;
  --accent: #22e6c6;
  --accent-strong: #80ffe6;
  --accent-warm: #ffd27d;
  --danger: #ff8f80;
  --cyber-blue: #6bb7ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(128, 255, 230, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(107, 183, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at top right, rgba(34, 230, 198, 0.22), transparent 30%),
    radial-gradient(circle at left 18%, rgba(107, 183, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #111d2f 0%, #162844 42%, #203350 100%);
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
  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(14, 27, 45, 0.86);
  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(45, 68, 104, 0.98), rgba(24, 40, 66, 0.92)),
    radial-gradient(circle at top left, rgba(34, 230, 198, 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.075);
  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: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 230, 198, 0.52);
  background: rgba(255, 255, 255, 0.1);
}

.document-list {
  display: grid;
  gap: 1.4rem;
}

.document-group {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
  padding: 1.15rem 1.25rem;
}

.document-group-head {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
}

.document-group-head h2,
.document-group-head h3 {
  margin: 0;
}

.document-group-items {
  display: grid;
}

.document-list-item {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) 1fr;
  gap: 1.25rem;
  padding: 0.95rem 0;
  border-top: 1px solid rgba(142, 171, 214, 0.25);
  color: var(--ink);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.document-list-item:first-child {
  border-top: 0;
}

.document-list-item strong {
  color: var(--ink);
}

.document-list-item span {
  color: var(--muted);
  line-height: 1.55;
}

.document-list-item:hover {
  border-color: rgba(34, 230, 198, 0.42);
}

.document-list-item:hover strong {
  color: var(--accent-strong);
}

.user-picker.is-selected,
.is-highlighted {
  border-color: rgba(34, 230, 198, 0.48);
  background: rgba(34, 230, 198, 0.12);
}

.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));
  align-items: stretch;
}

.info-grid > .detail-card,
.document-grid > .detail-card {
  align-self: stretch;
  height: 100%;
}

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

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

.module-card {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  min-height: 210px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(34, 230, 198, 0.08), transparent 48%),
    rgba(255, 255, 255, 0.075);
  padding: 1.35rem;
}

.module-card strong {
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.15;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.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(34, 230, 198, 0.42);
  background: rgba(34, 230, 198, 0.14);
  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: 1.6rem;
}

.form-section {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(159, 191, 231, 0.18);
}

.form-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.form-section-head {
  display: grid;
  gap: 0.35rem;
}

.form-section-head .eyebrow,
.form-section-head h2 {
  margin: 0;
}

.form-section-head h2 {
  font-size: 1.45rem;
}

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

.form-row-spaced {
  row-gap: 1.4rem;
}

.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: var(--input-bg);
  border: 1px solid rgba(184, 208, 238, 0.42);
  color: var(--ink);
  border-radius: 18px;
  padding: 0.9rem 1rem;
}

.form-control::placeholder {
  color: #a9bee0;
}

.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 var(--input-bg) 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(34, 230, 198, 0.22);
}

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

.form-check-input {
  background-color: var(--input-bg);
  border-color: rgba(184, 208, 238, 0.52);
  flex: 0 0 auto;
  margin-top: 0.18rem;
}

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

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

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

.textarea-md {
  min-height: 150px;
  resize: vertical;
}

.textarea-lg {
  min-height: 240px;
  resize: vertical;
}

.textarea-xl {
  min-height: 300px;
  resize: vertical;
}

.check-list {
  display: grid;
  gap: 0.85rem;
}

.check-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  min-width: 0;
  color: var(--ink);
  line-height: 1.45;
}

.check-row span,
.check-row label {
  min-width: 0;
}

.check-row-terms {
  padding-top: 0.4rem;
}

.form-note {
  padding: 1rem 0 0;
  border-top: 1px solid rgba(159, 191, 231, 0.18);
}

.form-control[type="file"] {
  padding: 0.35rem;
  line-height: 2.4rem;
  cursor: pointer;
}

.form-control[type="file"]::file-selector-button {
  margin-right: 1rem;
  border: 1px solid rgba(34, 230, 198, 0.48);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 230, 198, 0.96), rgba(107, 183, 255, 0.95));
  color: #071723;
  font-weight: 700;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.form-control[type="file"]::file-selector-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.consent-box {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  min-width: 0;
  line-height: 1.45;
}

.consent-box > span,
.consent-box > label,
.switch-row .form-check-label {
  min-width: 0;
  margin-bottom: 0;
  line-height: 1.45;
}

.cra-qualification-section {
  display: grid;
  gap: 1.4rem;
}

.cra-qualification-section .section-head {
  margin-bottom: 0;
}

.cra-qualification-section .consent-box {
  min-height: 4.5rem;
}

.switch-row {
  align-items: flex-start;
}

.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;
  color: #fff;
}

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

.footer a,
.footer span {
  color: #fff;
}

.footer a {
  opacity: 0.88;
}

.footer a:hover {
  color: var(--accent-strong);
  opacity: 1;
}

.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) {
  .document-list-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .module-card {
    min-height: auto;
  }

  .hero-copy,
  .surface {
    padding: 1.2rem;
  }

  h1 {
    font-size: 2.3rem;
  }
}
