:root {
  --arg-blue: #74c0fc;
  --arg-blue-deep: #228be6;
  --arg-navy: #102a43;
  --arg-white: #ffffff;
  --gold: #f5c542;
  --gold-dark: #d99b00;
  --brazil-green: #1f9d55;
  --brazil-yellow: #ffd43b;
  --paper: #fffaf0;
  --ink: #172033;
  --muted: #64748b;
  --line: rgba(16, 42, 67, 0.14);
  --shadow: 0 24px 70px rgba(16, 42, 67, 0.16);
  --radius: 26px;
  --bg: #eef8ff;
  --card: rgba(255, 255, 255, 0.88);
  --danger: #e03131;
  --success: #2f9e44;
  --font-body: "Manrope", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: -0.01em;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(116, 192, 252, 0.4), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(245, 197, 66, 0.24), transparent 32rem),
    linear-gradient(135deg, #eff8ff 0%, #ffffff 44%, #e7f5ff 100%);
}

body.dark {
  --bg: #07111f;
  --card: rgba(16, 31, 51, 0.88);
  --paper: #101f33;
  --ink: #edf6ff;
  --muted: #b5c6d8;
  --line: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  background:
    radial-gradient(circle at top left, rgba(34, 139, 230, 0.28), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(245, 197, 66, 0.16), transparent 32rem),
    linear-gradient(135deg, #06101d 0%, #0a182a 48%, #04101d 100%);
}

body.no-scroll {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

body.dark .site-header {
  background: rgba(7, 17, 31, 0.74);
}

.navbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand-ball {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--arg-blue), var(--gold));
  box-shadow: 0 12px 28px rgba(34, 139, 230, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.theme-toggle,
.nav-toggle {
  border: 0;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.nav-links a,
.theme-toggle {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.24s ease;
}

.nav-links a:hover,
.nav-links a.active,
.theme-toggle:hover {
  background: rgba(116, 192, 252, 0.22);
  color: var(--arg-blue-deep);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--card);
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 34px;
  align-items: center;
  padding: 76px 0 44px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--arg-blue-deep);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6.8vw, 5.3rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.75rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero-text {
  max-width: 640px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
  font-weight: 500;
}

.hero-actions,
.form-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.btn.primary {
  color: #07111f;
  background: linear-gradient(135deg, var(--gold), #ffe066 48%, var(--arg-blue));
  box-shadow: 0 18px 36px rgba(245, 197, 66, 0.28);
}

.btn.ghost {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line);
}

.small-btn {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.9rem;
}

.warning {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  color: #7a4d00;
  background: rgba(245, 197, 66, 0.22);
  border: 1px dashed rgba(217, 155, 0, 0.55);
  font-weight: 800;
}

body.dark .warning {
  color: #ffe8a3;
}

.transfer-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 28px;
  min-height: 420px;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(116, 192, 252, 0.18)),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(34, 139, 230, 0.05) 12px 24px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

body.dark .transfer-card {
  background:
    linear-gradient(135deg, rgba(16, 31, 51, 0.92), rgba(34, 139, 230, 0.14)),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(255, 255, 255, 0.04) 12px 24px);
}

.transfer-card::before {
  content: "⚽";
  position: absolute;
  right: -28px;
  top: -34px;
  font-size: 11rem;
  opacity: 0.08;
  transform: rotate(-16deg);
}

.flag-card {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  text-align: center;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 20px 44px rgba(16, 42, 67, 0.14);
  overflow: hidden;
  isolation: isolate;
}

.flag-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
  z-index: -1;
}

.official-flag {
  position: relative;
  width: min(172px, 100%);
  aspect-ratio: 7 / 5;
  border-radius: 18px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(0, 0, 0, 0.14);
  transform: perspective(700px) rotateX(4deg) rotateY(-4deg);
}

.official-flag::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.22), transparent 45%, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.brazil-card {
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.32), transparent 25%),
    linear-gradient(135deg, #1fba5a, #078b41);
  color: #082615;
}

.brazil-flag {
  background: #009b3a;
}

.brazil-flag::before {
  content: "";
  position: absolute;
  width: 68%;
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  background: #ffdf00;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.brazil-globe {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 47%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(12deg, transparent 43%, rgba(255, 255, 255, 0.94) 44% 54%, transparent 55%),
    radial-gradient(circle at 60% 35%, rgba(255, 255, 255, 0.24), transparent 20%),
    #002776;
  transform: translate(-50%, -50%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 6px 14px rgba(0, 0, 0, 0.18);
  z-index: 1;
}

.brazil-globe::before,
.brazil-globe::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  opacity: 0.75;
}

