  :root {
    --white: #ffffff;
    --bg: #f4f5f9;
    --surface: #ffffff;
    --blue-50: #eff4ff;
    --blue-100: #dae3ff;
    --blue-500: #3563e9;
    --blue-600: #2b4fc7;
    --green-50: #ecfdf5;
    --green-600: #15803d;
    --red-50: #fef2f2;
    --red-500: #dc2626;
    --amber-50: #fffbeb;
    --amber-500: #d97706;
    --amber-600: #92400e;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-md: 0 4px 24px rgba(0,0,0,.055), 0 1px 2px rgba(0,0,0,.03);
    --shadow-blue: 0 4px 16px rgba(53,99,233,.18);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --font: 'Source Sans 3', 'Source Sans Pro', system-ui, -apple-system, sans-serif;
    --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
    --font-mono: 'Source Code Pro', ui-monospace, Consolas, monospace;
  }

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

  body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    background-image:
      radial-gradient(ellipse 900px 600px at 0% 0%, rgba(53,99,233,.04) 0%, transparent 60%),
      radial-gradient(ellipse 700px 500px at 100% 100%, rgba(99,102,241,.03) 0%, transparent 60%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: radial-gradient(circle, rgba(0,0,0,.025) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none; z-index: 0;
  }

  .container {
    position: relative; z-index: 1;
    width: min(1020px, 96vw);
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 20px;
    animation: fadeUp .6s cubic-bezier(.16,1,.3,1) both;
  }

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

  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 38px;
    box-shadow: var(--shadow-md);
  }

  /* ── Logo centrado ── */
  .logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-light);
  }

  .logo-area img {
    height: 54px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.07));
  }

  .org-label {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--blue-500);
    margin-bottom: 2px;
  }

  .org-subtitle {
    font-family: var(--font);
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 400;
  }

  /* ── Badge ── */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 16px;
    transition: all .3s ease;
  }

  .badge--waiting { background: var(--amber-50); border: 1px solid #fde68a; color: var(--amber-600) }
  .badge--waiting .badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--amber-500); animation: pulse 2s ease-in-out infinite;
  }
  .badge--success { background: var(--green-50); border: 1px solid #a7f3d0; color: var(--green-600) }
  .badge--error { background: var(--red-50); border: 1px solid #fecaca; color: var(--red-500) }

  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }

  /* ── Title ── */
  h1 {
    font-family: var(--font-serif);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -.01em;
  }

  .lead {
    font-family: var(--font);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 26px;
    max-width: 440px;
  }

  /* ── Steps ── */
  .steps { margin-bottom: 28px }

  .step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-light);
  }
  .step:last-child { border-bottom: none }

  .step-num {
    width: 28px; height: 28px;
    border-radius: 9px;
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    display: grid; place-items: center;
    font-family: var(--font-mono);
    font-size: 12px; font-weight: 600;
    color: var(--blue-500); flex-shrink: 0;
  }

  .step-text {
    font-size: 14.5px;
    color: var(--text-secondary);
    padding-top: 3px;
    font-weight: 400;
    line-height: 1.5;
  }
  .step-text strong {
    color: var(--text);
    font-weight: 600;
  }

  /* ── Buttons ── */
  .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px }

  .btn {
    appearance: none; border: none;
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-family: var(--font);
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all .2s ease;
    display: inline-flex; align-items: center;
    gap: 8px; text-decoration: none;
  }

  .btn-primary {
    background: var(--blue-500); color: #fff;
    box-shadow: var(--shadow-blue), inset 0 1px 0 rgba(255,255,255,.15);
  }
  .btn-primary:hover {
    background: var(--blue-600); transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(53,99,233,.25);
  }
  .btn-primary:active { transform: translateY(0) }

  .btn-ghost {
    background: var(--bg); color: var(--text-secondary);
    border: 1px solid var(--border);
  }
  .btn-ghost:hover {
    background: var(--white); color: var(--text);
    border-color: #cbd5e1;
  }

  .btn-icon { font-size: 15px; line-height: 1 }

  /* ── Meta ── */
  .meta {
    display: flex; align-items: center; gap: 20px;
    font-size: 12.5px;
    color: var(--text-muted);
  }
  .meta-item { display: flex; align-items: center; gap: 5px }
  .meta-icon { width: 14px; height: 14px; opacity: .35 }
  .mono {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
  }
  .countdown {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--blue-500);
    font-size: 12.5px;
  }

  /* ── Error ── */
  .err {
    margin-top: 14px; padding: 12px 16px;
    border-radius: var(--radius-xs);
    background: var(--red-50); border: 1px solid #fecaca;
    color: var(--red-500); font-size: 13.5px; font-weight: 600;
  }

  /* ── QR Card ── */
  .qr-card {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 18px;
  }

  .qr-label {
    font-family: var(--font);
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--text-muted);
  }

  .qr-frame {
    position: relative;
    width: 290px; max-width: 78vw;
    aspect-ratio: 1;
    border-radius: 16px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    display: grid; place-items: center;
    overflow: hidden;
  }

  .qr-frame::before, .qr-frame::after {
    content: ''; position: absolute;
    width: 28px; height: 28px;
    border: 2.5px solid var(--blue-500);
    opacity: .25; z-index: 2;
  }
  .qr-frame::before { top:10px;left:10px;border-right:none;border-bottom:none;border-radius:5px 0 0 0 }
  .qr-frame::after { bottom:10px;right:10px;border-left:none;border-top:none;border-radius:0 0 5px 0 }

  .qr-corner-tr,.qr-corner-bl {
    position:absolute;width:28px;height:28px;
    border:2.5px solid var(--blue-500);opacity:.25;z-index:2;
  }
  .qr-corner-tr { top:10px;right:10px;border-left:none;border-bottom:none;border-radius:0 5px 0 0 }
  .qr-corner-bl { bottom:10px;left:10px;border-right:none;border-top:none;border-radius:0 0 0 5px }

  .qr-frame canvas { border-radius: 6px }

  .qr-placeholder {
    text-align:center;padding:24px;
    color:var(--text-muted);font-size:13.5px;
    line-height:1.6;
  }
  .qr-placeholder-icon { font-size:32px;margin-bottom:6px;opacity:.2 }
  .qr-expired {
    text-align:center;padding:20px;
    color:var(--text-secondary);font-size:14px;line-height:1.6;
  }

  .security-note {
    display:flex;align-items:center;gap:8px;
    padding:9px 14px;border-radius:var(--radius-xs);
    background:var(--green-50);border:1px solid #bbf7d0;
    font-size:11.5px;font-weight:500;
    color:var(--green-600);
  }
  .security-note svg { flex-shrink:0;width:13px;height:13px }

  .scan-line {
    display:none;position:absolute;left:10px;right:10px;height:2px;
    background:linear-gradient(90deg,transparent,var(--blue-500),transparent);
    border-radius:2px;animation:scanLine 3s ease-in-out infinite;
    box-shadow:0 0 10px rgba(53,99,233,.25);z-index:3;
  }
  .qr-frame.active .scan-line { display:block }

  @keyframes scanLine {
    0%{top:10px;opacity:0}10%{opacity:1}90%{opacity:1}100%{top:calc(100% - 12px);opacity:0}
  }

  @media(max-width:860px){
    .container{grid-template-columns:1fr;max-width:500px}
    .card{padding:28px}
    .qr-frame{width:250px}
  }
