* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.student-login-page {
    min-height: 100vh;
    background: #101a32;
    color: #ffffff;
}

.student-login-shell {
    display: grid;
    grid-template-columns: minmax(420px, 46vw) 1fr;
    min-height: 100vh;
    background: #101a32;
}

.student-login-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 28px clamp(32px, 3.4vw, 44px);
}

.student-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-brand-seal {
    width: 92px;
    height: 92px;
    object-fit: contain;
    flex: 0 0 auto;
}

.student-brand-wordmark h1,
.student-brand-wordmark p {
    margin: 0;
    color: #eef4ff;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: uppercase;
}

.student-brand-wordmark h1 {
    font-size: 66px;
    line-height: 0.78;
}

.student-brand-wordmark p {
    font-size: 28px;
    line-height: 1;
}

.student-system-title {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    text-align: center;
}

.login-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 30px;
    color: #f4f6fb;
}

.login-divider span {
    height: 1px;
    background: rgba(244, 246, 251, 0.72);
}

.login-divider p {
    margin: 0;
    font-size: 16px;
    white-space: nowrap;
}

.student-login-card {
    display: flex;
    flex-direction: column;
    gap: 17px;
    padding: 22px 20px 19px;
    border-radius: 8px;
    background: #f8fafc;
    color: #202124;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.field-label svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: #050505;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.student-login-card input {
    width: 100%;
    min-height: 32px;
    padding: 8px 13px;
    border: 0;
    border-radius: 6px;
    background: #d4d4d4;
    color: #1f2937;
    font-size: 13px;
}

.student-login-card input::placeholder {
    color: #a2a2a2;
}

.student-login-card input:focus {
    outline: 2px solid #24345f;
    outline-offset: 2px;
}

.student-login-card button {
    min-height: 36px;
    margin-top: 16px;
    border: 0;
    border-radius: 6px;
    background: #25345f;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
}

.student-login-card button:hover {
    background: #2e4071;
}

.forgot-link {
    align-self: center;
    margin-top: 8px;
    color: #a5a5a5;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.student-login-error {
    margin: 0;
    color: #c32222;
    font-size: 13px;
    font-weight: 700;
}

.student-login-success {
    margin: 0;
    color: #168a35;
    font-size: 13px;
    font-weight: 700;
}

.register-line {
    margin: 16px 0 0;
    color: #f4f6fb;
    font-size: 16px;
    text-align: center;
}

.register-line a {
    color: #5f8ff6;
    font-weight: 700;
    text-decoration: none;
}

.register-line a:hover,
.forgot-link:hover {
    text-decoration: underline;
}

.student-building-photo {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(16, 26, 50, 0.08), rgba(16, 26, 50, 0.16)),
        url("../adamson-main-building.png") center center / cover no-repeat;
}

.student-register-page {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(16, 26, 50, 0.05), rgba(16, 26, 50, 0.66) 25%, rgba(16, 26, 50, 0.66) 75%, rgba(16, 26, 50, 0.05)),
        url("../adamson-main-building.png") center center / cover no-repeat;
    color: #ffffff;
}

.student-register-shell {
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.student-register-panel {
    display: flex;
    width: min(100%, 650px);
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    padding: 28px 40px 34px;
    background: #101a32;
}

.register-brand {
    justify-content: center;
}

.register-brand .student-brand-seal {
    width: 92px;
    height: 92px;
}

.register-brand .student-brand-wordmark h1 {
    font-size: 66px;
}

.register-brand .student-brand-wordmark p {
    font-size: 28px;
}

.register-divider {
    gap: 34px;
}

.register-section-label {
    margin: 0;
    color: #f4f6fb;
    font-size: 18px;
}

.register-message {
    min-height: 20px;
    margin: 0;
    color: #d4d4d4;
    font-size: 14px;
    font-weight: 700;
}

.register-message.error {
    color: #ff7676;
}

.register-message.success {
    color: #7ee08b;
}

.register-step {
    display: none;
}

.register-step.active {
    display: block;
}

.privacy-card,
.student-register-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px 30px 26px;
    border-radius: 8px;
    background: #f8fafc;
    color: #202124;
}

.privacy-card h2 {
    margin: 0 0 4px;
    color: #202124;
    font-size: 22px;
}

.privacy-card p {
    margin: 0;
    color: #34383f;
    font-size: 16px;
    line-height: 1.45;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
    color: #202124;
    font-size: 16px;
    line-height: 1.35;
}

.consent-check input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex: 0 0 auto;
}

.student-register-card label {
    font-size: 18px;
}

.student-register-card label strong {
    color: #c32222;
}

.student-register-card input {
    width: min(100%, 385px);
    min-height: 36px;
    padding: 8px 13px;
    border: 0;
    border-radius: 7px;
    background: #d4d4d4;
    color: #1f2937;
    font-size: 16px;
}

.student-register-card input::placeholder {
    color: #8f8f8f;
}

