:root {
  --bg: #06111f;
  --bg-deep: #030813;
  --panel: rgba(10, 21, 38, 0.84);
  --panel-strong: rgba(7, 16, 29, 0.96);
  --panel-soft: rgba(10, 25, 44, 0.72);
  --border: rgba(125, 227, 255, 0.14);
  --border-strong: rgba(125, 227, 255, 0.28);
  --text: #ecf7ff;
  --muted: #91a8bc;
  --accent: #47cfff;
  --accent-strong: #1bb6f6;
  --accent-glow: rgba(71, 207, 255, 0.22);
  --success-bg: rgba(44, 225, 176, 0.14);
  --success-text: #8ff3d2;
  --warning-bg: rgba(255, 177, 92, 0.16);
  --warning-text: #ffd4a1;
  --danger: #ff6d8c;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(71, 207, 255, 0.18), transparent 24%),
    radial-gradient(circle at 85% 15%, rgba(18, 92, 190, 0.18), transparent 20%),
    radial-gradient(circle at bottom right, rgba(71, 207, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #081120 0%, #050b15 55%, #030813 100%);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  opacity: 0.34;
  z-index: 0;
}

body::before {
  top: -10vw;
  left: -12vw;
  background: rgba(71, 207, 255, 0.18);
}

body::after {
  right: -14vw;
  bottom: -16vw;
  background: rgba(29, 76, 174, 0.2);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

main,
section,
article {
  position: relative;
  z-index: 1;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 60px;
}

.shell--centered {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.preview-shell {
  display: grid;
  gap: 24px;
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 26%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero,
.profile-card {
  width: min(680px, 100%);
  padding: 42px;
}

.hero {
  overflow: hidden;
}

.hero::after,
.admin-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, transparent 28%, rgba(71, 207, 255, 0.08) 100%);
  pointer-events: none;
}

.hero h1,
.admin-header h1,
.profile-card h1 {
  margin: 10px 0 12px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h2 {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(125, 227, 255, 0.2);
  background: rgba(71, 207, 255, 0.08);
  color: #a8efff;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead,
.muted,
.status {
  color: var(--muted);
  line-height: 1.65;
}

.lead {
  max-width: 58ch;
  font-size: 1.05rem;
}

.lookup-form,
.stack {
  display: grid;
  gap: 16px;
}

.lookup-form {
  margin-top: 30px;
}

.field {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.field span {
  font-size: 0.92rem;
  color: #d5e8f8;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid rgba(125, 227, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  font: inherit;
  color: var(--text);
  background: rgba(3, 11, 22, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input::placeholder {
  color: #68839a;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px rgba(71, 207, 255, 0.12);
  transform: translateY(-1px);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  border: 1px solid rgba(71, 207, 255, 0.2);
  border-radius: 16px;
  padding: 13px 20px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #eaf9ff;
  background: rgba(71, 207, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 227, 255, 0.34);
  background: rgba(71, 207, 255, 0.18);
}

.button--ghost,
.button--subtle {
  color: #def6ff;
  background: rgba(71, 207, 255, 0.06);
  border-color: rgba(71, 207, 255, 0.14);
}

.button--ghost:hover,
.button--subtle:hover {
  background: rgba(71, 207, 255, 0.12);
}

.button--danger {
  color: #ffdbe4;
  background: rgba(255, 109, 140, 0.1);
  border-color: rgba(255, 109, 140, 0.18);
}

.button--danger:hover {
  background: rgba(255, 109, 140, 0.16);
  border-color: rgba(255, 109, 140, 0.28);
}

.hero-actions,
.session-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.admin-header,
.panel-title,
.record-item,
.record-actions,
.record-link {
  display: flex;
  gap: 16px;
}

.admin-header,
.panel-title,
.record-item {
  justify-content: space-between;
  align-items: center;
}

.admin-header {
  padding: 30px;
}

.grid,
.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.grid > .card,
#records-panel,
.preview-card {
  padding: 30px;
}

#records-panel {
  margin-top: 24px;
}

.records-list {
  display: grid;
  gap: 16px;
}

.record-item {
  flex-wrap: wrap;
  padding: 20px;
  border: 1px solid rgba(125, 227, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%),
    var(--panel-soft);
}

.record-item strong {
  display: block;
  font-size: 1.08rem;
}

.record-item p {
  margin: 4px 0 0;
}

.record-status {
  display: inline-flex;
  margin-top: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.record-status--active,
.status-badge--active {
  color: var(--success-text);
  background: var(--success-bg);
}

.record-status--inactive,
.status-badge--inactive {
  color: var(--warning-text);
  background: var(--warning-bg);
}

.record-actions {
  flex-wrap: wrap;
}

.record-link {
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  color: var(--muted);
  font-size: 0.92rem;
}

.record-link code {
  overflow-wrap: anywhere;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(71, 207, 255, 0.08);
  color: #d7f6ff;
}

.official-code-card {
  display: grid;
  gap: 8px;
  margin: 8px 0 4px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(71, 207, 255, 0.06);
  border: 1px solid rgba(125, 227, 255, 0.12);
}

.official-code-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9fcce0;
}

.official-code-value {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #effaff;
  overflow-wrap: anywhere;
}

.photo-box {
  display: grid;
  gap: 12px;
}

.photo-box img,
.profile-photo {
  width: 190px;
  height: 190px;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(125, 227, 255, 0.16);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.profile-card,
.preview-card {
  text-align: center;
}

.profile-photo {
  margin: 0 auto 24px;
}

.profile-data {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
}

.verification-panel {
  display: grid;
  gap: 18px;
  margin-top: 26px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(71, 207, 255, 0.05);
  border: 1px solid rgba(125, 227, 255, 0.1);
}

.qr-code-box {
  display: grid;
  place-items: center;
  min-height: 172px;
  border-radius: 20px;
  background: rgba(3, 11, 22, 0.82);
  border: 1px solid rgba(125, 227, 255, 0.1);
}

.qr-code-box canvas {
  max-width: 100%;
  height: auto;
}

.status-badge {
  display: inline-flex;
  justify-content: center;
  align-self: center;
  margin: 0 auto 14px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.profile-data div {
  padding: 18px;
  border-radius: 20px;
  background: rgba(71, 207, 255, 0.06);
  border: 1px solid rgba(125, 227, 255, 0.08);
}

.profile-data dt {
  font-size: 0.84rem;
  font-weight: 800;
  color: #9fb7ca;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-data dd {
  margin: 8px 0 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.preview-card {
  display: grid;
  gap: 20px;
  align-content: start;
}

.preview-card .profile-photo {
  margin-bottom: 0;
}

.preview-record {
  text-align: left;
}

.verify-hero {
  margin-bottom: 22px;
}

.verify-result {
  width: min(680px, 100%);
  padding: 30px;
}

.verify-meta {
  display: grid;
  gap: 18px;
  margin: 22px 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .panel-title,
  .record-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .profile-card,
  .grid > .card,
  #records-panel,
  .preview-card,
  .admin-header {
    padding: 24px;
  }

  .hero-actions,
  .session-box {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .photo-box img,
  .profile-photo {
    width: 160px;
    height: 160px;
  }
}
