@font-face {
    font-family: "Albert Sans";
    src: url("../fonts/albert-sans-regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Albert Sans";
    src: url("../fonts/albert-sans-semibold.ttf") format("truetype");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Albert Sans";
    src: url("../fonts/albert-sans-bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --waterside-navy: #003264;
    --waterside-blue: #0a50a5;
    --waterside-cyan: #28a5dc;
    --waterside-orange: #f56e1e;
    --waterside-yellow: #ffbe2d;
    --waterside-magenta: #dc2d78;
    --waterside-purple: #9b1e7d;
    --waterside-green: #32c878;
    --waterside-ink: #17354a;
    --white: #ffffff;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    min-width: 900px;
    min-height: 700px;
    margin: 0;
    padding: 0;
}

body {
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(145deg, #00274e 0%, var(--waterside-navy) 45%, #075b8f 100%);
    font-family: "Albert Sans", Arial, Helvetica, sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.header {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 29, 58, 0.28);
}

.logo {
    position: absolute;
    top: 32px;
    left: 64px;
    width: 380px;
    padding: 0;
    background: transparent;
    text-align: left;
}

.logo img {
    display: block;
    width: 100%;
    height: 122px;
    object-fit: contain;
    object-position: left center;
}

.date-time-container {
    position: absolute;
    top: 42px;
    right: 5%;
    text-align: right;
}

.display-date {
    font-size: 2.0rem;
    font-weight: 600;
}

.display-time {
    font-size: 4rem;
    font-weight: 700;
}

.page {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    display: none;
    width: 100%;
    height: 100%;
}

.active-page {
    display: block;
}

.home-grid {
    position: absolute;
    top: 235px;
    left: 50%;
    display: grid;
    width: calc(100% - 128px);
    max-width: 1120px;
    grid-template-columns: repeat(3, 1fr);
    gap: 45px 32px;
    transform: translateX(-50%);
}

.homepage-section-block {
    height: 180px;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 14px 28px rgba(0, 20, 40, 0.28), inset 0 -5px rgba(0, 0, 0, 0.14);
    transition: transform 120ms ease, filter 120ms ease;
}

.homepage-section-block:active {
    transform: translateY(3px);
    filter: brightness(0.96);
}

.homepage-section-block span {
    font-size: 2.35rem;
    font-weight: 700;
    line-height: 1.18;
}

.student-action {
    color: var(--white);
    background: linear-gradient(135deg, var(--waterside-cyan), var(--waterside-blue));
}

.staff-action {
    color: var(--white);
    background: linear-gradient(135deg, var(--waterside-magenta), var(--waterside-purple));
}

.visitor-action {
    color: var(--white);
    background: linear-gradient(135deg, var(--waterside-yellow), var(--waterside-orange));
}

.title {
    position: absolute;
    top: 180px;
    left: 0;
    width: 100%;
    height: 80px;
    margin: 0;
    padding: 20px 64px 0;
    font-size: 2.45rem;
    font-weight: 700;
}

.inner-container {
    position: absolute;
    top: 260px;
    right: 0;
    bottom: 0;
    left: 0;
}

.button {
    position: absolute;
    width: 200px;
    height: 95px;
    border-radius: 11px;
    color: var(--white);
    background: var(--waterside-green);
    box-shadow: 0 9px 20px rgba(0, 20, 40, 0.23), inset 0 -4px rgba(0, 0, 0, 0.12);
    font-size: 1.8rem;
    font-weight: 700;
}

.button:active,
.camera-retry:active {
    transform: translateY(2px);
}

.back-button {
    bottom: 50px;
    left: 64px;
}

.continue-button {
    right: 64px;
    bottom: 50px;
}

.scan-instructions,
.vis-text {
    position: absolute;
    top: 28px;
    left: 64px;
    width: 430px;
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.45;
}

.scan-instructions p {
    margin: 0 0 20px;
}

.camera-status {
    min-height: 2.5em;
    color: #ffe7a3;
    font-size: 1.05rem;
}

.staff-controls {
    position: absolute;
    top: 18px;
    left: 64px;
    width: 500px;
}

.staff-instructions {
    width: 500px;
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.staff-pin-display {
    display: block;
    width: 380px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.64);
    border-radius: 8px;
    color: var(--waterside-ink);
    background: var(--white);
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 44px;
    letter-spacing: 0.45em;
    text-align: center;
}

.staff-status {
    width: 380px;
    min-height: 38px;
    margin: 7px 0;
    color: #ffe7a3;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.staff-keypad {
    display: grid;
    width: 380px;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.staff-keypad-key {
    height: 47px;
    border-radius: 8px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 -3px rgba(0, 0, 0, 0.14);
    font-size: 1.25rem;
    font-weight: 700;
}

.staff-keypad-key.action-key {
    background: var(--waterside-purple);
    font-size: 1rem;
}

.staff-keypad-key:active {
    transform: translateY(2px);
}

.staff-keypad-key:disabled {
    cursor: default;
    opacity: 0.55;
}

.staff-controls .camera-retry {
    position: absolute;
    top: 106px;
    left: 392px;
    min-width: 108px;
    height: 48px;
    padding: 0 10px;
    font-size: 0.95rem;
}

.staff-back-button {
    right: 240px;
    bottom: 20px;
    width: 160px;
    height: 70px;
}

.camera-retry {
    min-width: 180px;
    height: 58px;
    border-radius: 9px;
    padding: 0 22px;
    color: var(--white);
    background: var(--waterside-green);
    font-size: 1.15rem;
    font-weight: 700;
}

.is-hidden {
    display: none !important;
}

.webcam {
    position: absolute;
    top: 30px;
    right: 64px;
    width: 530px;
    height: 298px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.78);
    border-radius: 12px;
    background: rgba(0, 22, 44, 0.72);
    box-shadow: 0 12px 30px rgba(0, 20, 40, 0.35);
}

.webcam video {
    display: none;
    width: 530px;
    height: 298px;
    object-fit: cover;
}

.vis-checkin {
    position: absolute;
    top: 115px;
    left: 64px;
    width: 455px;
}

.vis-checkin label {
    display: block;
    margin: 0 0 9px;
    font-size: 1.25rem;
    font-weight: 700;
}

.vis-checkin input,
.vis-checkin select {
    display: block;
    width: 455px;
    min-height: 58px;
    margin: 0 0 24px;
    border: 2px solid rgba(255, 255, 255, 0.64);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--waterside-ink);
    background: var(--white);
    font-size: 1.25rem;
}

.vis-checkin input:focus,
.vis-checkin select:focus {
    outline: 4px solid rgba(40, 165, 220, 0.42);
    border-color: var(--waterside-cyan);
}

.complete {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    padding: 66px 55px 40px;
    transform: translateX(-50%);
    background: var(--waterside-green);
    box-shadow: 0 18px 42px rgba(0, 20, 40, 0.3);
    text-align: center;
}

.complete .name {
    min-height: 42px;
    font-size: 1.7rem;
    font-weight: 700;
}

.complete .visiting {
    margin-top: 10px;
    font-size: 1.35rem;
}

.complete img {
    width: 145px;
    height: 145px;
    margin-top: 15px;
}

.staff-complete {
    padding-top: 88px;
}

.staff-complete img {
    margin-top: 42px;
}

.checkin-time {
    margin-top: 10px;
    font-size: 1.15rem;
}

.version {
    position: absolute;
    z-index: 4;
    right: 20px;
    bottom: 15px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
}

@media (max-width: 1050px) {
    .logo {
        width: 330px;
    }

    .date-time-container {
        right: 42px;
    }

    .display-date {
        font-size: 2rem;
    }

    .display-time {
        font-size: 3.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