.student-register-card input:focus {
    outline: 2px solid #24345f;
    outline-offset: 2px;
}

.student-register-card button {
    width: 100%;
    min-height: 38px;
    margin-top: 2px;
    border: 0;
    border-radius: 6px;
    background: #25345f;
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
}

.student-register-card button:hover {
    background: #2e4071;
}

.register-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

.register-primary-button,
.register-secondary-button,
.register-secondary-link {
    display: inline-grid;
    place-items: center;
    min-height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
}

.register-primary-button {
    background: #25345f;
    color: #ffffff;
}

.register-secondary-button,
.register-secondary-link {
    background: #ffffff;
    color: #25345f;
}

.register-primary-button:hover:not(:disabled),
.register-secondary-button:hover,
.register-secondary-link:hover {
    filter: brightness(1.08);
}

.register-primary-button:disabled,
.register-secondary-button:disabled {
    cursor: default;
    opacity: 0.55;
}

.face-capture-card {
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 8px;
    background: #f8fafc;
    color: #202124;
}

.otp-card {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px 18px;
    padding: 26px 30px;
    border-radius: 8px;
    background: #f8fafc;
    color: #202124;
}

.otp-mail-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25345f;
    color: #ffffff;
    font-size: 25px;
    font-weight: 700;
}

.otp-card h2,
.otp-card p {
    margin: 0;
}

.otp-card h2 {
    margin-bottom: 5px;
    font-size: 22px;
}

.otp-card > label,
.otp-card > input,
.otp-card > .otp-help {
    grid-column: 2;
}

.otp-card > label {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 700;
}

.otp-code-input {
    width: min(100%, 310px);
    min-height: 52px;
    padding: 8px 16px;
    border: 1px solid #aeb7ca;
    border-radius: 7px;
    background: #ffffff;
    color: #111a32;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0;
    text-align: center;
}

.otp-code-input:focus {
    outline: 2px solid #25345f;
    outline-offset: 2px;
}

.otp-card .otp-help {
    color: #5c6576;
    font-size: 14px;
}

.otp-actions {
    flex-wrap: wrap;
}

.capture-preview {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: #111a32;
    color: #d4d4d4;
}

.capture-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.face-guide-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.face-guide-frame {
    position: relative;
    width: min(42%, 190px);
    aspect-ratio: 0.72;
    border: 4px dashed rgba(255, 255, 255, 0.86);
    border-radius: 48% 48% 44% 44% / 38% 38% 54% 54%;
    box-shadow:
        0 0 0 999px rgba(7, 12, 28, 0.18),
        0 0 22px rgba(255, 255, 255, 0.28);
    transform-origin: center center;
    transition: transform 180ms ease, border-radius 180ms ease;
}

.face-guide-frame::before,
.face-guide-frame::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 26%;
    height: 1px;
    transform: translateX(-50%);
    border-top: 2px solid rgba(255, 255, 255, 0.72);
}

.face-guide-frame::before {
    top: 34%;
}

.face-guide-frame::after {
    top: 66%;
}

.face-guide-ear,
.face-guide-eye,
.face-guide-nose,
.face-guide-mouth {
    position: absolute;
    display: block;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 180ms ease, opacity 180ms ease;
}

.face-guide-ear {
    top: 40%;
    width: 10px;
    height: 24px;
    border-radius: 999px;
}

.face-guide-ear.left {
    left: -12px;
}

.face-guide-ear.right {
    right: -12px;
}

.face-guide-eye {
    top: 37%;
    width: 12px;
    height: 8px;
    border-radius: 999px;
}

.face-guide-eye.left {
    left: 32%;
}

.face-guide-eye.right {
    right: 32%;
}

.face-guide-nose {
    top: 48%;
    left: 50%;
    width: 8px;
    height: 22px;
    border-radius: 999px;
    transform: translateX(-50%);
}

.face-guide-mouth {
    top: 64%;
    left: 50%;
    width: 38px;
    height: 4px;
    border-radius: 999px;
    transform: translateX(-50%);
}

