/* Same "Ledger" light tokens as the main ChainLedger app (akram-audit-web/src/index.css), so the
   public verify page looks like part of the same product. */
:root {
  --bg: #f6f5f1;
  --bg-alt: #fbfaf7;
  --bg-raised: #ffffff;
  --bg-muted: #f1efe9;
  --border: #dedad0;
  --border-soft: #eae7de;
  --border-strong: #c9c3b5;
  --text: #262420;
  --text-muted: #847e70;
  --primary: #1e3a52;
  --primary-hover: #17293a;
  --primary-soft: #e4eaee;
  --accent: #e47125;
  --accent-light: #f08a44;
  --accent-dark: #c65c17;
  --success: #2f7d53;
  --success-soft: #e6f1ea;
  --danger: #a6392f;
  --danger-soft: #f6e5e2;
  --warning: #a8721e;
  --warning-soft: #f6eddc;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  position: relative;
  overflow-x: hidden;
  background: var(--bg);
  background-image: radial-gradient(circle at 88% 6%, rgba(228, 113, 37, 0.14) 0%, transparent 38%),
    radial-gradient(circle at 8% 96%, rgba(30, 58, 82, 0.12) 0%, transparent 40%),
    radial-gradient(circle, rgba(132, 126, 112, 0.18) 1px, transparent 1px);
  background-size: auto, auto, 22px 22px;
  background-position: 0 0, 0 0, 0 0;
}

/* Decorative web3/crypto iconography filling the empty side margins around the centered card.
   Fixed to the viewport (not the document), kept low-opacity/monochrome, and inert to the
   cursor so it reads as ambient texture rather than competing with the actual content. */
.bg-icons {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bg-icon {
  position: absolute;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.4;
  color: var(--primary);
  animation: bg-float 12s ease-in-out infinite;
}

@keyframes bg-float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--r, 0deg));
  }
  50% {
    transform: translateY(-14px) rotate(var(--r, 0deg));
  }
}

.bg-icon.i1 {
  top: 9%;
  left: 6%;
  width: 68px;
  height: 68px;
  opacity: 0.16;
  --r: -8deg;
  animation-delay: 0s;
}

.bg-icon.i2 {
  top: 12%;
  right: 9%;
  width: 84px;
  height: 84px;
  opacity: 0.12;
  --r: 10deg;
  animation-delay: 1.2s;
  fill: currentColor;
  stroke: none;
}

.bg-icon.i3 {
  bottom: 16%;
  left: 7%;
  width: 56px;
  height: 56px;
  opacity: 0.16;
  --r: 6deg;
  animation-delay: 2.4s;
}

.bg-icon.i4 {
  top: 46%;
  left: 3%;
  width: 46px;
  height: 46px;
  opacity: 0.13;
  --r: -10deg;
  animation-delay: 3.6s;
}

.bg-icon.i5 {
  bottom: 12%;
  right: 8%;
  width: 60px;
  height: 60px;
  opacity: 0.16;
  --r: 8deg;
  animation-delay: 0.8s;
}

.bg-icon.i6 {
  top: 7%;
  right: 5%;
  width: 50px;
  height: 50px;
  opacity: 0.14;
  --r: -6deg;
  animation-delay: 4.4s;
}

.bg-icon.i7 {
  top: 52%;
  right: 4%;
  width: 58px;
  height: 58px;
  opacity: 0.15;
  --r: 8deg;
  animation-delay: 1.8s;
}

.bg-icon.i8 {
  bottom: 8%;
  left: 24%;
  width: 44px;
  height: 44px;
  opacity: 0.1;
  --r: -12deg;
  animation-delay: 3s;
}

.bg-icon.i9 {
  top: 6%;
  left: 26%;
  width: 40px;
  height: 40px;
  opacity: 0.1;
  --r: 5deg;
  animation-delay: 5s;
}

.bg-icon.i10 {
  bottom: 6%;
  right: 27%;
  width: 46px;
  height: 46px;
  opacity: 0.1;
  --r: -14deg;
  animation-delay: 2s;
  fill: currentColor;
  stroke: none;
}

