* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

body {
    background: #f6f6f6;
}

.header {
    text-align: center;
    padding: 20px;
    background: #002c5f;
    color: #fff;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: #fff;
}

.topRow {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.deadline {
    background: #ffe9c4;
    padding: 10px 15px;
    border-radius: 6px;
}

#countdown {
    margin-top: 6px;
    font-weight: bold;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.links a {
    color: #004aad;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.instructions ul {
    padding-left: 20px;
    line-height: 1.7;
}

.instructions ul li a {
    color: #004aad;
    text-decoration: none;
    font-weight: 500;
}

.addressGrid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.addressGrid div {
    flex: 1;
    min-width: 220px;
    background: #f2f2f2;
    padding: 15px;
    border-radius: 6px;
}

.uploadArea {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.uploadBox {
    flex: 1;
    border: 2px dashed #aaa;
    padding: 30px;
    text-align: center;
    min-width: 220px;
}

.terms {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action {
    text-align: center;
}

.action a {
    padding: 14px 40px;
    background: #004aad;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.action a:hover {
    opacity: .9;
}

.closed {
    background: #ccc !important;
    cursor: not-allowed;
}

#closedMsg {
    color: red;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
}

.disabledUpload {
    opacity: .4;
    pointer-events: none;
}


/* Mobile */

@media(max-width:768px) {

    .topRow {
        flex-direction: column;
    }

}



/* form page css */

.wrapper {
    max-width: 1100px;
    margin: auto;
    background: white;
    padding: 30px 20px;
}

.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.steps span {
    width: 60px;
    height: 60px;
    border-radius: 50px;
    background: #e4e4e4;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.steps span::after {
    content: '';
    background: #ccc;
    height: 1px;
    width: 200px;
    position: absolute;
    left: 100%;
}

.steps span.active::after {
    content: '';
    background: #004aad;
}

.steps span:last-child::after {
    height: 0;
}

.steps .active {
    background: #004aad;
    color: white;
}


.step {
    display: none;
}

.step.active {
    display: block;
}

.step h3 {
    margin-top: 15px;
}

.step h4 {
    margin-top: 15px;
}

.step p {
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

.step ul {
    list-style: lower-roman;
    padding-left: 15px;
    margin-top: 10px;
}

.step ul li {
    font-size: 14px;
    line-height: 22px;
}


/* step 1 */

.step1Wrap {
    display: flex;
    gap: 25px;
    margin-top: 25px;
    align-items: flex-start;
}

.personalGrid {
    flex: 3;
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #ddd;
}

.field {
    width: 50%;
    display: flex;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.field.full {
    width: 100%;
}

.field label {
    width: 40%;
    padding: 10px;
    background: #f2f6ff;
    font-size: 14px;
}

.field.full label {
    width: 20%;
}

.field input,
.field select,
.field textarea {
    width: 60%;
    border: none;
    padding: 10px;
    outline: none;
    background-color: #f2f2f26b;
}

.field.full select,
.field.full input,
.field.full textarea {
    /* resize: none; */
    /* height: 70px; */
    width: 80%;
}

/* PHOTO */

.photoBox {
    flex: 1;
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
}

.signatureBox{
    flex: 1;
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
}

.preview {
    width: 150px;
    height: 180px;
    border: 1px dashed #004aad;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f2f2f2;
}

.signaturePreview {
    width: 200px;
    height: 50px;
    border: 1px dashed #004aad;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f2f2f2;
}

.signaturePreview img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

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

.uploadBtn {
    display: block;
    background: #004aad;
    color: white;
    padding: 8px;
    cursor: pointer;
}

.signatureUploadBtn{
    display: block;
    background: #004aad;
    color: white;
    padding: 8px;
    cursor: pointer;
}

/* Mobile */

@media(max-width:768px) {

    .step1Wrap {
        flex-direction: column;
    }

    .field {
        width: 100%;
    }

}

/* step 1 */

/* step 2 */

.academicTable {
    border: 1px solid #ccc;
    overflow-x: auto;
}

.aRow {
    display: flex;
    min-width: 900px;
    border-bottom: 1px solid #ddd;
}

.examCell {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start !important;
}

.degreeInput {
    border-left: 0 !important;
    border: 1px solid #ccc !important;
    border-radius: 4px;
}

.aRow.head {
    background: #004aad;
    color: white;
    font-weight: 600;
}

.aRow>* {
    padding: 8px;
    border-left: 1px solid #ddd;
    font-size: 13px;
    display: flex;
    align-items: center;
}

/* COLUMN WIDTHS */

.aRow> :nth-child(1) {
    width: 160px;
}

.aRow> :nth-child(2) {
    width: 90px;
}

.aRow> :nth-child(3) {
    width: 180px;
}

.aRow> :nth-child(4) {
    width: 100px;
}

.aRow> :nth-child(5) {
    width: 100px;
}

.aRow> :nth-child(6) {
    width: 70px;
    /* background: #eef5ff; */
    justify-content: center;
}

.aRow> :nth-child(7) {
    width: 80px;
    justify-content: center;
}

.aRow> :nth-child(8) {
    width: 160px;
}

.aRow input,
.aRow select {
    width: 100%;
    border: 0;
    border-left: 1px solid #ccc;
    outline: none;
    padding: 4px;
    font-size: 13px;
}

.percent {
    width: 100%;
    text-align: center;
}

.totalBox {
    margin-top: 15px;
    font-weight: 600;
    color: #004aad;
}

/* File input tidy */
.aRow input[type=file] {
    font-size: 12px;
}

/* MOBILE */

@media(max-width:900px) {

    .aRow {
        flex-wrap: wrap;
        min-width: unset;
    }

    .aRow>* {
        width: 100% !important;
        border-right: none;
    }

    .aRow.head {
        display: none;
    }

}

/* step 2 */


/* step 3 */

.adminCards {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 15px;
}

.adminCard {
    border: 1px solid #ddd;
    padding: 20px;
    border-left: 5px solid #004aad;
}

.adminCard h4 {
    margin-bottom: 15px;
    color: #004aad;
    font-size: 15px;
}

.adminGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* reuse fieldGroup from Teaching */

@media(max-width:768px) {

    .adminGrid .fieldGroup {
        min-width: 100%;
    }

}

.summaryCard {
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 15px;
    border-left: 5px solid #004aad;
}

.summaryCard h4 {
    color: #004aad;
    margin-bottom: 15px;
}

.summaryGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.fieldGroup {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 220px;
}

.fieldGroup label {
    font-size: 12px;
    min-height: 30px;
    color: #004aad;
    line-height: 16px;
}

.fieldGroup input,
.fieldGroup select {
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
    background-color: #fff;
    color: #333;
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.fieldGroup select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

.teachCards {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 25px;
}

.teachCard {
    border: 1px solid #ddd;
    padding: 20px;
    border-left: 5px solid #004aad;
}

.teachCard h4 {
    margin-bottom: 15px;
    color: #004aad;
}

.teachGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.teachGrid input {
    flex: 1;
    min-width: 220px;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
}


.addExpBtn {
    margin-top: 15px;
    padding: 10px 20px;
    border: 1px dashed #004aad;
    background: none;
    color: #004aad;
    cursor: pointer;
    border-radius: 4px;
}

.addExpBtn:hover {
    background: #004aad;
    color: white;
}

/* Mobile */

@media(max-width:768px) {

    .teachGrid input {
        min-width: 100%;
    }

}

/* step 3 */

/* step 4 */

/* step 4 */

/* step 5 */

.previewBtn {
    padding: 12px 20px;
    border: 1px solid #004aad;
    background: none;
    color: #004aad;
    cursor: pointer;
    margin-top: 10px;
}

.previewBtn:hover {
    background: #004aad;
    color: white;
}

.declaration {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
}

.finalSubmit {
    text-align: center;
    margin-top: 30px;
}

.submitBtn {
    background: #004aad;
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    cursor: pointer;
}

.submitBtn:hover {
    opacity: .9;
}

/* step 5 */

.nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.nav button {
    background: #004aad;
    color: white;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
}

.nav button.backBtn {
    background-color: #ccc;
    color: #111;
}

.nav button.backBtn:hover {
    background-color: #aaa;
}

.nav button:hover {
    background-color: #002c5f;
}

.submitBtn {
    background: #004aad;
    color: white;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
}

.submitBtn:hover {
    background-color: #002c5f;
}
