/* JAGRITI 2K27 – registration, ticket and admin pages.
   Loads after /css/tokens.css. Self-contained: does not import the home page styles. */

:root {
  --focus: #1a438a;
  --field-border: #7b8aa0;
  --danger-bg: #fff4f3;
  --amber-bg: #fff1d6;
  --amber-ink: #7a4300;
  --green-bg: #e3f6e6;
  --green-ink: #0d5c06;
  --grey-bg: #e8edf4;
  --grey-ink: #334155;
  --tri: linear-gradient(90deg, var(--saffron) 0 33.33%, #ffffff 33.33% 66.66%, var(--green) 66.66% 100%);
}

body.app {
  background: var(--surface-alt);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
}
body.app main { flex: 1 0 auto; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--saffron); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--saffron); color: var(--navy-950);
  padding: 10px 16px; border-radius: 0 0 10px 10px; font-weight: 700; text-decoration: none; transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }

/* ------------------------------------------------------------ header / footer */
.app-header { background: var(--navy-950); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 14px rgba(6, 15, 38, .35); }
.app-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.tri-bar { height: 4px; background: var(--tri); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.brand img { height: 36px; width: auto; }
.brand-text { font-family: var(--font-display); font-size: 1.7rem; letter-spacing: .06em; line-height: 1; white-space: nowrap; }
.brand-text b { color: var(--saffron); font-weight: 400; }
.header-links { display: flex; align-items: center; gap: 8px; }
.back-link {
  color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .35); display: inline-flex; align-items: center; gap: 6px; transition: background .2s, border-color .2s;
}
.back-link:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.app-footer { background: var(--navy-950); color: #c9d4ea; margin-top: 56px; font-size: .88rem; }
.app-footer::before { content: ''; display: block; height: 4px; background: var(--tri); }
.app-footer .inner { padding: 28px 16px; display: grid; gap: 6px; text-align: center; }
.app-footer strong { color: #fff; font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .08em; font-weight: 400; }
.app-footer a { color: var(--saffron); }
.app-footer p { margin: 0; }

/* ------------------------------------------------------------------- page hero */
.page-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1000px 340px at 85% 120%, rgba(255, 153, 51, .55), transparent 70%),
    radial-gradient(700px 300px at 0% 0%, rgba(41, 182, 246, .18), transparent 70%),
    linear-gradient(160deg, var(--navy-900), var(--navy-950));
  padding: 38px 0 96px;
}
.page-hero::after {
  content: ''; position: absolute; right: -90px; bottom: -150px; width: 380px; height: 380px; border-radius: 50%;
  border: 2px solid rgba(255, 153, 51, .45); box-shadow: 0 0 0 28px rgba(255, 153, 51, .08), 0 0 0 64px rgba(255, 153, 51, .05);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.eyebrow { font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: .78rem; color: var(--saffron); margin: 0 0 6px; }
.page-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.5rem, 7vw, 4.4rem); line-height: 1; letter-spacing: .03em; margin: 0 0 10px; }
.page-hero h1 span { color: var(--saffron); }
.page-hero p.lead { margin: 0 0 18px; color: #d7e0f2; max-width: 56ch; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.info-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: .84rem; font-weight: 600;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
}
.info-chip svg { width: 15px; height: 15px; flex: none; color: var(--saffron); }
.test-badge {
  display: inline-flex; align-items: center; gap: 6px; background: repeating-linear-gradient(-45deg, #ffd23f 0 10px, #f2b705 10px 20px);
  color: #2a1d00; font-weight: 800; letter-spacing: .1em; font-size: .75rem; text-transform: uppercase; padding: 6px 12px;
  border-radius: 8px; border: 2px solid #2a1d00;
}

/* ------------------------------------------------------------------ layout */
.reg-layout { display: grid; gap: 24px; margin-top: -64px; position: relative; z-index: 2; align-items: start; }
@media (min-width: 980px) { .reg-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; } }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 18px; }
@media (min-width: 640px) { .card { padding: 32px 36px; border-radius: var(--radius-lg); } }
.card h2 { font-family: var(--font-display); font-weight: 400; font-size: 2rem; letter-spacing: .04em; margin: 0 0 4px; color: var(--navy-900); line-height: 1.1; }
.card h2:focus { outline: none; }
.card .sub { color: var(--ink-soft); margin: 0 0 22px; font-size: .95rem; }

