
/* =========================================================
   1. RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f4f8fd;
    color: #1a2b4a;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* =========================================================
   2. PAGE
========================================================= */

.ms-application-page {
    min-height: 100vh;
    padding: 48px 20px 70px;
}

.ms-application-shell {
    position: relative;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}


/* =========================================================
   2b. APPLICATION OUTER FRAME — DESKTOP ONLY
   Pseudo-element only, so it never affects layout width.
========================================================= */

.ms-application-shell::before {
    content: "";
    position: absolute;
    inset: -24px;
    z-index: -1;
    pointer-events: none;

    border: 1px solid rgba(105, 120, 140, 0.16);
    border-radius: 24px;

    box-shadow:
        0 0 24px rgba(70, 85, 105, 0.06),
        0 18px 50px rgba(70, 85, 105, 0.05);
}


/* =========================================================
   3. APPLICATION HEADER
========================================================= */

.ms-application-header {
    margin-bottom: 32px;
}

.ms-application-header-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.ms-application-header-content {
    flex: 1 1 auto;
    min-width: 0;
}

.ms-application-header h1 {
    margin: 0 0 12px;
    color: #0b4ea2;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.ms-application-intro {
    max-width: 700px;
    margin: 0;
    color: #68788f;
    font-size: 16px;
    line-height: 1.7;
}


/* =========================================================
   3b. HEADER LOGO
========================================================= */

.ms-application-header-logo {
    flex: 0 0 360px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.ms-application-header-logo img {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    object-fit: contain;
}


/* =========================================================
   4. APPLICATION CARD
========================================================= */

.ms-application-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #dde6f2;
    border-radius: 18px;
    box-shadow:
        0 20px 50px rgba(11, 78, 162, 0.08);
}


/* =========================================================
   5. PROGRESS AREA
========================================================= */

.ms-progress-area {
    padding: 28px 32px 24px;
    background: #f8fbff;
    border-bottom: 1px solid #e4ecf6;
}

.ms-progress-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.ms-progress-step-text {
    font-size: 14px;
    font-weight: 700;
    color: #0b4ea2;
}

.ms-progress-percent {
    font-size: 13px;
    font-weight: 600;
    color: #6b7b96;
}

.ms-progress-bar {
    width: 100%;
    height: 6px;
    margin-bottom: 26px;
    overflow: hidden;
    background: #e2ebf7;
    border-radius: 999px;
}