@media (max-width: 900px) {
  /* Below this width there's no side margin left to decorate — the card fills it. */
  .bg-icons {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-icon {
    animation: none;
  }
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 470px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 38px 34px 30px;
  box-shadow: 0 24px 60px -24px rgba(38, 36, 32, 0.22), 0 4px 14px -6px rgba(38, 36, 32, 0.08);
  overflow: hidden;
  animation: card-in 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* The two-column form state needs more room than the simple single-message states
   (verified/expired/error), so width is a modifier rather than the base .card size. */
.card--wide {
  max-width: 900px;
  padding: 40px 44px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}

.col-info {
  padding-right: 44px;
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
}

.col-verify {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

@media (max-width: 760px) {
  .card--wide {
    max-width: 470px;
    padding: 34px 28px 26px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .col-info {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 22px;
    margin-bottom: 22px;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* A thin brand-colored seal across the top — the kind of restrained detail that reads as
   "an institution built this" rather than a generic template, without adding visual noise. */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 55%, var(--accent) 55%, var(--accent) 100%);
}

.card::after {
  content: "";
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 220px;
  background: radial-gradient(ellipse at center, rgba(228, 113, 37, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  text-align: center;
}

.brand--left {
  align-items: flex-start;
  text-align: left;
}

.brand-logo {
  height: 44px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  .brand-logo {
    height: 34px;
  }
}

.brand-trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--success-soft);
  border: 1px solid rgba(47, 125, 83, 0.25);
  color: var(--success);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-trust svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: auto 0 22px;
  width: 100%;
  flex-shrink: 0;
}

/* Step indicator: connect -> sign. Purely cosmetic (both steps happen on this one page) but
   gives the flow a sense of process/progress instead of a single undifferentiated form. */
.steps {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.step.active {
  color: var(--text);
}

.step.done {
  color: var(--success);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.step-num svg {
  width: 12px;
  height: 12px;
}

.step.active .step-num {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.step.done .step-num {
  border-color: var(--success);
  background: var(--success);
  color: #ffffff;
}

.step-line {
  width: 32px;
  height: 1.5px;
  background: var(--border);
  transition: background 0.2s ease;
}

.step-line.done {
  background: var(--success);
}

h1 {
  color: var(--text);
  font-size: 21px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.center {
  text-align: center;
}

.field {
  margin-top: 20px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field-label svg {
  width: 13px;
  height: 13px;
  color: var(--primary);
  flex-shrink: 0;
}

.mono-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: "IBM Plex Mono", ui-monospace, Consolas, Menlo, monospace;
  font-size: 12.5px;
  word-break: break-all;
  color: var(--text);
  line-height: 1.5;
  transition: border-color 0.15s ease;
}

.field:hover .mono-box {
  border-color: var(--border-strong);
}

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  border-radius: 8px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 22px;
  transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 20px -10px rgba(30, 58, 82, 0.6);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 10px 24px -8px rgba(30, 58, 82, 0.55);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.chain-pills {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.pill.active {
  color: var(--accent-dark);
  border-color: rgba(228, 113, 37, 0.35);
  background: rgba(228, 113, 37, 0.08);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 20px;
}

.status-banner.success {
  background: var(--success-soft);
  border: 1px solid rgba(47, 125, 83, 0.3);
  color: var(--success);
}

.status-banner.error {
  background: var(--danger-soft);
  border: 1px solid rgba(166, 57, 47, 0.3);
  color: var(--danger);
}

.status-banner.info {
  background: var(--primary-soft);
  border: 1px solid rgba(30, 58, 82, 0.2);
  color: var(--primary);
}

.banner-icon svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 1px;
  display: block;
}

.spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(30, 58, 82, 0.2);
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
  margin-top: 1px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.connected-address {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding: 11px 14px;
  background: var(--success-soft);
  border: 1px solid rgba(47, 125, 83, 0.25);
  border-radius: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(47, 125, 83, 0.18);
}

.result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 4px auto 18px;
}

.result-icon.success {
  background: var(--success-soft);
  color: var(--success);
  box-shadow: 0 0 0 8px rgba(47, 125, 83, 0.06);
}

.result-icon.warning {
  background: var(--warning-soft);
  color: var(--warning);
  box-shadow: 0 0 0 8px rgba(168, 114, 30, 0.06);
}

.result-icon.error {
  background: var(--danger-soft);
  color: var(--danger);
  box-shadow: 0 0 0 8px rgba(166, 57, 47, 0.06);
}

.result-icon svg {
  width: 28px;
  height: 28px;
}

.footer-note {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: left;
  line-height: 1.5;
}

/* Manual signing flow (Handshake / Decred): numbered wallet instructions, copy button, and the
   paste-signature box. */
.manual-steps {
  margin: 18px 0 20px;
  padding-left: 20px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.manual-steps li {
  margin-bottom: 8px;
}

.manual-steps code {
  font-family: "IBM Plex Mono", ui-monospace, Consolas, Menlo, monospace;
  font-size: 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  word-break: break-all;
}

.btn-compact {
  width: auto;
  margin-top: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
}

.signature-input {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  outline: none;
}

.signature-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
