/* ============================================================
   QR CHECK-IN EVENT SYSTEM — Master Stylesheet
   Hội thảo Tuân thủ Luật Bảo vệ Dữ liệu Cá nhân
   Design: FSI-inspired — Red accent, white clean, corporate
   ============================================================ */

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #e60012;
  --primary-dark: #c5000f;
  --primary-light: #ff2d3b;
  --primary-deep: #b2000d;
  --accent: #e60012;
  --accent-light: #ff4d5a;
  --text-dark: #1a1a1a;
  --text-heading: #222222;
  --green: #2d9a4e;
  --green-light: #4ecb71;
  --orange: #e67e22;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Layout Containers ────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Touch-friendly interactive elements */
button, .btn, a {
  -webkit-tap-highlight-color: transparent;
}

button, .btn, input, select, textarea {
  touch-action: manipulation;
}

/* ═══════════════════════════════════════════════════════════
   HEADER TOP — Logo bar matching reference image
   ═══════════════════════════════════════════════════════════ */
.header-top {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
  padding: 0;
}

.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 24px;
}

/* ── Organization blocks (center + right) ───────────────── */
.org-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.org-block-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--gray-400);
  letter-spacing: 0.5px;
  font-weight: 700;
  white-space: nowrap;
}

.org-block-logos {
  display: flex;
  align-items: center;
  gap: 20px;
}

.org-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  transition: all var(--transition);
  filter: grayscale(0);
}

/* FSI logo is taller — double the base height */
.org-logo-img[alt="FSI"] {
  height: 84px;
}

.org-logo-img:hover {
  transform: scale(1.05);
}

/* Placeholder for missing VASTI logo */
.org-logo--placeholder {
  height: 42px;
  padding: 4px 18px;
  background: var(--gray-100);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--gray-600);
  white-space: nowrap;
  border: 1.5px dashed var(--gray-300);
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════════
   HERO SECTION — FSI banner background
   ═══════════════════════════════════════════════════════════ */
.hero-section {
  background: url('/images/banner-home.jpg') center center / cover no-repeat;
  padding: 60px 0 70px;
  position: relative;
  overflow: hidden;
}

/* Dark overlay so text stays readable */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 40, 0.58);
  z-index: 0;
}

/* Decorative red dots (FSI style) */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 80px;
  left: 60px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.4;
  z-index: 0;
}

.hero-deco-1 {
  position: absolute;
  top: 120px;
  right: 40px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.3;
}

.hero-deco-2 {
  position: absolute;
  bottom: 40px;
  right: 200px;
  width: 60px;
  height: 3px;
  background: var(--primary);
  opacity: 0.2;
  border-radius: 2px;
}

.hero-deco-3 {
  position: absolute;
  top: 60px;
  right: 50px;
  width: 40px;
  height: 3px;
  background: var(--primary);
  opacity: 0.15;
  border-radius: 2px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.hero-info {
  padding-top: 16px;
  color: var(--white);
}

.hero-badge {
  display: inline-block;
  background: rgba(230, 0, 18, 0.85);
  color: var(--white);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-title .highlight {
  color: #ffcdd2;
}

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
  letter-spacing: 0.3px;
}

.hero-desc {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.9);
}

.hero-detail-item i {
  font-size: 1rem;
  margin-top: 4px;
  color: #ff8a80;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.hero-detail-item strong {
  color: var(--white);
  font-weight: 700;
}

.hero-detail-item .sub {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
}

.hero-cta {
  margin-top: 32px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-hero:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 0, 18, 0.25);
}

/* ═══════════════════════════════════════════════════════════
   REGISTRATION FORM — Card style
   ═══════════════════════════════════════════════════════════ */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-xl);
  color: var(--text-dark);
  border: 1px solid var(--gray-100);
  position: relative;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.form-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  color: var(--primary);
  margin-bottom: 26px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group label .required {
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all var(--transition);
  background: var(--white);
  font-family: inherit;
  color: var(--text-dark);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.08);
}

.form-control::placeholder {
  color: var(--gray-400);
}

/* Radio Group */
.radio-group {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  flex: 1;
  justify-content: center;
  font-size: 0.88rem;
}

.radio-option:hover {
  border-color: var(--primary);
  background: rgba(230, 0, 18, 0.02);
}