.ms-progress-bar-fill {
    width: 14.2857%;
    height: 100%;
    background: linear-gradient(90deg, #0b4ea2 0%, #1ec0ee 100%);
    border-radius: inherit;
    transition: width 0.3s ease;
}


/* =========================================================
   6. STEP INDICATORS
========================================================= */

.ms-step-track {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.ms-step-indicator {
    min-width: 0;
    text-align: center;
}

.ms-step-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 auto 8px;
    border: 2px solid #cfdcee;
    border-radius: 50%;
    background: #fff;
    color: #7d8ca6;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.ms-step-label {
    display: block;
    overflow: hidden;
    color: #8391a8;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
}

.ms-step-indicator.is-active .ms-step-circle {
    border-color: #0b4ea2;
    background: #0b4ea2;
    color: #fff;
    box-shadow:
        0 0 0 5px rgba(11, 78, 162, 0.12);
}

.ms-step-indicator.is-active .ms-step-label {
    color: #0b4ea2;
}

.ms-step-indicator.is-complete .ms-step-circle {
    border-color: #1ec0ee;
    background: #e5f7fd;
    color: #0b4ea2;
}


/* =========================================================
   7. FORM BODY
========================================================= */

.ms-form-body {
    padding: 42px 44px 36px;
}

.ms-form-step {
    display: none;
}

.ms-form-step.is-active {
    display: block;
    animation: msStepIn 0.22s ease;
}

@keyframes msStepIn {

    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   8. SECTION HEADING
========================================================= */

.ms-section-heading {
    margin-bottom: 32px;
}

.ms-section-kicker {
    margin-bottom: 8px;
    color: #1ec0ee;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.ms-section-heading h2 {
    margin: 0 0 9px;
    color: #0b4ea2;
    font-size: 27px;
    letter-spacing: -0.02em;
}

.ms-section-heading p {
    max-width: 680px;
    margin: 0;
    color: #68788f;
    font-size: 14px;
    line-height: 1.65;
}


/* =========================================================
   9. TWO-COLUMN FIELD GRID
========================================================= */

.ms-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 28px;
}

.ms-field {
    min-width: 0;
}

.ms-field-placeholder {
    visibility: hidden;
    pointer-events: none;
}

.ms-field-full {
    grid-column: 1 / -1;
}


/* =========================================================
   10. LABELS
========================================================= */

.ms-label {
    display: block;
    margin-bottom: 8px;
    color: #2c3d5c;
    font-size: 13px;
    font-weight: 700;
}

.ms-required {
    margin-left: 2px;
    color: #d6278a;
}


/* =========================================================
   11. INPUTS
========================================================= */

.ms-input,
.ms-select {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid #c9d6e8;
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: #1a2b4a;
    font-size: 15px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.ms-input::placeholder {
    color: #9aa8bd;
}

.ms-input:hover,
.ms-select:hover {
    border-color: #9fb2cd;
}

.ms-input:focus,
.ms-select:focus {
    border-color: #0b4ea2;
    box-shadow:
        0 0 0 4px rgba(11, 78, 162, 0.12);
}

.ms-field.has-error .ms-input,
.ms-field.has-error .ms-select {
    border-color: #d6278a;
    box-shadow:
        0 0 0 3px rgba(214, 39, 138, 0.10);
}


/* =========================================================
   11b. FILE INPUT
========================================================= */

.ms-file-input {
    padding: 10px 12px;
    height: auto;
}


/* =========================================================
   12. FIELD SUPPORT TEXT
========================================================= */

.ms-field-help {
    margin-top: 7px;
    color: #8493ab;
    font-size: 12px;
    line-height: 1.5;
}

.ms-field-error {
    display: none;
    margin-top: 7px;
    color: #c0207a;
    font-size: 12px;
    font-weight: 600;
}

.ms-field.has-error .ms-field-error {
    display: block;
}


/* =========================================================
   13. PASSWORD FIELD
========================================================= */

.ms-password-wrap {
    position: relative;
}

.ms-password-wrap .ms-input {
    padding-right: 76px;
}

.ms-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    padding: 5px 4px;
    border: 0;
    background: transparent;
    color: #0b4ea2;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transform: translateY(-50%);
}


/* =========================================================
   14. PROFILE PHOTO UPLOAD
========================================================= */

.ms-photo-upload {
    position: relative;
    min-height: 176px;
    padding: 22px;
    border: 1.5px dashed #b6c8e0;
    border-radius: 12px;
    background: #f8fbff;
    text-align: center;
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.ms-photo-upload:hover {
    border-color: #0b4ea2;
    background: #f4f9ff;
}

.ms-photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ms-photo-empty {
    display: block;
}

.ms-photo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #e5f2fd;
    color: #0b4ea2;
    font-size: 21px;
    font-weight: 700;
}

.ms-photo-title {
    margin-bottom: 5px;
    color: #2c3d5c;
    font-size: 14px;
    font-weight: 700;
}

.ms-photo-description {
    margin-bottom: 14px;
    color: #8493ab;
    font-size: 12px;
}

.ms-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid #0b4ea2;
    border-radius: 7px;
    background: #fff;
    color: #0b4ea2;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ms-upload-button:hover {
    background: #f0f7ff;
}

.ms-photo-preview {
    display: none;
}

.ms-photo-upload.has-photo .ms-photo-empty {
    display: none;
}

.ms-photo-upload.has-photo .ms-photo-preview {
    display: block;
}

.ms-photo-preview-image {
    width: 82px;
    height: 82px;
    margin-bottom: 10px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(11, 78, 162, 0.18);
    object-fit: cover;
}

