.ticket-page {
    position: relative;
    isolation: isolate;
    /* Bulatan dekoratif boleh keluar tepi kartu, tetapi tidak membuat halaman bisa digeser ke samping. */
    overflow-x: clip;
    min-height: 58vh;
    padding: clamp(.25rem, 1.5vw, 1rem) 0 2rem;
}

.ticket-orb {
    position: absolute;
    z-index: -1;
    width: 220px;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(3px);
    pointer-events: none;
    animation: ticket-orb-float 8s ease-in-out infinite alternate;
}

.ticket-orb.is-one {
    top: 4%;
    right: -8%;
    background: rgba(216, 162, 162, .22);
}

.ticket-orb.is-two {
    bottom: 4%;
    left: -10%;
    width: 180px;
    background: rgba(142, 166, 107, .18);
    animation-delay: -3s;
}

.ticket-confirmation {
    display: grid;
    place-items: center;
}

.ticket-confirm-shell {
    width: min(100%, 760px);
    padding: clamp(1.25rem, 4vw, 2.6rem);
    border: 1px solid rgba(34, 57, 111, .12);
    border-radius: clamp(24px, 4vw, 36px);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 30px 70px -42px rgba(1, 7, 54, .55);
    text-align: center;
}

.ticket-success-mark {
    display: grid;
    width: 74px;
    aspect-ratio: 1;
    place-items: center;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(142, 166, 107, .16);
    color: #2d8659;
    font-size: 2.25rem;
    animation: ticket-success-pop .65s cubic-bezier(.2, .85, .25, 1.35) both;
}

.ticket-kicker,
.ticket-dashboard-type {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--fm-primary-600);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ticket-confirm-shell h1,
.ticket-track-hero h1 {
    margin: .6rem 0 .55rem;
    color: var(--fm-ink-strong);
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    letter-spacing: -.035em;
}

.ticket-lead {
    max-width: 620px;
    margin: 0 auto;
    color: var(--fm-muted);
    line-height: 1.75;
}

.ticket-pass {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: .35rem;
    margin: clamp(1.35rem, 3vw, 2rem) 0 1rem;
    padding: clamp(1.3rem, 3vw, 1.85rem);
    border-radius: 24px;
    background: linear-gradient(135deg, #010736 0%, #0d1c42 58%, #22396f 100%);
    box-shadow: 0 24px 48px -32px rgba(1, 7, 54, .85);
    color: #fff;
}

.ticket-pass::after {
    content: "";
    position: absolute;
    inset: auto 0 22%;
    border-top: 1px dashed rgba(255, 255, 255, .24);
}

.ticket-pass-label {
    position: relative;
    z-index: 1;
    color: #fcf1d0;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.ticket-pass strong {
    position: relative;
    z-index: 1;
    font-size: clamp(1.05rem, 4.5vw, 1.65rem);
    letter-spacing: .025em;
    overflow-wrap: anywhere;
}

.ticket-pass-name {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
    color: rgba(255, 255, 255, .7);
    font-size: .82rem;
}

.ticket-pass-cut {
    position: absolute;
    top: 72%;
    width: 28px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
}

.ticket-pass-cut.is-left { left: -14px; }
.ticket-pass-cut.is-right { right: -14px; }

.ticket-pass-shine {
    position: absolute;
    inset: -40% auto -40% -35%;
    width: 22%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
    transform: rotate(18deg);
    animation: ticket-shine 4.5s ease-in-out infinite;
}

.ticket-quick-actions,
.ticket-continue-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}

.ticket-reminder {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    margin: 1.25rem 0;
    padding: .9rem 1rem;
    border: 1px solid rgba(216, 162, 162, .32);
    border-radius: 16px;
    background: rgba(255, 220, 220, .34);
    color: var(--fm-ink);
    text-align: left;
}