.radio-option input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.radio-option input[type="radio"]:checked + span {
  font-weight: 700;
  color: var(--primary);
}

.radio-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(230, 0, 18, 0.04);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  width: 100%;
  box-shadow: 0 4px 15px rgba(230, 0, 18, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 0, 18, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-success {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(45, 154, 78, 0.25);
}

.btn-success:hover {
  background: #248a42;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 154, 78, 0.35);
}

.btn-danger {
  background: var(--primary);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.15rem;
}

.btn-white {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--white);
}

.btn-white:hover {
  background: transparent;
  color: var(--white);
}

/* ═══════════════════════════════════════════════════════════
   STATS BAR — FSI footer-back background
   ═══════════════════════════════════════════════════════════ */
.stats-bar {
  background:
    url('/images/bg-stats.png') center center / cover no-repeat,
    linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 40%, var(--primary-light) 100%);
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}

.stats-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(180, 0, 10, 0.72);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
  padding: 8px 16px;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255,255,255,0.2);
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  margin-top: 8px;
  line-height: 1.4;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   TIMELINE SECTION — FSI bg-hst background
   ═══════════════════════════════════════════════════════════ */
.timeline-section {
  padding: 70px 0;
  background:
    url('/images/bg-timeline.png') center center / cover no-repeat,
    #f0f4f8;
  position: relative;
}

.timeline-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.82);
  z-index: 0;
  pointer-events: none;
}

.timeline-section .container {
  position: relative;
  z-index: 1;
}

.section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.section-title .highlight {
  color: var(--primary);
}

.section-subtitle {
  text-align: center;
  font-size: 0.92rem;
  color: var(--gray-500);
  margin-bottom: 44px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.section-title-bar {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 44px;
}

.section-title-bar span {
  width: 40px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-title-bar span:nth-child(2) {
  width: 20px;
  opacity: 0.4;
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 44px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary) 0%, rgba(230,0,18,0.2) 100%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
  padding: 22px 26px;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.timeline-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -35px;
  top: 26px;
  width: 13px;
  height: 13px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-time {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.timeline-desc ul {
  list-style: none;
  margin-top: 6px;
}

.timeline-desc ul li {
  padding: 3px 0;
}

.timeline-desc ul li::before {
  content: '–';
  margin-right: 8px;
  color: var(--primary);
  font-weight: bold;
}

/* ═══════════════════════════════════════════════════════════
   PARTICIPANTS SECTION
   ═══════════════════════════════════════════════════════════ */
.participants-section {
  padding: 70px 0;
  background: var(--white);
}

.participants-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 0;
}

.participant-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  transition: all var(--transition);
}

.participant-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.participant-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 14px;
  display: block;
}

.participant-card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 24px;
  font-size: 0.78rem;
}

.footer a {
  color: rgba(255,255,255,0.7);
}

.footer a:hover {
  color: var(--primary-light);
}

/* ═══════════════════════════════════════════════════════════
   TICKET PAGE
   ═══════════════════════════════════════════════════════════ */
.ticket-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f8f8 0%, var(--gray-100) 100%);
  padding: 30px 20px;
}

.ticket-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.ticket-header {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 24px;
  text-align: center;
}

.ticket-header h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.ticket-header p {
  font-size: 0.75rem;
  opacity: 0.8;
}

.ticket-body {
  padding: 28px 24px;
  text-align: center;
}

.ticket-qr {
  margin: 0 auto 20px;
  padding: 14px;
  background: var(--white);
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  display: inline-block;
}

.ticket-qr img {
  width: 220px;
  height: 220px;
}

.ticket-uid {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 16px;
  padding: 8px 20px;
  background: rgba(230, 0, 18, 0.05);
  border-radius: var(--radius-full);
  display: inline-block;
  border: 1px solid rgba(230, 0, 18, 0.1);
}

.ticket-info {
  text-align: left;
  margin-bottom: 20px;
}

.ticket-info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
}

.ticket-info-row:last-child {
  border-bottom: none;
}

.ticket-info-label {
  color: var(--gray-500);
  font-weight: 500;
}

.ticket-info-value {
  font-weight: 600;
  color: var(--text-dark);
  text-align: right;
}

