:root {
  --bstv-bg: #0d1117;
  --bstv-surface: #111827;
  --bstv-surface-2: #161f2c;
  --bstv-text: #f9fafb;
  --bstv-muted: #94a3b8;
  --bstv-accent: #e11d48;
  --bstv-accent-2: #f59e0b;
  --bstv-green: #16a34a;
  --bstv-yellow: #ca8a04;
  --bstv-red: #dc2626;
}

.bstv-portal-box,
.bstv-verify-box {
  max-width: 1100px;
  margin: 24px auto;
  background: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
  color: var(--bstv-text);
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  padding: 28px;
}

.bstv-portal-box h2,
.bstv-verify-box h1,
.bstv-portal-box h3 {
  color: #fff;
  margin-top: 0;
}

.bstv-verify-body,
.bstv-pdf-body {
  margin: 0;
  background: #060b14;
  font-family: Inter, Arial, sans-serif;
}

.bstv-verify-wrap {
  min-height: 100vh;
  padding: 28px;
}

.bstv-verify-badge,
.bstv-status-active,
.bstv-status-inactive,
.bstv-status-expired {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.bstv-status-active { background: rgba(22,163,74,.16); color: #7ff0a4; }
.bstv-status-inactive { background: rgba(202,138,4,.16); color: #f7d26b; }
.bstv-status-expired { background: rgba(220,38,38,.16); color: #ff8f8f; }

.bstv-card-shell {
  margin-top: 20px;
}

.bstv-card-face {
  width: 100%;
  max-width: 840px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(225,29,72,.22), transparent 30%),
    radial-gradient(circle at bottom left, rgba(245,158,11,.18), transparent 35%),
    linear-gradient(145deg, #111827 0%, #0b1220 100%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
}

.bstv-card-topline {
  height: 8px;
  background: linear-gradient(90deg, var(--bstv-accent), var(--bstv-accent-2));
}

.bstv-card-brand {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .24em;
  padding: 26px 28px 0;
  color: #fff;
}

.bstv-card-subbrand {
  font-size: 28px;
  font-weight: 800;
  padding: 6px 28px 0;
  color: #fff;
}

.bstv-card-main {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 28px;
}

.bstv-card-photo {
  background: rgba(255,255,255,.04);
  border-radius: 22px;
  overflow: hidden;
  min-height: 300px;
  border: 1px solid rgba(255,255,255,.06);
}

.bstv-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bstv-card-photo-empty {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bstv-muted);
}

.bstv-card-name,
.bstv-print-name {
  font-size: 34px;
  line-height: 1.1;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.bstv-card-role,
.bstv-print-role {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(225,29,72,.18);
  color: #ffd7df;
  font-weight: 700;
  margin-bottom: 22px;
}

.bstv-card-meta,
.bstv-print-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #fff;
}

.bstv-card-meta span,
.bstv-print-line span {
  color: var(--bstv-muted);
}

.bstv-card-bottom {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  padding: 0 28px 28px;
  align-items: center;
}

.bstv-card-qr,
.bstv-print-qr {
  width: 160px;
  height: 160px;
  background: #fff;
  padding: 10px;
  border-radius: 18px;
}

.bstv-card-verify-text strong {
  display: block;
  color: #fff;
  margin-bottom: 8px;
  font-size: 20px;
}

.bstv-card-verify-text span {
  color: var(--bstv-muted);
  line-height: 1.5;
}

.bstv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--bstv-accent), #fb7185);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  margin-right: 10px;
}

.bstv-btn-secondary {
  background: rgba(255,255,255,.08);
}

.bstv-portal-actions {
  margin-bottom: 20px;
}

.bstv-pdf-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(6,11,20,.92);
  backdrop-filter: blur(12px);
  padding: 14px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.bstv-pdf-toolbar button {
  appearance: none;
  border: 0;
  background: linear-gradient(90deg, var(--bstv-accent), #fb7185);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.bstv-pdf-pages {
  padding: 30px;
}

.bstv-print-page {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 1280px;
  margin: 0 auto;
}

.bstv-print-card {
  min-height: 780px;
  background: linear-gradient(145deg, #111827 0%, #0b1220 100%);
  border-radius: 30px;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 28px 80px rgba(0,0,0,.42);
  padding: 34px;
}

.bstv-print-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(225,29,72,.22), transparent 28%),
    radial-gradient(circle at bottom left, rgba(245,158,11,.16), transparent 34%);
  pointer-events: none;
}

.bstv-print-head,
.bstv-print-back-title {
  position: relative;
  z-index: 1;
  letter-spacing: .24em;
  font-size: 14px;
  font-weight: 800;
}

.bstv-print-subhead {
  position: relative;
  z-index: 1;
  font-size: 36px;
  font-weight: 900;
  margin-top: 10px;
}

.bstv-print-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  margin-top: 30px;
}

.bstv-print-photo {
  border-radius: 22px;
  overflow: hidden;
  min-height: 320px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}

.bstv-print-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bstv-print-qr-wrap {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 34px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
}

.bstv-print-small,
.bstv-print-mini-meta,
.bstv-print-back-box p,
.bstv-signature-caption {
  color: var(--bstv-muted);
  line-height: 1.5;
}

.bstv-print-back-box {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  padding: 20px;
  margin-top: 28px;
}

.bstv-print-back-section-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}

.bstv-print-signature-zone {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: end;
}

.bstv-signature-line {
  width: 220px;
  border-bottom: 1px solid rgba(255,255,255,.4);
  height: 56px;
}

.bstv-signature-img {
  max-width: 220px;
  max-height: 80px;
  display: block;
}

@media (max-width: 900px) {
  .bstv-card-main,
  .bstv-card-bottom,
  .bstv-print-page,
  .bstv-print-grid,
  .bstv-print-qr-wrap,
  .bstv-print-signature-zone {
    grid-template-columns: 1fr;
  }

  .bstv-card-face,
  .bstv-print-card {
    border-radius: 22px;
  }

  .bstv-card-name,
  .bstv-print-name,
  .bstv-print-subhead {
    font-size: 28px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  .no-print,
  .bstv-pdf-toolbar {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .bstv-pdf-pages {
    padding: 0;
  }

  .bstv-print-page {
    gap: 10mm;
    max-width: none;
  }

  .bstv-print-card {
    box-shadow: none;
    break-inside: avoid;
    min-height: 180mm;
  }
}
