.edumi-landing-page {
    --application-brand: var(--edumi-blue, #0466c2);
    --application-navy: var(--edumi-navy, #102a43);
    --application-border: var(--edumi-border, #dfe7f1);
    --application-soft: var(--edumi-soft, #eef4fb);
    --application-muted: var(--edumi-muted, #62748a);
    --application-shadow: 0 10px 24px rgba(16, 42, 67, 0.06);

    min-height: 100vh;
}

.edumi-landing-page .page-shell {
    width: min(980px, calc(100% - 32px));
    max-width: 980px;
    margin: 0 auto;
}

.edumi-landing-page .hero-wrap,
.edumi-landing-page .progress-shell,
.edumi-landing-page .section-box,
.edumi-landing-page .card {
    max-width: 100%;
    border: 1px solid var(--application-border);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: var(--application-shadow);
}

.edumi-landing-page .hero-wrap {
    margin-bottom: 22px;
    padding: 28px 24px 20px;
}

.edumi-landing-page .brand-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
}

.edumi-landing-page .brand-logos a {
    display: inline-flex;
    align-items: center;
}

.edumi-landing-page .brand-logos img {
    width: auto;
    object-fit: contain;
}

.edumi-landing-page .brand-logos img:first-child {
    max-height: 42px;
}

.edumi-landing-page .brand-logos img:last-child {
    max-height: 54px;
}

.edumi-landing-page .hero-title {
    margin-bottom: 8px;
    color: var(--application-brand);
    font-weight: 800;
}

.edumi-landing-page .hero-subtitle {
    margin-bottom: 0;
    color: var(--application-muted);
    font-size: 0.86rem;
}

.edumi-landing-page .progress-shell {
    margin-bottom: 20px;
    padding: 18px 18px 14px;
}

.edumi-landing-page .progress-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.edumi-landing-page .step-indicator {
    margin: 0;
    color: var(--application-brand);
    font-weight: 800;
}

.edumi-landing-page .progress-percent {
    color: var(--application-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.edumi-landing-page .premium-progress {
    position: relative;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--application-soft, #eef4fb);
}

.edumi-landing-page .premium-progress .progress-bar {
    position: relative;
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff3e3e 0%, #a00070 48%, #0466c2 100%);
    transition: width 0.35s ease;
}

.edumi-landing-page .premium-progress .progress-bar::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
    content: "";
}

.edumi-landing-page .step-dots {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.edumi-landing-page .step-dot {
    border: 1px solid var(--application-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--application-muted);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 7px 6px;
    text-align: center;
}

.edumi-landing-page .step-dot.active {
    border-color: rgba(4, 102, 194, 0.28);
    background: var(--application-soft);
    color: var(--application-brand);
}

.edumi-landing-page .save-status {
    min-height: 20px;
    margin-top: 10px;
    color: var(--application-brand);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.edumi-landing-page .form-step {
    display: none;
}

.edumi-landing-page .form-step.active {
    display: block;
}

.edumi-landing-page .form-step .row {
    row-gap: 1rem;
}

.edumi-landing-page .card {
    overflow: hidden;
}

.edumi-landing-page .card-header {
    border-bottom: 0;
    background: linear-gradient(135deg, #ff3e3e 0%, #a00070 48%, #0466c2 100%);
    color: #ffffff;
    font-weight: 800;
    padding: 15px 18px;
}

.edumi-landing-page .card-body {
    background: #ffffff;
    padding: 24px;
}

.edumi-landing-page .form-label.fw-semibold,
.edumi-landing-page .fw-semibold {
    color: var(--application-navy);
}

.edumi-landing-page .form-control,
.edumi-landing-page .form-select {
    min-height: 46px;
    border: 1px solid var(--application-border);
    border-radius: 8px;
    box-shadow: none;
}

.edumi-landing-page textarea.form-control {
    min-height: auto;
}

.edumi-landing-page .form-control:focus,
.edumi-landing-page .form-select:focus {
    border-color: var(--application-brand);
    box-shadow: 0 0 0 0.2rem rgba(4, 102, 194, 0.12);
}

.edumi-landing-page .form-text,
.edumi-landing-page .invalid-feedback,
.edumi-landing-page .valid-feedback {
    line-height: 1.45;
}

.edumi-landing-page .opt-label {
    color: var(--application-muted);
    font-size: 0.85em;
    font-weight: 400;
}

.edumi-landing-page .section-box {
    background: var(--application-soft, #eef4fb);
    padding: 14px;
}

.edumi-landing-page .application-terms-card {
    border: 1px solid var(--application-border);
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(16, 42, 67, 0.05);
}

.edumi-landing-page .application-terms-title {
    padding: 14px 18px;
    background: linear-gradient(180deg, #f3f7fc 0%, #e7f0fb 100%);
    border-bottom: 1px solid var(--application-border);
    color: var(--application-navy);
    font-size: 0.96rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.edumi-landing-page .application-terms-body {
    padding: 16px 18px 14px;
}

.edumi-landing-page .application-terms-body p {
    margin: 0 0 10px;
    color: var(--application-navy);
    font-size: 0.92rem;
    line-height: 1.65;
}

.edumi-landing-page .application-terms-body p:last-child {
    margin-bottom: 0;
}

.edumi-landing-page .signature-wrapper {
    width: 100%;
    max-width: 520px;
    margin: auto;
    border: 2px dashed rgba(4, 102, 194, 0.35);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--application-soft);
}

.edumi-landing-page #signature-pad {
    display: block;
    width: 100%;
    height: 150px;
    cursor: crosshair;
}

@media (max-width: 767.98px) {
    .edumi-landing-page .application-terms-title {
        padding: 12px 14px;
        font-size: 0.88rem;
    }

    .edumi-landing-page .application-terms-body {
        padding: 14px;
    }

    .edumi-landing-page .application-terms-body p {
        font-size: 0.88rem;
        line-height: 1.58;
    }
}

.edumi-landing-page .btn {
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 10px 20px;
}

.edumi-landing-page .btn-primary,
.edumi-landing-page .btn-success {
    border: 0 !important;
    background: linear-gradient(135deg, #ff3e3e 0%, #a00070 48%, #0466c2 100%);
    background-size: 150% auto;
    color: #ffffff !important;
    transition: background-position 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.edumi-landing-page .btn-primary:hover,
.edumi-landing-page .btn-success:hover {
    border: 0 !important;
    background-position: right center;
    box-shadow: 0 10px 22px rgba(16, 42, 67, 0.12);
    transform: translateY(-1px);
}

.edumi-landing-page button[onclick^="nextStep"],
.edumi-landing-page button[onclick^="prevStep"] {
    border: 1.5px solid var(--application-brand) !important;
    background: #ffffff !important;
    color: var(--application-brand) !important;
    box-shadow: none;
}

.edumi-landing-page button[onclick^="nextStep"]:hover,
.edumi-landing-page button[onclick^="prevStep"]:hover {
    border-color: transparent !important;
    background: linear-gradient(135deg, #ff3e3e 0%, #a00070 48%, #0466c2 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(160, 0, 21, 0.18);
    transform: translateY(-1px);
}

.edumi-landing-page .clear-x-top-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: #ffffff;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.edumi-landing-page .clear-x-top-btn:hover {
    border-color: #f43f5e;
    background: #fff1f2;
    color: #be123c;
    transform: scale(1.05);
}

.edumi-landing-page .clear-x-top-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.15);
}

#pdf-template,
#pdf-template-clone,
#pdf-template *,
#pdf-template-clone * {
    box-sizing: border-box;
    font-family: "Inter", Arial, sans-serif;
    color: #1f2937;
}

#pdf-template,
#pdf-template-clone {
    display: none;
    width: 794px !important;
    min-width: 794px !important;
    max-width: 794px !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    padding: 24px 32px 42px !important;
    font-size: 10.5px !important;
    line-height: 1.35 !important;
}

#pdf-template table,
#pdf-template-clone table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
}

#pdf-template th,
#pdf-template td,
#pdf-template-clone th,
#pdf-template-clone td {
    padding: 5px 6px !important;
    font-size: 9.5px !important;
    overflow-wrap: break-word !important;
    vertical-align: top !important;
    white-space: normal !important;
    word-break: normal !important;
}

.pdf-page {
    width: 100%;
    page-break-after: always;
}

.pdf-page:last-child {
    page-break-after: auto;
}

.pdf-header {
    margin-bottom: 18px;
    border-bottom: 2px solid #dbe7f3;
    padding-bottom: 12px;
    text-align: center;
}

.pdf-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 10px;
}

.pdf-logos img:first-child {
    width: auto;
    max-height: 42px;
}

.pdf-logos img:last-child {
    width: auto;
    max-height: 66px;
}

.pdf-title {
    margin: 0;
    color: #0f3d75;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.pdf-subtitle {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 11px;
}

.pdf-meta-badge {
    display: inline-block;
    margin-top: 8px;
    border: 1px solid #cddff2;
    border-radius: 999px;
    background: #eef5fc;
    color: #0f3d75;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 4px 10px;
}

.pdf-section {
    margin: 14px 0;
    overflow: hidden;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    background: #ffffff;
}

.pdf-section-title {
    border-bottom: 1px solid #dde5ee;
    background: linear-gradient(90deg, #edf4fb 0%, #f7fafc 100%);
    color: #0f3d75;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    text-transform: uppercase;
}

.pdf-table,
.mini-info-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.pdf-table {
    font-size: 11px;
}

.pdf-table th,
.pdf-table td,
.mini-info-table th,
.mini-info-table td {
    border: 1px solid #e3e8ef;
    padding: 8px 9px;
    text-align: left;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
}

.pdf-table th,
.mini-info-table th {
    background: #f8fafc;
    color: #243447;
    font-weight: 800;
}

.pdf-table td {
    background: #ffffff;
    color: #374151;
}

.pdf-table tr:nth-child(even) td {
    background: #fcfdff;
}

.pref-table col.pref-no {
    width: 8% !important;
}

.pref-table col.pref-country {
    width: 14% !important;
}

.pref-table col.pref-inst {
    width: 23% !important;
}

.pref-table col.pref-level {
    width: 15% !important;
}

.pref-table col.pref-course {
    width: 40% !important;
}

.pref-table th:nth-child(5),
.pref-table td:nth-child(5) {
    hyphens: auto !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.terms-box {
    color: #374151;
    font-size: 7px;
    letter-spacing: 0.1px;
    line-height: 1.25;
    padding: 8px 10px 6px;
}

.terms-box p {
    margin: 0 0 4px;
}

.signature-block {
    margin-top: 18px;
    padding: 12px 0 0;
}

.signature-label {
    margin-bottom: 8px;
    color: #111827;
    font-size: 11px;
    font-weight: 800;
}

.signature-box {
    display: flex;
    width: 250px;
    min-height: 88px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    background: #fcfdff;
    padding: 8px 10px;
}

.signature-box img {
    display: block;
    max-width: 180px;
    max-height: 65px;
}

.mini-info-table {
    font-size: 11px;
}

.mini-info-table th {
    width: 18%;
}

.checklist-wrap {
    padding: 12px 14px 14px;
}

.checklist-list {
    margin: 0;
    padding-left: 0;
    font-size: 7px;
    list-style: none;
}

.checklist-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.check-box {
    display: inline-block;
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    margin-top: 2px;
    border: 1.5px solid #1f2937;
    border-radius: 2px;
}

.pdf-footer-line {
    margin-top: 18px;
    border-top: 1px solid #dbe3ec;
    color: #6b7280;
    font-size: 9px;
    padding-top: 8px;
    text-align: center;
}

@media (max-width: 768px) {
    .edumi-landing-page .page-shell {
        width: min(100% - 24px, 640px);
    }

    .edumi-landing-page .hero-wrap {
        margin-bottom: 14px;
        padding: 20px 14px 14px;
    }

    .edumi-landing-page .progress-shell {
        padding: 14px 14px 12px;
    }

    .edumi-landing-page .progress-meta {
        align-items: flex-start;
        gap: 6px;
    }

    .edumi-landing-page .step-dots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .edumi-landing-page .step-dot {
        border-radius: 8px;
        font-size: 0.72rem;
        padding: 7px 5px;
    }

    .edumi-landing-page .card-header {
        padding: 13px 14px;
    }

    .edumi-landing-page .card-body {
        padding: 18px 14px;
    }

    .edumi-landing-page .section-box {
        padding: 13px;
    }

    .edumi-landing-page .signature-wrapper {
        max-width: 100%;
    }

    .edumi-landing-page #signature-pad {
        height: 132px;
    }

    .edumi-landing-page .card-body > .d-flex,
    .edumi-landing-page .text-center > .d-flex,
    .edumi-landing-page .btn-group.d-flex {
        flex-direction: column !important;
        gap: 8px;
    }

    .edumi-landing-page .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .edumi-landing-page .brand-logos {
        gap: 12px;
    }

    .edumi-landing-page .brand-logos img:first-child {
        max-height: 34px;
    }

    .edumi-landing-page .brand-logos img:last-child {
        max-height: 44px;
    }

    .edumi-landing-page .hero-title {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .edumi-landing-page .progress-meta {
        display: block;
    }

    .edumi-landing-page .progress-percent {
        display: block;
        margin-top: 4px;
    }

    .edumi-landing-page .step-dots {
        grid-template-columns: 1fr;
    }

    .edumi-landing-page .btn {
        white-space: normal;
    }
}

/* Keep the application form stable while still using the home theme foundation. */
.edumi-landing-page .hero-wrap:hover,
.edumi-landing-page .progress-shell:hover,
.edumi-landing-page .card:hover {
    border-color: var(--application-border);
    background: #ffffff;
    box-shadow: var(--application-shadow);
    transform: none;
}

.edumi-landing-page .section-box:hover {
    border-color: var(--application-border);
    background: var(--application-soft);
    box-shadow: var(--application-shadow);
    transform: none;
}

/* === Consistency fixes: align to EDUMi token system === */

/* Bootstrap text-primary (#0d6efd) → EDUMi blue */
.edumi-landing-page .text-primary {
    color: var(--application-brand) !important;
}

/* Bootstrap text-success (green) → EDUMi blue (form section sub-headings) */
.edumi-landing-page .card-body .text-success {
    color: var(--application-brand) !important;
}

/* btn-outline-primary: use EDUMi blue not Bootstrap blue */
.edumi-landing-page .btn-outline-primary {
    border-color: var(--application-brand) !important;
    color: var(--application-brand) !important;
    background: #ffffff !important;
}

.edumi-landing-page .btn-outline-primary:hover {
    border-color: transparent !important;
    background: var(--edumi-gradient, linear-gradient(135deg, #ff3e3e 0%, #a00070 48%, #0466c2 100%)) !important;
    color: #ffffff !important;
}

/* btn-outline-danger: keep red, just round it */
.edumi-landing-page .btn-outline-danger {
    border-radius: 999px !important;
}
