* {
    box-sizing: border-box;
}

:root {
    --primary: #173b63;
    --primary-dark: #102a47;
    --accent: #1d7a61;
    --accent-soft: #eaf7f2;
    --background: #edf2f6;
    --card: #ffffff;
    --text: #172033;
    --muted: #667085;
    --border: #d8e0e8;
    --danger: #c53939;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;
    background:
        linear-gradient(
            135deg,
            #eef4f8 0%,
            #f8fafc 55%,
            #eef5f2 100%
        );
    color: var(--text);
}

.page-shell {
    min-height: 100vh;
    padding: 42px 18px;
}

.registration-card {
    width: min(1000px, 100%);
    margin: 0 auto;
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(23,59,99,.10);
    border-radius: 20px;
    box-shadow:
        0 18px 50px rgba(20, 41, 65, .10);
}

.page-header {
    padding: 34px 38px 30px;
    color: #fff;
    background:
        linear-gradient(
            120deg,
            var(--primary-dark),
            var(--primary)
        );
}

.header-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 11px;
    border: 1px solid rgba(255,255,255,.30);
    border-radius: 50px;
    background: rgba(255,255,255,.10);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.1px;
}

.page-header h1 {
    margin: 0 0 9px;
    max-width: 780px;
    font-size: clamp(27px, 4vw, 42px);
    line-height: 1.12;
}

.page-header p {
    max-width: 700px;
    margin: 0;
    color: rgba(255,255,255,.82);
    line-height: 1.6;
}

.mandatory-notice {
    margin: 24px 38px 0;
    padding: 13px 16px;
    border: 1px solid #c7eadc;
    border-radius: 10px;
    background: var(--accent-soft);
    color: #28594b;
    font-size: 14px;
}

form {
    padding: 8px 38px 36px;
}

.form-section {
    margin-top: 30px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 0;
    font-size: 20px;
}

.section-number {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 19px 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

label {
    font-size: 13px;
    font-weight: 700;
    color: #27364a;
}

label span {
    color: var(--danger);
}

input,
select {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    font: inherit;
    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

input:hover,
select:hover {
    border-color: #b9c6d3;
}

input:focus,
select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow:
        0 0 0 3px rgba(23,59,99,.10);
}

.hidden {
    display: none !important;
}

.form-actions {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid #edf0f3;
}

.submit-button {
    min-width: 190px;
    min-height: 48px;
    padding: 12px 24px;
    border: 0;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
}

.submit-button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.staging-note {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 12px;
}

/* SUCCESS POPUP */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(14, 27, 42, .68);
}

.success-modal {
    width: min(520px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 18px;
    background: #fff;
    box-shadow:
        0 24px 65px rgba(0,0,0,.22);
    text-align: center;
}

.success-icon {
    display: flex;
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f7f1;
    color: #17805f;
    font-size: 31px;
    font-weight: 800;
}

.success-modal h2 {
    margin: 0 0 18px;
}

.allotted-number {
    margin: 18px 0;
    padding: 15px;
    border-radius: 10px;
    background: #f1f5f9;
}

.allotted-number span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.allotted-number strong {
    font-size: 25px;
    letter-spacing: 1px;
    color: var(--primary);
}

.success-modal p {
    color: #536173;
    line-height: 1.65;
}

.urdu-message {
    margin-top: 18px;
    padding: 16px;
    border-radius: 10px;
    background: #f7f8fa;
    color: #384657;
    font-family:
        "Noto Nastaliq Urdu",
        "Segoe UI",
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 2;
    text-align: right;
}

.modal-button {
    min-width: 110px;
    margin-top: 20px;
    padding: 11px 22px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 700px) {

    .page-shell {
        padding: 12px;
    }

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

    .page-header {
        padding: 26px 20px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .mandatory-notice {
        margin:
            18px 20px
            0;
    }

    form {
        padding:
            5px 20px
            28px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-section {
        margin-top: 25px;
    }

    input,
    select {
        min-height: 50px;
        font-size: 16px;
    }

    .submit-button {
        width: 100%;
    }

    .success-modal {
        padding: 24px 18px;
    }
}

/* Submission error popup */

.error-icon {
    display: flex;
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff0f0;
    color: #c23b3b;
    font-size: 31px;
    font-weight: 800;
}

.error-modal h2 {
    color: #8f2f2f;
}

.submit-button:not(:disabled) {
    cursor: pointer;
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.submit-button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow:
        0 8px 20px rgba(29,122,97,.20);
}