.ticket-notice {
  background: rgba(230, 0, 18, 0.04);
  border: 1px solid rgba(230, 0, 18, 0.1);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.83rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 16px;
}

.ticket-notice i {
  color: var(--primary);
  margin-right: 6px;
}

.ticket-footer {
  padding: 16px 24px;
  background: var(--gray-50);
  border-top: 2px dashed var(--gray-200);
  text-align: center;
}

.ticket-footer .btn {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   SCANNER PAGE
   ═══════════════════════════════════════════════════════════ */
.scanner-page {
  min-height: 100vh;
  background: var(--gray-50);
}

.scanner-header {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 18px 20px;
  text-align: center;
}

.scanner-header h1 {
  font-size: 1.1rem;
  font-weight: 700;
}

.scanner-header p {
  font-size: 0.8rem;
  opacity: 0.8;
}

.scanner-body {
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
}

.scanner-stats-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.scanner-stat {
  text-align: center;
}

.scanner-stat .number {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.scanner-stat .label {
  font-size: 0.7rem;
  color: var(--gray-500);
  text-transform: uppercase;
}

#qr-reader {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

#qr-reader video {
  border-radius: var(--radius);
}

.scan-result-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: none;
}

.scan-result-card.show {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-status {
  text-align: center;
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.result-status.success {
  background: rgba(45, 154, 78, 0.08);
  color: var(--green);
}

.result-status.warning {
  background: rgba(230, 126, 34, 0.08);
  color: var(--orange);
}

.result-status.error {
  background: rgba(230, 0, 18, 0.06);
  color: var(--primary);
}

.result-status i {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.result-status h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.result-status p {
  font-size: 0.85rem;
  opacity: 0.8;
}

.result-info {
  margin-bottom: 16px;
}

.result-info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}

.result-info-label {
  color: var(--gray-500);
}

.result-info-value {
  font-weight: 600;
}

.btn-checkin {
  width: 100%;
  padding: 18px;
  font-size: 1.15rem;
}

/* ═══════════════════════════════════════════════════════════
   CHECK-IN PAGE
   ═══════════════════════════════════════════════════════════ */
.checkin-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  padding: 20px;
}

.checkin-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 450px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.checkin-card-header {
  padding: 24px;
  text-align: center;
}

.checkin-card-header.pending {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
  color: var(--white);
}

.checkin-card-header.checked {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
  color: var(--white);
}

.checkin-card-header.error-state {
  background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
  color: var(--white);
}

.checkin-card-body {
  padding: 24px;
}

/* ═══════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.alert-success { background: rgba(45,154,78,0.08); color: var(--green); border: 1px solid rgba(45,154,78,0.15); }
.alert-error { background: rgba(230,0,18,0.06); color: var(--primary); border: 1px solid rgba(230,0,18,0.12); }
.alert-warning { background: rgba(230,126,34,0.08); color: var(--orange); border: 1px solid rgba(230,126,34,0.15); }
.alert-info { background: rgba(230,0,18,0.04); color: var(--primary); border: 1px solid rgba(230,0,18,0.08); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-first optimisation
   ═══════════════════════════════════════════════════════════ */

/* ── Tablet: 1024px ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .header-top .container {
    gap: 16px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-item:nth-child(4)::after,
  .stat-item:nth-child(5)::after {
    display: none;
  }

  .participants-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Mobile landscape / large phone: 768px ─────────────── */
@media (max-width: 768px) {
  /* Container padding */
  .container {
    padding: 0 16px;
  }

  .header-top {
    position: relative;
  }

  .header-top .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: auto;
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 14px;
  }

  .org-block {
    width: 100%;
    align-items: center;
  }

  .org-block:first-child {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-100);
  }

  .org-block-label {
    font-size: 0.8rem;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
  }

  .org-block-logos {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .org-logo-img {
    height: 60px;
  }

  .org-logo-img[alt="FSI"] {
    height: 120px;
  }

  /* Hero */
  .hero-section {
    padding: 32px 0 40px;
    background-position: center top;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-info {
    padding-top: 0;
    text-align: center;
  }

  .hero-badge {
    font-size: 0.72rem;
    padding: 5px 14px;
  }

  .hero-title {
    font-size: 1.5rem;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-desc {
    font-size: 0.87rem;
    margin-bottom: 20px;
  }

  .hero-details {
    max-width: 340px;
    margin: 0 auto;
    text-align: left;
  }

  .hero-detail-item {
    font-size: 0.87rem;
  }

  /* Form card */
  .form-card {
    padding: 22px 16px 18px;
    border-radius: var(--radius);
  }

  .form-card-title {
    font-size: 0.95rem;
    margin-bottom: 18px;
  }

  .form-control {
    padding: 12px 14px;
    font-size: 0.92rem;
  }

  .radio-group {
    flex-direction: row;
  }

  .radio-option {
    padding: 10px 8px;
    font-size: 0.84rem;
  }

  .btn-primary {
    padding: 14px;
    font-size: 0.92rem;
  }

  /* Stats bar */
  .stats-bar {
    padding: 28px 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  /* 5th item spans both columns and centers itself */
  .stat-item:nth-child(5) {
    grid-column: 1 / -1;
  }

  .stat-item::after {
    display: none;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  /* Timeline */
  .timeline-section {
    padding: 44px 0;
  }

  .timeline {
    padding-left: 32px;
  }

  .timeline-item {
    padding: 16px 18px;
    margin-bottom: 16px;
  }

  .timeline-item::before {
    left: -27px;
    width: 11px;
    height: 11px;
  }

  .timeline-time {
    font-size: 1rem;
  }

  .timeline-title {
    font-size: 1.05rem;
  }

  .timeline-desc {
    font-size: 0.92rem;
  }

  /* Participants */
  .participants-section {
    padding: 44px 0;
  }

  .participants-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* 5th card spans both columns and centers itself */
  .participant-card:nth-child(5) {
    grid-column: 1 / -1;
    max-width: calc(50% - 7px);
    margin: 0 auto;
  }

  .participant-card {
    padding: 22px 14px;
  }

  .participant-card i {
    font-size: 1.8rem;
    margin-bottom: 12px;
  }

  .participant-card h4 {
    font-size: 0.96rem;
  }

  /* Section titles */
  .section-title {
    font-size: 1.45rem;
  }

  /* Hero text */
  .hero-badge {
    font-size: 0.82rem;
    padding: 5px 14px;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .hero-desc {
    font-size: 0.98rem;
    margin-bottom: 20px;
  }

  .hero-details {
    max-width: 340px;
    margin: 0 auto;
    text-align: left;
  }

  .hero-detail-item {
    font-size: 0.98rem;
  }

  /* Form card */
  .form-card {
    padding: 22px 16px 18px;
    border-radius: var(--radius);
  }

  .form-card-title {
    font-size: 1.05rem;
    margin-bottom: 18px;
  }

  .form-control {
    padding: 12px 14px;
    font-size: 1rem;
  }

  .radio-group {
    flex-direction: row;
  }

  .radio-option {
    padding: 10px 8px;
    font-size: 0.95rem;
  }

  .btn-primary {
    padding: 14px;
    font-size: 1rem;
  }
  .footer {
    font-size: 0.74rem;
    padding: 18px 16px;
  }
}

/* ── Small phones: 480px ─────────────────────────────────── */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .org-block-logos {
    gap: 8px;
  }

  .org-logo-img {
    height: 52px;
  }

  .org-logo-img[alt="FSI"] {
    height: 104px;
  }
    padding: 24px 0 32px;
  }

  .hero-title {
    font-size: 1.4rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-desc {
    display: none;
  }

  .hero-details {
    max-width: 100%;
  }

  /* Stats: 2 columns, 5th centered */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  /* Form */
  .form-card {
    padding: 20px 14px;
  }

  .form-group {
    margin-bottom: 14px;
  }

  /* Participants */
  .participants-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .participant-card h4 {
    font-size: 0.9rem;
  }

  /* Ticket */
  .ticket-qr img {
    width: 180px;
    height: 180px;
  }

  .ticket-uid {
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 6px 14px;
  }

  .ticket-card {
    max-width: 100%;
  }

  /* Scanner */
  .scanner-stats-bar {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .scanner-stat .number {
    font-size: 1.2rem;
  }
}

/* ── Very small phones: 360px ────────────────────────────── */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.1rem;
  }

  .btn-primary {
    font-size: 0.85rem;
    padding: 13px;
  }

  .form-card-title {
    font-size: 0.85rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 1.4rem;
  }
}

