:root {
  --blue: #009AD9;
  --blue-dark: #0077b0;
  --blue-deep: #005f8c;
  --gray: #64748b;
  --text: #334155;
  --text-light: #94a3b8;
  --white: #ffffff;
  --border: #e2e8f0;
  --radius: 24px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #e4eaf5 0%, #d8e2f3 100%);
  background-image: url('assets/bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── CARD ── */
.card {
  width: 100%;
  max-width: 420px;
  max-height: calc(100dvh - 32px);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(2px);
}

/* ── HEADER ── */
.card-header {
  background: linear-gradient(135deg, #0a7bbf 0%, #004e78 100%);
  padding: 24px 32px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Decorative mesh lines */
.card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      120deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,0.03) 40px,
      rgba(255,255,255,0.03) 41px
    ),
    repeating-linear-gradient(
      60deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,0.02) 40px,
      rgba(255,255,255,0.02) 41px
    );
}

/* Glow accent */
.card-header::after {
  content: '';
  position: absolute;
  top: -60%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0,154,217,0.3) 0%, transparent 70%);
  border-radius: 50%;
}

.card-logo {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}

.card-logo img {
  width: min(220px, 55vw);
  margin: 0 auto;
  display: block;
  filter: brightness(0) invert(1);
}

.card-tagline {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── BODY ── */
.card-body {
  background: var(--white);
  padding: 24px 32px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* ── INFO ROWS ── */
.card-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 0.88rem;
  text-align: left;
  transition: color 0.2s ease;
  text-decoration: none;
}

a.info-row:hover {
  color: var(--blue);
}

a.info-row:hover svg {
  color: var(--blue-dark);
}

.info-row svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--blue);
  transition: color 0.2s ease;
}

.info-row span {
  line-height: 1.4;
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
  flex-shrink: 0;
}

/* ── QR CODE ── */
.card-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  min-height: 0;
}

#qrcode {
  background: var(--white);
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: inline-block;
  line-height: 0;
}

#qrcode img {
  display: block;
  width: min(160px, 28vh);
  height: min(160px, 28vh);
}

.qr-hint {
  color: var(--text-light);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

/* ── SAVE BUTTON ── */
.btn-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 154, 217, 0.35);
}

.btn-save svg {
  width: 18px;
  height: 18px;
}

/* ── RESPONSIVE ── */
@media (max-width: 440px) {
  .card-header {
    padding: 20px 24px 16px;
  }

  .card-body {
    padding: 20px 24px 24px;
  }

  .card-logo img {
    width: min(200px, 55vw);
  }
}

/* Short screens */
@media (max-height: 700px) {
  .card-header {
    padding: 16px 24px 12px;
  }

  .card-logo {
    margin-bottom: 8px;
  }

  .card-logo img {
    width: 180px;
  }

  .card-tagline {
    font-size: 0.72rem;
  }

  .card-body {
    padding: 16px 24px 20px;
  }

  .card-info {
    gap: 10px;
  }

  .info-row {
    font-size: 0.82rem;
  }

  .divider {
    margin: 14px 0;
  }

  .btn-save {
    margin-top: 12px;
    padding: 10px 20px;
    font-size: 0.82rem;
  }
}
