/* Halaman publik SIPINTAR BPD (login, lupa/reset password, daftar hadir) */
:root {
    --navy: #1b1763;
    --navy-2: #2a2590;
    --accent: #5b55e0;
    --accent-soft: rgba(91, 85, 224, .14);
    --bg: #f3f4fa;
    --card: #ffffff;
    --text: #1d1b3a;
    --muted: #5d5f7a;
    --subtle: #8b8da6;
    --line: #e2e4f0;
    --input: #ffffff;
    --danger: #c0352b;
    --danger-bg: #fdecea;
    --success: #1f7a4d;
    --success-bg: #e6f6ee;
    --warning: #8a5a00;
    --warning-bg: #fff4dc;
    --surface: #f6f6fc;
    --shadow: 0 24px 60px -24px rgba(27, 23, 99, .28), 0 2px 6px rgba(27, 23, 99, .06);
    --wave-a: #1b1763;
    --wave-b: #5b55e0;
    --silhouette: rgba(91, 85, 224, .10);
}

@media (prefers-color-scheme: dark) {
    :root {
        --navy: #c9c6ff;
        --navy-2: #a9a4ff;
        --accent: #8f8aff;
        --accent-soft: rgba(143, 138, 255, .18);
        --bg: #0e0d1a;
        --card: #17162a;
        --text: #ecebfa;
        --muted: #a9a9c4;
        --subtle: #7f7f9c;
        --line: #2c2a47;
        --input: #1d1c33;
        --danger: #ff8a80;
        --danger-bg: rgba(255, 138, 128, .12);
        --success: #6fdca5;
        --success-bg: rgba(111, 220, 165, .12);
        --warning: #ffc96b;
        --warning-bg: rgba(255, 201, 107, .12);
        --surface: #1f1e36;
        --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
        --wave-a: #2a2590;
        --wave-b: #5b55e0;
        --silhouette: rgba(143, 138, 255, .07);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- Dekorasi latar ---------- */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 500px at 20% 10%, var(--accent-soft), transparent 70%),
        radial-gradient(700px 500px at 90% 90%, var(--accent-soft), transparent 70%);
}

.auth-bg svg {
    position: absolute;
}

.wave-tl {
    top: 0;
    left: 0;
    width: min(44vw, 620px);
}

.wave-br {
    right: 0;
    bottom: 0;
    width: min(40vw, 560px);
}

.silhouette {
    left: 0;
    bottom: 0;
    width: min(46vw, 640px);
    color: var(--silhouette);
}

/* ---------- Tata letak ---------- */
.auth {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(400px, 560px) minmax(0, 1fr);
    gap: 28px;
    align-items: stretch;
    max-width: 1480px;
    margin: 0 auto;
    padding: clamp(24px, 5vh, 56px) clamp(24px, 3.5vw, 56px);
}

/* ---------- Kartu form ---------- */
.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 40px clamp(28px, 4vw, 56px) 28px;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.brand img {
    width: 62px;
    height: auto;
    flex: none;
    filter: drop-shadow(0 3px 6px rgba(27, 23, 99, .14));
}

@media (prefers-color-scheme: dark) {
    .brand img {
        filter: none;
    }
}

.brand-divider {
    width: 1px;
    align-self: stretch;
    background: var(--line);
}

.brand-name {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--navy);
}

.heading {
    text-align: center;
    margin: 36px 0 30px;
}

.heading .greet {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--muted);
}

.heading h1 {
    margin: 2px 0 6px;
    font-size: clamp(38px, 3.6vw, 50px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--navy);
}

.heading .tagline {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--muted);
}

.heading-rule {
    position: relative;
    width: 72%;
    height: 1px;
    margin: 20px auto 0;
    background: var(--line);
}

.heading-rule::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -2px;
    width: 80px;
    height: 5px;
    border-radius: 99px;
    background: var(--accent);
    transform: translateX(-50%);
}

/* ---------- Field ---------- */
.field {
    margin-bottom: 18px;
}

.field label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.field label svg {
    width: 18px;
    height: 18px;
    color: var(--navy);
}

.control {
    position: relative;
}

.control input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.control input::placeholder {
    color: var(--subtle);
}

.control input:hover {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.control input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.control input[type="password"],
.control input.has-toggle {
    padding-right: 52px;
}

.toggle-pass {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
}

.toggle-pass:hover {
    background: var(--accent-soft);
    color: var(--navy);
}

.toggle-pass:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.toggle-pass svg {
    width: 20px;
    height: 20px;
}

.toggle-pass .eye-off,
.toggle-pass[aria-pressed="true"] .eye {
    display: none;
}

.toggle-pass[aria-pressed="true"] .eye-off {
    display: block;
}

.hint {
    margin: 6px 2px 0;
    font-size: 13px;
    color: var(--danger);
}

.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--danger);
    background: var(--danger-bg);
    border-radius: 12px;
}