.aside-card { display: grid; gap: 18px; }
.aside-card h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: .05em; font-size: 1.5rem; margin: 0; color: var(--navy-900); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; font-size: .92rem; }
.facts .ico { width: 34px; height: 34px; border-radius: 10px; background: #fff1de; color: var(--saffron-600); display: grid; place-items: center; }
.facts .ico svg { width: 18px; height: 18px; }
.facts strong { display: block; color: var(--navy-900); line-height: 1.3; }
.facts span.t { color: var(--ink-soft); font-size: .86rem; }
.aside-card hr { border: 0; border-top: 1px dashed var(--line); margin: 0; }
.kit-list { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: .88rem; display: grid; gap: 3px; }

/* ------------------------------------------------------------ spots banner */
.spots { display: grid; gap: 8px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 20px; }
.spots-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-800); }
.spots-head .live { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: .75rem; }
.spots-head .live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green-400); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 179, 68, .6); } 70% { box-shadow: 0 0 0 8px rgba(47, 179, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 179, 68, 0); } }
.spots-grid { display: grid; gap: 10px; }
@media (min-width: 520px) { .spots-grid { grid-template-columns: 1fr 1fr; gap: 18px; } }
.spot .row { display: flex; justify-content: space-between; font-size: .88rem; gap: 8px; }
.spot .row b { color: var(--navy-900); }
.meter { height: 8px; background: #dbe3ef; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.meter > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--saffron), var(--green)); border-radius: 99px; transition: width .8s var(--ease); }
.spot.mine { outline: 2px solid var(--saffron); outline-offset: 5px; border-radius: 6px; }
.spot.full .meter > i { background: var(--danger); }

/* ------------------------------------------------------------------ stepper */
.stepper { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: s; }
.stepper li { position: relative; text-align: center; }
.stepper li::before { /* connector */
  content: ''; position: absolute; top: 19px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0;
}
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: var(--saffron); }
.step-btn {
  position: relative; z-index: 1; background: none; border: 0; padding: 0 2px; font: inherit; color: var(--ink-soft); cursor: default;
  display: grid; justify-items: center; gap: 6px; width: 100%;
}
.step-btn:disabled { cursor: default; }
.step-btn:not(:disabled) { cursor: pointer; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #fff;
  border: 3px solid var(--line); color: var(--ink-soft); transition: all .25s var(--ease);
}
.step-label { font-size: .76rem; font-weight: 600; line-height: 1.2; }
@media (min-width: 560px) { .step-label { font-size: .88rem; } }
.stepper li.current .step-num { background: var(--saffron); border-color: var(--saffron); color: var(--navy-950); box-shadow: 0 0 0 5px rgba(255, 153, 51, .25); }
.stepper li.current .step-label { color: var(--navy-900); }
.stepper li.done .step-num { background: var(--green); border-color: var(--green); color: #fff; font-size: 0; }
.stepper li.done .step-num::after { content: '✓'; font-size: 1.1rem; }
.stepper li.done .step-label { color: var(--navy-800); }

/* --------------------------------------------------------------------- form */
.step-section { animation: fadeUp .35s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.form-grid { display: grid; gap: 18px 20px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field > label, .field > legend, legend.lbl { font-weight: 600; font-size: .92rem; color: var(--navy-900); padding: 0; }
fieldset.field > legend { margin-bottom: 8px; }
fieldset.field { display: block; }
fieldset.field > * + * { margin-top: 6px; }
.req { color: var(--danger); margin-left: 2px; }
.opt { color: var(--ink-soft); font-weight: 400; font-size: .82rem; margin-left: 4px; }
.hint { margin: 0; color: var(--ink-soft); font-size: .82rem; line-height: 1.4; }
.err { margin: 0; color: var(--danger); font-size: .84rem; font-weight: 600; line-height: 1.35; }
.err:empty { display: none; }
.err::before { content: '! '; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 4px; background: var(--danger); color: #fff; border-radius: 50%; font-size: .75rem; line-height: 16px; text-align: center; vertical-align: 1px; }

.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=date], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm); padding: 12px 14px; min-height: 48px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230b1f44' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--navy-700); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(26, 67, 138, .22); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); background: var(--danger-bg); }
.field.has-error input:focus, .field.has-error select:focus, .field.has-error textarea:focus { box-shadow: 0 0 0 4px rgba(217, 48, 37, .2); }
.field.is-valid input:not(:placeholder-shown), .field.is-valid select { border-color: var(--green); }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix .pre { display: grid; place-items: center; padding: 0 12px; background: var(--grey-bg); border: 1.5px solid var(--field-border); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-weight: 600; color: var(--navy-900); }
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
.counter { text-align: right; font-size: .76rem; color: var(--ink-soft); margin: 0; }

/* radio chips + cards */
.choice-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-grid.cards { display: grid; gap: 10px; }
@media (min-width: 640px) { .choice-grid.cards { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.choice label {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 64px; min-height: 48px; padding: 10px 18px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--field-border); background: #fff; font-weight: 600; color: var(--navy-900); transition: all .18s var(--ease); text-align: center;
}
.choice:hover label { border-color: var(--navy-700); background: #f6f9ff; }
.choice input:checked + label { border-color: var(--navy-900); background: var(--navy-900); color: #fff; box-shadow: var(--shadow-sm); }
.choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice.opt label { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; text-align: left; padding: 14px 16px; height: 100%; }
.choice.opt .ct { font-weight: 700; }
.choice.opt .cs { font-weight: 400; font-size: .8rem; opacity: .85; line-height: 1.3; }
.choice input:checked + label .cs { opacity: .9; }
.choice input:checked + label::after { content: ''; }
.field.has-error .choice label { border-color: var(--danger); }
.size-guide { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; color: var(--ink-soft); background: var(--surface-alt); border-radius: var(--radius-sm); padding: 8px 12px; }
.size-guide svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--navy-700); }

.note { border-radius: var(--radius-sm); padding: 10px 14px; font-size: .86rem; background: #eaf3ff; color: var(--navy-800); border: 1px solid #c4dbff; margin: 0; }
.cond { animation: fadeUp .3s var(--ease); }

/* alerts */
.alert { display: grid; grid-template-columns: 22px 1fr; gap: 10px; border-radius: var(--radius-sm); padding: 14px 16px; font-size: .92rem; border: 1.5px solid; margin: 0 0 18px; }
.alert svg { width: 22px; height: 22px; margin-top: 1px; }
.alert .body > :first-child { margin-top: 0; }
.alert .body > :last-child { margin-bottom: 0; }
.alert p { margin: 0 0 6px; }
.alert.error { background: var(--danger-bg); border-color: #f1a9a4; color: #7f1710; }
.alert.warn { background: var(--amber-bg); border-color: #f2c26b; color: var(--amber-ink); }
.alert.info { background: #eaf3ff; border-color: #b7d3ff; color: #12326b; }
.alert.ok { background: var(--green-bg); border-color: #9fd9a6; color: var(--green-ink); }
.alert a { color: inherit; font-weight: 700; }
.alert .linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; text-decoration: underline; color: inherit; cursor: pointer; }

/* nav buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 26px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s; line-height: 1.2;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled=true] { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--saffron); color: var(--navy-950); box-shadow: 0 8px 20px rgba(242, 127, 12, .32); }
.btn-primary:hover:not(:disabled) { background: var(--saffron-600); transform: translateY(-1px); }
.btn-navy { background: var(--navy-900); color: #fff; }
.btn-navy:hover:not(:disabled) { background: var(--navy-700); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover:not(:disabled) { background: #0d6e05; }
.btn-ghost { background: #fff; color: var(--navy-900); border-color: var(--field-border); }
.btn-ghost:hover:not(:disabled) { border-color: var(--navy-900); background: #f6f9ff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 38px; padding: 6px 16px; font-size: .86rem; }
.btn-lg { min-height: 58px; font-size: 1.1rem; padding-inline: 34px; }
.btn-block { width: 100%; }
.step-actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 28px; flex-wrap: wrap; }
.step-actions .right { margin-left: auto; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(11, 31, 68, .25); border-top-color: var(--navy-950); animation: spin .8s linear infinite; }
.btn-navy .spinner, .btn-green .spinner, .btn-danger .spinner { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* honeypot – off-screen, not display:none (bots fill it) */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ review */
.summary { display: grid; gap: 16px; margin-bottom: 22px; }
@media (min-width: 760px) { .summary { grid-template-columns: 1fr 1fr; } }
.sum-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.sum-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sum-head h3 { margin: 0; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-700); }
.link-btn { background: none; border: 0; font: inherit; font-weight: 700; font-size: .84rem; color: var(--navy-700); text-decoration: underline; cursor: pointer; padding: 4px 6px; }
.sum-card dl { margin: 0; display: grid; gap: 6px; }
.sum-card dl > div { display: grid; grid-template-columns: 112px 1fr; gap: 8px; font-size: .9rem; }
.sum-card dt { color: var(--ink-soft); }
.sum-card dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.fee-card {
  display: grid; gap: 12px; padding: 18px 20px; border-radius: var(--radius); margin-bottom: 20px; color: #fff;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
}
.fee-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fee-top .cat { display: grid; gap: 4px; }
.fee-top .cat small { color: #bcd0f5; letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; font-weight: 700; }
.cat-chip { display: inline-block; background: var(--saffron); color: var(--navy-950); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; border-radius: 99px; padding: 3px 14px; font-size: .95rem; width: fit-content; }
.fee-amount { font-family: var(--font-display); font-size: 3rem; line-height: 1; letter-spacing: .03em; text-align: right; }
.fee-amount small { display: block; font-family: var(--font-body); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #bcd0f5; font-weight: 700; }
.fee-inc { margin: 0; font-size: .84rem; color: #d7e0f2; border-top: 1px dashed rgba(255, 255, 255, .3); padding-top: 10px; }
.consent { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-alt); border: 1.5px solid var(--line); }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--navy-900); }
.consent label { font-size: .9rem; line-height: 1.5; cursor: pointer; }
.field.has-error .consent { border-color: var(--danger); background: var(--danger-bg); }
.pay-area { display: grid; gap: 12px; margin-top: 22px; }
.pay-area .secure { text-align: center; font-size: .8rem; color: var(--ink-soft); margin: 0; }

/* success */
.success { text-align: center; display: grid; gap: 14px; justify-items: center; animation: fadeUp .45s var(--ease); }
.success .tick { width: 84px; height: 84px; border-radius: 50%; background: var(--green-bg); display: grid; place-items: center; }
.success .tick svg { width: 46px; height: 46px; color: var(--green); }
.success h2 { font-size: 2.6rem; }
.reg-id-box { background: var(--navy-900); color: #fff; border-radius: var(--radius); padding: 14px 28px; display: grid; gap: 2px; }
.reg-id-box small { letter-spacing: .16em; text-transform: uppercase; font-size: .75rem; color: #bcd0f5; font-weight: 700; }
.reg-id-box b { font-family: var(--font-display); font-size: 2.4rem; letter-spacing: .1em; font-weight: 400; line-height: 1.1; }
.next-list { text-align: left; max-width: 520px; width: 100%; margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: n; }
.next-list li { counter-increment: n; display: grid; grid-template-columns: 30px 1fr; gap: 12px; font-size: .94rem; }
.next-list li::before { content: counter(n); width: 28px; height: 28px; border-radius: 50%; background: var(--saffron); color: var(--navy-950); font-weight: 800; display: grid; place-items: center; font-size: .85rem; }

/* ----------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 99px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.b-paid { background: var(--green-bg); color: var(--green-ink); }
.b-pre { background: var(--amber-bg); color: var(--amber-ink); }
.b-pending { background: var(--grey-bg); color: var(--grey-ink); }
.b-failed { background: #fde4e2; color: #8a1912; }

/* ================================================================= TICKET */
.ticket-main { padding: 36px 0 0; }
.ticket-wrap { max-width: 820px; margin: 0 auto; display: grid; gap: 22px; }
.ticket-title { text-align: center; }
.ticket-title h1 { font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; font-size: clamp(2rem, 6vw, 3rem); margin: 0; color: var(--navy-900); line-height: 1.1; }
.ticket-title p { margin: 4px 0 0; color: var(--ink-soft); }
.pass { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; position: relative; border: 1px solid var(--line); animation: fadeUp .5s var(--ease); }
.pass-top {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-950)); color: #fff; padding: 18px 22px 20px; position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap;
}
.pass-top::after { content: ''; position: absolute; right: -50px; top: -80px; width: 220px; height: 220px; border-radius: 50%; border: 2px solid rgba(255, 153, 51, .5); box-shadow: 0 0 0 18px rgba(255, 153, 51, .1); }
.pass-top > * { position: relative; z-index: 1; }
.pass-brand { font-family: var(--font-display); font-size: 2.2rem; letter-spacing: .06em; line-height: 1; }
.pass-brand b { color: var(--saffron); font-weight: 400; }
.pass-brand small { display: block; font-family: var(--font-body); font-size: .75rem; letter-spacing: .2em; color: #bcd0f5; font-weight: 600; margin-top: 4px; }
.pass-tri { height: 6px; background: var(--tri); }
.pass-body { display: grid; }
@media (min-width: 640px) { .pass-body { grid-template-columns: 250px 1fr; } }
.bib-block { background: var(--saffron); color: var(--navy-950); padding: 20px; display: grid; place-content: center; text-align: center; min-height: 170px; }
.bib-block small { letter-spacing: .3em; font-weight: 800; font-size: .8rem; }
.bib-number { font-family: var(--font-display); font-size: 6.4rem; line-height: .95; letter-spacing: .02em; }
.bib-block.nobib { background: repeating-linear-gradient(-45deg, #fff4e3 0 14px, #ffeacb 14px 28px); }
.bib-block.nobib .bib-number { font-size: 1.9rem; letter-spacing: .04em; line-height: 1.15; max-width: 12ch; margin-inline: auto; }
.runner { padding: 22px 24px; display: grid; gap: 8px; align-content: center; min-width: 0; }
.runner .name { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 3.1rem); line-height: 1; letter-spacing: .03em; color: var(--navy-900); margin: 0; overflow-wrap: anywhere; }
.runner .college { margin: 0; color: var(--ink-soft); font-weight: 500; }
.runner .tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.cat-pill { background: var(--navy-900); color: #fff; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .82rem; padding: 3px 14px; border-radius: 99px; }
.pass-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .pass-grid { grid-template-columns: repeat(4, 1fr); } }
.pass-grid > div { padding: 14px 20px; border-bottom: 1px solid var(--line); min-width: 0; }
.pass-grid dt { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.pass-grid dd { margin: 2px 0 0; font-weight: 700; color: var(--navy-900); overflow-wrap: anywhere; font-size: .95rem; }
.pass-grid .wide, .pass-grid .wide2 { grid-column: 1 / -1; }
@media (min-width: 640px) { .pass-grid .wide2 { grid-column: span 2; } }
.perforation { position: relative; border-top: 3px dashed #c3cde0; margin: 0 22px; }
.perforation::before, .perforation::after { content: ''; position: absolute; top: -15px; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--line); }
.perforation::before { left: -36px; }
.perforation::after { right: -36px; }
.stub { padding: 18px 22px 22px; display: grid; gap: 10px; justify-items: center; }
.barcode { display: flex; align-items: stretch; height: 64px; gap: 0; max-width: 100%; overflow: hidden; }
.barcode i { display: block; background: var(--navy-950); height: 100%; }
.barcode i.gap { background: transparent; }
.stub .code { font-family: 'Courier New', monospace; letter-spacing: .5em; font-size: .92rem; font-weight: 700; color: var(--navy-900); }
.stub .hint { text-align: center; }
.status-note { border-radius: var(--radius-sm); padding: 12px 16px; font-size: .92rem; border: 1.5px solid; }
.status-note.b-pre { border-color: #f2c26b; }
.status-note.b-pending { border-color: #c4cfdf; }
.status-note.b-paid { border-color: #9fd9a6; }
.status-note::before { display: none; }
.status-note p { margin: 0; }
.status-note a { font-weight: 700; color: inherit; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.carry { background: #fff; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.carry h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: .05em; font-size: 1.7rem; margin: 0 0 10px; color: var(--navy-900); }
.carry ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 640px) { .carry ul { grid-template-columns: 1fr 1fr; } }
.carry li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .94rem; align-items: start; }
.carry li::before { content: ''; width: 20px; height: 20px; border: 2px solid var(--navy-700); border-radius: 5px; margin-top: 3px; }
.state-card { text-align: center; max-width: 560px; margin: 0 auto; display: grid; gap: 12px; justify-items: center; padding: 38px 24px; }
.state-card h1 { font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; letter-spacing: .04em; margin: 0; color: var(--navy-900); }
.state-card p { margin: 0; color: var(--ink-soft); }
.state-card .ill { width: 78px; height: 78px; border-radius: 50%; background: #fff1de; color: var(--saffron-600); display: grid; place-items: center; }
.state-card .ill svg { width: 40px; height: 40px; }
.skeleton { background: linear-gradient(100deg, #e8edf4 30%, #f6f8fc 50%, #e8edf4 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-lg); height: 420px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* =================================================================== ADMIN */
.admin-main { padding: 28px 0 0; }
.admin-main .container { max-width: 1360px; }
.login-card { max-width: 420px; margin: 48px auto 0; display: grid; gap: 16px; }
.login-card h1 { font-family: var(--font-display); font-weight: 400; letter-spacing: .05em; font-size: 2.2rem; margin: 0; color: var(--navy-900); }
.admin-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.admin-top h1 { font-family: var(--font-display); font-weight: 400; letter-spacing: .05em; font-size: 2.4rem; margin: 0; color: var(--navy-900); line-height: 1; }
.admin-top .meta { color: var(--ink-soft); font-size: .84rem; }
.admin-top .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); border-top: 5px solid var(--navy-700); display: grid; gap: 2px; }
.kpi small { color: var(--ink-soft); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .75rem; }
.kpi b { font-family: var(--font-display); font-weight: 400; font-size: 2.6rem; line-height: 1.05; color: var(--navy-900); letter-spacing: .02em; }
.kpi span { font-size: .8rem; color: var(--ink-soft); }
.kpi.k-paid { border-top-color: var(--green); }
.kpi.k-pre { border-top-color: var(--saffron); }
.kpi.k-pending { border-top-color: #94a3b8; }
.kpi.k-rev { border-top-color: var(--sky); }
.panels { display: grid; gap: 14px; margin-bottom: 22px; }
@media (min-width: 900px) { .panels { grid-template-columns: repeat(3, 1fr); } }
.panel { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.panel h2 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-700); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.bars li { display: grid; grid-template-columns: 112px 1fr auto; gap: 10px; align-items: center; font-size: .86rem; }
.bars .lab { font-weight: 600; color: var(--navy-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .track { background: #e8edf4; border-radius: 99px; height: 10px; overflow: hidden; }
.bars .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-700), var(--sky)); border-radius: 99px; transition: width .6s var(--ease); }
.bars .track i.sf { background: linear-gradient(90deg, var(--saffron), var(--saffron-600)); }
.bars .track i.gr { background: linear-gradient(90deg, var(--green), var(--green-400)); }
.bars .val { text-align: right; white-space: nowrap; font-weight: 700; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.empty-small { color: var(--ink-soft); font-size: .86rem; margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.toolbar .field { min-width: 0; }
.toolbar .grow { flex: 1 1 260px; }
.toolbar .field input, .toolbar .field select { min-height: 44px; padding-block: 8px; }
.table-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.reg { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.reg th { text-align: left; background: var(--navy-900); color: #fff; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; padding: 11px 12px; white-space: nowrap; position: sticky; top: 0; }
table.reg td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.reg tbody tr:hover { background: #f6f9ff; }
table.reg .who { font-weight: 700; color: var(--navy-900); background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: rgba(26, 67, 138, .35); text-underline-offset: 3px; }
table.reg .who:hover { text-decoration-color: currentColor; }
table.reg .sub { display: block; color: var(--ink-soft); font-size: .78rem; overflow-wrap: anywhere; }
table.reg .mono { font-family: 'Courier New', monospace; font-weight: 700; white-space: nowrap; }
table.reg td.act { text-align: right; white-space: nowrap; }
.table-foot { padding: 10px 14px; color: var(--ink-soft); font-size: .82rem; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.empty-row { padding: 40px 16px; text-align: center; color: var(--ink-soft); }
@media (max-width: 760px) {
  table.reg thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.reg, table.reg tbody, table.reg tr, table.reg td { display: block; width: 100%; }
  table.reg tr { padding: 12px 14px; border-bottom: 8px solid var(--surface-alt); }
  table.reg td { border: 0; padding: 3px 0 3px 104px; position: relative; min-height: 24px; }
  table.reg td::before { content: attr(data-label); position: absolute; left: 0; top: 5px; color: var(--ink-soft); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
  table.reg td.act { text-align: left; padding-top: 8px; }
  table.reg td.act:empty { display: none; }
}

dialog { border: 0; border-radius: var(--radius); padding: 0; box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 32px)); color: var(--ink); }
dialog::backdrop { background: rgba(6, 15, 38, .62); }
dialog .dlg { padding: 24px; display: grid; gap: 14px; max-height: calc(100vh - 60px); overflow: auto; }
dialog h2 { margin: 0; font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; font-size: 1.9rem; color: var(--navy-900); }
dialog p { margin: 0; }
dialog .row-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
dialog dl { display: grid; gap: 6px; margin: 0; }
dialog dl > div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; font-size: .9rem; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
dialog dt { color: var(--ink-soft); }
dialog dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--navy-950); color: #fff; padding: 12px 20px; border-radius: 99px; box-shadow: var(--shadow); z-index: 90; font-weight: 600; font-size: .92rem; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--danger); }

.btn-reset { background: none; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; color: #fff; }
.login-card .sub { margin: 0; }
.login-card .alert p, #dash-error p { margin: 0; }
.login-card .step-actions { margin-top: 18px; }
.sum-actions { justify-content: center; }

/* ============================================================== PRINT */
@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; }
  .app-header, .app-footer, .no-print, .skip-link, .toast { display: none !important; }
  .ticket-main { padding: 0; }
  .pass { box-shadow: none; animation: none; border: 1.5px solid #333; break-inside: avoid; }
  .pass, .pass * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .perforation::before, .perforation::after { background: #fff; }
  .ticket-wrap { max-width: none; gap: 14px; }
  .carry { box-shadow: none; break-inside: avoid; }
}

.wide .container { max-width: 1360px; }
.brand img { height: 40px; width: auto; }
.brand.has-logo .brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Phone & touch polish (register, ticket, admin) ---------- */
.brand { flex: 0 1 auto; }
@media (max-width: 1020px), (pointer: coarse) {
  .brand, .back-link { min-height: 44px; }
  .app-footer a { display: inline-block; padding: 12px 6px; }
}
@media (max-width: 380px) {
  .app-header .container, .container.bar { padding-left: 14px; padding-right: 14px; }
  .back-link { padding: 8px 12px; }
}

/* date of birth: type it (DD/MM/YYYY) or tap the calendar. The native date input sits invisibly over the
   calendar icon, so tapping the icon opens the phone's own date picker on every browser. */
.dob-wrap { position: relative; display: flex; gap: 8px; align-items: stretch; }
.dob-wrap > input[type=text] { flex: 1; min-width: 0; }
.dob-cal { position: relative; flex: none; display: grid; place-items: center; width: 52px; min-height: 48px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface-alt); color: var(--navy-900); cursor: pointer; }
.dob-cal:hover, .dob-cal:focus-within { border-color: var(--navy-700); }
.dob-cal:focus-within { box-shadow: 0 0 0 4px rgba(26, 67, 138, .22); }
.dob-cal svg { width: 22px; height: 22px; pointer-events: none; }
.dob-cal input[type=date] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; margin: 0; min-height: 0; }
.dob-cal input[type=date]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
#branch-other { margin-top: 8px; }
.wa-join { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 18px; background: #1fa855; border-color: #1fa855; color: #fff; }
.wa-join:hover { background: #178a45; border-color: #178a45; color: #fff; }

/* registration page: availability status per group (no seat counts) */
.spot .row { align-items: center; }
.spot .avail-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--navy-900); background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.spot .avail-pill i { width: 8px; height: 8px; border-radius: 50%; background: #1fa855; }
.spot .avail-pill[data-level="fast"] i { background: #f08a00; }
.spot .avail-pill[data-level="last"] i { background: #d93025; }
.spot .avail-pill[data-level="full"] i { background: #6b7280; }

/* ---------- race-day check-in ---------- */
.ci-main .container { max-width: 560px; }
.ci-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ci-top h1 { font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; color: var(--navy-900); margin: 0; }
.ci-totals { margin: 0; font-weight: 700; color: var(--navy-800); }
.ci-scan { display: grid; gap: 12px; }
.ci-camera { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.ci-camera[hidden], .ci-result[hidden] { display: none; }
.ci-camera video { display: block; width: 100%; max-height: 60vh; object-fit: cover; }
.ci-frame { position: absolute; inset: 18% 18%; border: 3px solid rgba(255, 255, 255, .9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); pointer-events: none; }
.ci-stop { position: absolute; right: 10px; bottom: 10px; background: #fff; }
.ci-or { text-align: center; margin: 0; color: var(--ink-soft); font-size: .9rem; }
.ci-form { display: flex; gap: 8px; }
.ci-form input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase; }
.ci-result { margin-top: 16px; border-top: 8px solid var(--line); }
.ci-result.is-busy { color: var(--ink-soft); }
.ci-result.is-ready { border-top-color: #1a438a; }
.ci-result.is-done { border-top-color: #1fa855; background: #effaf3; }
.ci-result.is-warn { border-top-color: #f08a00; background: #fff6eb; }
.ci-result.is-bad { border-top-color: #d93025; background: #fdeeed; }
.ci-status { margin: 0 0 6px; font-weight: 800; font-size: 1.15rem; }
.is-done .ci-status { color: #137a3c; } .is-warn .ci-status { color: #b36200; } .is-bad .ci-status { color: #b3261e; }
.ci-name { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--navy-900); line-height: 1.2; }
.ci-id { margin: 2px 0 12px; font-weight: 700; letter-spacing: .08em; color: var(--ink-soft); }
.ci-facts { display: grid; gap: 6px; margin: 0 0 16px; }
.ci-facts div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; font-size: .95rem; }
.ci-facts dt { color: var(--ink-soft); } .ci-facts dd { margin: 0; font-weight: 600; }
.ci-actions { display: grid; gap: 10px; }

/* admin: check-in volunteers dialog */
#vol-dlg .sub { margin: 0 0 14px; font-size: .9rem; color: var(--ink-soft); }
.vol-form { display: flex; gap: 8px; }
.vol-form input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; }
.vol-msg { min-height: 1.3em; margin: 8px 0; font-size: .88rem; color: #137a3c; }
.vol-msg.is-bad { color: #b3261e; }
.vol-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.vol-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.vol-info { display: grid; min-width: 0; }
.vol-info b { overflow-wrap: anywhere; }
.vol-info span { font-size: .8rem; color: var(--ink-soft); }
.vol-remove[data-confirm="1"] { border-color: #d93025; color: #b3261e; }
.vol-empty { color: var(--ink-soft); font-size: .9rem; }
.ci-who { margin: -6px 0 12px; font-size: .85rem; color: var(--ink-soft); overflow-wrap: anywhere; }
