/* Event Passport theme, styled after e2i.com.sg:
   Plus Jakarta Sans, e2i blue, orange accent, cream sections, pill buttons, rounded cards. */
:root {
  --blue: #005496;
  --blue-mid: #074372;
  --blue-deep: #0e314d;
  --blue-soft: #e8f1f8;
  --orange: #f37043;
  --orange-dark: #d95a2e;
  --orange-soft: #fdeee8;
  --cream: #fffcf2;
  --title: #1e2225;
  --text: #4d5459;
  --grey: #777777;
  --line: #e6e8eb;
  --disable: #f4f4f4;
  --white: #ffffff;
  --ok: #0f7b4f;
  --ok-soft: #e9f7f0;
  --warn: #a35a00;
  --warn-soft: #fff6e0;
  --err: #c0392b;
  --err-soft: #fdecea;
  --radius-card: 20px;
  --radius-input: 10px;
  --shadow: 0 2px 6px rgba(14, 49, 77, .05), 0 12px 32px rgba(14, 49, 77, .07);
  --gradient: linear-gradient(180deg, #005496 0%, #074372 52.4%, #0e314d 100%);
  --gradient-side: linear-gradient(135deg, #005496 0%, #074372 55%, #0e314d 100%);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--white);
  display: flex; flex-direction: column; min-height: 100vh;
}
img { max-width: 100%; }
a { color: var(--orange); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--title); font-weight: 700; line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1rem; }
code { background: var(--disable); padding: 0 .3em; border-radius: 4px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .container { padding-left: 24px; padding-right: 24px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px);
  padding-top: env(safe-area-inset-top);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; position: relative; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--title); text-decoration: none !important; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--orange); color: #fff; font-size: 1.2rem; box-shadow: 0 0 0 4px var(--orange-soft);
}
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-weight: 800; font-size: 1.02rem; color: var(--blue); }
.brand-text small { font-size: .72rem; color: var(--grey); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }

.nav { display: flex; align-items: center; gap: .25rem 1.4rem; }
.nav a { color: var(--title); font-weight: 600; font-size: .92rem; }
.nav a:hover { color: var(--orange); text-decoration: none; }
.nav a.on { color: var(--orange); }
.nav .btn { color: inherit; }
.nav-guest a.btn { color: #fff; }
.inline { display: inline; margin: 0; }
.nav-toggle { display: none; }

@media (max-width: 899px) {
  .nav-toggle {
    display: grid; gap: 5px; width: 44px; height: 44px; place-content: center;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--title); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  #site-nav {
    display: none; position: absolute; top: 100%; left: -16px; right: -16px;
    flex-direction: column; align-items: stretch; gap: 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px rgba(14,49,77,.08); padding: .5rem 16px 1rem;
  }
  #site-nav.open { display: flex; }
  #site-nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  #site-nav form { margin-top: .9rem; }
  #site-nav form .btn { width: 100%; }
}

/* ---------- Page hero (blue band, like e2i page titles) ---------- */
.page-hero { background: var(--gradient-side); color: #fff; position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -80px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(243,112,67,.35), rgba(243,112,67,0) 70%);
}
.page-hero .container { padding-top: 2rem; padding-bottom: 2.25rem; position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin: 0; word-break: break-word; }
.crumbs { text-transform: uppercase; font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: rgba(255,255,255,.8); margin: 0 0 .5rem; white-space: pre; }
.hero-sub { margin: .5rem 0 0; color: rgba(255,255,255,.85); }
@media (min-width: 900px) { .page-hero .container { padding-top: 3rem; padding-bottom: 3.25rem; } }

/* ---------- Layout ---------- */
.main { flex: 1; padding-top: 1.5rem; padding-bottom: 3rem; }
.main-flush { flex: 0; padding: 0; }
.home .main-flush:last-of-type { flex: 1; }
.card {
  background: #fff; border-radius: var(--radius-card); padding: 1.25rem;
  border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 1.25rem;
}
@media (min-width: 720px) { .card { padding: 1.75rem; } }
.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--grey); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.plain { margin: 0; padding-left: 1.1rem; }
.eyebrow { text-transform: uppercase; font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--title); margin: 0 0 .35rem; }
.eyebrow-light { color: rgba(255,255,255,.8); }
.section-title { margin-bottom: 1rem; }
.small-title { font-size: 1.1rem; }
.lead { font-size: 1.08rem; }
.two-col { display: grid; gap: 0 1.25rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.4fr 1fr; align-items: start; } }

/* ---------- Alerts ---------- */
.alert { padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1.25rem; font-weight: 500; border: 1px solid transparent; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: #bfe8d3; }
.alert-error { background: var(--err-soft); color: var(--err); border-color: #f5c6c0; }
.alert-info { background: var(--blue-soft); color: var(--blue); border-color: #c9dcec; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; color: var(--title); }
input, select {
  width: 100%; font: inherit; font-size: 16px; padding: .75rem .9rem; color: var(--title);
  border: 1px solid #d3d8dd; border-radius: var(--radius-input); background: #fff;
}
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,84,150,.15); }
.check { display: flex !important; align-items: center; gap: .55rem; font-weight: 500 !important; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--orange); }
.row { display: flex; gap: .5rem; align-items: center; }
.row input { flex: 1; min-width: 0; }
.row.tight { gap: .35rem; }
.search-row { flex-wrap: wrap; }
.search-row input { flex: 1 1 240px; }
.short { max-width: 10rem; }
.grid2 { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Buttons (pill shaped, like e2i) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .8rem 1.75rem; border-radius: 25px; border: 1.5px solid transparent;
  font: inherit; font-size: .9rem; font-weight: 700; line-height: 1.2; cursor: pointer;
  text-decoration: none !important; transition: background .15s, color .15s, border-color .15s, transform .1s;
  background: var(--blue-soft); color: var(--blue);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { background: #fff; border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.8); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--blue); }
.btn-lg { padding: .95rem 2rem; font-size: 1rem; }
.btn-small { padding: .45rem 1rem; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.center-row { justify-content: center; }
.stack { display: grid; gap: .6rem; margin-top: 1rem; }
@media (max-width: 479px) { .btn-row .btn-lg { flex: 1 1 100%; } }

/* ---------- Home ---------- */
.home-hero { background: var(--gradient-side); color: #fff; overflow: hidden; }
.home-hero-grid { display: grid; gap: 2rem; align-items: center; padding-top: 2.5rem; padding-bottom: 3rem; }
.home-hero h1 { color: #fff; }
.home-hero .lead { color: rgba(255,255,255,.88); }
.hero-visual { display: none; }
@media (min-width: 900px) {
  .home-hero-grid { grid-template-columns: 1.2fr 1fr; padding-top: 4.5rem; padding-bottom: 5rem; }
  .hero-visual { display: flex; justify-content: center; }
}
.mini-passport {
  width: 300px; background: #fff; border-radius: 24px; padding: 1.5rem;
  box-shadow: 0 30px 60px rgba(0,0,0,.25); display: grid; gap: 1rem;
}
.mini-qr { display: block; width: 100%; height: auto; border-radius: 8px; image-rendering: pixelated; }
.mini-caption { margin: -.4rem 0 0; text-align: center; font-weight: 700; font-size: .85rem; color: var(--blue); }
.mini-stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.mini-stamps span { aspect-ratio: 1; border-radius: 50%; border: 2px dashed #d3d8dd; display: grid; place-items: center; color: transparent; font-size: .9rem; }
.mini-stamps span.got { border: 0; background: var(--blue); color: var(--orange); }
.mini-bar { height: 10px; border-radius: 99px; background: var(--blue-soft); overflow: hidden; }
.mini-bar span { display: block; height: 100%; width: 70%; background: var(--orange); border-radius: 99px; }

.section-cream { background: var(--cream); padding: 3rem 0 3.5rem; }
.feature-grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.feature-card { background: var(--blue); color: rgba(255,255,255,.88); border-radius: var(--radius-card); padding: 30px; }
.feature-card h3 { color: #fff; }
.feature-card p { margin: 0; }
.feature-n {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--orange); color: #fff; font-weight: 800; margin-bottom: 1rem;
}

/* ---------- Sign in / register ---------- */
.auth-grid { display: grid; gap: 1.25rem; max-width: 1000px; margin: 0 auto; }
.info-card { display: none; }
@media (min-width: 900px) {
  .auth-grid { grid-template-columns: 1fr 1.25fr; align-items: start; }
  .info-card {
    display: block; background: var(--gradient); color: rgba(255,255,255,.88);
    border-radius: var(--radius-card); padding: 2.25rem; position: sticky; top: 100px;
  }
  .info-card h2 { color: #fff; }
}
.form-card { margin-bottom: 0; }
.ticks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .7rem; }
.ticks li { padding-left: 2rem; position: relative; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: .1rem; width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center;
}

/* ---------- Passport ---------- */
.passport-grid { display: grid; gap: 1.25rem; }
.passport-side { display: grid; gap: 1.25rem; align-content: start; }
.passport-side .card { margin: 0; }
@media (min-width: 900px) {
  .passport-grid { grid-template-columns: 380px 1fr; align-items: start; }
  .passport-side { position: sticky; top: 92px; }
}
.qr-card { text-align: center; }
.qr-box { display: inline-block; padding: .75rem; border-radius: 18px; background: #fff; border: 2px dashed #c9dcec; }
.qr-box img { display: block; width: min(260px, 68vw); height: auto; image-rendering: pixelated; }
.code-label { margin: 1rem 0 0; text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; font-weight: 700; color: var(--grey); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.35rem; letter-spacing: .15em; margin: 0 0 .5rem; font-weight: 700; color: var(--blue); }
.progress-card { background: var(--gradient); color: #fff; border-radius: var(--radius-card); padding: 1.5rem; }
.progress-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: .8rem; }
.progress-big { font-size: 2.4rem; font-weight: 800; line-height: 1; margin: 0; }
.progress-big small { font-size: 1.1rem; font-weight: 600; opacity: .75; }
.progress-left { font-weight: 600; opacity: .85; font-size: .9rem; }
.progress { height: 12px; background: rgba(255,255,255,.2); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--orange); border-radius: 999px; transition: width .6s ease; }
.prize { margin-top: 1rem; padding: .9rem 1rem; border-radius: 14px; font-weight: 700; }
.prize-ready { background: #fff; color: var(--orange-dark); }
.prize-claimed { background: rgba(255,255,255,.15); color: #fff; }
.booths-card { margin: 0; }
.stamp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
@media (min-width: 1100px) { .stamp-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); } }
.stamp {
  border: 1.5px dashed #d3d8dd; border-radius: 16px; padding: 1rem .6rem; text-align: center;
  display: grid; gap: .25rem; justify-items: center; align-content: start; color: var(--grey); background: #fafbfc;
}
.stamp-icon { width: 48px; height: 48px; border-radius: 50%; border: 2px dashed #d3d8dd; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: .25rem; }
.stamp-name { font-weight: 700; font-size: .9rem; color: var(--title); line-height: 1.3; }
.stamp-booth { font-size: .75rem; font-weight: 600; }
.stamp.got { border: 1.5px solid #c9dcec; background: var(--blue-soft); }
.stamp.got .stamp-icon { border: 0; background: var(--blue); color: var(--orange); transform: rotate(-10deg); }
.stamp.just .stamp-icon { animation: thump .6s ease; }
@keyframes thump { 0% { transform: scale(2) rotate(-25deg); opacity: 0; } 70% { transform: scale(.9) rotate(-10deg); opacity: 1; } 100% { transform: scale(1) rotate(-10deg); } }

/* ---------- Scanner ---------- */
.scan-grid { display: grid; gap: 1.25rem; }
.scan-side { display: grid; gap: 1.25rem; align-content: start; }
.scan-side .card, .scan-card { margin: 0; }
@media (min-width: 900px) { .scan-grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.scan-card { text-align: center; }
.pill { display: inline-block; background: var(--blue-soft); color: var(--blue); padding: .35rem 1rem; border-radius: 999px; font-weight: 600; margin-bottom: 1rem; }
.reader { width: 100%; max-width: 460px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: var(--blue-deep); }
.reader:empty { display: none; }
.reader video { display: block; width: 100% !important; }
.reader-placeholder {
  width: 100%; max-width: 460px; aspect-ratio: 1; margin: 0 auto; border-radius: 16px;
  background: var(--gradient); display: grid; place-items: center;
}
.scan-frame { width: 55%; aspect-ratio: 1; border-radius: 18px; border: 3px dashed rgba(255,255,255,.55); }
.scan-card .btn-row { margin-top: 1.25rem; }
.scan-card .btn-lg { min-width: 220px; }
.result { padding: 1.25rem; border-radius: var(--radius-card); text-align: left; border: 2px solid transparent; }
.result-title { font-weight: 800; font-size: 1.2rem; margin-bottom: .35rem; line-height: 1.3; }
.result-line { color: var(--text); }
.result .stack { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.result-ok { background: var(--ok-soft); border-color: #9ed9bb; }
.result-ok .result-title { color: var(--ok); }
.result-warn { background: var(--warn-soft); border-color: #f5d48a; }
.result-warn .result-title { color: var(--warn); }
.result-error { background: var(--err-soft); border-color: #f0b0a8; }
.result-error .result-title { color: var(--err); }

/* ---------- Lists, stats, tables ---------- */
.list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.list li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); color: var(--title); }
.list li:last-child { border-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .stats { grid-template-columns: repeat(5, 1fr); gap: 1rem; } }
.stat { background: var(--blue); border-radius: var(--radius-card); padding: 1.25rem; display: grid; gap: .15rem; }
.stat:nth-child(5) { background: var(--orange); }
.stat-n { font-size: 2rem; font-weight: 800; color: #fff; line-height: 1.1; }
.stat-l { color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 600; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--grey); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; background: var(--disable); }
.table th:first-child { border-radius: 10px 0 0 10px; }
.table th:last-child { border-radius: 0 10px 10px 0; }
.table th, .table td { padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td { color: var(--title); }
.table tr.inactive { opacity: .5; }
.table input { padding: .5rem .65rem; }
/* Phones: show each table row as a card */
@media (max-width: 759px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { border: 1px solid var(--line); border-radius: 16px; padding: .5rem .9rem; margin-bottom: .75rem; background: #fff; }
  .table-stack td { border: 0; padding: .45rem 0; display: grid; grid-template-columns: 7.5rem 1fr; gap: .75rem; align-items: center; }
  .table-stack td::before { content: attr(data-label); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--grey); }
  .table-stack td[data-label=""] { grid-template-columns: 1fr; }
  .table-stack td[data-label=""]::before { display: none; }
  .table-stack td[colspan] { grid-template-columns: 1fr; }
  .table-stack td[colspan]::before { margin-bottom: -.25rem; }
  .table-stack .short { max-width: none; }
}
.tag { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--disable); text-transform: capitalize; }
.tag-admin { background: var(--orange-soft); color: var(--orange-dark); }
.tag-counter { background: var(--warn-soft); color: var(--warn); }
.tag-exhibitor { background: var(--blue-soft); color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { background: var(--gradient); color: rgba(255,255,255,.8); margin-top: auto; padding-bottom: env(safe-area-inset-bottom); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 2rem; padding-top: 1.75rem; padding-bottom: 1.75rem; font-size: .9rem; }
.foot strong { color: #fff; font-size: 1rem; }
.foot p { margin: .2rem 0 0; }
.foot-small { font-size: .8rem; opacity: .8; }

/* ---------- Hiring info ---------- */
.booths-note { margin-top: -.5rem; }
.stamp-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 479px) { .stamp-grid { grid-template-columns: 1fr; } }
@media (max-width: 479px) {
  .stamp { grid-template-columns: 48px 1fr; justify-items: start; text-align: left; column-gap: .9rem; padding: .9rem; }
  .stamp-icon { grid-row: span 4; margin: 0; }
}
@media (min-width: 1100px) { .stamp-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }
.hiring-label { margin-top: .35rem; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-dark); }
.roles { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
@media (max-width: 479px) { .stamp .roles { justify-content: flex-start; } }
.role { display: inline-block; background: #fff; border: 1px solid #d7e3ee; color: var(--blue); border-radius: 999px; padding: .12rem .55rem; font-size: .72rem; font-weight: 600; line-height: 1.5; }
.stamp.got .role { border-color: #c9dcec; }
.roles-compact { justify-content: flex-start; margin-top: .35rem; }
.edit { margin-top: .5rem; }
.edit summary { cursor: pointer; color: var(--orange); font-weight: 700; font-size: .85rem; }
.edit .form { margin-top: .75rem; gap: .7rem; min-width: 260px; }
