*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Poppins", Arial, sans-serif;
}

body{
    background:linear-gradient(135deg,#eef7ec,#f8fbff);
    color:#1f2937;
    padding:24px 0;
}

.application-page{
    width:94%;
    max-width:1120px;
    margin:auto;
    background:#ffffff;
    border-radius:20px;
    box-shadow:0 20px 55px rgba(20,70,25,.12);
    overflow:hidden;
}

.form-topbar{
    background:#1f6b2d;
    color:#fff;
    padding:14px 28px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    flex-wrap:wrap;
}

.form-topbar h4{
    font-size:16px;
    font-weight:700;
    letter-spacing:.3px;
}

.form-topbar span{
    font-size:14px;
    opacity:.95;
}

form{
    padding:28px;
}

.application-no{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:18px;
    max-width:360px;
}

.application-no label{
    white-space:nowrap;
    font-weight:700;
}

.header{
    border:2px solid #d8e7d5;
    border-radius:16px;
    padding:20px;
    margin-bottom:18px;
    background:#fbfff9;
}

.header-grid{
    display:grid;
    grid-template-columns:105px 1fr 105px;
    gap:18px;
    align-items:center;
    text-align:center;
}

.logo-box{
    width:95px;
    height:95px;
    /* border:1px solid #b9c9b6; */
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    font-size:12px;
    color:#526056;
    background:#fff;
    line-height:1.35;
}

.header h1{
    color:#111827;
    font-size:30px;
    line-height:1.15;
    font-weight:800;
}

.header .pias{
    font-size:20px;
    font-weight:800;
    margin:4px 0;
}

.header p{
    font-size:14px;
    margin:5px 0;
}

.header h2{
    font-size:18px;
    margin-top:10px;
    color:#111827;
    text-decoration:underline;
    font-weight:800;
}

.header h3{
    display:inline-block;
    font-size:18px;
    margin-top:6px;
    color:#111827;
    text-decoration:underline;
    font-weight:800;
}

.academic-year{
    margin-top:8px;
    display:block;
    font-size:14px;
    font-weight:800;
}

.note-box{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
    background:#eef8eb;
    border-left:5px solid #1f6b2d;
    padding:14px 18px;
    border-radius:12px;
    margin-bottom:22px;
    font-size:14px;
    font-weight:600;
}

.section{
    border:1px solid #d6e7d1;
    border-radius:16px;
    background:#fbfdf9;
    padding:22px;
    margin-bottom:22px;
}

.section-title{
    color:#1f6b2d;
    font-size:19px;
    margin-bottom:18px;
    font-weight:800;
}

.candidate-layout{
    display:grid;
    grid-template-columns:1fr 180px;
    gap:22px;
    align-items:start;
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:16px;
}

.form-group{
    display:flex;
    flex-direction:column;
    gap:7px;
}

.form-group.full{
    grid-column:1/-1;
}

label{
    font-size:14px;
    font-weight:700;
    color:#263238;
}

input,
textarea,
select{
    width:100%;
    padding:12px 13px;
    border:1px solid #bdceb9;
    border-radius:10px;
    background:#fff;
    outline:none;
    font-size:15px;
}

input:focus,
textarea:focus,
select:focus{
    border-color:#1f6b2d;
    box-shadow:0 0 0 3px rgba(31,107,45,.12);
}

textarea{
    min-height:104px;
    resize:vertical;
}

.photo-box{
    width:180px;
    min-height:190px;
    border:2px dashed #78966f;
    border-radius:14px;
    background:#fff;
    padding:12px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:10px;
    text-align:center;
    color:#4b5563;
    font-size:13px;
}

.pin-row,.dob-row{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}

.box-input{
    width:42px;
    height:42px;
    text-align:center;
    padding:0;
    border-radius:7px;
    font-weight:700;
}

.dob-block{
    display:grid;
    grid-template-columns:repeat(3,auto);
    gap:10px;
    align-items:end;
}

.dob-field small{
    display:block;
    text-align:center;
    font-weight:700;
    margin-bottom:5px;
    color:#374151;
}

.code-table-wrap{
    overflow-x:auto;
    margin-top:12px;
}

.code-table,
.marks-table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
}

.code-table th,
.code-table td,
.marks-table th,
.marks-table td{
    border:1px solid #b8c8b5;
    padding:10px;
    text-align:center;
    vertical-align:middle;
}

.code-table th,
.marks-table th{
    background:#e8f5e9;
    color:#1b5e20;
    font-weight:800;
}

.code-table td:first-child,
.code-table th:first-child{
    font-weight:800;
}

.inline-other{
    margin-top:12px;
    max-width:420px;
}

.table-wrap{
    overflow-x:auto;
}

.marks-table input{
    min-width:120px;
    border:none;
    border-radius:0;
    box-shadow:none;
    padding:10px;
}

.marks-table input:focus{
    box-shadow:inset 0 0 0 2px rgba(31,107,45,.22);
}

.declaration-text{
    line-height:1.8;
    font-size:15px;
    margin-bottom:18px;
}

.declaration-line{
    display:inline-block;
    min-width:230px;
    border-bottom:1px dotted #444;
    height:24px;
    vertical-align:middle;
}

.signature-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    align-items:end;
}

.signature-box{
    text-align:right;
    font-weight:700;
    padding-top:28px;
}

.dd-note{
    border-top:2px solid #1f2937;
    text-align:center;
    padding-top:12px;
    line-height:1.7;
    font-size:15px;
}

.btn-row{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:26px;
}

button{
    border:none;
    border-radius:30px;
    padding:13px 28px;
    font-size:15px;
    font-weight:800;
    cursor:pointer;
}

.reset-btn{
    background:#e5e7eb;
    color:#111827;
}

.submit-btn{
    background:#1f6b2d;
    color:#fff;
}

.submit-btn:hover{
    background:#14551f;
}

@media(max-width:900px){
    .header-grid{
        grid-template-columns:1fr;
    }
    .logo-box{
        margin:auto;
    }
    .candidate-layout{
        grid-template-columns:1fr;
    }
    .photo-box{
        width:100%;
        min-height:170px;
    }
}

@media(max-width:768px){
    body{
        padding:12px 0;
    }
    form{
        padding:18px;
    }
    .form-topbar{
        padding:14px 18px;
    }
    .header h1{
        font-size:22px;
    }
    .header h2,
    .header h3{
        font-size:15px;
    }
    .note-box,
    .form-grid,
    .signature-grid{
        grid-template-columns:1fr;
    }
    .section{
        padding:16px;
    }
    .application-no{
        align-items:flex-start;
        flex-direction:column;
        max-width:100%;
    }
    .btn-row{
        flex-direction:column;
    }
    button{
        width:100%;
    }
}