/* Credential verification page: a single card, built for desktop and phones. */
:root {
  --v-ink: #0b2a4a;
  --v-text: #1f3550;
  --v-muted: #5f7186;
  --v-blue: #0b63ce;
  --v-blue-dark: #084fa6;
  --v-line: #d5e1ee;
  --v-green: #15803d;
  --v-green-bg: #effbf3;
  --v-green-line: #8fd3a8;
  --v-red: #b42318;
  --v-red-bg: #fff4f2;
  --v-red-line: #f2a79c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--v-text);
  background:
    radial-gradient(900px 420px at 12% -8%, #dfeaff 0%, rgba(223, 234, 255, 0) 70%),
    radial-gradient(800px 420px at 100% 108%, #e3ecff 0%, rgba(227, 236, 255, 0) 70%),
    #f3f7fe;
}
.verify-page { display: grid; place-items: start center; padding: clamp(20px, 7vh, 72px) 16px 40px; }
.verify-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 880px);
  background: #fff;
  border: 1px solid #e3ebf5;
  border-radius: 22px;
  padding: clamp(24px, 5vw, 52px);
  box-shadow: 0 22px 60px -24px rgba(11, 42, 74, .28), 0 2px 6px rgba(11, 42, 74, .05);
}
.verify-glow {
  position: absolute;
  top: -70px;
  right: -60px;
  width: 360px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(47, 111, 224, .13), rgba(47, 111, 224, 0));
  pointer-events: none;
}
.verify-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.verify-logo { display: inline-block; line-height: 0; }
.verify-logo img { display: block; width: min(250px, 62vw); height: auto; }
.verify-shield { width: 78px; height: 88px; flex: none; filter: drop-shadow(0 8px 14px rgba(47, 111, 224, .18)); }
h1 {
  position: relative;
  margin: clamp(22px, 4vw, 40px) 0 10px;
  font-size: clamp(1.7rem, 5.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--v-ink);
}
.verify-lead { position: relative; margin: 0 0 clamp(22px, 4vw, 34px); font-size: clamp(1rem, 2.6vw, 1.2rem); line-height: 1.5; color: var(--v-text); }
#verifyForm { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
.verify-field { display: grid; gap: 10px; min-width: 0; }
.verify-field label { font-weight: 700; color: var(--v-ink); font-size: 1.02rem; }
#code {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 16px 18px;
  font: inherit;
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--v-ink);
  background: #fff;
  border: 1.5px solid var(--v-line);
  border-radius: 12px;
  resize: none;
  overflow: hidden;
  word-break: break-all;
  transition: border-color .15s, box-shadow .15s;
}
#code:focus { outline: none; border-color: var(--v-blue); box-shadow: 0 0 0 4px rgba(11, 99, 206, .14); }
#code[aria-invalid="true"] { border-color: var(--v-red); }
#verifyButton {
  min-width: 140px;
  height: 56px;
  padding: 0 28px;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: var(--v-blue);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
#verifyButton:hover { background: var(--v-blue-dark); }
#verifyButton:active { transform: translateY(1px); }
#verifyButton:disabled { opacity: .65; cursor: progress; }
#verifyButton:focus-visible { outline: 3px solid rgba(11, 99, 206, .35); outline-offset: 2px; }
.verify-result {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
  margin-top: clamp(22px, 4vw, 34px);
  padding: clamp(18px, 3vw, 28px);
  border: 1.5px solid var(--v-green-line);
  border-radius: 14px;
  background: var(--v-green-bg);
}
.verify-result[hidden] { display: none; }
.verify-result.bad { border-color: var(--v-red-line); background: var(--v-red-bg); }
.verify-result.wait { border-color: var(--v-line); background: #f7faff; grid-template-columns: 1fr; color: var(--v-muted); }
.verify-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #fff;
  background: var(--v-green);
  box-shadow: 0 8px 16px -6px rgba(21, 128, 61, .5);
}
.verify-result.bad .verify-icon { background: var(--v-red); box-shadow: 0 8px 16px -6px rgba(180, 35, 24, .45); }
.verify-icon svg { width: 32px; height: 32px; }
.verify-body { min-width: 0; padding-left: 22px; border-left: 2px solid rgba(11, 42, 74, .16); }
.verify-result.wait .verify-body { padding-left: 0; border-left: 0; }
.verify-body h2 { margin: 0 0 14px; font-size: clamp(1.35rem, 4vw, 1.9rem); line-height: 1.15; color: var(--v-green); }
.verify-result.bad .verify-body h2 { color: var(--v-red); }
.verify-body dl { display: grid; grid-template-columns: auto auto 1fr; gap: 10px 14px; margin: 0; font-size: 1.05rem; }
.verify-body dt { color: var(--v-muted); }
.verify-body dt::after { content: ""; }
.verify-body .colon { color: var(--v-muted); }
.verify-body dd { margin: 0; min-width: 0; color: var(--v-ink); font-weight: 500; overflow-wrap: anywhere; }
.verify-body .row { display: contents; }
.verify-message.wait-text { color: var(--v-muted); }
.verify-message { margin: 0; font-size: 1.05rem; line-height: 1.5; color: var(--v-red); }
@media (max-width: 640px) {
  .verify-page { padding-top: 18px; }
  .verify-card { border-radius: 20px; }
  .verify-top { flex-direction: column; align-items: flex-start; gap: 14px; }
  .verify-shield { align-self: center; width: 64px; height: 72px; }
  #verifyForm { grid-template-columns: 1fr; }
  #code { font-size: .94rem; padding: 14px 16px; }
  #verifyButton { width: 100%; }
  .verify-result { grid-template-columns: auto 1fr; gap: 14px; padding: 16px; }
  .verify-icon { width: 46px; height: 46px; }
  .verify-icon svg { width: 24px; height: 24px; }
  .verify-body { padding-left: 14px; }
  .verify-body dl { grid-template-columns: auto auto 1fr; gap: 8px 8px; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