.ms-photo-filename {
    margin-bottom: 12px;
    color: #4b5d7a;
    font-size: 12px;
    font-weight: 600;
    word-break: break-word;
}

.ms-photo-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.ms-photo-action {
    padding: 7px 11px;
    border: 0;
    border-radius: 6px;
    background: #eef4fb;
    color: #3a4d6b;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.ms-photo-action.is-remove {
    color: #c0207a;
}


/* =========================================================
   15. CHOICE / CHECKBOX GROUPS
========================================================= */

.ms-choice-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;

    width: 350px;
    max-width: 100%;
}

.ms-choice {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    min-height: 38px;
    padding: 8px 12px;

    border: 1px solid #c9d7ea;
    border-radius: 9px;

    background: #fff;
    color: #1a2b4a;

    font-size: 14px;
    line-height: 1.4;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.ms-choice:hover {
    border-color: #1ec0ee;
    background: #f8fbff;
}

.ms-choice:has(input:checked) {
    border-color: #0b4ea2;
    background: #eef5ff;
    box-shadow:
        0 0 0 3px rgba(11, 78, 162, 0.07);
}

.ms-choice input {
    width: 17px;
    height: 17px;
    margin: 0;

    flex: 0 0 auto;

    accent-color: #0b4ea2;
}

.ms-choice span {
    min-width: 0;
}


/* =========================================================
   16. FORM NAVIGATION
========================================================= */

.ms-form-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 42px;
    padding-top: 26px;
    border-top: 1px solid #edf2f8;
}

.ms-nav-spacer {
    flex: 1;
}

.ms-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.ms-button:active {
    transform: translateY(1px);
}

.ms-button-primary {
    border: 1px solid #0b4ea2;
    background: #0b4ea2;
    color: #fff;
}

.ms-button-primary:hover {
    background: #093f85;
    border-color: #093f85;
}

.ms-button-secondary {
    border: 1px solid #c9d6e8;
    background: #fff;
    color: #3a4d6b;
}

.ms-button-secondary:hover {
    border-color: #9fb2cd;
    background: #f8fbff;
}


/* =========================================================
   17. PLACEHOLDER STEPS
========================================================= */

.ms-coming-step {
    padding: 55px 20px;
    border: 1px dashed #c9d6e8;
    border-radius: 12px;
    background: #f8fbff;
    text-align: center;
}

.ms-coming-step strong {
    display: block;
    margin-bottom: 7px;
    color: #0b4ea2;
    font-size: 18px;
}

.ms-coming-step span {
    color: #7d8ca6;
    font-size: 13px;
}


/* =========================================================
   18. FOOTER NOTE
========================================================= */

.ms-application-note {
    max-width: 760px;
    margin: 24px auto 0;
    color: #7b8aa3;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}


/* =========================================================
   19. CONFIDENTIALITY DECLARATION (STEP 5)
========================================================= */

.ms-declaration-box {
    margin-bottom: 28px;
    padding: 22px;

    border: 1px solid #d8e3f1;
    border-radius: 12px;

    background: #f8fbff;
}

.ms-declaration-box h3 {
    margin: 0 0 14px;

    color: #0b4ea2;

    font-size: 16px;
    font-weight: 700;
}

.ms-declaration-content {
    max-height: 190px;
    overflow-y: auto;

    padding: 16px 18px;

    border: 1px solid #d4dfed;
    border-radius: 9px;

    background: #fff;

    color: #465873;

    font-size: 14px;
    line-height: 1.65;
}

.ms-declaration-content p {
    margin: 0 0 14px;
}

.ms-declaration-content p:last-child {
    margin-bottom: 0;
}

.ms-declaration-agreement {
    display: flex;
    align-items: flex-start;
    gap: 11px;

    margin-top: 16px;

    color: #17345d;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;

    cursor: pointer;
}

.ms-declaration-agreement input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;

    flex: 0 0 auto;

    accent-color: #0b4ea2;
}

.ms-declaration-fields {
    margin-top: 32px;
}


/* =========================================================
   20. DISCLOSURE BOX (STEP 6)
   (kept minimal — assumes similar style to declaration box)
========================================================= */

