/* FHX Kenangan: guest page, landing and admin gallery.
   "Sweet" look of its own (not MajlisKita's fuchsia on slate): warm cream, peach and honey with a
   sage accent, a soft serif for headings (Fraunces) and a rounded sans for text (Nunito). */
:root {
  --bg: #fff8f1;
  --bg-2: #fdeee3;
  --card: #ffffff;
  --ink: #3b2a24;
  --muted: #8a7366;
  --line: #f2e3d6;
  --accent: #e2725b;
  --accent-deep: #c85a43;
  --accent-ink: #ffffff;
  --accent-soft: #fde8de;
  --honey: #f2b45c;
  --honey-soft: #fff1d9;
  --sage: #6f9e80;
  --sage-soft: #e5f1e8;
  --ok: #3f8a5c;
  --bad: #c0392b;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(120, 70, 40, .05), 0 12px 32px rgba(200, 120, 80, .12);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1512;
    --bg-2: #261b16;
    --card: #2a1f1a;
    --ink: #fbefe6;
    --muted: #c9b2a4;
    --line: #3e2f27;
    --accent: #f39a7f;
    --accent-deep: #f6b09a;
    --accent-ink: #2b130b;
    --accent-soft: #3d2820;
    --honey: #f2c27a;
    --honey-soft: #3a2c1a;
    --sage: #9cc7aa;
    --sage-soft: #23332a;
    --ok: #8fd3a6;
    --bad: #ff9d8f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 16px/1.6 var(--sans);
  background:
    radial-gradient(900px 420px at 15% -8%, var(--accent-soft), transparent 70%),
    radial-gradient(700px 380px at 100% 0%, var(--honey-soft), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
[hidden] { display: none !important; }
a { color: var(--accent-deep); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
.wrap { max-width: 640px; margin: 0 auto; padding: 28px 16px 56px; }
.wide { max-width: 1120px; }
body.landing .wrap { max-width: 1040px; }

/* header */
.top { text-align: center; margin: 4px 0 28px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 800 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0; }
.brand svg { width: 20px; height: 20px; flex: none; }
.top h1 { font-size: clamp(30px, 7vw, 46px); line-height: 1.12; margin: 10px 0 8px; }
.top p { margin: 0 auto; max-width: 34em; color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 21px; margin: 0 0 4px; }
.card .hint { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.note { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

label { display: block; font-size: 14px; font-weight: 700; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=date], input[type=tel], input[type=password], input[type=number], input[type=search], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 110px; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }
.field { margin: 0 0 14px; }
.count { float: right; font-weight: 600; color: var(--muted); font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.primary:hover { box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row .btn { width: 100%; min-height: 60px; border-radius: 18px; }
.full { width: 100%; }
.native { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; font-size: 14px; }
.native button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-deep); text-decoration: underline; cursor: pointer; }

.msg { border-radius: 14px; padding: 10px 14px; font-size: 14px; margin: 12px 0 0; }
.msg.ok { background: var(--sage-soft); color: var(--ok); }
.msg.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }

/* the queue of files to send */
.queue { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.queue li { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--accent-soft); border: 1px solid var(--line); }
/* the whole photo or video, letterboxed in its square (never cropped) */
.queue li { background: #1c1512; }
.queue img, .queue video { width: 100%; height: 100%; object-fit: contain; display: block; }
.queue .tag { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; }
.queue .x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.queue .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0, 0, 0, .25); }
.queue .bar i { display: block; height: 100%; width: 0; background: var(--honey); transition: width .2s; }
.queue li.done::after, .queue li.failed::after {
  content: attr(data-state); position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 6px;
  font-size: 12px; font-weight: 800; color: #fff; background: rgba(63, 138, 92, .65);
}
.queue li.failed::after { background: rgba(192, 57, 43, .7); }
.send { margin-top: 14px; display: grid; gap: 8px; }
.save-box { margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: var(--sage-soft); }
.save-box p { margin: 0 0 10px; font-weight: 700; color: var(--ok); }

/* camera */
.cam { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; color: #fff; }
.cam-view { position: relative; flex: 1; min-height: 0; display: flex; }
.cam video { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #000; }
.cam-fx { position: absolute; pointer-events: none; }
.cam-fx.gold::before, .cam-fx.gold::after { content: ""; position: absolute; border: 2px solid rgba(212, 175, 55, .9); }
.cam-fx.gold::before { inset: 2.5%; }
.cam-fx.gold::after { inset: 4%; border-width: 1px; }
/* the stamp preview: kenangan.js sets left/width/bottom to sit on the picture itself */
.cam-stamp {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px; pointer-events: none;
  padding: 28px 16px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.cam-stamp b { font: 600 clamp(15px, 4.4vw, 22px)/1.2 var(--serif); }
.cam-stamp span { font: 700 clamp(11px, 3vw, 14px)/1.3 var(--sans); opacity: .9; letter-spacing: .04em; }
.cam-tools { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px 0; background: #000; }
.cam-filters { display: flex; gap: 6px; overflow-x: auto; flex: 1; scrollbar-width: none; padding-bottom: 2px; }
.cam-filters::-webkit-scrollbar { display: none; }
.cam-filters button {
  flex: none; display: grid; justify-items: center; gap: 4px; border: 0; background: none; color: #fff; cursor: pointer; padding: 0 2px;
  font: 700 11px/1 var(--sans); opacity: .75;
}
.cam-filters button i { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; background: var(--sw); }
.cam-filters button[aria-pressed=true] { opacity: 1; }
.cam-filters button[aria-pressed=true] i { border-color: var(--honey); box-shadow: 0 0 0 2px #000 inset; }
.cam-row { display: flex; align-items: center; gap: 8px; }
.cam-row:has(> :not([hidden])) { min-height: 34px; }
.cam-frames button i { width: 34px; height: 34px; border-radius: 10px; }
.cam .cam-stamp-toggle { flex: none; min-height: 32px; font-size: 12px; }
.cam .cam-stamp-toggle[aria-pressed=false] { opacity: .6; }
.cam video.mirror { transform: scaleX(-1); }
.cam-top, .cam-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.cam-top { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.cam-bottom { padding-bottom: max(16px, env(safe-area-inset-bottom)); background: #000; }
.cam .ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 0; min-height: 40px; padding: 0 14px; border-radius: 999px; font: 700 14px/1 var(--sans); cursor: pointer; }
.cam .ghost:disabled { opacity: .4; }
.modes { display: inline-flex; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 3px; }
.modes button { border: 0; background: none; color: #fff; font: 700 14px/1 var(--sans); padding: 9px 14px; border-radius: 999px; cursor: pointer; }
.modes button[aria-pressed=true] { background: #fff; color: #000; }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: rgba(255, 255, 255, .25); cursor: pointer; flex: none; }
.shutter.video { background: #e53935; }
.shutter.rec { border-radius: 16px; transform: scale(.8); background: #e53935; }
.shutter:disabled { opacity: .4; }
.timer { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); background: #e53935; padding: 4px 10px; border-radius: 8px; font: 700 14px/1.2 ui-monospace, monospace; }
.cam-msg { position: absolute; left: 16px; right: 16px; top: 40%; text-align: center; font-size: 15px; background: rgba(0, 0, 0, .6); padding: 14px; border-radius: 14px; }
.cam-msg button { margin-top: 10px; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .25s; }
.flash.on { opacity: .8; transition: none; }
.side { width: 96px; display: flex; justify-content: center; }
@media (min-width: 900px) {
  .cam { inset: 4vh 10vw; border-radius: 24px; overflow: hidden; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .6); }
}

/* ---------------- landing (no event code) ---------------- */
.section-title { font-size: clamp(24px, 4vw, 32px); margin: 44px 0 6px; text-align: center; }
.section-lead { text-align: center; color: var(--muted); margin: 0 auto 22px; max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 8px 0 0; padding: 0; list-style: none; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.steps svg { width: 52px; height: 52px; display: block; margin-bottom: 10px; }
.steps h3 { margin: 0 0 4px; font-size: 19px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

/* demo */
.demo { margin-top: 28px; background: linear-gradient(135deg, var(--card), var(--honey-soft)); border: 1.5px solid color-mix(in srgb, var(--honey) 55%, var(--line)); }
.demo h2 { margin-top: 0; }
.demo .inline .btn { flex: none; }
.demo-grid { display: flex; gap: 18px; align-items: flex-start; }
.demo-qr { flex: none; width: 150px; height: 150px; background: #fff; border-radius: 18px; padding: 10px; box-shadow: var(--shadow); }
.demo-qr svg { width: 100%; height: 100%; display: block; }
@media (max-width: 520px) {
  .demo-grid { flex-direction: column; align-items: center; text-align: center; }
  .demo-grid .ev-tools { justify-content: center; }
  .demo .inline { flex-direction: column; }
}

/* packages */
.switch { display: flex; justify-content: center; gap: 4px; margin: 0 auto 20px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; box-shadow: var(--shadow); }
.switch button { border: 0; background: none; color: var(--muted); font: 800 14px/1 var(--sans); padding: 11px 18px; border-radius: 999px; cursor: pointer; }
.switch button[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); }
/* rows of up to 3, centred, so 5 packages sit as 3 + 2 */
.plans { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 14px; align-items: stretch; padding-top: 12px; }
.plan { flex: 1 1 260px; max-width: 330px; position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 20px; box-shadow: var(--shadow); }
.plan.popular { border: 2px solid var(--accent); }
.plan .ribbon { position: absolute; top: -12px; left: 20px; background: var(--accent); color: var(--accent-ink); font: 800 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.plan h3 { margin: 0; font-size: 20px; }
.plan .for { margin: 4px 0 12px; color: var(--muted); font-size: 14px; min-height: 2.8em; }
.plan .price { margin: 0 0 14px; font: 800 30px/1 var(--sans); color: var(--accent-deep); }
.plan .price small { font-size: 14px; font-weight: 700; color: var(--muted); }
.plan ul { margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; }
.plan li { position: relative; padding: 5px 0 5px 24px; border-top: 1px dashed var(--line); }
.plan li:first-child { border-top: 0; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 12px; height: 7px; border-left: 2.5px solid var(--sage); border-bottom: 2.5px solid var(--sage); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; width: 100%; }

/* add-ons */
.addons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.addons li { background: var(--sage-soft); border-radius: 18px; padding: 14px 16px; }
.addons b { display: block; }
.addons span { color: var(--sage); font-weight: 800; }
.addons small { display: block; color: var(--muted); }
.addons a { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 800; }
.keep-note { text-align: center; }

footer { text-align: center; font-size: 13px; color: var(--muted); margin-top: 32px; }

/* ---------------- admin ---------------- */
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.adm-head h1 { margin: 6px 0 0; font-size: 32px; }
#who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.layout { display: grid; gap: 16px; }
@media (min-width: 880px) { .layout { grid-template-columns: 300px 1fr; align-items: start; } .layout > aside { position: sticky; top: 16px; } }
.events { list-style: none; margin: 0 0 14px; padding: 0; }
.events li { border: 1.5px solid var(--line); border-radius: 16px; padding: 11px 13px; margin: 0 0 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.events li:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.events li[aria-current=true] { border-color: var(--accent); background: var(--accent-soft); }
.events b { display: block; }
.events small { color: var(--muted); }
.pill { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--sage-soft); color: var(--sage); margin-left: 6px; vertical-align: 2px; }
.pill.closed { background: var(--line); color: var(--muted); }
.pill.expired { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.ev-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.ev-link { font-size: 13px; word-break: break-all; color: var(--muted); margin: 0 0 12px; }
.display-box { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 2px; margin: 0 0 14px; }
.display-box .hint { margin: 4px 0 10px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; }
.tabs button { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 800 13px/1 var(--sans); cursor: pointer; }
.tabs button[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
.tile .media { aspect-ratio: 4 / 3; background: #1c1512; display: block; }
/* show the whole photo or video (no cropping) */
.tile .media img, .tile .media video { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile .media.file { display: grid; place-items: center; color: #fff; font-size: 13px; }
.tile .body { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.tile .meta { font-size: 12px; color: var(--muted); }
.tile .wish { font-family: var(--serif); font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tile .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }

/* plan, usage and guest QR */
.sub { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 10px; }
.sub select, .sub input { width: auto; padding: 7px 10px; border-radius: 12px; }
.ev-tools .sub { margin-top: 0; }
#newEvent .sub { display: flex; }
#newEvent .sub select { flex: 1; min-width: 0; }
.quota { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 0 0 12px; }
.quota div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; font-size: 13px; }
.quota b { display: block; font-size: 18px; }
.quota i { display: block; height: 5px; border-radius: 5px; background: var(--line); margin-top: 6px; overflow: hidden; }
.quota i::after { content: ""; display: block; height: 100%; width: var(--used, 0%); background: linear-gradient(90deg, var(--honey), var(--accent)); }
.quota .full i::after { background: var(--bad); }
/* who sees what: the site admin (body.is-admin) or an organiser (body.is-organiser) */
body:not(.is-admin) .admin-only, body:not(.is-organiser) .organiser-only { display: none !important; }

/* login / register */
.auth { max-width: 440px; margin: 8px auto 0; }
.auth-tabs { margin: 0 auto 18px; }
.auth form h2 { margin: 0 0 4px; }
.auth .agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 13px; color: var(--muted); margin: 4px 0 14px; }
.auth .agree input { margin-top: 3px; accent-color: var(--accent); }
.auth input[type=password] { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px; }
.auth input[type=password]:focus { border-color: var(--accent); outline: none; }
.pick-plan { border: 0; padding: 0; margin: 4px 0 12px; }
.pick-plan legend { font-size: 14px; font-weight: 700; margin: 0 0 8px; padding: 0; }
.plan-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.plan-opt { position: relative; display: grid; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; font-size: 13px; }
.plan-opt input { position: absolute; opacity: 0; }
.plan-opt b { font-size: 14px; }
.plan-opt span { color: var(--accent-deep); font-weight: 800; }
.plan-opt small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.plan-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.plan-opt:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }
.request-banner { max-width: 1120px; border: 1.5px solid color-mix(in srgb, var(--honey) 60%, var(--line)); background: linear-gradient(135deg, var(--card), var(--honey-soft)); }
.request-banner b { font-family: var(--serif); font-size: 18px; }
.pay-to { margin: 8px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px dashed var(--line); font-weight: 700; white-space: pre-line; }
.req-list { display: grid; gap: 10px; }
.pay-box { margin: 4px 0 10px; }
.table-wrap { overflow-x: auto; }
.pay-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pay-table th, .pay-table td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
.pay-table th { color: var(--muted); font-weight: 800; border-top: 0; }
.req { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--bg); }
.req small { color: var(--muted); }
.req small.proof-in { color: var(--ok); font-weight: 800; }
.admin-code { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 12px; }
.admin-code summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); }
.admin-code form { margin-top: 12px; }
.admin-code #resendCode { margin-top: 8px; }

/* guest camera settings: on/off switches */
.cam-set { display: grid; gap: 10px; max-width: 460px; }
.cam-set .toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 700; cursor: pointer; }
.cam-set .toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cam-set .toggle i { width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.cam-set .toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.cam-set .toggle input:checked + i { background: var(--sage); }
.cam-set .toggle input:checked + i::after { transform: translateX(18px); }
.cam-set .toggle input:focus-visible + i { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }
.qr-box { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 12px; }
.qr-preview { flex: none; width: 132px; height: 132px; background: #fff; border-radius: 14px; padding: 8px; }
.qr-preview svg { width: 100%; height: 100%; display: block; }
@media (max-width: 520px) { .qr-box { flex-direction: column; } }

/* ---------------- member area: sidebar menu and its sections ---------------- */
body.in-app .wrap.wide { max-width: 1400px; }
.shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.menu { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.side-who { display: flex; gap: 10px; align-items: center; padding: 4px 6px 14px; margin: 0 0 8px; border-bottom: 1px dashed var(--line); }
.side-who b { display: block; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.side-who small { color: var(--muted); font-size: 12px; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--honey)); color: var(--accent-ink); font: 800 16px/1 var(--sans); }
.menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.menu a svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.menu a:hover { background: var(--bg); }
.menu a[aria-current=page] { background: var(--accent-soft); color: var(--accent-deep); }
.menu a[aria-current=page] svg { color: var(--accent); }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 800 11px/20px var(--sans); font-style: normal; text-align: center; }
.side-out { margin-top: 12px; }
@media (min-width: 960px) {
  .shell { grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
  .menu { position: sticky; top: 16px; }
}
/* phones and tablets: the menu is a row of chips that scrolls sideways */
@media (max-width: 959px) {
  .menu { position: sticky; top: 0; z-index: 5; flex-direction: row; align-items: center; gap: 6px; overflow-x: auto; padding: 8px; border-radius: 18px; }
  .side-who { display: none; }
  .menu a { flex: none; padding: 9px 12px; }
  .side-out { flex: none; margin: 0 0 0 auto; }
}
/* the events list sits beside the event only where there is room next to the menu */
@media (min-width: 960px) and (max-width: 1239px) {
  .panes .layout { grid-template-columns: minmax(0, 1fr); }
  .panes .layout > aside { position: static; }
}
@media (min-width: 1240px) { .panes .layout { grid-template-columns: 290px minmax(0, 1fr); } }

/* packages and add-ons to apply for */
.pkg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pkg-head .switch { margin: 0 0 16px; }
.pkg-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pkg { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--bg); }
.pkg.popular { border-color: var(--accent); }
.pkg.current { border-color: var(--sage); }
.pkg .tag { position: absolute; top: -10px; right: 14px; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 800 10px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.pkg.current .tag { background: var(--sage); }
.pkg h3 { margin: 0; font-size: 18px; }
.pkg .for { margin: 0; color: var(--muted); font-size: 13px; }
.pkg .price { margin: 6px 0 4px; font: 800 22px/1.1 var(--sans); color: var(--accent-deep); }
.pkg .price small { font-size: 13px; color: var(--muted); }
.pkg ul { margin: 0 0 10px; padding: 0; list-style: none; font-size: 13px; }
.pkg li { padding: 3px 0 3px 18px; position: relative; }
.pkg li::before { content: ""; position: absolute; left: 1px; top: 8px; width: 9px; height: 5px; border-left: 2px solid var(--sage); border-bottom: 2px solid var(--sage); transform: rotate(-45deg); }
.pkg .btn { margin-top: auto; }
.pkg a.more { font-size: 13px; font-weight: 800; }
.apply { border: 2px solid var(--accent); }
.req-line { display: block; margin-top: 2px; }
/* ---------------- top bar on the public pages (landing, guest page, guide, login) ---------------- */
.kn-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; max-width: 1120px; margin: 0 auto; padding: 14px 16px 0; }
.kn-home { display: inline-flex; align-items: center; gap: 8px; font: 800 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.kn-home svg { width: 22px; height: 22px; flex: none; }
.kn-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.kn-links a { padding: 8px 12px; border-radius: 999px; font: 700 14px/1 var(--sans); color: var(--ink); text-decoration: none; }
.kn-links a:hover, .kn-links a[aria-current=page] { background: var(--accent-soft); color: var(--accent-deep); }
.kn-links .kn-labs { border: 1.5px solid var(--line); margin-left: 4px; }
/* guests on an event page only get the way home; logged-in organisers have the sidebar instead */
body:not(.landing) .kn-bar[data-guest-hide] .kn-more { display: none; }
body.in-app .kn-bar { display: none; }
body:not(.in-app) .adm-head .brand { display: none; }
@media (max-width: 520px) { .kn-links a { padding: 7px 9px; font-size: 13px; } }

/* the short guide on the landing page */
.guide-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.guide-card h3 { margin: 0 0 8px; font-size: 20px; }
.guide-card ol { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: 15px; }
.guide-card li { margin: 0 0 6px; }
#panduan { scroll-margin-top: 8px; }
/* the admin guide in the member area */
.admin-guide h3 { margin: 18px 0 6px; font-size: 18px; }
.admin-guide h3:first-of-type { margin-top: 6px; }
.admin-guide ul, .admin-guide ol { margin: 0 0 8px; padding-left: 20px; font-size: 14px; }
.admin-guide li { margin: 0 0 5px; }
.admin-guide .ev-tools { margin-top: 10px; }

/* ---------------- guide (panduan.html) ---------------- */
body.guide .wrap { max-width: 860px; }
.guide-tabs { margin: 22px auto 0; }
.guide-tabs a { border-radius: 999px; padding: 11px 18px; font: 800 14px/1 var(--sans); color: var(--muted); text-decoration: none; }
.guide-tabs a:hover { background: var(--accent); color: var(--accent-ink); }
.guide-part { padding-top: 24px; scroll-margin-top: 8px; }
.guide-part + .guide-part { margin-top: 24px; border-top: 1px dashed var(--line); }
.guide-steps { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: step; }
.guide-steps > li { position: relative; padding-left: 74px; counter-increment: step; }
.guide-steps > li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--honey)); color: var(--accent-ink); font: 800 17px/1 var(--sans); }
.guide-steps h3 { margin: 6px 0 6px; font-size: 20px; }
.guide-steps p { margin: 0 0 10px; }
.guide-steps .tip { padding: 10px 14px; border-radius: 12px; background: var(--honey-soft); font-size: 14px; }
.guide-list { margin: 0 0 6px; padding-left: 18px; }
.guide-list li { margin: 0 0 6px; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 4px 0 12px; }
.guide-table th, .guide-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-top: 1px solid var(--line); }
.guide-table th { color: var(--muted); font-weight: 800; border-top: 0; }
.guide-table td:nth-child(2) { white-space: nowrap; font-weight: 800; color: var(--accent-deep); }
.guide-faq-title { margin: 26px 0 10px; font-size: 22px; }
.guide-faq details { padding: 14px 18px; margin-bottom: 10px; }
.guide-faq summary { cursor: pointer; font-weight: 800; }
.guide-faq p { margin: 10px 0 0; color: var(--muted); }
.guide-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 22px 0 0; }
@media (max-width: 520px) {
  .guide-steps > li { padding-left: 22px; padding-top: 66px; }
  .guide-steps > li::before { top: 18px; left: 22px; }
  .guide-table td:nth-child(2) { white-space: normal; }
}
/* suspensions: the account banner and the event's remark */
.susp-bar { max-width: 1120px; padding: 14px 18px; border: 1.5px solid color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 8%, var(--card)); color: var(--ink); font-weight: 700; font-size: 14px; }
.susp-box { border: 1.5px solid color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 6%, var(--bg)); }
.susp-box > b { color: var(--bad); }
#suspTools { margin-top: -4px; }
/* the conversation about a suspension: the PIC's messages and the admin's replies */
.msg-row { margin: 0 0 8px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); max-width: 560px; }
.msg-row.from-admin { margin-left: auto; background: var(--sage-soft); border-color: color-mix(in srgb, var(--sage) 40%, var(--line)); }
.msg-row b { font-size: 14px; }
.msg-row p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
#suspAppeals, .thread { display: flex; flex-direction: column; margin: 6px 0 10px; }
.susp-item { grid-template-columns: minmax(0, 1fr) auto; }
.reply-box { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 4px 0; }
.reply-box textarea { flex: 1 1 240px; min-height: 0; }

/* how to pay: manual (bank details, QR, proof) or the gateway */
.pay-choice { margin: 4px 0 14px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 16px; background: var(--card); }
.pay-choice .type-opts { margin-bottom: 10px; }
.pay-title { margin: 0 0 8px; font-weight: 800; font-size: 14px; }
.pay-manual .pay-to { margin-top: 0; }
.pay-qr { display: block; width: 180px; max-width: 100%; margin: 10px 0; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.proof-pick { display: grid; gap: 6px; margin: 10px 0 4px; font-size: 14px; font-weight: 700; }
.proof-pick input { font: inherit; font-size: 13px; }
.price-line { margin: 0 0 12px; font: 800 18px/1.2 var(--sans); color: var(--accent-deep); }
.req small.held-in { color: var(--bad); font-weight: 800; }
.invite-note, .customer-note { padding: 10px 14px; border-radius: 12px; background: var(--sage-soft); color: var(--ink) !important; font-weight: 700; }
.cust-add { flex-wrap: wrap; margin-top: 10px; }
.cust-add input { flex: 1 1 160px; }
.qr-set img { width: 160px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: block; margin-bottom: 8px; }
.set-toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 14px; font-size: 14px; font-weight: 800; cursor: pointer; }
.set-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.set-toggle i { width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.set-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.set-toggle input:checked + i { background: var(--sage); }
.set-toggle input:checked + i::after { transform: translateX(18px); }
.set-toggle input:focus-visible + i { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }

/* Unlimited Event Pass credits, on the events page */
.credit-bar { max-width: 1120px; padding: 14px 18px; border: 1.5px solid color-mix(in srgb, var(--sage) 55%, var(--line)); background: linear-gradient(135deg, var(--card), var(--sage-soft)); font-weight: 700; font-size: 14px; }
/* display moderation: shown only while the event's screen shows approved submissions (#detail.approving) */
.show-mode { margin: 6px 0 10px; }
#detail:not(.approving) .approve-only { display: none !important; }
.approve-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: var(--honey-soft); font-size: 14px; font-weight: 700; }
.tile .state { align-self: flex-start; margin: 0; }
.pill.waiting { background: var(--honey-soft); color: #9a6418; }
.tile.waiting { box-shadow: 0 0 0 2px var(--honey); }
/* the super admin logged in as an organiser, and the users list */
.acting-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 16px; padding: 12px 16px; border-radius: 18px; border: 2px solid var(--honey); background: var(--honey-soft); font-weight: 700; font-size: 14px; }
#userSearch { max-width: 280px; margin: 0 0 16px; }
.user-table td:last-child { text-align: right; }
.user-table .muted { color: var(--muted); }
/* per-guest limits: the organiser's setting and what a guest sees */
.guest-limits { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.guest-limits .sub { margin-top: 0; }
.guest-limits input { width: 120px; }
.card .hint.guest-quota { margin: 4px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--honey-soft); color: var(--ink); font-size: 14px; }
@media (max-width: 560px) { .req { grid-template-columns: minmax(0, 1fr); } }
.req.closed-req { opacity: .75; }
.req-note { display: block; font-style: italic; }

/* account */
.acct { max-width: 680px; }
.acct-info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 10px 0 18px; font-size: 14px; }
.acct-info dt { color: var(--muted); font-weight: 700; }
.acct-info dd { margin: 0; overflow-wrap: anywhere; }
.type-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.type-opts small { font-size: 12px; }

/* the "own logo" add-on: the organiser's logo instead of FHX branding */
body.no-brand .kn-bar, body.no-brand main > footer { display: none; }
.event-logo { display: block; max-width: min(260px, 70vw); max-height: 110px; margin: 0 auto 12px; object-fit: contain; }
.logo-preview { display: block; max-width: 220px; max-height: 110px; margin: 4px 0 12px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; object-fit: contain; }
