:root {
    --deep-green: #063c29;
    --forest-green: #087f59;
    --forest-dark: #056647;
    --gold: #fdc530;
    --white: #ffffff;
    --soft-gray: #e9eceb;
    --ink: #18332a;
    --muted: #617069;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    min-height: 100vh;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(rgba(4, 45, 29, .42), rgba(4, 45, 29, .55)),
        url("images/vsu-alangalang-login-bg-wide.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.brand-header {
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.35rem clamp(1.25rem, 5vw, 4.5rem);
    background: transparent;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: white;
    text-decoration: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

.brand-logo { width: 38px; height: 38px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.brand-name { font-size: 1.18rem; font-weight: 760; letter-spacing: -.02em; }
.brand-name span { color: var(--gold); }

.activity-shell {
    min-height: 100vh;
    width: 100%;
    display: grid;
    place-items: center;
    padding: 6.2rem 1.25rem 2rem;
}

.activity-card {
    width: min(100%, 800px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .52);
    border-radius: 1.15rem;
    background: rgba(248, 249, 247, .64);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .65),
        0 28px 80px rgba(0, 26, 17, .34);
    backdrop-filter: blur(10px) saturate(115%);
    -webkit-backdrop-filter: blur(10px) saturate(115%);
}

.step-header {
    position: relative;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.15rem clamp(1.25rem, 5vw, 3rem);
    border-bottom: 1px solid rgba(255, 255, 255, .45);
}

.back-button {
    position: absolute;
    left: clamp(1.25rem, 5vw, 3rem);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    background: rgba(255, 255, 255, .28);
    color: var(--deep-green);
    transition: background .18s ease, opacity .18s ease;
}

.back-button:hover:not(:disabled) { background: rgba(255, 255, 255, .65); }
.back-button:disabled { opacity: .42; cursor: default; }
.step-progress { display: flex; align-items: center; justify-content: center; gap: .65rem; }
.step-item { display: flex; align-items: center; gap: .42rem; color: #6c7873; }
.step-item span {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 1.5px solid #8c9892;
    border-radius: 50%;
    font-size: .7rem;
    font-weight: 750;
}

.step-item small { font-size: .72rem; font-weight: 650; }
.step-item.is-active { color: var(--forest-green); }
.step-item.is-active span {
    border-color: var(--forest-green);
    background: var(--forest-green);
    color: white;
    box-shadow: 0 0 0 4px rgba(8, 127, 89, .12);
}

.step-line { width: 58px; height: 1px; background: rgba(86, 103, 95, .38); }
.step-panel { padding: 1.5rem clamp(1.5rem, 6vw, 3.6rem) 2.4rem; }
.step-panel.is-visible { animation: panel-in .28s ease both; }
.step-panel.is-leaving { animation: panel-out .18s ease both; }
.panel-heading { margin-bottom: 1.5rem; }
.eyebrow {
    display: block;
    margin-bottom: .55rem;
    color: var(--forest-green);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.panel-heading h1 {
    margin: 0 0 .35rem;
    color: var(--deep-green);
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    font-weight: 760;
    letter-spacing: -.025em;
}

.panel-heading p { margin: 0; color: var(--muted); font-size: .91rem; }
.instruction-list {
    display: grid;
    gap: .7rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.instruction-list li {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 50px;
    padding: .65rem .85rem;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: .65rem;
    background: rgba(255, 255, 255, .48);
    color: #29443a;
    font-size: .86rem;
    font-weight: 600;
}

.instruction-list li span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(8, 127, 89, .12);
    color: var(--forest-green);
    font-size: .72rem;
    font-weight: 800;
}

.goal-box {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1.1rem;
    padding: .8rem .9rem;
    border-left: 3px solid var(--gold);
    border-radius: .55rem;
    background: rgba(255, 255, 255, .45);
}

.goal-box > i { color: #9b7810; font-size: 1.15rem; }
.goal-box strong { display: block; color: var(--deep-green); font-size: .73rem; }
.goal-box p { margin: .05rem 0 0; color: var(--muted); font-size: .78rem; }
.btn-eduschedx {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--forest-green);
    --bs-btn-border-color: var(--forest-green);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--forest-dark);
    --bs-btn-hover-border-color: var(--forest-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--forest-dark);
    --bs-btn-active-border-color: var(--forest-dark);
    min-height: 46px;
    border: 1px solid var(--forest-green);
    border-radius: .55rem;
    background: var(--forest-green);
    color: white;
    font-size: .9rem;
    font-weight: 720;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 8px 18px rgba(5, 102, 71, .18);
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.btn-eduschedx::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: -60%;
    left: -35%;
    width: 22%;
    height: 220%;
    transform: rotate(18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
    pointer-events: none;
    transition: left .55s ease;
}

.btn-eduschedx:hover,
.btn-eduschedx:focus,
.btn-eduschedx:active,
.btn-eduschedx:first-child:active {
    border-color: var(--forest-dark);
    background: var(--forest-dark);
    color: white;
}

.btn-eduschedx:hover::after,
.btn-eduschedx:focus-visible::after { left: 115%; }
.btn-eduschedx:focus-visible { box-shadow: 0 0 0 .22rem rgba(255, 255, 255, .3); }
.field-card {
    height: 100%;
    padding: .75rem;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: .62rem;
    background: rgba(255, 255, 255, .67);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}

.form-label { margin-bottom: .42rem; color: #30483f; font-size: .69rem; font-weight: 750; }
.form-select {
    min-height: 42px;
    border: 1px solid rgba(124, 143, 134, .38);
    border-radius: .45rem;
    background-color: rgba(255, 255, 255, .9);
    color: var(--ink);
    font-size: .78rem;
}

.form-select:focus { border-color: var(--forest-green); box-shadow: 0 0 0 .2rem rgba(8, 127, 89, .13); }
/* The PHP result page reuses the same header and glass surface. */
.result-page {
    width: min(100%, 560px);
    border-color: rgba(255, 255, 255, .34);
    background: rgba(4, 61, 41, .82);
    box-shadow: 0 28px 80px rgba(0, 22, 14, .45);
}
.result-page .screen-panel { padding: 2rem clamp(1.4rem, 6vw, 3rem); }
.result-profile {
    display: grid;
    justify-items: center;
    padding: 1.75rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .13);
    color: white;
    text-align: center;
}

.profile-avatar {
    position: relative;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: white;
    font-size: 2.5rem;
}

.profile-decision {
    position: absolute;
    right: -2px;
    bottom: -1px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 2px solid #124e38;
    border-radius: 50%;
    color: white;
    font-size: .7rem;
}

.result-success .profile-decision { background: #12a16e; }
.result-danger .profile-decision { background: #c74646; }
.profile-label {
    margin: 1rem 0 .1rem;
    color: rgba(255, 255, 255, .62);
    font-size: .65rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.result-profile h1 { margin: 0; color: white; font-size: 1.7rem; font-weight: 760; }
.result-badge {
    margin-top: .65rem;
    padding: .34rem .72rem;
    border-radius: 2rem;
    font-size: .72rem;
    font-weight: 750;
}

.result-success .result-badge { background: rgba(31, 190, 133, .2); color: #91efc8; }
.result-danger .result-badge { background: rgba(231, 90, 90, .2); color: #ffc0c0; }
.result-reason {
    max-width: 360px;
    margin: .7rem 0 1.15rem;
    color: rgba(255, 255, 255, .78);
    font-size: .82rem;
}

.profile-status {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .65rem;
}

.profile-status > div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: .55rem;
    padding: .65rem .75rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: .55rem;
    background: rgba(0, 0, 0, .1);
    text-align: left;
}

.profile-status i { grid-row: 1 / 3; color: var(--gold); }
.profile-status span { color: rgba(255, 255, 255, .58); font-size: .61rem; }
.profile-status strong { color: white; font-size: .73rem; font-weight: 700; }

@keyframes panel-in {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: none; }
}

@keyframes panel-out {
    to { opacity: 0; transform: translateX(-10px); }
}

@media (max-width: 767.98px) {
    body { background-attachment: scroll; }
    .brand-header { padding: 1rem 1.2rem; }
    .activity-shell { align-items: start; padding: 5rem .85rem 1.25rem; }
    .activity-card { border-radius: .9rem; }
    .step-header { min-height: 72px; justify-content: flex-end; padding-inline: 1.1rem; }
    .back-button { left: 1.1rem; }
    .step-line { width: 28px; }
    .step-item small { font-size: .66rem; }
    .step-panel { padding: 1.3rem 1.1rem 1.5rem; }
    .field-card { padding: .7rem; }
}

@media (max-width: 390px) {
    .step-item small { display: none; }
    .step-line { width: 40px; }
    .profile-status { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.compact-card { width: min(100%, 590px); }
.screen-panel {
    padding: 2rem clamp(1.5rem, 6vw, 3rem) 2.25rem;
}

.student-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid rgba(255, 255, 255, .42);
}

.student-progress a {
    position: relative;
    padding: .85rem .3rem;
    color: #68756f;
    font-size: .65rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: color .18s ease, background .18s ease;
}

.student-progress a:hover {
    background: rgba(255, 255, 255, .18);
    color: var(--deep-green);
}

.student-progress a.is-active { color: var(--forest-green); }
.student-progress a.is-active::after {
    content: "";
    position: absolute;
    right: 20%;
    bottom: 0;
    left: 20%;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--forest-green);
}

.form-control {
    min-height: 44px;
    border-color: rgba(124, 143, 134, .42);
    background: rgba(255, 255, 255, .8);
}

.form-control:focus {
    border-color: var(--forest-green);
    box-shadow: 0 0 0 .2rem rgba(8, 127, 89, .13);
}

.page-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1rem;
    color: var(--deep-green);
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
}

.page-back:hover { color: var(--forest-green); }
.student-info-form { display: grid; gap: 1.15rem; }
.student-info-form .btn { margin-top: .35rem; }
.activity-code-input {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.optional-label { margin-left: .25rem; color: var(--muted); font-weight: 500; }
.assigned-station[readonly] {
    background: rgba(6, 60, 41, .09);
    color: var(--deep-green);
    font-weight: 750;
}
.station-input .input-group-text {
    border-color: rgba(124, 143, 134, .42);
    background: rgba(6, 60, 41, .09);
    color: var(--deep-green);
    font-weight: 750;
}

.activity-modal {
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: .8rem;
    background: rgba(249, 251, 248, .96);
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(0, 25, 15, .32);
    backdrop-filter: blur(16px);
}

.activity-modal .modal-title { color: var(--deep-green); font-weight: 750; }
.activity-modal .modal-body { color: var(--muted); font-size: .9rem; }
.submission-icon + h1 { margin-top: 0; }
.submission-icon.submission-warning { background: #9a6a08; }

code {
    padding: .12rem .3rem;
    border-radius: .25rem;
    background: rgba(6, 60, 41, .08);
    color: var(--deep-green);
}

.manual-result {
    margin-top: .8rem;
    padding: .7rem .85rem;
    border-radius: .5rem;
    font-size: .8rem;
    font-weight: 700;
    text-align: center;
}

.manual-result.is-granted { background: rgba(19, 150, 99, .13); color: #086442; }
.manual-result.is-denied { background: rgba(193, 55, 55, .12); color: #9a3030; }
.submit-output-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(72, 98, 85, .18);
}

.code-editor {
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: .7rem;
    background: rgba(4, 45, 29, .94);
    box-shadow: 0 18px 42px rgba(0, 35, 22, .2);
}

.code-editor-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem .85rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .75);
    font-size: .72rem;
    font-weight: 700;
}

.code-dots { display: flex; gap: .3rem; }
.code-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .24); }
.code-dots i:nth-child(2) { background: rgba(255, 201, 39, .62); }
.code-lines { overflow-x: auto; padding: 1rem; }
.code-lines > code,
.code-lines > label {
    min-height: 1.5rem;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    background: none;
    color: #e8f2ed;
    font: 500 .76rem/1.5 Consolas, "SFMono-Regular", monospace;
    white-space: nowrap;
}

.code-answer {
    width: min(72%, 510px);
    min-width: 220px;
    height: 30px;
    margin: .18rem .35rem;
    padding: .25rem .5rem;
    border: 1px solid rgba(255, 201, 39, .52);
    border-radius: .35rem;
    outline: 0;
    background: rgba(255, 255, 255, .1);
    color: #fff4bc;
    font: inherit;
}

.code-answer:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 201, 39, .13); }
.code-answer::placeholder { color: rgba(255, 255, 255, .36); }

.btn-submit-output {
    min-height: 44px;
    border: 1px solid rgba(5, 105, 72, .45);
    background: rgba(255, 255, 255, .52);
    color: var(--deep-green);
    font-weight: 750;
}

.btn-submit-output:hover,
.btn-submit-output:focus {
    border-color: var(--forest-green);
    background: rgba(8, 127, 89, .1);
    color: var(--deep-green);
    box-shadow: 0 0 0 .2rem rgba(8, 127, 89, .12);
}
.submission-received { display: grid; justify-items: center; text-align: center; }
.submission-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--forest-green);
    color: white;
    font-size: 1.7rem;
}

.submission-received h1 { margin-bottom: .45rem; color: var(--deep-green); font-size: 1.8rem; font-weight: 760; }
.submission-received > p { color: var(--muted); font-size: .88rem; }
.student-summary {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-top: .8rem;
    padding: .8rem 1rem;
    border-radius: .55rem;
    background: rgba(255, 255, 255, .55);
    font-size: .8rem;
}

.student-summary span { color: var(--muted); }
.student-summary div { display: grid; gap: .15rem; text-align: left; }
.student-summary small { color: var(--muted); font-size: .68rem; }
.admin-login-card { width: min(100%, 460px); }
.admin-body { background-attachment: fixed; }
.admin-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .8rem clamp(1rem, 4vw, 3rem);
    background: rgba(4, 45, 29, .92);
    color: white;
}