.ms-disclosure-box {
    margin-bottom: 28px;
    padding: 22px;

    border: 1px solid #d8e3f1;
    border-radius: 12px;

    background: #f8fbff;
}

.ms-disclosure-box h3 {
    margin: 0 0 18px;

    color: #0b4ea2;

    font-size: 17px;
    font-weight: 700;
}

.ms-disclosure-section {
    margin-bottom: 22px;
}

.ms-disclosure-section:last-child {
    margin-bottom: 0;
}

.ms-disclosure-section h4 {
    margin: 0 0 10px;

    color: #17345d;

    font-size: 15px;
    font-weight: 700;
}

.ms-disclosure-section p {
    margin: 0 0 12px;

    color: #465873;

    font-size: 14px;
    line-height: 1.65;
}

.ms-disclosure-section p:last-child {
    margin-bottom: 0;
}

.ms-disclosure-section ul {
    margin: 0 0 12px;
    padding-left: 20px;

    color: #465873;

    font-size: 14px;
    line-height: 1.65;
}

.ms-disclosure-section ul li {
    margin-bottom: 6px;
}

.ms-disclosure-section ul li:last-child {
    margin-bottom: 0;
}

.ms-disclosure-section a {
    color: #0b4ea2;
    font-weight: 600;
    text-decoration: underline;
}

.ms-disclosure-section a:hover {
    color: #093f85;
}


/* =========================================================
   21. FINAL DECLARATION (STEP 7)
========================================================= */

.ms-final-declaration {
    margin-bottom: 32px;
    padding: 22px;

    border: 1px solid #d8e3f1;
    border-radius: 12px;

    background: #f8fbff;
}

.ms-final-declaration-notice {
    margin-bottom: 20px;
    padding: 16px 18px;

    border-left: 4px solid #1ec0ee;
    border-radius: 6px;

    background: #eef7fe;

    color: #2c4a76;

    font-size: 13.5px;
    line-height: 1.65;
}

.ms-final-declaration-content p {
    margin: 0 0 14px;

    color: #465873;

    font-size: 14px;
    line-height: 1.65;
}

.ms-final-declaration-content p:last-child {
    margin-bottom: 0;
}

.ms-final-declaration-fields {
    margin-top: 8px;
}


/* =========================================================
   22. SUBMIT BUTTON
========================================================= */

.ms-submit-button {
    min-width: 220px;
}


/* =========================================================
   23. TABLET (≤ 850px)
========================================================= */

@media (max-width: 850px) {

    .ms-application-page {
        padding: 28px 14px 50px;
    }

    /* Disable outer frame on tablet/mobile */

    .ms-application-shell::before {
        display: none;
    }


    /* HEADER */

    .ms-application-header {
        padding: 0 5px;
    }

    .ms-application-header-layout {
        align-items: flex-start;
        flex-direction: column-reverse;
        gap: 24px;
    }

    .ms-application-header-content {
        width: 100%;
    }

    .ms-application-header-logo {
        flex: none;
        width: 100%;
        justify-content: flex-start;
    }

    .ms-application-header-logo img {
        width: min(100%, 320px);
        max-width: 320px;
    }


    /* PROGRESS + FORM */

    .ms-progress-area {
        padding: 24px 20px;
    }

    .ms-form-body {
        padding: 32px 24px;
    }

    .ms-step-label {
        display: none;
    }

}


/* =========================================================
   24. MOBILE (≤ 650px)
========================================================= */