.ticket-reminder i { color: #8e5f63; font-size: 1.2rem; }
.ticket-reminder p { margin: 0; font-size: .84rem; line-height: 1.6; }

.ticket-continue-form {
    flex-direction: column;
    align-items: center;
    padding-top: .15rem;
}

.ticket-confirm-check {
    display: inline-flex;
    gap: .6rem;
    align-items: center;
    color: var(--fm-muted);
    font-size: .83rem;
    cursor: pointer;
}

.ticket-confirm-check input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--fm-primary);
}

.ticket-track-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.35rem, 4vw, 2.5rem);
    border-radius: clamp(24px, 4vw, 34px);
    background: linear-gradient(135deg, #fff 0%, #fff9ee 52%, #ffeded 100%);
    border: 1px solid rgba(216, 162, 162, .22);
    box-shadow: 0 28px 58px -42px rgba(1, 7, 54, .48);
}

.ticket-track-hero::after {
    content: "";
    position: absolute;
    top: -110px;
    right: -60px;
    width: 300px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 50px solid rgba(216, 162, 162, .16);
}

.ticket-track-hero > * { position: relative; z-index: 1; }
.ticket-track-hero p { max-width: 660px; margin: 0; color: var(--fm-muted); line-height: 1.7; }

.ticket-hero-icon {
    display: grid;
    flex: 0 0 auto;
    width: clamp(72px, 10vw, 108px);
    aspect-ratio: 1;
    place-items: center;
    border-radius: 30px;
    background: #010736;
    color: #fcf1d0;
    box-shadow: 0 20px 34px -24px rgba(1, 7, 54, .8);
    font-size: clamp(2rem, 5vw, 3.2rem);
    transform: rotate(5deg);
    animation: ticket-icon-float 4s ease-in-out infinite;
}

.ticket-search-card {
    position: relative;
    z-index: 2;
    width: min(92%, 920px);
    margin: -1.25rem auto 1.75rem;
    padding: 1rem;
    border: 1px solid rgba(34, 57, 111, .12);
    border-radius: 20px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 22px 48px -34px rgba(1, 7, 54, .62);
}

.ticket-search-card > label {
    display: block;
    margin: 0 0 .5rem .25rem;
    color: var(--fm-ink-strong);
    font-size: .82rem;
    font-weight: 700;
}

.ticket-search-card > small {
    display: block;
    margin: .55rem .25rem 0;
    color: var(--fm-muted);
    font-size: .74rem;
}

.ticket-search-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 58px;
    padding: .35rem .4rem .35rem 1rem;
    border: 1px solid var(--fm-line);
    border-radius: 15px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.ticket-search-row:focus-within {
    border-color: var(--fm-primary);
    box-shadow: 0 0 0 4px rgba(34, 57, 111, .1);
}

.ticket-search-icon { color: var(--fm-primary-600); font-size: 1.25rem; }