.brazil-globe::before {
  width: 46%;
  height: 3px;
  left: 20%;
  top: 35%;
  transform: rotate(18deg);
}

.brazil-globe::after {
  width: 34%;
  height: 2px;
  right: 17%;
  bottom: 32%;
  transform: rotate(18deg);
}

.argentina-card {
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.45), transparent 22%),
    linear-gradient(135deg, #a6d8ff, #58b8f5 46%, #ffffff 46% 54%, #74c0fc 54%);
  color: #102a43;
}

.argentina-flag {
  background: linear-gradient(to bottom, #74c0fc 0 33.33%, #fff 33.33% 66.66%, #74c0fc 66.66% 100%);
}

.argentina-sun {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, #d99b00 0 10deg, #f5c542 10deg 20deg),
    radial-gradient(circle, #ffe066 0 45%, #d99b00 46% 100%);
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 3px rgba(217, 155, 0, 0.18),
    0 6px 14px rgba(217, 155, 0, 0.26);
  z-index: 1;
}

.argentina-sun::before {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff1a8, #f5c542 52%, #d99b00);
}

.flag-card strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.flag-card small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: rgba(16, 42, 67, 0.78);
  background: rgba(255, 255, 255, 0.48);
  font-weight: 900;
}

body.dark .flag-card small {
  color: #102a43;
}

.transfer-arrow {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 14px 28px rgba(16, 42, 67, 0.16);
  font-size: 1.55rem;
  z-index: 2;
}

.stamp,
.mini-stamp,
.cert-stamp {
  color: rgba(224, 49, 49, 0.9);
  border: 4px solid rgba(224, 49, 49, 0.76);
  border-radius: 14px;
  font-weight: 1000;
  letter-spacing: 0.12em;
  transform: rotate(-12deg);
  text-transform: uppercase;
}

.floating-stamp {
  position: absolute;
  right: 36px;
  bottom: 36px;
  padding: 12px 18px;
  font-size: 1.45rem;
  background: rgba(255, 255, 255, 0.48);
}

.form-section {
  padding: 44px 0;
}

.paper-form,
.search-card,
.panel,
.modal-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.paper-form {
  overflow: hidden;
  padding: clamp(22px, 4vw, 42px);
}

.paper-form::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(34, 139, 230, 0.18);
  border-radius: 22px;
  pointer-events: none;
}

.watermark {
  position: absolute;
  inset: auto -60px 36% auto;
  transform: rotate(-28deg);
  font-size: clamp(2.5rem, 9vw, 7rem);
  font-weight: 1000;
  letter-spacing: -0.08em;
  color: rgba(34, 139, 230, 0.065);
  white-space: nowrap;
  pointer-events: none;
}

.form-top,
.panel-header,
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.form-code {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 800;
}

.mini-stamp {
  flex: 0 0 auto;
  padding: 10px 14px;
  font-size: 1rem;
}

.flag-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 30px 0;
}

.mini-flag {
  position: relative;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  overflow: hidden;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 3px solid rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.08),
    0 14px 28px rgba(16, 42, 67, 0.1);
}

.mini-flag span {
  position: relative;
  z-index: 3;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 16px rgba(16, 42, 67, 0.12);
}

.brazil-mini {
  background: #009b3a;
  color: #07240f;
}

.brazil-mini::before {
  content: "";
  position: absolute;
  width: 48%;
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  background: #ffdf00;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 5px;
}

.brazil-mini::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(12deg, transparent 43%, rgba(255, 255, 255, 0.92) 44% 54%, transparent 55%),
    #002776;
  transform: translate(-50%, -50%);
}

.argentina-mini {
  background: linear-gradient(to bottom, #74c0fc 0 33.33%, #fff 33.33% 66.66%, #74c0fc 66.66% 100%);
  color: #102a43;
}

.argentina-mini::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-conic-gradient(#d99b00 0 10deg, #f5c542 10deg 20deg);
  transform: translate(-50%, -50%);
}

.switch-icon {
  font-weight: 1000;
  color: var(--arg-blue-deep);
}

.registration-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-weight: 900;
}

label small,
.form-note,
.field-help {
  color: var(--muted);
}