.alert svg {
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 1px;
}

/* ---------- Tombol ---------- */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, box-shadow .15s, transform .05s;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 2px;
}

.btn-primary {
    margin-top: 26px;
    color: #fff;
    background: #1b1763;
    border: 0;
    box-shadow: 0 10px 22px -10px rgba(27, 23, 99, .7);
}

.btn-primary:hover {
    background: #2a2590;
}

.btn-primary[disabled] {
    cursor: progress;
    opacity: .85;
}

.btn-outline {
    margin-top: 14px;
    color: var(--navy);
    background: transparent;
    border: 1.5px solid var(--navy);
}

.btn-outline:hover {
    color: #fff;
    background: #1b1763;
    border-color: #1b1763;
}

@media (prefers-color-scheme: dark) {
    .btn-primary {
        background: #5b55e0;
        box-shadow: 0 10px 22px -10px rgba(91, 85, 224, .8);
    }

    .btn-primary:hover {
        background: #6d67f0;
    }

    .btn-outline:hover {
        background: #5b55e0;
        border-color: #5b55e0;
    }
}

.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.is-loading .spinner {
    display: block;
}

.is-loading .btn-icon {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.forgot {
    display: block;
    width: fit-content;
    margin: 18px auto 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.forgot:hover {
    text-decoration: underline;
}

.auth-footer {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.auth-footer span {
    white-space: nowrap;
}

/* ---------- Panel foto ---------- */
.showcase {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #1b1763;
    box-shadow: var(--shadow);
    min-height: 560px;
}

.slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity .9s ease;
}

.slide.is-active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 7s ease;
}

.slide.is-active img {
    transform: scale(1);
}

.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(14, 12, 60, 0) 45%, rgba(14, 12, 60, .55) 72%, rgba(14, 12, 60, .92) 100%);
}

.slide figcaption {
    position: absolute;
    z-index: 1;
    left: clamp(28px, 4vw, 48px);
    right: clamp(28px, 4vw, 48px);
    bottom: 92px;
    padding-left: 22px;
    color: #fff;
    border-left: 4px solid #7a74ff;
}

