/* =========================
   GLOBAL RESET
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

/* =========================
   BACKGROUND
========================= */
.admission-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* =========================
   CARD
========================= */
.admission-card {
    width: 100%;
    max-width: 650px;
    background: #ffffff;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

/* =========================
   FORM STEP
========================= */
.form-step {
    display: none;
    max-width: 480px;
    margin: 0 auto;
}

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

/* =========================
   INPUTS
========================= */
input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    font-size: 14px;
    transition: 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255,102,0,0.15);
    outline: none;
}

textarea {
    min-height: 90px;
    resize: none;
}

 .required {
        color: #8B0000;
        font-weight: bold;
        margin-left: 3px;
    }

/* =========================
   ERROR
========================= */
.error {
    color: #e63946;
    font-size: 12px;
    margin-bottom: 10px;
}

/* =========================
   BUTTONS
========================= */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.btn-main {
    background: linear-gradient(135deg, #ff6600, #ff8c00);
    border: none;
    border-radius: 30px;
    padding: 10px 26px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(255,102,0,0.3);
}

.prevBtn {
    background: #ddd;
    border: none;
    border-radius: 30px;
    padding: 10px 22px;
    cursor: pointer;
}

/* =========================
   PROGRESS
========================= */
.progress {
    height: 6px;
    background: #eee;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #ff6600, #ffa500);
    transition: 0.4s;
}

.preview-section {
    background: #fff;
    border-left: 4px solid #ff6600;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.preview-grid div {
    background: #f9fafb;
    padding: 8px;
    border-radius: 6px;
}
/* =========================
   FILE UPLOAD (MODERN UI)
========================= */
.file-upload {
    background: #f9fafb;
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: 0.3s;
    margin-bottom: 20px;
    cursor: pointer;
}

.file-upload:hover {
    border-color: #ff6600;
    background: #fff7f0;
}

.file-upload input {
    display: none;
}

.file-label {
    font-weight: 600;
    color: #444;
    cursor: pointer;
}

.file-upload span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #777;
}

/* IMAGE PREVIEW */
.img-preview {
    display: block;
    margin: 15px auto;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #eee;
}

/* =========================
   LOADER
========================= */
#loader {
    display: none;
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.6);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.spinner {
    width: 55px;
    height: 55px;
    border: 6px solid #fff;
    border-top: 6px solid #ff6600;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

 .same-address-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 15px 0 10px;
        cursor: pointer;
    }

    .same-address-wrapper input {
        width: 18px;
        height: 18px;
        accent-color: #ff7a00;
    }

    /* FIX ALIGNMENT PERFECTLY */
.same-address {
    margin: 15px 0;
}

/* SAME ADDRESS FIX */
.same-address label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* KEEP TEXT IN ONE LINE */
.checkbox-text {
    white-space: nowrap;   /* 🔥 MAIN FIX */
}

/* CHECKBOX ALIGN */
.same-address input[type="checkbox"] {
    margin: 0;
    transform: translateY(1px);
    accent-color: #ff7a00;
}

#gender {
        margin-top: 10px;
    }

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* =========================
   RESPONSIVE DESIGN
========================= */

/* TABLET */
@media (max-width: 768px) {

    .admission-card {
        padding: 25px;
    }

    .form-step {
        max-width: 100%;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn-main,
    .prevBtn {
        width: 100%;
    }
}

/* MOBILE */
@media (max-width: 480px) {

    .admission-card {
        padding: 20px;
        border-radius: 12px;
    }

    input,
    select,
    textarea {
        font-size: 13px;
        padding: 10px;
    }

    h2 {
        font-size: 20px;
    }

    .img-preview {
        width: 100px;
        height: 100px;
    }
}

/* =========================
   PREMIUM UX ENHANCEMENTS
========================= */

/* STEP ANIMATION */
.form-step {
    animation: fadeSlide 0.4s ease;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(25px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* INPUT STATES */
.input-error {
    border: 2px solid #e63946 !important;
    background: #fff5f5;
    animation: shake 0.3s;
}

.input-success {
    border: 2px solid #2ecc71 !important;
    background: #f4fff6;
}

/* SHAKE EFFECT */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

/* ERROR TEXT IMPROVED */
.error {
    font-size: 12px;
    font-weight: 500;
    color: #e63946;
}

/* SUCCESS FEEDBACK */
.success-text {
    color: #2ecc71;
    font-size: 12px;
}

/* BUTTON DISABLED */
.btn-main:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    box-shadow: none;
}

/* PROGRESS SMOOTH */
.progress-bar {
    transition: width 0.5s ease-in-out;
}

/* INPUT HOVER */
input:hover,
select:hover,
textarea:hover {
    border-color: #ff8c00;
}

/* FOCUS ENHANCED */
input:focus,
select:focus,
textarea:focus {
    transform: scale(1.01);
}

/* FILE UPLOAD ACTIVE */
.file-upload.active {
    border-color: #ff6600;
    background: #fff7f0;
}

/* CLICK FEEDBACK */
.btn-main:active {
    transform: scale(0.96);
}


.doc-title {
    margin-top: 20px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.upload-box {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 10px 0;
    cursor: pointer;
    transition: 0.3s;
}

.upload-box:hover {
    border-color: #ff7a00;
    background: #fff8f2;
}

.upload-box p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.preview img {
    max-width: 100px;
    margin-top: 10px;
    border-radius: 8px;
}

.file-info {
    font-size: 13px;
    margin-top: 8px;
}

/* CAPTCHA WRAPPER */
.captcha-wrapper {
    grid-column: span 2;
    margin-top: 10px;
}

/* BOX */
.captcha-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* IMAGE */
.captcha-image img {
    height: 50px;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 4px;
    background: #fff;
}

/* REFRESH BUTTON */
.captcha-refresh {
    border: none;
    background: #f1f3f7;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
}

.captcha-refresh:hover {
    background: #ff6600;
    color: #fff;
    transform: rotate(90deg);
}

/* INPUT */
#captcha {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
    transition: 0.3s;
}

#captcha:focus {
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255,102,0,0.15);
}