.field-error {
  display: block !important;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.dark input,
body.dark select,
body.dark textarea {
  background: rgba(255, 255, 255, 0.06);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(34, 139, 230, 0.75);
  box-shadow: 0 0 0 4px rgba(116, 192, 252, 0.18);
}

input[readonly] {
  cursor: not-allowed;
  font-weight: 900;
  background: rgba(243, 244, 246, 0.95);
  color: var(--muted);
  border-color: rgba(134, 142, 150, 0.45);
}

input[readonly]:focus {
  box-shadow: none;
}

textarea {
  resize: vertical;
  min-height: 116px;
}

.full-width {
  grid-column: 1 / -1;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px dashed rgba(34, 139, 230, 0.38);
  border-radius: 18px;
  background: rgba(116, 192, 252, 0.1);
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--arg-blue-deep);
}

.form-note {
  margin: -4px 0 0;
  font-size: 0.92rem;
}

.search-section {
  padding: 28px 0 74px;
}

.search-card {
  padding: clamp(20px, 4vw, 34px);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  align-items: center;
  overflow: hidden;
}

.search-card h2 {
  margin-bottom: 10px;
}

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

.search-form {
  display: flex;
  gap: 10px;
}

.search-result {
  grid-column: 1 / -1;
}

/* Center certificate preview and its contents when shown in search results */
#searchResult .certificate-preview,
#searchResult .certificate-preview .certificate-border {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
}

.result-card {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(116, 192, 252, 0.12);
}

.result-card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.result-card strong {
  color: var(--arg-blue-deep);
}

.message {
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 900;
}

.message.error {
  color: var(--danger);
  background: rgba(224, 49, 49, 0.1);
}

.message.success {
  color: var(--success);
  background: rgba(47, 158, 68, 0.12);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  background: rgba(255, 255, 255, 0.42);
}

body.dark .site-footer {
  background: rgba(7, 17, 31, 0.42);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.site-footer a {
  color: var(--arg-blue-deep);
  font-weight: 900;
  text-decoration: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 17, 31, 0.68);
  backdrop-filter: blur(12px);
}

.modal-overlay.show {
  display: flex;
}

.modal-card {
  width: min(680px, 100%);
  max-height: min(92vh, 980px);
  overflow: auto;
  padding: clamp(20px, 4vw, 34px);
  text-align: center;
  animation: modalIn 0.28s ease both;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(116, 192, 252, 0.16);
  font-size: 1.6rem;
  cursor: pointer;
}

.success-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--arg-blue), #fff, var(--arg-blue));
  font-size: 2.4rem;
}

.modal-card p {
  color: var(--muted);
}

.modal-id strong {
  color: var(--arg-blue-deep);
}

.qr-section {
  margin: 20px auto;
  padding: 18px;
  border: 2px dashed rgba(116, 192, 252, 0.5);
  border-radius: 16px;
  background: rgba(116, 192, 252, 0.08);
  text-align: center;
}

.qr-label {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.qrcode-container {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.qrcode-container canvas {
  max-width: 100%;
  height: auto;
  border: 2px solid rgba(116, 192, 252, 0.3);
  border-radius: 8px;
  padding: 4px;
  background: white;
}

.qr-url {
  margin: 12px 0 0;
  font-size: 0.95rem;
  color: var(--arg-blue-deep);
  font-weight: 700;
}

.certificate-preview {
  position: relative;
  margin: 22px auto;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 8.5 / 11;
  color: #102a43;
  background:
    linear-gradient(to bottom, rgba(116, 192, 252, 0.35) 0 18%, rgba(255, 255, 255, 0.98) 18% 82%, rgba(116, 192, 252, 0.35) 82% 100%),
    #fff;
  border-radius: 20px;
  padding: 12px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.certificate-border {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 400px;
  padding: 28px;
  border: 3px double rgba(16, 42, 67, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.certificate-watermark {
  position: absolute;
  inset: 44% auto auto 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-size: clamp(2rem, 8vw, 4.8rem);
  font-weight: 1000;
  color: rgba(34, 139, 230, 0.08);
  white-space: nowrap;
  z-index: 0;
}

.certificate-kicker {
  margin: 0;
  color: var(--gold-dark) !important;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 1000;
}

.certificate-preview h3 {
  margin: 10px 0 16px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.06em;
}

.certificate-preview h4 {
  margin: 10px 0;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  color: var(--arg-blue-deep);
}

.cert-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 18px 0;
}

.cert-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(116, 192, 252, 0.22);
  font-weight: 800;
}

.cert-reason {
  width: min(100%, 420px);
  margin-inline: auto;
  font-style: italic;
}

.cert-signature {
  display: grid;
  width: 210px;
  margin: 24px auto 0;
  padding-top: 10px;
  border-top: 2px solid rgba(16, 42, 67, 0.42);
}

.cert-signature span {
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 1.2rem;
}

.cert-signature small {
  color: #52616f;
  font-weight: 800;
}



.cert-stamp {
  position: absolute;
  right: 22px;
  bottom: 22px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.dashboard-main {
  padding-bottom: 72px;
}

.dashboard-hero {
  position: relative;
  padding: 72px 24px 34px;
  margin-top: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(116, 192, 252, 0.18), rgba(245, 197, 66, 0.12)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(16, 42, 67, 0.12);
  overflow: hidden;
}

body.dark .dashboard-hero {
  background:
    linear-gradient(135deg, rgba(34, 139, 230, 0.16), rgba(245, 197, 66, 0.08)),
    rgba(16, 31, 51, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: -45px auto auto -45px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 192, 252, 0.22), transparent 70%);
  pointer-events: none;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 24px;
  pointer-events: none;
}

.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.hero-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(34, 139, 230, 0.14);
  color: var(--arg-blue-deep);
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(16, 42, 67, 0.08);
}

body.dark .hero-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #cfe9ff;
}

.dashboard-hero h1 {
  position: relative;
  z-index: 1;
}

.dashboard-hero p:not(.eyebrow):not(.warning) {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: 16px auto 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.05rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
  margin-bottom: 28px;
}

.stat-card,
.leader-card,
.registration-card,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 248, 255, 0.9));
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(16, 42, 67, 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body.dark .stat-card,
body.dark .leader-card,
body.dark .registration-card,
body.dark .panel {
  background: linear-gradient(145deg, rgba(16, 31, 51, 0.96), rgba(10, 24, 40, 0.92));
}

.stat-card:hover,
.leader-card:hover,
.registration-card:hover,
.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(16, 42, 67, 0.16);
  border-color: rgba(34, 139, 230, 0.24);
}

