* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f7f1e8;
    color: #3d2a20;
    font-family: Arial, "Noto Sans Devanagari", sans-serif;
}

.page-wrap {
    min-height: 100vh;
}

.main-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 35px rgba(75, 45, 20, 0.13);
}

.identity {
    text-align: center;
    padding: 24px 16px 18px;
    background: #fffdf8;
}

.shivir-logo {
    width: 190px;
    max-width: 52vw;
    height: auto;
    display: block;
    margin: 0 auto 12px;
}

.identity h1 {
    margin: 0;
    color: #7b211b;
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.25;
}

.date-line {
    margin-top: 8px;
    color: #6d4b2c;
    font-size: 18px;
    font-weight: 700;
}

.poster-wrap {
    width: 100%;
    background: #fff;
    text-align: center;
}

.shivir-poster {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.form-area {
    padding: 26px 28px 34px;
}

.intro {
    text-align: center;
    margin-bottom: 12px;
}

.intro h2 {
    color: #8B4513;
    font-weight: 800;
    margin-bottom: 6px;
}

.intro p {
    color: #6f6259;
    margin-bottom: 0;
}

.section-title {
    color: #8B4513;
    font-size: 22px;
    font-weight: 800;
    border-bottom: 1px solid #eadcca;
    padding-bottom: 9px;
    margin-top: 28px;
    margin-bottom: 18px;
}

.form-label {
    font-weight: 700;
    color: #4c382d;
}

.required {
    color: #dc3545;
}

.form-control,
.form-select {
    min-height: 47px;
    border-color: #d9cbbd;
    border-radius: 9px;
}

textarea.form-control {
    min-height: 85px;
}

.form-control:focus,
.form-select:focus {
    border-color: #a86b37;
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.12);
}

.help-text {
    color: #777;
    font-size: 13px;
    margin-top: 6px;
}

.photo-preview {
    display: none;
    width: 180px;
    height: 180px;
    object-fit: cover;
    margin-top: 13px;
    border: 2px solid #dfc8ad;
    border-radius: 12px;
}

.declaration-box {
    background: #fffaf2;
    border: 1px solid #eadcca;
    border-radius: 10px;
    padding: 14px;
}

.btn-submit {
    margin-top: 22px;
    min-height: 52px;
    border: 0;
    border-radius: 10px;
    background: #8B4513;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.btn-submit:hover {
    background: #6e3410;
    color: #fff;
}

.btn-submit:disabled {
    opacity: 0.7;
}

.alert {
    border-radius: 12px;
}

.success-registration {
    text-align: center;
    padding: 26px 12px;
}

.registration-number {
    color: #8B4513;
    font-size: 40px;
    font-weight: 900;
    letter-spacing: 1px;
    margin: 12px 0;
}

@media (max-width: 576px) {
    .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .main-card {
        border-radius: 14px;
    }

    .identity {
        padding: 20px 12px 15px;
    }

    .shivir-logo {
        width: 150px;
    }

    .identity h1 {
        font-size: 27px;
    }

    .date-line {
        font-size: 16px;
    }

    .form-area {
        padding: 20px 16px 26px;
    }

    .section-title {
        font-size: 20px;
    }

    .registration-number {
        font-size: 32px;
    }
}


.returning-user {
    background: #fffaf2;
    border: 1px solid #eadcca;
    border-radius: 12px;
    padding: 18px;
}

.returning-user h3 {
    color: #8B4513;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
}

.returning-user p {
    color: #6f6259;
    margin-bottom: 14px;
}

.btn-outline-submit {
    min-height: 48px;
    border: 2px solid #8B4513;
    border-radius: 9px;
    color: #8B4513;
    background: #fff;
    font-weight: 800;
}

.btn-outline-submit:hover {
    background: #8B4513;
    color: #fff;
}

.download-button {
    display: inline-block;
    text-decoration: none;
    padding: 12px 18px;
}

.date-field {
    letter-spacing: .5px;
}

.name-field {
    text-transform: capitalize;
}

.mobile-validation-message {
    color: #dc3545;
    font-size: 13px;
    font-weight: 600;
    margin-top: 5px;
}

.mobile-field.is-invalid {
    border-color: #dc3545;
}

.mobile-field.is-valid {
    border-color: #198754;
}


/* FORM UPLOAD WAIT OVERLAY */
.upload-wait-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.upload-wait-overlay.show {
    display: flex;
}

.upload-wait-box {
    width: min(92vw, 390px);
    background: #fff;
    border-radius: 16px;
    padding: 28px 22px;
    text-align: center;
    box-shadow: 0 10px 35px rgba(0,0,0,.25);
}

.upload-wait-box h3 {
    margin: 12px 0 8px;
    color: #7b211b;
    font-weight: 800;
}

.upload-wait-box p {
    margin: 0;
    color: #5f554d;
    line-height: 1.6;
}

.upload-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto;
    border: 4px solid #eadcca;
    border-top-color: #8B4513;
    border-radius: 50%;
    animation: uploadSpin .8s linear infinite;
}

@keyframes uploadSpin {
    to { transform: rotate(360deg); }
}