.ticket-search-row input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--fm-ink-strong);
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.ticket-search-row input::placeholder { color: #98a2b3; font-weight: 400; text-transform: none; }

.ticket-dashboard {
    margin-bottom: 1.25rem;
    padding: clamp(1rem, 3vw, 1.6rem);
    border: 1px solid rgba(34, 57, 111, .12);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 60px -46px rgba(1, 7, 54, .6);
}

.ticket-dashboard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.ticket-dashboard-head h2 {
    margin: .2rem 0 .55rem;
    color: var(--fm-ink-strong);
    font-size: clamp(1.15rem, 3vw, 1.5rem);
}

.ticket-page .progress-track { height: 10px; background: #edf0f5; }
.ticket-page .progress-fill { position: relative; overflow: hidden; }

.ticket-page .progress-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .7rem;
}

.ticket-page .progress-step {
    min-height: 96px;
    padding: 0;
    border-radius: 16px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.ticket-page .progress-step:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -24px rgba(1, 7, 54, .65); }
.ticket-page .progress-step.is-current { animation: ticket-current-step 2.6s ease-in-out infinite; }
.ticket-page .progress-step strong { font-size: .82rem; }
.ticket-page .progress-step small { margin-top: .18rem; font-size: .73rem; }
.ticket-content-grid > * { min-width: 0; }
.ticket-next-form { overflow: visible; }
.ticket-page .doc-link > i:last-child { margin-left: auto; color: #98a2b3; font-size: .9rem; }

@keyframes ticket-success-pop {
    0% { opacity: 0; transform: scale(.55) rotate(-12deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes ticket-shine {
    0%, 45% { transform: translateX(0) rotate(18deg); }
    75%, 100% { transform: translateX(750%) rotate(18deg); }
}

@keyframes ticket-icon-float {
    0%, 100% { transform: translateY(0) rotate(5deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes ticket-orb-float {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(12px, -18px, 0) scale(1.08); }
}

@keyframes ticket-current-step {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 57, 111, .12); }
    50% { box-shadow: 0 0 0 6px rgba(34, 57, 111, .05); }
}

@media (max-width: 767.98px) {
    .ticket-track-hero { align-items: flex-start; }
    .ticket-hero-icon { width: 64px; border-radius: 20px; }
    .ticket-search-card { width: calc(100% - 1rem); }
    .ticket-page .progress-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .ticket-page .progress-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .ticket-confirm-shell { padding: 1.15rem; border-radius: 24px; }
    .ticket-pass { border-radius: 19px; }
    .ticket-quick-actions > * { flex: 1 1 0; }
    .ticket-track-hero { padding: 1.25rem; border-radius: 24px; }
    .ticket-hero-icon { display: none; }
    .ticket-search-card { margin-top: -.65rem; padding: .75rem; }
    .ticket-search-row { flex-wrap: wrap; padding: .7rem; }
    .ticket-search-row input { min-height: 38px; }
    .ticket-search-row .btn { width: 100%; }
    .ticket-dashboard-head { flex-direction: column; }
    .ticket-page .progress-steps { display: grid; grid-template-columns: 1fr; }
    .ticket-page .progress-steps.is-collapsible:not(.is-open) .progress-step:not(.is-current) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ticket-orb,
    .ticket-success-mark,
    .ticket-pass-shine,
    .ticket-hero-icon,
    .ticket-page .progress-step.is-current { animation: none !important; }
    .ticket-page .progress-step { transition: none; }
}

/* Area Peserta: buka dengan nomor tiket + PIN 6 digit. */
.ticket-unlock-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; align-items: end; gap: .85rem; }
.ticket-unlock-grid label { display: block; margin: 0 0 .5rem .25rem; color: var(--fm-ink-strong); font-size: .82rem; font-weight: 700; }
.ticket-search-row.is-pin { padding-right: .35rem; }
.ticket-search-row.is-pin input { letter-spacing: .3em; text-transform: none; }
.ticket-search-row .password-toggle { position: static; width: 44px; height: 44px; flex: 0 0 44px; }
.ticket-unlock-submit { min-height: 58px; border-radius: 15px; }
.ticket-unlock-error { display: flex; align-items: center; gap: .5rem; margin: .75rem .25rem 0; color: #b42318; font-size: .82rem; font-weight: 600; }

/* PIN pada kartu tiket konfirmasi (hanya tampil di sesi pembuat tiket). */
.ticket-pass-pin { position: relative; z-index: 1; display: inline-flex; align-items: baseline; gap: .65rem; justify-self: center; margin-top: .5rem; padding: .45rem .9rem; border-radius: 12px; background: #fcf1d0; color: #010736; }
.ticket-pass-pin small { color: #22396f; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ticket-pass .ticket-pass-pin strong { font-size: clamp(1.2rem, 5vw, 1.6rem); letter-spacing: .3em; }

@media (max-width: 767.98px) {
    .ticket-unlock-grid { grid-template-columns: minmax(0, 1fr); }
    .ticket-unlock-submit { width: 100%; }
}