.face-guide-label {
    position: absolute;
    left: 50%;
    bottom: 18px;
    min-width: 180px;
    transform: translateX(-50%);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(17, 26, 50, 0.82);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.face-guide-overlay[data-view="left"] .face-guide-frame {
    transform: perspective(420px) rotateY(-24deg);
    border-radius: 56% 42% 42% 52% / 38% 38% 54% 54%;
}

.face-guide-overlay[data-view="left"] .face-guide-eye.left,
.face-guide-overlay[data-view="left"] .face-guide-ear.left {
    opacity: 0.42;
}

.face-guide-overlay[data-view="left"] .face-guide-nose,
.face-guide-overlay[data-view="left"] .face-guide-mouth {
    transform: translateX(-18%);
}

.face-guide-overlay[data-view="right"] .face-guide-frame {
    transform: perspective(420px) rotateY(24deg);
    border-radius: 42% 56% 52% 42% / 38% 38% 54% 54%;
}

.face-guide-overlay[data-view="right"] .face-guide-eye.right,
.face-guide-overlay[data-view="right"] .face-guide-ear.right {
    opacity: 0.42;
}

.face-guide-overlay[data-view="right"] .face-guide-nose,
.face-guide-overlay[data-view="right"] .face-guide-mouth {
    transform: translateX(-82%);
}

.face-guide-overlay[data-view="up"] .face-guide-frame {
    transform: perspective(420px) rotateX(16deg) translateY(-5px);
}

.face-guide-overlay[data-view="up"] .face-guide-eye {
    transform: translateY(7px);
}

.face-guide-overlay[data-view="up"] .face-guide-nose,
.face-guide-overlay[data-view="up"] .face-guide-mouth {
    transform: translate(-50%, 10px);
}

.face-guide-overlay[data-view="down"] .face-guide-frame {
    transform: perspective(420px) rotateX(-16deg) translateY(5px);
}

.face-guide-overlay[data-view="down"] .face-guide-eye {
    transform: translateY(-7px);
}

.face-guide-overlay[data-view="down"] .face-guide-nose,
.face-guide-overlay[data-view="down"] .face-guide-mouth {
    transform: translate(-50%, -8px);
}

.face-guide-overlay[data-view="complete"] .face-guide-frame {
    border-style: solid;
    border-color: rgba(126, 224, 139, 0.92);
    box-shadow:
        0 0 0 999px rgba(7, 12, 28, 0.1),
        0 0 24px rgba(126, 224, 139, 0.35);
}

.capture-preview p {
    position: absolute;
    inset: auto 16px 16px;
    z-index: 3;
    margin: 0;
    color: #d4d4d4;
    text-align: center;
}

.capture-status {
    display: grid;
    gap: 4px;
}

.capture-status strong {
    color: #25345f;
    font-size: 18px;
}

.capture-status p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
}

.capture-angle-guide {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.capture-angle {
    display: grid;
    min-height: 72px;
    place-items: center;
    gap: 4px;
    padding: 8px 5px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #eef2f7;
    color: #4b5563;
    text-align: center;
}

.capture-angle strong {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #ffffff;
    color: #25345f;
    font-size: 18px;
}

.capture-angle small {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
}

.capture-angle.current {
    border-color: #25345f;
    background: #dbe6ff;
    color: #25345f;
}

.capture-angle.done {
    border-color: #2b8a4b;
    background: #dcfce7;
    color: #166534;
}

.capture-angle.done strong {
    background: #2b8a4b;
    color: #ffffff;
}

.capture-thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.capture-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #d4d4d4;
    aspect-ratio: 1;
}

.capture-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.capture-thumb small {
    position: absolute;
    right: 4px;
    bottom: 4px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #25345f;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.capture-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.register-error {
    font-size: 14px;
}

.signin-line {
    margin-top: 0;
}

@media (max-width: 980px) {
    body {
        overflow-x: hidden;
    }

    .student-login-shell {
        grid-template-columns: 1fr;
    }

    .student-login-panel {
        min-height: 68vh;
        padding: 32px 24px 38px;
    }

    .student-building-photo {
        min-height: 28vh;
        order: -1;
        background-position: center 42%;
    }

    .student-brand {
        justify-content: center;
    }

    .student-register-panel {
        width: min(100%, 620px);
    }
}

@media (max-width: 520px) {
    .student-login-panel {
        gap: 22px;
        padding-inline: 16px;
    }

    .student-brand-seal {
        width: 70px;
        height: 70px;
    }

    .student-brand-wordmark h1 {
        font-size: 42px;
    }

    .student-brand-wordmark p {
        font-size: 18px;
    }

    .student-register-panel {
        min-height: 100vh;
        justify-content: center;
        gap: 18px;
        padding: 22px 18px 28px;
    }

    .register-brand .student-brand-wordmark h1 {
        font-size: 42px;
    }

    .register-brand .student-brand-wordmark p {
        font-size: 18px;
    }

    .student-register-card {
        gap: 12px;
        padding: 20px 18px;
    }

    .privacy-card,
    .otp-card,
    .face-capture-card {
        padding: 20px 18px;
    }

    .otp-card {
        grid-template-columns: 1fr;
    }

    .otp-card > label,
    .otp-card > input,
    .otp-card > .otp-help {
        grid-column: 1;
    }

    .student-register-card label,
    .student-register-card input,
    .student-register-card button,
    .register-primary-button,
    .register-secondary-button,
    .register-secondary-link {
        font-size: 16px;
    }

    .student-register-card input {
        width: 100%;
    }

    .login-divider {
        gap: 14px;
    }

    .register-line {
        font-size: 15px;
    }

    .register-actions,
    .capture-actions {
        grid-template-columns: 1fr;
        display: grid;
    }

    .capture-thumbs {
        grid-template-columns: repeat(5, minmax(42px, 1fr));
        gap: 6px;
    }
}
