/* ==========================================================================
   Nexus — Proof of Reserves (extends Security page design system)
   ========================================================================== */

/* ---- Text-only hero ---- */
.reserves-page .por-hero--text .cr-hero__grid {
  grid-template-columns: 1fr;
  min-height: auto;
}

.reserves-page .por-hero--text .cr-hero__content {
  align-items: center;
  justify-content: center;
}

.reserves-page .por-hero--text .cr-hero__content-inner {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  padding: 24px 20px 56px;
  text-align: center;
}

/* ---- Latest snapshot metrics ---- */
.por-metrics__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.por-metric {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px;
  background: var(--nx-white);
  border: 1px solid var(--nx-border);
  border-radius: var(--sc-radius);
}

.por-metric__icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.por-metric__label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-muted);
}

.por-metric__value {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--nx-navy);
  font-variant-numeric: tabular-nums;
}

.por-metric__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.72;
  color: var(--nx-muted);
}

.por-metric .sc-reserves__cta {
  align-self: flex-start;
  margin-top: 6px;
}

button.sc-reserves__cta {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* ---- Verify liabilities login modal ---- */
.por-verify-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.por-verify-modal.is-open {
  display: flex;
}

.por-verify-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 17, 29, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
}

.por-verify-modal__dialog {
  position: relative;
  width: min(100%, 28rem);
  padding: 32px 28px 28px;
  background: var(--nx-white);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  box-shadow: var(--nx-shadow-lg);
}

.por-verify-modal__dialog .por-verify-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--nx-radius-sm);
  background: var(--nx-bg);
  color: var(--nx-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.por-verify-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--nx-radius-sm);
  background: transparent;
  color: var(--nx-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.por-verify-modal__close:hover {
  background: #eef4fb;
  color: var(--nx-navy);
}

.por-verify-modal__close:focus-visible {
  outline: 2px solid var(--nx-orange);
  outline-offset: 2px;
}

.por-verify-modal__dialog h2 {
  margin: 0 32px 12px 0;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--nx-navy);
}

.por-verify-modal__dialog p {
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.72;
  color: var(--nx-muted);
}

.por-verify-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.por-verify-modal__actions .btn {
  min-width: 8.5rem;
  justify-content: center;
  box-shadow: none;
  border-radius: 999px;
}

.por-verify-modal__actions .btn-primary {
  color: var(--nx-white);
  background: var(--nx-navy);
  border: 1px solid var(--nx-navy);
}

.por-verify-modal__actions .btn-primary:hover {
  background: var(--nx-navy-light);
  border-color: var(--nx-navy-light);
  box-shadow: none;
}

.por-verify-modal__actions .btn-ghost {
  background: var(--nx-white);
}

.por-verify-modal__actions .btn-ghost:hover {
  background: #eef4fb;
  border-color: var(--nx-navy);
  color: var(--nx-navy);
}

body.por-verify-modal-open {
  overflow: hidden;
}

/* ---- Assets verification wizard ---- */
.por-assets-modal__dialog {
  position: relative;
  width: min(100%, 32rem);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: 0;
  background: var(--nx-white);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  box-shadow: var(--nx-shadow-lg);
}

.por-assets-modal__header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 14px 56px;
  border-bottom: 1px solid var(--nx-border);
  background: var(--nx-white);
}

.por-assets-modal__header .por-verify-modal__close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
}

.por-assets-modal__header .por-verify-modal__close:focus-visible {
  outline: 2px solid var(--nx-navy);
  outline-offset: 2px;
}

.por-assets-modal__header h2 {
  margin: 0;
  max-width: 100%;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  color: var(--nx-navy);
}

.por-assets-modal__back {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--nx-radius-sm);
  background: transparent;
  color: var(--nx-navy);
  cursor: pointer;
}

.por-assets-modal__back:hover {
  background: #eef4fb;
}

.por-assets-modal__back[hidden] {
  display: none;
}

.por-assets-step {
  padding: 20px 24px 24px;
}

.por-assets-modal__intro {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--nx-muted);
}

.por-assets-modal__step-title {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--nx-navy);
}

.por-assets-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(5, 48, 92, 0.18);
  border-radius: var(--nx-radius);
  background: #eef4fb;
  color: var(--nx-navy);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.por-assets-link:hover {
  background: #e3edf8;
  border-color: var(--nx-navy);
}

