:root {
  --purple: #3A0888;
  --purple-dark: #260262;
  --purple-light: #4D0BB5;
  --orange: #F43908;
  --lime: #C1FF00;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e2e0ea;
  --bg: #f6f5fa;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
header {
  background: var(--purple);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
header h1 { font-size: 16px; margin: 0; font-weight: 600; }
header .status {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--lime); }
.dot.err { background: var(--orange); }
.dot.loading { background: #ffd84d; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
button {
  font: inherit;
  font-size: 13px;
  border: 0;
  background: var(--orange);
  color: #fff;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
}
button:disabled { opacity: .5; cursor: default; }
.expiry { font-size: 12px; color: rgba(255,255,255,.85); }
main { flex: 1 1 auto; display: flex; position: relative; min-height: 0; }
iframe { position: absolute; inset: 0; border: 0; width: 100%; height: 100%; background: #fff; }
.overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 32px;
  max-width: 520px;
  box-shadow: 0 4px 24px rgba(38,2,98,.08);
}
.card h2 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 6px 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.card .detail {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 6px;
  padding: 10px 12px;
  text-align: left;
  word-break: break-word;
}
.card.error h2 { color: var(--orange); }
.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--purple-light);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }