/* ===== LPS LikeIT Makassar 2026 – brand styles ===== */
:root {
  --bg: #f4f6f9; --card: #ffffff; --text: #14213d; --muted: #667085; --line: #dfe3ea;
  --navy: #14213d; --orange: #1d5fd1; --amber: #8fb3f0; --red: #d93a2b;
  --primary: #1d5fd1; --primary-ink: #fff;
  --grad: linear-gradient(180deg, #2f6fe0 0%, #1d5fd1 100%);
  --ok: #16915a; --ok-bg: #e4f5ec; --warn: #b56a00; --warn-bg: #fff3dc; --bad: #d93a2b; --bad-bg: #fde9e5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,33,61,.06), 0 8px 24px -12px rgba(20,33,61,.18);
  --font-head: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; font-family: var(--font-body); background: transparent; color: var(--text); line-height: 1.5; min-height: 100vh; position: relative; }

a { color: var(--orange); font-weight: 700; }
h1, h2, h3, .btn, .vlabel, .vname, .stat .n, .tid { font-family: var(--font-head); }
.wrap { max-width: 560px; margin: 0 auto; padding: 24px 16px 56px; }
.wrap.wide { max-width: 1320px; }

/* Participant header */
.brand { text-align: center; margin: 4px 0 22px; }
@media (max-width: 600px) { .brand { margin-top: 18px; } .brand-logo { width: 76%; } header.top .ident img { height: 34px; } header.top h1 { font-size: 1.02rem; } }
.brand-logo { display: block; width: min(440px, 86%); height: auto; margin: 0 auto; filter: drop-shadow(0 6px 10px rgba(240,90,40,.12)); }
.brand-event { display: inline-block; margin-top: 10px; padding: 6px 16px; border-radius: 99px; background: var(--navy); color: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; letter-spacing: .02em; }
.brand .sub { margin-top: 8px; color: var(--muted); font-weight: 600; }

/* Staff header */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
  background: rgba(255,255,255,.85); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; box-shadow: var(--shadow); }
header.top .ident { display: flex; align-items: center; gap: 12px; min-width: 0; }
header.top .ident img { height: 44px; width: auto; flex: none; }
header.top h1 { font-size: 1.15rem; margin: 0; color: var(--navy); line-height: 1.2; }
header.top .sub { color: var(--muted); font-size: .88rem; }
nav.links { display: flex; gap: 14px; font-size: .9rem; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.muted { color: var(--muted); }
label { display: block; font-weight: 800; font-size: .9rem; margin: 14px 0 6px; color: var(--navy); }
input, select { width: 100%; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; background: #fff; color: var(--text); }
input:focus, select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(29,95,209,.18); background: #fff; }
.radio-row { display: flex; gap: 10px; }
.radio-row label { flex: 1; margin: 0; font-weight: 700; color: var(--text); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; background: #fff; }
.radio-row input { width: auto; accent-color: var(--orange); }
.radio-row label:has(input:checked) { border-color: var(--orange); background: #eaf1fd; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 18px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 1rem; cursor: pointer; color: var(--navy); text-decoration: none; }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 0 #1546a0; }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #1546a0; }
.btn.block { width: 100%; margin-top: 20px; font-size: 1.1rem; padding: 13px 18px; }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn:disabled { opacity: .6; cursor: default; }
.error { color: var(--bad); font-size: .9rem; font-weight: 700; min-height: 1.2em; margin: 8px 0 0; }
.hidden { display: none !important; }

/* Ticket */
.ticket { text-align: center; }
.ticket h2 { color: var(--navy); }
.ticket .qr { display: inline-block; padding: 14px; background: #fff; border: 3px solid var(--amber); border-radius: 16px; margin: 14px 0; }
.ticket .qr img, .ticket .qr canvas { display: block; }
.ticket .tid { font-size: 1.2rem; letter-spacing: .05em; font-weight: 700; color: var(--orange); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; margin: 14px auto 0; max-width: 360px; font-size: .95rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 800; word-break: break-word; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.notice { padding: 10px 12px; border-radius: 12px; font-size: .9rem; margin-bottom: 12px; font-weight: 600; }
.notice.info { background: #eaf1fd; color: #1546a0; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }

/* Scanner */
#reader { width: 100%; border-radius: 14px; overflow: hidden; background: var(--navy); min-height: 240px; }
.result { margin-top: 16px; border-radius: 14px; padding: 16px; border: 1.5px solid var(--line); }
.result.ok { background: var(--ok-bg); border-color: #b6e5cd; }
.result.warn { background: var(--warn-bg); border-color: #f2d49b; }
.result.bad, .result.out { background: var(--bad-bg); border-color: #f4bcb2; }
.result h3 { margin: 0 0 6px; font-size: 1.15rem; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border-top: 5px solid var(--amber); }
.stat:nth-child(2) { border-top-color: var(--orange); }
.stat:nth-child(3) { border-top-color: var(--navy); }
.stat:nth-child(4) { border-top-color: var(--ok); }
.stat:nth-child(5) { border-top-color: var(--bad); }
.stat .n { font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .85rem; font-weight: 700; }
.bar { height: 6px; background: var(--line); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); width: 0; transition: width .4s; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.toolbar input { flex: 1 1 220px; width: auto; background: #fff; }
.toolbar select { width: auto; background: #fff; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #f0f3f8; font-weight: 800; color: var(--navy); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f7f9fc; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 800; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.no { background: #f1ede5; color: var(--muted); }
.pill.bad, .pill.out { background: var(--bad-bg); color: var(--bad); }
.mono { font-family: ui-monospace, Menlo, monospace; }

/* Modal / gate */
.gate, .modal { position: fixed; inset: 0; background: rgba(20,33,61,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.gate-card, .modal .card { width: 100%; max-width: 380px; }
.gate-card { border-top: 6px solid var(--orange); }
.gate-card h2 { margin: 0 0 4px; color: var(--navy); }
.gate-card input { margin-top: 14px; }
.gate-card .btn { margin-top: 6px; width: 100%; }

/* Verification popup (scanner + dashboard) */
.vmodal { position: fixed; inset: 0; background: rgba(20,33,61,.6); display: flex; align-items: flex-end; justify-content: center; padding: 16px; z-index: 60; }
@media (min-width: 600px) { .vmodal { align-items: center; } }
.vcard { width: 100%; max-width: 440px; background: #fff; border: 3px solid var(--line); border-radius: 22px; padding: 18px 18px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.25); transition: background .2s, border-color .2s; }
.vcard.in  { background: #eafaf2; border-color: var(--ok); }
.vcard.out { background: #fdeeee; border-color: var(--bad); }
.vcard.err { background: #f4f5f8; border-color: #9aa3b5; }
.vhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vlabel { font-size: .85rem; font-weight: 700; letter-spacing: .08em; padding: 4px 12px; border-radius: 99px; background: #e9ecf2; color: var(--muted); }
.vcard.in  .vlabel { background: var(--ok); color: #fff; }
.vcard.out .vlabel { background: var(--bad); color: #fff; }
.vclose { border: 0; background: rgba(0,0,0,.06); width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--text); }
.vname { font-size: 1.5rem; font-weight: 700; margin: 12px 0 2px; word-break: break-word; color: var(--navy); }
.vcard .kv { margin: 8px 0 0; max-width: none; }
.vstate { margin-top: 12px; font-size: .92rem; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.7); }
.vstate:empty { display: none; }
.vbtns { display: flex; gap: 10px; margin-top: 16px; }
.vbtns .btn { flex: 1; min-height: 58px; font-size: 1.1rem; border: 0; color: #fff; transition: opacity .15s, filter .15s, transform .05s; }
.vbtns .btn:active:not(:disabled) { transform: scale(.98); }
.btn.vin  { background: var(--ok); }
.btn.vout { background: var(--bad); }
.vbtns .btn:disabled { opacity: .25; filter: grayscale(1); cursor: not-allowed; }

/* Paused camera overlay */
#readerWrap { position: relative; }
.paused-note { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; text-align: center; padding: 20px; color: #fff; font-weight: 700; background: rgba(20,33,61,.9); border-radius: 14px; }
#reader.paused + .paused-note { display: flex; }

/* Footer */
.foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 22px; font-weight: 600; }

/* =====================================================================
   Invitation pages (index.html) – cover, series, info, agenda, social
   ===================================================================== */

/* Registration wizard */
.steps { display: flex; gap: 4px; margin: 0 0 18px; }
.steps i { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.steps i.done { background: var(--primary); }
.step h2 { margin: 0 0 4px; font-size: 1.25rem; }
.step .hint { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.ro { background: #f0f3f8 !important; color: var(--muted); }
.nav { display: flex; gap: 10px; margin-top: 22px; }
.nav .btn { flex: 1; }
.member { border: 1.5px solid var(--line); border-radius: 12px; padding: 4px 14px 14px; margin-top: 12px; }
.member .age { color: var(--muted); font-size: .85rem; font-weight: 700; min-height: 1.2em; margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--text); }
.check input { width: auto; margin-top: 4px; }
/* Required field left empty or wrong after pressing Lanjut */
input.invalid, select.invalid { border-color: var(--bad); background: var(--bad-bg); }
.radio-row.invalid label { border-color: var(--bad); background: var(--bad-bg); }
.check.invalid { color: var(--bad); }
.check.invalid input { outline: 2px solid var(--bad); outline-offset: 2px; }
/* Dropdown with tick boxes (allergies): looks like a select, opens a list */
details.multi { border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
details.multi summary { list-style: none; cursor: pointer; padding: 12px 36px 12px 13px; position: relative; color: var(--text); }
details.multi summary::-webkit-details-marker { display: none; }
details.multi summary::after { content: "▾"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
details.multi[open] summary { border-bottom: 1px solid var(--line); }
details.multi[open] summary::after { content: "▴"; }
details.multi .opts { padding: 4px 13px 12px; }
details.multi .opts .check { margin: 8px 0; font-weight: 500; }
details.multi.invalid { border-color: var(--bad); background: var(--bad-bg); }
.policy { max-height: 46vh; overflow-y: auto; font-size: .9rem; border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; background: #fafbfd; }
.policy h3 { font-size: .95rem; margin: 14px 0 4px; }
.policy p, .policy ul { margin: 0 0 8px; }
.summary { width: 100%; font-size: .9rem; }
.summary td { white-space: normal; padding: 6px 8px; }
.summary td:first-child { color: var(--muted); width: 40%; }
.title-bar { text-align: center; margin: 8px 0 20px; }
.title-bar h1 { margin: 0; font-size: 1.6rem; }
.title-bar .sub { color: var(--muted); font-weight: 600; }