.por-assets-link__icon {
  display: flex;
  color: var(--nx-navy);
  flex-shrink: 0;
}

.por-assets-link__label {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
}

.por-assets-link__external {
  display: flex;
  color: var(--nx-navy);
  flex-shrink: 0;
}

.por-assets-modal__steps {
  margin: 0 0 24px;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--nx-muted);
}

.por-assets-modal__steps li + li {
  margin-top: 8px;
}

.por-assets-modal__steps strong {
  color: var(--nx-navy);
  font-weight: 600;
}

.por-assets-details {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  background: #f8fafc;
}

.por-assets-details__heading {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nx-muted);
}

.por-assets-details__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.por-assets-details__row + .por-assets-details__row {
  border-top: 1px solid var(--nx-border);
}

.por-assets-details__label {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: var(--nx-muted);
}

.por-assets-details__value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 62%;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nx-navy);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.por-assets-details__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  font-weight: 500;
}

.por-assets-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--nx-radius-sm);
  background: transparent;
  color: var(--nx-muted);
  cursor: pointer;
}

.por-assets-copy:hover {
  background: #eef4fb;
  color: var(--nx-navy);
}

.por-assets-copy.is-copied {
  color: var(--nx-success);
}

.por-assets-modal__continue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  border: 1px solid var(--nx-navy);
  border-radius: 999px;
  background: var(--nx-navy);
  color: var(--nx-white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.por-assets-modal__continue:hover {
  background: var(--nx-navy-light);
  border-color: var(--nx-navy-light);
}

.por-assets-modal__continue:focus-visible {
  outline: 2px solid var(--nx-navy);
  outline-offset: 3px;
}

.por-assets-step--success {
  text-align: center;
  padding: 32px 24px 28px;
}

.por-assets-success__badge {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--nx-success);
}

.por-assets-success__lead {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--nx-muted);
}

.por-assets-success__title {
  margin: 0 0 4px;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--nx-navy);
}

.por-assets-success__date {
  margin: 0 0 28px;
  font-size: 0.9375rem;
  color: var(--nx-muted);
}

.por-assets-success__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.por-assets-modal__secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--nx-border);
  border-radius: 999px;
  background: var(--nx-white);
  color: var(--nx-navy);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.por-assets-modal__secondary:hover {
  background: #eef4fb;
  border-color: var(--nx-navy);
}

@media (max-width: 768px) {
  .por-assets-modal__dialog {
    width: 100%;
    max-height: 92vh;
  }

  .por-assets-modal__header {
    min-height: 56px;
    padding: 12px 48px;
  }

  .por-assets-modal__header h2 {
    font-size: 1rem;
  }

  .por-assets-step {
    padding: 18px 20px 22px;
  }

  .por-assets-details__row {
    flex-wrap: wrap;
  }

  .por-assets-details__value {
    max-width: 100%;
    margin-left: auto;
  }

  .por-assets-success__actions {
    grid-template-columns: 1fr;
  }

  .por-verify-modal__dialog {
    padding: 28px 22px 22px;
  }

  .por-verify-modal__actions {
    flex-direction: column;
  }

  .por-verify-modal__actions .btn {
    width: 100%;
  }
}

/* ---- Attestation history table ---- */
.por-history__wrap {
  overflow-x: auto;
  border: 1px solid var(--nx-border);
  border-radius: var(--sc-radius);
  background: var(--nx-white);
}

.por-history__table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.por-history__table th,
.por-history__table td {
  padding: 14px 20px;
  text-align: left;
  font-size: 15px;
  line-height: 1.5;
  border-bottom: 1px solid var(--nx-border);
}

.por-history__table th {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nx-muted);
  background: #f8fafc;
}

.por-history__table td {
  color: var(--nx-navy);
  font-variant-numeric: tabular-nums;
}

.por-history__table tbody tr:last-child td {
  border-bottom: none;
}

.por-history__table td:last-child {
  font-weight: 700;
  color: var(--nx-success);
}

@media (max-width: 768px) {
  .reserves-page .por-hero--text .cr-hero__content-inner {
    padding: 16px 20px 40px;
  }

  .por-metrics__grid {
    grid-template-columns: 1fr;
  }

  .por-history__table th,
  .por-history__table td {
    padding: 12px 16px;
    font-size: 14px;
  }
}