.admin-header > div { display: flex; align-items: center; gap: .7rem; }
.admin-header span { display: grid; }
.admin-header strong { font-size: .95rem; }
.admin-header small { color: rgba(255, 255, 255, .62); font-size: .65rem; }
.admin-shell { width: min(1180px, calc(100% - 2rem)); margin: 2rem auto; }
.admin-title { color: white; text-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.admin-title .eyebrow { color: var(--gold); }
.admin-title h1 { margin: .25rem 0 1.2rem; font-size: 1.8rem; font-weight: 760; }
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .85rem;
    margin-bottom: 1rem;
}

.summary-grid > div {
    display: grid;
    gap: .25rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: .7rem;
    background: rgba(248, 249, 247, .78);
    backdrop-filter: blur(10px);
}

.summary-grid span { color: var(--muted); font-size: .7rem; }
.summary-grid strong { color: var(--deep-green); font-size: 1.35rem; }
.admin-table-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: .8rem;
    background: rgba(248, 249, 247, .9);
    box-shadow: 0 20px 50px rgba(0, 25, 16, .24);
}

.search-form {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    padding: 1rem;
    border-bottom: 1px solid #dce3e0;
}

.table { font-size: .78rem; }
.table thead th { padding: .8rem 1rem; color: #607068; font-size: .65rem; text-transform: uppercase; }
.table tbody td { padding: .8rem 1rem; }
.case-pass { color: #098658 !important; font-size: 1rem; }
.case-fail { color: #be3c3c !important; font-size: 1rem; }
.student-result-head {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: .8rem;
    margin-bottom: 1rem;
}

.student-result-head > div {
    display: grid;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: .65rem;
    background: rgba(248, 249, 247, .88);
}

.student-result-head span { color: var(--muted); font-size: .68rem; }
.student-result-head strong { color: var(--deep-green); }

@media (max-width: 767.98px) {
    .screen-panel { padding: 1.5rem 1.25rem 1.75rem; }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .student-result-head { grid-template-columns: 1fr; }
    .admin-shell { width: min(100% - 1rem, 1180px); margin-top: 1rem; }
}