@media (max-width: 650px) {

    .ms-application-page {
        padding-left: 10px;
        padding-right: 10px;
    }


    /* HEADER */

    .ms-application-header {
        margin-bottom: 24px;
        padding: 0 5px;
    }

    .ms-application-header-layout {
        gap: 20px;
    }

    .ms-application-header-logo img {
        width: min(100%, 280px);
        max-width: 280px;
    }

    .ms-application-header h1 {
        margin-bottom: 10px;
        font-size: 32px;
    }

    .ms-application-intro {
        font-size: 15px;
        line-height: 1.65;
    }


    /* CARD */

    .ms-application-card {
        border-radius: 13px;
    }


    /* PROGRESS */

    .ms-progress-area {
        padding: 20px 16px;
    }

    .ms-progress-summary {
        margin-bottom: 16px;
    }

    .ms-step-track {
        gap: 3px;
    }

    .ms-step-circle {
        width: 29px;
        height: 29px;
        font-size: 11px;
    }


    /* FORM */

    .ms-form-body {
        padding: 28px 18px 24px;
    }

    .ms-field-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ms-field-placeholder {
        display: none;
    }

    .ms-choice-group {
        width: 100%;
    }

    .ms-form-navigation {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .ms-button {
        width: 100%;
    }

    .ms-nav-spacer {
        display: none;
    }

}


/* =========================================================
   25. DECLARATION BOXES — SMALLER SCREENS (≤ 700px)
========================================================= */

@media (max-width: 700px) {

    .ms-declaration-box,
    .ms-disclosure-box,
    .ms-final-declaration {
        padding: 16px;
    }

    .ms-declaration-content {
        max-height: 220px;
        padding: 14px;
    }

}

/* =========================================================
   CAPTCHA / SECURITY CHECK
========================================================= */

.ms-captcha-panel {
    width: 100%;
    margin: 30px 0;

    overflow: hidden;

    background: #f8fbff;

    border: 1px solid #d8e3f1;
    border-radius: 12px;
}


/* =========================================================
   CAPTCHA ROWS
========================================================= */

.ms-captcha-row {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
}


/* =========================================================
   CAPTCHA TITLE
========================================================= */

.ms-captcha-title {
    min-height: 48px;
    padding: 12px 20px;

    gap: 5px;

    background: #eef7fe;

    border-bottom: 1px solid #d8e3f1;

    color: #465873;

    font-size: 13px;
    line-height: 1.5;
}

.ms-captcha-title strong {
    color: #0b4ea2;
    font-weight: 800;
}


/* =========================================================
   CAPTCHA QUESTION
========================================================= */

.ms-captcha-question {
    min-height: 54px;
    padding: 14px 20px 5px;

    color: #17345d;

    font-size: 21px;
    font-weight: 700;
}


/* =========================================================
   CAPTCHA ANSWER
========================================================= */

.ms-captcha-answer {
    padding: 5px 20px 18px;
}

.ms-captcha-answer input {
    width: 150px;
    height: 44px;

    padding: 0 14px;

    background: #ffffff;

    border: 1px solid #c9d6e8;
    border-radius: 9px;

    outline: none;

    color: #1a2b4a;

    font-size: 15px;
    font-weight: 600;
    text-align: center;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.ms-captcha-answer input::placeholder {
    color: #9aa8bd;
    font-weight: 400;
}

.ms-captcha-answer input:hover {
    border-color: #9fb2cd;
}

.ms-captcha-answer input:focus {
    border-color: #0b4ea2;

    box-shadow:
        0 0 0 4px rgba(11, 78, 162, 0.10);
}


/* =========================================================
   CAPTCHA ERROR
========================================================= */

.ms-captcha-panel .ms-field-error {
    margin: 0;
    padding: 10px 16px;

    border-top: 1px solid #f2c7dc;

    background: #fff7fb;

    color: #c0207a;

    text-align: center;
}


/* =========================================================
   REMOVE NUMBER ARROWS
========================================================= */

.ms-captcha-answer input::-webkit-outer-spin-button,
.ms-captcha-answer input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.ms-captcha-answer input[type="number"] {
    -moz-appearance: textfield;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .ms-captcha-panel {
        margin: 24px 0;
    }

    .ms-captcha-title {
        min-height: 46px;
        padding: 11px 14px;

        flex-wrap: wrap;
    }

    .ms-captcha-question {
        min-height: 50px;
        padding-top: 13px;

        font-size: 19px;
    }

    .ms-captcha-answer {
        padding: 4px 14px 16px;
    }

    .ms-captcha-answer input {
        width: 140px;
        height: 43px;
    }

}