body {
    font-family: Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #111c34 100%);
    color: white;
    margin: 0;
    min-height: 100vh;
}

.site-logos {
    position: fixed;
    top: 22px;
    left: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 20;
}

.site-logo {
    width: clamp(52px, 6.2vw, 84px);
    height: auto;
}

.landing-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: 40px;
    padding: 56px 64px;
    box-sizing: border-box;
}

.hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 16px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #93c5fd;
}

.hero-panel h1 {
    margin: 0;
    font-size: clamp(3.6rem, 8vw, 6.8rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
    max-width: 9ch;
}

.hero-copy {
    max-width: 560px;
    margin: 26px 0 0;
    color: #cbd5e1;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.7;
}

.action-panel {
    display: flex;
    justify-content: center;
    align-items: center;
}

.card {
    width: min(420px, 100%);
    background: rgba(30, 41, 59, 0.92);
    backdrop-filter: blur(10px);
    padding: 34px;
    border-radius: 22px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-sizing: border-box;
}

.card-label {
    margin: 0 0 18px;
    color: #94a3b8;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

input,
select {
    width: 100%;
    padding: 14px 15px;
    margin-top: 12px;
    border: 1px solid #334155;
    border-radius: 10px;
    box-sizing: border-box;
    background: #f8fafc;
    color: #0f172a;
}

button {
    margin-top: 12px;
    padding: 12px;
    width: 100%;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.in,
.out {
    appearance: none;
    backface-visibility: hidden;
    border-style: none;
    box-sizing: border-box;
    color: #fff;
    display: inline-block;
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    outline: none;
    overflow: hidden;
    padding: 14px 20px;
    position: relative;
    text-align: center;
    text-decoration: none;
    transform: translate3d(0, 0, 0);
    transition: all .3s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    vertical-align: top;
    white-space: nowrap;
}

.in {
    background-color: #27ae60;
    box-shadow: rgba(39, 174, 96, .18) 0 4px 12px;
}

.in:hover {
    background-color: #1e8449;
    box-shadow: rgba(39, 174, 96, .24) 0 8px 18px;
}

.out {
    background-color: #e74c3c;
    box-shadow: rgba(231, 76, 60, .18) 0 4px 12px;
}

.out:hover {
    background-color: #c0392b;
    box-shadow: rgba(231, 76, 60, .24) 0 8px 18px;
}

.scan {
    background-color: #2563eb;
    color: #fff;
    font-weight: 700;
    box-shadow: rgba(37, 99, 235, .18) 0 4px 12px;
}

.manage-records {
    width: auto;
    margin: 14px auto 0;
    padding: 0;
    background: transparent;
    color: #94a3b8;
    box-shadow: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.scan:hover {
    background-color: #1d4ed8;
}

.in:hover,
.out:hover,
.scan:hover {
    transform: translateY(-1px);
    transition-duration: .35s;
}

.manage-records:hover {
    color: #cbd5e1;
}

.in:active,
.out:active,
.scan:active {
    transform: translateY(2px);
    transition-duration: .2s;
}

.manage-records:active {
    transform: none;
}

#response {
    margin: 18px 0 0;
    min-height: 24px;
    font-size: 14px;
    line-height: 1.6;
    color: #e2e8f0;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.hidden {
    display: none;
}

.modal-card {
    width: min(420px, 100%);
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.modal-wide {
    width: min(720px, 100%);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-header h3 {
    margin: 0;
}

.close-btn {
    width: auto;
    margin-top: 0;
    background: transparent;
    color: #fff;
    font-size: 14px;
    padding: 6px 10px;
    border: 1px solid #475569;
    box-shadow: none;
}

#cameraFeed {
    width: 100%;
    margin-top: 16px;
    border-radius: 12px;
    background: #020617;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.manual-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.manual-row input {
    width: 100%;
    margin-top: 0;
}

.submit-scan {
    width: 140px;
    margin-top: 0;
}

.scan-status {
    word-break: break-word;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 16px;
}

@media (max-width: 1080px) {
    .landing-shell {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 42px 28px;
    }

    .hero-panel {
        max-width: none;
        text-align: center;
        align-items: center;
    }

    .hero-panel h1 {
        max-width: 10ch;
    }

    .hero-copy {
        margin-top: 20px;
    }
}

@media (max-width: 640px) {
    .site-logo {
        width: 44px;
    }

    .site-logos {
        top: 12px;
        left: 12px;
        gap: 6px;
    }

    .landing-shell {
        padding: 78px 16px 32px;
        gap: 22px;
    }

    .hero-panel h1 {
        font-size: clamp(2.9rem, 14vw, 4.2rem);
    }

    .hero-copy {
        font-size: 0.98rem;
    }

    .card {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .manual-row {
        flex-direction: column;
    }

    .submit-scan {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .site-logo {
        width: 38px;
    }

    .site-logos {
        top: 10px;
        left: 10px;
        gap: 5px;
    }

    .landing-shell {
        padding-top: 72px;
    }

    .hero-panel h1 {
        font-size: clamp(2.45rem, 13vw, 3.35rem);
    }

    .eyebrow {
        font-size: 0.74rem;
        letter-spacing: 0.16em;
    }
}