/* DECLARATION BOX */
.declaration-box {
    grid-column: span 2;
    background: #fff8f2;
    border: 1px solid #ffd6b3;
    padding: 15px;
    border-radius: 10px;
}

/* LABEL */
.declaration-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

/* HIDE DEFAULT CHECKBOX */
.declaration-label input {
    display: none;
}

/* CUSTOM CHECKBOX */
.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ff6600;
    border-radius: 5px;
    position: relative;
    margin-top: 3px;
}

/* CHECKED STATE */
.declaration-label input:checked + .checkmark {
    background: #ff6600;
}

/* CHECK ICON */
.declaration-label input:checked + .checkmark::after {
    content: "✔";
    position: absolute;
    color: #fff;
    font-size: 12px;
    left: 3px;
    top: -1px;
}

/* TEXT */
.declaration-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* DISABLED BUTTON */
#finalSubmit:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

/* =========================
   FIX PREVIEW LAYOUT (FINAL)
========================= */

/* CARD SECTION IMPROVE */
/* =========================
   PREVIEW UI (FINAL CLEAN)
========================= */

/* PROFILE */
.preview-profile{
    display:flex;
    gap:15px;
    align-items:center;
    background:#fff;
    padding:15px;
    border-radius:12px;
    margin-bottom:20px;
    box-shadow:0 5px 15px rgba(0,0,0,0.05);
}

.preview-profile img{
    width:70px;
    height:70px;
    border-radius:50%;
    object-fit:cover;
}

/* CARD SECTION */
.preview-section{
    background:#fff;
    border-left:4px solid #ff6600;
    padding:18px;
    border-radius:12px;
    margin-bottom:20px;
    box-shadow:0 6px 16px rgba(0,0,0,0.05);
}

/* HEADER */
.preview-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-weight:600;
    font-size:15px;
    margin-bottom:12px;
}

/* EDIT BUTTON */
.preview-header button{
    background:#fff3e6;
    border:1px solid #ff6600;
    padding:4px 10px;
    border-radius:6px;
    cursor:pointer;
    font-size:12px;
    transition:0.3s;
}

.preview-header button:hover{
    background:#ff6600;
    color:#fff;
}

/* GRID */
.preview-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px;
}

/* FIELD BOX */
.preview-grid div{
    background:#f8f9fb;
    padding:12px;
    border-radius:10px;
    display:flex;
    flex-direction:column;
    font-size:14px;
    line-height:1.4;
    word-break:break-word;
    transition:0.2s;
}

/* HOVER EFFECT */
.preview-grid div:hover{
    background:#fff;
    box-shadow:0 4px 12px rgba(0,0,0,0.06);
}

/* LABEL */
.preview-grid strong{
    font-size:12px;
    color:#888;
    margin-bottom:4px;
}

/* VALUE */
.preview-grid span{
    font-size:14px;
    color:#333;
}

/* IMAGE PREVIEW */
.preview-img{
    width:60px;
    border-radius:8px;
    margin-top:5px;
}

/* MISSING FIELD */
.missing{
    color:#e63946;
    font-weight:500;
}

/* REMOVE DEFAULT BUTTON STYLES */
button{
    border:none;
    outline:none;
    font-family:inherit;
}

/* FIX LIGHT BUTTON */
.btn-light{
    background:#f1f3f7;
    border:none;
    padding:8px 14px;
    border-radius:8px;
    cursor:pointer;
    font-size:14px;
    transition:0.3s;
}

.btn-light:hover{
    background:#e0e3ea;
}

/* BACK BUTTON */
.back-btn{
    background:#ddd;
    border:none;
    padding:10px 20px;
    border-radius:25px;
    cursor:pointer;
}

/* CONTINUE BUTTON */
.continue-btn{
    background:#ff6600;
    border:none;
    padding:10px 24px;
    border-radius:25px;
    color:#fff;
    font-weight:600;
    cursor:pointer;
}

.continue-btn:hover{
    background:#e65c00;
}

/* =========================
   MOBILE
========================= */
@media(max-width:768px){
    .preview-grid{
        grid-template-columns:1fr;
    }
}