:root {
    --bg: #031006;
    --bg-soft: #0a1d0e;
    --panel: rgba(8, 24, 12, .92);
    --green: #72c94f;
    --green-strong: #5ab43f;
    --white: #f7f8f2;
    --muted: #c8d1bf;
    --line: rgba(255, 255, 255, .14);
    --danger: #ff746c;
    --ok: #92e071;
    --shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--white);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        linear-gradient(90deg, rgba(3, 16, 6, .98), rgba(3, 16, 6, .78)),
        url("../img/event-poster.jpeg") center top / cover fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 80% 18%, rgba(114, 201, 79, .18), transparent 32%);
}

a {
    color: inherit;
}

main {
    position: relative;
    z-index: 1;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand img,
.event-logo {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: 999px;
    background: #071008;
}

.brand strong {
    display: block;
    font-size: 15px;
}

.brand small {
    color: var(--green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero-form {
    width: min(100%, 1180px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(360px, 540px) minmax(320px, 520px);
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2.5vw, 34px);
    min-height: 100vh;
    padding: clamp(24px, 5vw, 72px);
}

.hero-copy {
    max-width: 540px;
    text-align: right;
    justify-self: end;
}

.hero-copy .event-logo {
    display: block;
    margin-left: auto;
}

.hero-copy .lead {
    margin-left: auto;
}

.hero-form > .panel {
    text-align: left;
    justify-self: start;
}

.hero-copy .event-logo,
.success-panel .event-logo,
.auth-panel .event-logo {
    width: 163px;
    height: 163px;
    margin-bottom: 22px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--green);
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    line-height: 1.05;
}

h1 {
    font-size: clamp(34px, 6vw, 72px);
    max-width: 820px;
}

h2 {
    font-size: 24px;
}

.lead {
    max-width: 620px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.event-card,
.panel,
.table-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.event-card {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 22px;
    padding: 16px 18px;
    border-left: 4px solid var(--green);
    border-radius: 8px;
}

.event-card strong {
    font-size: 22px;
}

.event-card span {
    color: var(--muted);
}

.panel {
    border-radius: 8px;
    padding: clamp(20px, 4vw, 32px);
}

.form-stack {
    display: grid;
    gap: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--white);
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--white);
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}

input:focus {
    outline: 2px solid rgba(114, 201, 79, .42);
    border-color: var(--green);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-error,
.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
}

.field-error {
    color: var(--danger);
}

.field-hint {
    color: var(--muted);
}

.field-hint.valid {
    color: var(--ok);
}

.photo-widget {
    display: grid;
    gap: 10px;
}

.camera-box {
    display: grid;
    place-items: center;
    min-height: 240px;
    overflow: hidden;
    background: rgba(0, 0, 0, .28);
    border: 1px dashed rgba(255, 255, 255, .22);
    border-radius: 8px;
}

.photo-widget.compact .camera-box {
    min-height: 180px;
}

.camera-box video,
.camera-box img {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
}

.actions,
.page-title,
.search-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    color: #061007;
    background: linear-gradient(180deg, var(--green), var(--green-strong));
}

.btn-muted {
    color: var(--white);
    background: rgba(255, 255, 255, .1);
    border: 1px solid var(--line);
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.center-page,
.admin-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(26px, 5vw, 60px) 0;
}

.center-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.success-panel,
.auth-panel {
    width: min(100%, 520px);
    text-align: center;
}

.auth-panel h1 {
    font-size: clamp(26px, 4vw, 34px);
}

.voucher {
    margin: 24px 0;
    padding: 20px;
    color: #071008;
    background: var(--white);
    border: 4px solid var(--green);
    border-radius: 8px;
    font-size: clamp(34px, 9vw, 58px);
    font-weight: 1000;
    letter-spacing: .12em;
}

.flash-wrap {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20;
    display: grid;
    gap: 10px;
    max-width: 420px;
}

.flash {
    padding: 13px 16px;
    border-radius: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.flash-error {
    border-color: rgba(255, 116, 108, .55);
}

.flash-success {
    border-color: rgba(146, 224, 113, .65);
}

.page-title {
    justify-content: space-between;
    margin-bottom: 22px;
}

.page-title h1 {
    font-size: clamp(30px, 4vw, 48px);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.stats div {
    padding: 18px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(8, 24, 12, .88);
}

.stats strong {
    display: block;
    font-size: 32px;
    color: var(--green);
}

.stats span,
small {
    color: var(--muted);
}

.search-bar {
    margin-bottom: 18px;
}

.search-bar input {
    flex: 1 1 280px;
}

.table-card {
    overflow-x: auto;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--green);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.avatar {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 999px;
    border: 2px solid var(--green);
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    color: #071008;
    background: var(--green);
    border-radius: 999px;
    font-weight: 1000;
    letter-spacing: .08em;
}

.status {
    font-weight: 900;
}

.status.ok {
    color: var(--ok);
}

.status.wait {
    color: #ffd27a;
}

.link {
    color: var(--green);
    font-weight: 900;
}

.empty {
    color: var(--muted);
    text-align: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 18px;
}

.data-list {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
}

.data-list dt {
    color: var(--muted);
}

.data-list dd {
    margin: 0;
    font-weight: 800;
}

.photo-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8, 24, 12, .88);
}

figure img,
.photo-placeholder {
    width: 100%;
    height: 520px;
    object-fit: contain;
    background: rgba(0, 0, 0, .32);
}

.photo-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
}

figcaption {
    padding: 12px;
    color: var(--green);
    font-weight: 900;
}

.credential-list {
    display: grid;
    gap: 16px;
}

.credential-card {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 380px);
    gap: 18px;
}

.credential-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.credential-photo {
    width: 150px;
    height: 190px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--green);
}

.attendance-form {
    display: grid;
    gap: 12px;
}

.check-line {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0;
}

.check-line input {
    width: 20px;
    min-height: 20px;
}

@media (max-width: 860px) {
    .hero-form,
    .detail-grid,
    .photo-compare,
    .credential-card {
        grid-template-columns: 1fr;
    }

    .hero-form {
        min-height: 0;
    }

    .hero-copy {
        margin: 0 auto;
        text-align: center;
    }

    .hero-copy .event-logo {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-copy .lead {
        margin-left: auto;
        margin-right: auto;
    }

    .event-card {
        align-items: center;
        text-align: center;
    }

    .grid-2,
    .stats {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 38px;
    }

    figure img,
    .photo-placeholder {
        height: 360px;
    }
}

@media (max-width: 560px) {
    .hero-form {
        padding: 22px 16px;
    }

    .credential-main {
        flex-direction: column;
    }

    .credential-photo {
        width: 100%;
        height: 280px;
    }

    .flash-wrap {
        left: 12px;
        right: 12px;
    }
}