.stat-card {
  padding: 24px;
  text-align: center;
}

.stat-card span {
  font-size: 2rem;
}

.stat-card p {
  margin: 10px 0;
  color: var(--muted);
  font-weight: 900;
}

.stat-card strong {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.08em;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 22px;
  align-items: start;
}

.panel {
  padding: clamp(20px, 3vw, 28px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 248, 255, 0.9));
}

body.dark .panel {
  background: linear-gradient(145deg, rgba(16, 31, 51, 0.96), rgba(10, 24, 40, 0.92));
}

.leaderboard-grid {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.leader-card {
  padding: 18px;
}

.leader-card span {
  color: var(--muted);
  font-weight: 900;
}

.leader-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.28rem;
  line-height: 1.35;
}

.latest-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.registration-card {
  position: relative;
  padding: 16px 16px 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  animation: listIn 0.32s ease both;
  overflow: hidden;
}

.registration-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 132px;
}

.registration-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--arg-blue), var(--gold));
}

.registration-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.registration-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.registration-meta span,
.reg-id-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(116, 192, 252, 0.16);
  color: var(--arg-blue-deep);
  font-size: 0.84rem;
  font-weight: 900;
  border: 1px solid rgba(34, 139, 230, 0.14);
}

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

.congrats-btn {
  min-width: 132px;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.reveal-up {
  animation: revealUp 0.56s ease both;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes listIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero,
  .dashboard-layout,
  .search-card {
    grid-template-columns: 1fr;
  }

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

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--card);
  }

  .nav-links {
    position: absolute;
    inset: 74px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a,
  .theme-toggle {
    text-align: center;
  }

  .hero {
    padding-top: 46px;
  }

  .transfer-card,
  .flag-strip {
    grid-template-columns: 1fr;
  }

  .transfer-arrow {
    margin: -2px auto;
    transform: rotate(90deg);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-top,
  .panel-header,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .mini-stamp {
    align-self: flex-start;
  }

  .search-form {
    flex-direction: column;
  }

  .registration-card {
    grid-template-columns: 1fr;
  }

  .registration-actions {
    width: 100%;
    flex-direction: row;
  }

  .congrats-btn,
  .share-btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 22px, 1120px);
  }

  .paper-form,
  .search-card,
  .panel,
  .modal-card {
    border-radius: 20px;
  }

  .certificate-border {
    padding: 18px;
    min-height: 350px;
  }

  .certificate-preview {
    aspect-ratio: 8.5 / 11;
    max-width: 100%;
  }

  .cert-stamp {
    position: static;
    display: inline-block;
    margin-top: 16px;
  }

  .qr-section {
    margin: 16px auto;
    padding: 12px;
  }

  .qrcode-container canvas {
    max-width: 160px;
    max-height: 160px;
  }

  .qr-label,
  .qr-url {
    font-size: 0.85rem;
  }
}