.slide figcaption strong {
    display: block;
    font-size: clamp(24px, 2.2vw, 32px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
}

.slide figcaption span {
    display: block;
    margin-top: 6px;
    font-size: clamp(15px, 1.2vw, 18px);
    color: rgba(255, 255, 255, .88);
}

.dots {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 34px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: width .3s, background .3s;
}

.dots button[aria-current="true"] {
    width: 28px;
    background: #7a74ff;
}

.dots button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ---------- Responsif ---------- */
@media (max-width: 1100px) {
    .auth {
        grid-template-columns: minmax(380px, 500px) minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .auth {
        grid-template-columns: 1fr;
        max-width: 560px;
        align-content: center;
        padding: 24px 16px;
    }

    .showcase {
        display: none;
    }

    .auth-card {
        padding: 32px 24px 24px;
    }

    .wave-tl {
        width: 70vw;
    }

    .wave-br {
        width: 64vw;
    }

    .silhouette {
        width: 90vw;
    }
}

@media (max-width: 420px) {
    .brand {
        gap: 14px;
    }

    .brand img {
        width: 52px;
    }

    .brand-name {
        font-size: 14px;
    }

    .heading {
        margin: 28px 0 24px;
    }

    .heading .greet {
        font-size: 20px;
    }

    .heading .tagline {
        font-size: 14px;
    }
}

/* Layar laptop yang pendek (mis. 1366x768, 1280x720): rapatkan jarak supaya tidak perlu scroll */
@media (min-width: 901px) and (max-height: 820px) {
    .auth {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .auth-card {
        padding: 24px clamp(28px, 4vw, 52px) 18px;
    }

    .brand img {
        width: 48px;
    }

    .brand-name {
        font-size: 14px;
    }

    .heading {
        margin: 18px 0 18px;
    }

    .heading .greet {
        font-size: 19px;
    }

    .heading h1 {
        font-size: clamp(32px, 3vw, 40px);
        margin-bottom: 2px;
    }

    .heading .tagline {
        font-size: 14px;
    }

    .heading-rule {
        margin-top: 14px;
    }

    .field {
        margin-bottom: 12px;
    }

    .field label {
        margin-bottom: 6px;
    }

    .control input,
    .btn {
        height: 46px;
    }

    .btn-primary {
        margin-top: 18px;
    }

    .btn-outline {
        margin-top: 10px;
    }

    .forgot {
        margin-top: 12px;
    }

    .auth-footer {
        margin-top: 14px;
        padding-top: 12px;
    }

    .showcase {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .slide,
    .slide img,
    .dots button {
        transition: none;
    }
}

/* =====================================================================
   Komponen tambahan untuk halaman publik lain
   ===================================================================== */

/* Judul halaman turunan (lupa / reset password, daftar hadir) */
.heading.is-page {
    margin: 30px 0 26px;
}

.heading .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 99px;
}

.heading .eyebrow svg {
    width: 14px;
    height: 14px;
}

.heading.is-page h1 {
    font-size: clamp(30px, 2.8vw, 38px);
}

.heading.is-page .tagline {
    max-width: 420px;
    margin: 0 auto;
    font-size: 15px;
}

/* Varian alert */
.alert-success {
    color: var(--success);
    background: var(--success-bg);
}

.alert-warning {
    color: var(--warning);
    background: var(--warning-bg);
}

/* Select dan teks bantuan */
.control select {
    width: 100%;
    height: 52px;
    padding: 0 44px 0 16px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8da6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.control select:invalid {
    color: var(--subtle);
}

.control select option {
    color: var(--text);
    background: var(--card);
}

.control select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.req {
    color: var(--danger);
}

.help {
    margin: 6px 2px 0;
    font-size: 13px;
    color: var(--muted);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid .photo-box {
    border-color: var(--danger);
}

/* Tautan kembali */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.back-link svg {
    width: 18px;
    height: 18px;
    transition: transform .15s;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

.back-wrap {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

/* Tombol sekunder lembut */
.btn-soft {
    color: var(--navy);
    background: var(--accent-soft);
    border: 0;
}

.btn-soft:hover {
    background: color-mix(in srgb, var(--accent) 24%, transparent);
}

/* Kekuatan password */
.strength {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.strength span {
    flex: 1;
    height: 5px;
    border-radius: 99px;
    background: var(--line);
    transition: background .2s;
}

.strength[data-level="1"] span:nth-child(-n+1) {
    background: #e5534b;
}

.strength[data-level="2"] span:nth-child(-n+2) {
    background: #f0a020;
}

.strength[data-level="3"] span:nth-child(-n+3) {
    background: #3aa76d;
}

.strength[data-level="4"] span {
    background: #1f8a57;
}

.strength-label {
    margin: 6px 2px 0;
    font-size: 13px;
    color: var(--muted);
}

/* Keadaan selesai (sukses) */
.result-state {
    text-align: center;
    padding: 10px 0 4px;
}

.result-state .result-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 50%;
    color: var(--success);
    background: var(--success-bg);
}

.result-state .result-icon svg {
    width: 38px;
    height: 38px;
}

.result-state h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: var(--navy);
}

.result-state p {
    max-width: 400px;
    margin: 0 auto;
    color: var(--muted);
}

.result-state .btn {
    margin-top: 24px;
}

/* =====================================================================
   Tata letak satu kolom (Daftar Hadir)
   ===================================================================== */
.auth.is-single {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
    align-content: center;
}

.auth.is-single .auth-card {
    justify-content: flex-start;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.auth.is-single .brand {
    justify-content: flex-start;
}

.card-top .back-link {
    font-size: 14px;
}

/* Langkah-langkah */
.steps {
    display: flex;
    gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--subtle);
    background: var(--surface);
    border-radius: 12px;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: 800;
    color: var(--subtle);
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: 50%;
}

.steps li.is-current {
    color: var(--navy);
    background: var(--accent-soft);
}

.steps li.is-current::before {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.steps li.is-done {
    color: var(--muted);
}

.steps li.is-done::before {
    content: "\2713";
    color: var(--success);
    border-color: var(--success);
}

/* Pemindai QR */
.scanner {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 24px;
    background: #0d0b2b;
}

.scanner #reader {
    width: 100%;
    height: 100%;
    border: 0 !important;
}

.scanner #reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.scanner #reader img[alt="Info icon"],
.scanner #reader #qr-shaded-region {
    display: none !important;
}

.scanner-frame {
    position: absolute;
    inset: 15%;
    pointer-events: none;
}

.scanner-frame::before,
.scanner-frame::after,
.scanner-frame span::before,
.scanner-frame span::after {
    content: "";
    position: absolute;
    width: 34px;
    height: 34px;
    border: 4px solid #fff;
}

.scanner-frame::before {
    top: 0;
    left: 0;
    border-right: 0;
    border-bottom: 0;
    border-top-left-radius: 14px;
}

.scanner-frame::after {
    top: 0;
    right: 0;
    border-left: 0;
    border-bottom: 0;
    border-top-right-radius: 14px;
}

.scanner-frame span::before {
    bottom: 0;
    left: 0;
    border-right: 0;
    border-top: 0;
    border-bottom-left-radius: 14px;
}

.scanner-frame span::after {
    bottom: 0;
    right: 0;
    border-left: 0;
    border-top: 0;
    border-bottom-right-radius: 14px;
}

.scanner-line {
    position: absolute;
    left: 18%;
    right: 18%;
    top: 18%;
    height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, transparent, #8f8aff, transparent);
    box-shadow: 0 0 16px #8f8aff;
    animation: scan 2.4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes scan {
    to {
        top: 82%;
    }
}

.scanner-overlay {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    color: #fff;
    background: rgba(13, 11, 43, .9);
}

.scanner.is-blocked .scanner-overlay,
.scanner.is-busy .scanner-overlay {
    display: flex;
}

.scanner.is-blocked .scanner-line,
.scanner.is-busy .scanner-line,
.scanner.is-blocked .scanner-frame {
    display: none;
}

.when-blocked,
.when-busy {
    display: grid;
    justify-items: center;
    gap: 12px;
}

.scanner .when-busy,
.scanner.is-busy .when-blocked {
    display: none;
}

.scanner.is-busy .when-busy {
    display: grid;
}

.scanner-overlay svg {
    width: 40px;
    height: 40px;
    opacity: .85;
}

.scanner-overlay strong {
    font-size: 16px;
}

.scanner-overlay p {
    margin: 0;
    max-width: 280px;
    font-size: 14px;
    color: rgba(255, 255, 255, .85);
}

.scanner-overlay .btn {
    width: auto;
    height: 42px;
    padding: 0 18px;
    font-size: 14px;
    color: #1b1763;
    background: #fff;
    border: 0;
}

.scanner-overlay .spinner {
    display: block;
    width: 34px;
    height: 34px;
    border-width: 3px;
}

.scan-hint {
    margin: 16px auto 0;
    max-width: 420px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

/* Info acara */
.event-card {
    margin-bottom: 26px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.event-card .event-label {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
}

.event-card h2 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--navy);
}

.event-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px 20px;
    margin: 0;
}

.event-meta > div {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.event-meta svg {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--accent);
}

.event-meta dt {
    font-size: 12px;
    font-weight: 600;
    color: var(--subtle);
}

.event-meta dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* Grid form */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

.form-grid .span-2 {
    grid-column: 1 / -1;
}

/* Foto kehadiran */
.photo-box {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    max-height: 340px;
    width: 100%;
    margin: 0 auto 12px;
    border: 2px dashed var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.photo-box.has-media {
    border-style: solid;
}

.photo-box video,
.photo-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-box video {
    transform: scaleX(-1);
}

.photo-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 16px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.photo-empty svg {
    width: 42px;
    height: 42px;
    color: var(--accent);
}

.photo-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.photo-actions .btn {
    height: 46px;
    margin: 0;
    font-size: 15px;
}

.photo-actions .span-2 {
    grid-column: 1 / -1;
}

.btn-capture {
    color: #fff;
    background: #1f8a57;
    border: 0;
}

.btn-capture:hover {
    background: #1a7549;
}

/* Pemberitahuan formulir tidak tersedia */
.notice {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 28px 20px;
    text-align: center;
    color: var(--warning);
    background: var(--warning-bg);
    border-radius: 18px;
}

.notice svg {
    width: 40px;
    height: 40px;
}

.notice h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
}

.notice p {
    margin: 0;
    color: var(--text);
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .steps li {
        flex-direction: column;
        gap: 6px;
        padding: 10px 6px;
        text-align: center;
        font-size: 12px;
    }

    .event-card {
        padding: 18px;
    }

    .card-top {
        justify-content: center;
    }

    .auth.is-single .brand {
        justify-content: center;
    }
}

@media (min-width: 901px) and (max-height: 820px) {
    .auth.is-single {
        align-content: start;
    }

    .heading.is-page {
        margin: 18px 0;
    }

    .control select {
        height: 46px;
    }
}

.field label .req {
    margin-left: -6px;
}

.photo-box {
    max-width: 520px;
}

@media (max-width: 420px) {
    .photo-actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scanner-line {
        animation: none;
        top: 50%;
    }
}

/* Tombol "Pasang aplikasi di HP" (PWA) di halaman login */
.pwa-install {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    margin: 10px auto 0;
    padding: 7px 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    background: var(--accent-soft);
    border: 0;
    border-radius: 99px;
    cursor: pointer;
}

.pwa-install svg {
    width: 18px;
    height: 18px;
}
