/* ==========================================================================
   makefile.css
   Styling for the "course description file" wizard
   (resources/views/front/makefile.blade.php).

   Everything that affects the page is scoped to .makefile-v2; the modals are
   scoped to their own ids / .mk-modal. This sheet is loaded only by that page.

   No CDN, no remote fonts, no remote images: it reuses the project's own
   BYekan / BYekanBold faces and the local line-awesome icon font.
   ========================================================================== */

.makefile-v2 {
    /* --- neutrals */
    --mk-bg: #f5f7fa;
    --mk-surface: #ffffff;
    --mk-surface-2: #f8fafc;
    --mk-surface-3: #eef2f7;
    --mk-line: #e3e9f0;
    --mk-line-strong: #cfd8e3;
    --mk-ink: #16222e;
    --mk-ink-2: #43546a;
    --mk-ink-3: #74869b;

    /* --- brand + semantics */
    --mk-primary: #1d4ed8;
    --mk-primary-ink: #16379c;
    --mk-primary-soft: #eef3ff;
    --mk-success: #0f7a46;
    --mk-success-soft: #eefaf3;
    --mk-warn: #9a6400;
    --mk-warn-soft: #fff8e8;
    --mk-danger: #c02a37;
    --mk-danger-soft: #fdf1f2;

    /* --- shape + depth */
    --mk-r-sm: 8px;
    --mk-r: 12px;
    --mk-r-lg: 16px;
    --mk-shadow-1: 0 1px 2px rgba(16, 32, 52, .06), 0 1px 3px rgba(16, 32, 52, .05);
    --mk-shadow-2: 0 4px 14px rgba(16, 32, 52, .08);
    --mk-shadow-3: 0 12px 32px rgba(16, 32, 52, .12);
    --mk-focus: 0 0 0 3px rgba(29, 78, 216, .18);

    /* --- rhythm */
    --mk-gap: 16px;
    --mk-pane-pad: 28px;
}

/* ==========================================================================
   1. Page shell
   ========================================================================== */

.makefile-v2.makefile-page {
    background: var(--mk-bg);
    padding-bottom: 8px;
}

.makefile-v2 .mk-shell,
.makefile-v2.mk-shell {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    margin-top: 28px;
    margin-bottom: 48px;
    padding-inline: 16px;
}

.makefile-v2 .mk-col {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    padding-inline: 0;
}

.makefile-v2,
.makefile-v2 input,
.makefile-v2 select,
.makefile-v2 button,
.makefile-v2 textarea {
    color: var(--mk-ink);
}

/* --- preview ribbon ------------------------------------------------------ */
.makefile-v2 .mk-preview-ribbon {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1px dashed var(--mk-primary);
    border-radius: var(--mk-r);
    background: var(--mk-primary-soft);
    color: var(--mk-primary-ink);
}

.makefile-v2 .mk-preview-ribbon > i {
    font-size: 22px;
    line-height: 1.4;
    flex-shrink: 0;
}

.makefile-v2 .mk-preview-ribbon strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.makefile-v2 .mk-preview-ribbon span {
    display: block;
    font-size: 12.5px;
    line-height: 1.9;
    color: #2f4a8f;
    text-align: justify;
}

/* --- page header -------------------------------------------------------- */
.makefile-v2 .mk-head {
    margin-bottom: 18px;
}

.makefile-v2 .mk-eyebrow {
    margin: 0 0 4px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--mk-primary);
}

.makefile-v2 .mk-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.6;
    font-weight: 900;
    color: var(--mk-ink);
}

.makefile-v2 .mk-sub {
    margin: 6px 0 0;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--mk-ink-3);
}

/* ==========================================================================
   2. Progress indicator + stepper
   ========================================================================== */

.makefile-v2 .mk-progress {
    margin-bottom: 14px;
}

.makefile-v2 .mk-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mk-ink-2);
}

.makefile-v2 .mk-progress-pct {
    color: var(--mk-primary);
}

.makefile-v2 .mk-progress-track {
    height: 6px;
    border-radius: 999px;
    background: var(--mk-surface-3);
    overflow: hidden;
}

.makefile-v2 .mk-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mk-primary) 0%, #4f7ff5 100%);
    transition: width .35s ease;
}

/* --- wizard container: neutralize the smartwizard default theme --------- */
.makefile-v2 .sw,
.makefile-v2 .sw-theme-default {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.makefile-v2 .sw > .tab-content {
    overflow: visible;
    background: transparent;
    min-height: 0 !important;
}

.makefile-v2 .sw-theme-default > .nav,
.makefile-v2 #smartwizard > .nav {
    display: flex;
    gap: 8px;
    padding: 0 !important;
    margin: 0 0 20px 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.makefile-v2 .sw-theme-default > .nav > li,
.makefile-v2 #smartwizard > .nav > li {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    list-style: none;
}

/* step button */
.makefile-v2 .sw-theme-default > .nav .nav-link,
.makefile-v2 #smartwizard > .nav .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 0;
    max-height: none;
    padding: 12px 12px !important;
    margin: 0;
    border: 1px solid var(--mk-line);
    border-radius: var(--mk-r);
    background: var(--mk-surface);
    box-shadow: var(--mk-shadow-1);
    color: var(--mk-ink-2) !important;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

/* remove the old arrow notches entirely */
.makefile-v2 .sw-theme-default > .nav .nav-link::before,
.makefile-v2 .sw-theme-default > .nav .nav-link::after,
.makefile-v2 #smartwizard > .nav .nav-link::before,
.makefile-v2 #smartwizard > .nav .nav-link::after {
    display: none !important;
    content: none !important;
}

.makefile-v2 .mk-step-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--mk-surface-3);
    transition: background .18s ease;
}

.makefile-v2 .mk-step-badge img {
    width: 20px !important;
    height: 20px !important;
    margin: 0;
    opacity: .8;
}

.makefile-v2 .mk-step-num {
    position: absolute;
    inset-inline-end: -3px;
    bottom: -3px;
    min-width: 17px;
    height: 17px;
    padding: 0 3px;
    border-radius: 999px;
    background: var(--mk-surface);
    border: 1px solid var(--mk-line-strong);
    color: var(--mk-ink-3);
    font-size: 10px;
    font-weight: 900;
    line-height: 15px;
    text-align: center;
}

.makefile-v2 .mk-step-label {
    flex: 1;
    min-width: 0;
    line-height: 1.6;
}

/* hover / focus */
.makefile-v2 #smartwizard > .nav .nav-link:hover {
    border-color: var(--mk-line-strong);
    box-shadow: var(--mk-shadow-2);
}

.makefile-v2 #smartwizard > .nav .nav-link:focus-visible {
    outline: none;
    box-shadow: var(--mk-focus);
}

/* active step */
.makefile-v2 .sw-theme-default > .nav .nav-link.active,
.makefile-v2 #smartwizard > .nav .nav-link.active {
    background: var(--mk-primary-soft);
    border-color: var(--mk-primary);
    color: var(--mk-primary-ink) !important;
    box-shadow: 0 2px 10px rgba(29, 78, 216, .14);
    transform: none;
}

/* the badge stays light so the multi-colour SVG icons remain readable;
   the state is carried by the ring, the card and the number chip */
.makefile-v2 #smartwizard > .nav .nav-link.active .mk-step-badge {
    background: #fff;
    box-shadow: 0 0 0 2px var(--mk-primary);
}

.makefile-v2 #smartwizard > .nav .nav-link.active .mk-step-badge img {
    opacity: 1;
}

.makefile-v2 #smartwizard > .nav .nav-link.active .mk-step-num {
    background: var(--mk-primary);
    border-color: var(--mk-primary);
    color: #fff;
}

/* completed step */
.makefile-v2 .sw-theme-default > .nav .nav-link.done,
.makefile-v2 #smartwizard > .nav .nav-link.done {
    background: var(--mk-success-soft);
    border-color: #bfe3d0;
    color: #0c5c35 !important;
}

.makefile-v2 #smartwizard > .nav .nav-link.done .mk-step-badge {
    background: #fff;
    box-shadow: 0 0 0 2px var(--mk-success);
}

.makefile-v2 #smartwizard > .nav .nav-link.done .mk-step-badge img {
    opacity: 1;
}

/* completed steps show a tick instead of the step number */
.makefile-v2 #smartwizard > .nav .nav-link.done .mk-step-num {
    background: var(--mk-success);
    border-color: var(--mk-success);
    color: #fff;
    font-size: 0;
}

.makefile-v2 #smartwizard > .nav .nav-link.done .mk-step-num::after {
    content: '\f00c'; /* la-check */
    font-family: 'Line Awesome Free';
    font-weight: 900;
    font-size: 10px;
    line-height: 15px;
}

/* not reached yet */
.makefile-v2 .sw-theme-default > .nav .nav-link.inactive,
.makefile-v2 #smartwizard > .nav .nav-link.inactive {
    background: var(--mk-surface-2);
    border-color: var(--mk-line);
    color: var(--mk-ink-3) !important;
}

/* ==========================================================================
   3. Panes
   ========================================================================== */

/* keep smartwizard's own show/hide contract */
.makefile-v2 .tab-content > .tab-pane {
    display: none;
}

.makefile-v2 .tab-content > .tab-pane.active {
    display: block;
}

.makefile-v2 .tab-content {
    height: auto !important;
}

.makefile-v2 .mk-pane {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    padding: var(--mk-pane-pad);
    background: var(--mk-surface);
    border: 1px solid var(--mk-line);
    border-radius: var(--mk-r-lg);
    box-shadow: var(--mk-shadow-1);
}

.makefile-v2 .mk-pane-head {
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--mk-line);
}

.makefile-v2 .mk-pane-title {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.6;
    color: var(--mk-ink);
}

.makefile-v2 .mk-pane-desc {
    margin: 5px 0 0;
    font-size: 13px;
    line-height: 1.9;
    color: var(--mk-ink-3);
}

/* ==========================================================================
   4. Guidance disclosures + alerts
   ========================================================================== */

.makefile-v2 .mk-help.alert,
.makefile-v2 .tab-pane .alert.alert-primary {
    max-width: 100%;
    margin: 0 0 20px;
    padding: 0;
    border: 1px solid #d5e2f7;
    border-left: 0;
    border-inline-start: 3px solid var(--mk-primary);
    border-radius: var(--mk-r);
    background: var(--mk-primary-soft);
    color: #23365e;
}

.makefile-v2 .mk-help > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--mk-primary-ink);
    cursor: pointer;
    list-style: none;
    user-select: none;
    border-radius: var(--mk-r);
}

.makefile-v2 .mk-help > summary::-webkit-details-marker {
    display: none;
}

.makefile-v2 .mk-help > summary::after {
    content: '\f107'; /* line-awesome la-angle-down */
    font-family: 'Line Awesome Free';
    font-weight: 900;
    margin-inline-start: auto;
    font-size: 16px;
    transition: transform .18s ease;
}

.makefile-v2 .mk-help[open] > summary::after {
    transform: rotate(180deg);
}

.makefile-v2 .mk-help > summary:focus-visible {
    outline: none;
    box-shadow: var(--mk-focus);
}

.makefile-v2 .mk-help > ul {
    margin: 0;
    padding: 2px 32px 14px 16px;
    list-style: disc;
}

.makefile-v2 .mk-help > ul > li {
    margin-bottom: 8px;
    font-size: 12.8px;
    line-height: 2;
}

.makefile-v2 .mk-help > ul > li:last-child {
    margin-bottom: 0;
}

.makefile-v2 .mk-help p,
.makefile-v2 .mk-help P {
    margin: 0;
}

/* resume / notice banners */
.makefile-v2 .alert.mk-notice,
.makefile-v2 .mk-validation.alert {
    border-radius: var(--mk-r);
    border: 1px solid #f0dca8;
    background: var(--mk-warn-soft);
    color: var(--mk-warn);
    font-size: 13px;
    line-height: 2;
    padding: 14px 16px;
}

.makefile-v2 .mk-validation.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin: 0 0 15px;
    border-color: #f3c7c7;
    background: var(--mk-danger-soft);
    color: var(--mk-danger);
    font-weight: 700;
    animation: mkShake .36s ease;
}

.makefile-v2 .mk-validation.alert > i {
    font-size: 19px;
}

@keyframes mkShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(5px); }
    75%      { transform: translateX(-5px); }
}

/* the step-3 "restore" callout inside the help list */
.makefile-v2 .mk-help .restore-saved-data {
    border-radius: var(--mk-r-sm);
    border: 1px solid #e4c876;
    background: #fdf3d8;
    color: #7a5600;
    font-weight: 700;
    font-size: 12px;
    padding: 5px 10px;
}

.makefile-v2 .mk-help .restore-saved-data:hover {
    background: #f9e9bd;
}

/* ==========================================================================
   5. Fields
   ========================================================================== */

.makefile-v2 .form-group {
    line-height: inherit;
}

.makefile-v2 .mk-field {
    margin-bottom: 20px;
}

.makefile-v2 .mk-field:last-child {
    margin-bottom: 0;
}

.makefile-v2 .mk-label,
.makefile-v2 .mk-field > label {
    display: block;
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.8;
    color: var(--mk-ink);
}

.makefile-v2 .mk-label-note,
.makefile-v2 .mk-label small {
    font-weight: 600;
    font-size: 11.5px;
    color: var(--mk-ink-3);
}

.makefile-v2 .mk-req,
.makefile-v2 .mk-label .text-danger {
    color: var(--mk-danger) !important;
    font-weight: 900;
}

.makefile-v2 .mk-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 7px 0 0;
    font-size: 11.5px;
    line-height: 1.9;
    color: var(--mk-ink-3);
}

.makefile-v2 .mk-hint--block {
    padding: 10px 12px;
    border-radius: var(--mk-r-sm);
    background: var(--mk-surface-2);
    border: 1px solid var(--mk-line);
}

/* --- inputs + native selects ------------------------------------------- */
.makefile-v2 .form-control,
.makefile-v2 select.form-control {
    height: auto;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--mk-line-strong);
    border-radius: var(--mk-r-sm);
    background-color: var(--mk-surface);
    box-shadow: none;
    font-size: 14px;
    color: var(--mk-ink);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.makefile-v2 .form-control::placeholder {
    color: #a7b4c3;
}

.makefile-v2 .form-control:hover {
    border-color: #b6c3d2;
}

.makefile-v2 .form-control:focus {
    border-color: var(--mk-primary);
    box-shadow: var(--mk-focus);
    background-color: var(--mk-surface);
    outline: none;
}

.makefile-v2 .form-control[readonly] {
    background-color: var(--mk-surface-3);
    color: var(--mk-ink-2);
    cursor: not-allowed;
}

.makefile-v2 .mk-input-ltr {
    direction: ltr;
    text-align: left;
}

/* native colour input: the default .form-control padding squashed the swatch
   into a thin line, so the chosen colour was invisible. Strip the inner
   padding and let the swatch fill the control. */
.makefile-v2 input[type="color"].mk-color {
    min-height: 44px;
    height: 44px;
    width: 100px !important;
    padding: 4px;
    border: 1px solid var(--mk-line-strong);
    border-radius: var(--mk-r-sm);
    background: var(--mk-surface);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.makefile-v2 input[type="color"].mk-color::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 6px;
}

.makefile-v2 input[type="color"].mk-color::-webkit-color-swatch {
    border: 1px solid rgba(16, 32, 52, .18);
    border-radius: 6px;
}

.makefile-v2 input[type="color"].mk-color::-moz-color-swatch {
    border: 1px solid rgba(16, 32, 52, .18);
    border-radius: 6px;
}

.makefile-v2 input[type="color"].mk-color:hover {
    border-color: var(--mk-primary);
}

.makefile-v2 input[type="color"].mk-color:focus {
    outline: none;
    border-color: var(--mk-primary);
    box-shadow: var(--mk-focus);
}

/* error state set by markMakefileFieldError() */
.makefile-v2 .makefile-field-error,
.makefile-v2 .form-control.is-invalid,
.makefile-v2 .is-invalid {
    border-color: var(--mk-danger) !important;
    box-shadow: 0 0 0 3px rgba(192, 42, 55, .12) !important;
}

.makefile-v2 .makefile-field-error + .select2-container .select2-selection,
.makefile-v2 .makefile-field-error .select2-selection {
    border-color: var(--mk-danger) !important;
}

/* keyboard hint: hidden until the JS reveals it (it sets display:block, then
   hides it again after 3s). Without this it used to be permanently visible. */
.makefile-v2 .keyboard-warning {
    display: none;
    margin-top: 7px;
    padding: 7px 11px;
    border-radius: var(--mk-r-sm);
    background: var(--mk-warn-soft);
    border: 1px solid #f0dca8;
    color: var(--mk-warn);
    font-size: 11.5px;
    font-weight: 700;
}

/* --- select2 ------------------------------------------------------------ */
.makefile-v2 .select2-container {
    width: 100% !important;
}

.makefile-v2 .select2-container--default .select2-selection--single {
    height: 46px;
    padding: 5px 6px;
    border: 1px solid var(--mk-line-strong);
    border-radius: var(--mk-r-sm);
    background: var(--mk-surface);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.makefile-v2 .select2-container--default .select2-selection--single:hover {
    border-color: #b6c3d2;
}

.makefile-v2 .select2-container--default.select2-container--open .select2-selection--single,
.makefile-v2 .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--mk-primary);
    box-shadow: var(--mk-focus);
}

.makefile-v2 .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 34px;
    padding-inline: 6px;
    color: var(--mk-ink);
    font-size: 14px;
}

.makefile-v2 .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
}

.makefile-v2 .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #a7b4c3;
}

/* dropdown is portalled to <body>, so it cannot be scoped */
.select2-dropdown {
    border-color: #cfd8e3;
    border-radius: var(--mk-r-sm);
    box-shadow: 0 12px 32px rgba(16, 32, 52, .12);
    overflow: hidden;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #1d4ed8;
}

.select2-search--dropdown .select2-search__field {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
}

/* --- editable English title boxes -------------------------------------- */
/* IMPORTANT: these three stay display:none by default — the JS slides them
   open/closed (slideDown/slideUp/.show()) exactly as before. */
.makefile-v2 .edit_city_enname_box,
.makefile-v2 .edit_faculty_enname_box,
.makefile-v2 .edit_university_enname_box {
    display: none;
}

.makefile-v2 .edit_city_enname_box,
.makefile-v2 .edit_faculty_enname_box,
.makefile-v2 .edit_university_enname_box,
.makefile-v2 .edit_program_enname_box {
    position: relative;
    margin-top: 10px;
    padding: 11px 14px 11px 38px;
    border: 1px solid #cfe0d6;
    border-radius: var(--mk-r-sm);
    background: var(--mk-success-soft);
    direction: ltr;
    text-align: left;
}

.makefile-v2 .edit_city_enname_box i,
.makefile-v2 .edit_faculty_enname_box i,
.makefile-v2 .edit_university_enname_box i,
.makefile-v2 .edit_program_enname_box i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    pointer-events: none;
}

.makefile-v2 .edit_city_enname_box .edited_city_enname,
.makefile-v2 .edit_faculty_enname_box .edited_faculty_enname,
.makefile-v2 .edit_university_enname_box .edited_university_enname {
    display: inline-block;
    min-width: 200px;
    min-height: 22px;
    color: #15402a;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    cursor: text;
    direction: ltr;
    text-align: left;
    border-bottom: 1px dashed #9fc5b0;
}

.makefile-v2 .edit_city_enname_box [contenteditable]:focus,
.makefile-v2 .edit_faculty_enname_box [contenteditable]:focus,
.makefile-v2 .edit_university_enname_box [contenteditable]:focus {
    border-bottom-color: var(--mk-success);
    background: rgba(255, 255, 255, .65);
}

/* the program title box wraps a real <input> */
.makefile-v2 .edit_program_enname_box {
    padding: 0;
    border: 0;
    background: transparent;
}

.makefile-v2 .edit_program_enname_box .program_title {
    display: block;
    width: 100%;
    direction: ltr;
    text-align: left;
    padding-left: 40px;
}

.makefile-v2 .edit_program_enname_box i {
    left: 14px;
    z-index: 2;
    color: var(--mk-success);
}

/* --- radio "choice" cards --------------------------------------------- */
.makefile-v2 .mk-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.makefile-v2 .mk-choice {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
}

.makefile-v2 .mk-choice .form-check-input,
.makefile-v2 .mk-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.makefile-v2 .mk-choice .form-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    margin: 0;
    padding: 13px 14px;
    border: 1.5px solid var(--mk-line-strong);
    border-radius: var(--mk-r);
    background: var(--mk-surface);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--mk-ink-2);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}

.makefile-v2 .mk-choice .form-check-label:hover {
    border-color: #a9bdd8;
    background: var(--mk-surface-2);
}

.makefile-v2 .mk-choice-icon {
    font-size: 20px;
    color: var(--mk-ink-3);
    flex-shrink: 0;
    transition: color .16s ease;
}

.makefile-v2 .mk-choice input:checked + .form-check-label {
    border-color: var(--mk-primary);
    background: var(--mk-primary-soft);
    color: var(--mk-primary-ink);
    box-shadow: 0 2px 10px rgba(29, 78, 216, .12);
}

.makefile-v2 .mk-choice input:checked + .form-check-label .mk-choice-icon {
    color: var(--mk-primary);
}

.makefile-v2 .mk-choice input:focus-visible + .form-check-label {
    box-shadow: var(--mk-focus);
}

.makefile-v2 .mk-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--mk-gap);
}

/* ==========================================================================
   6. Course list (step 2)
   ========================================================================== */

.makefile-v2 .mk-add-course {
    margin-bottom: 16px;
    border: 1px solid var(--mk-line);
    border-radius: var(--mk-r);
    background: var(--mk-surface-2);
    box-shadow: none;
}

.makefile-v2 .mk-add-course .card-body {
    padding: 16px;
}

.makefile-v2 .mk-course-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.makefile-v2 .mk-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid #d5e2f7;
    background: var(--mk-primary-soft);
    color: var(--mk-primary-ink);
    font-size: 12px;
    font-weight: 700;
}

.makefile-v2 .mk-chip--muted {
    border-color: var(--mk-line);
    background: var(--mk-surface-2);
    color: var(--mk-ink-3);
}

.makefile-v2 .mk-chip b {
    font-family: BYekanBold, BYekan, Tahoma, sans-serif;
}

/* empty state: shown only while #sortable has no rows */
.makefile-v2 .mk-empty-courses {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 34px 20px;
    margin-top: 12px;
    border: 1px dashed var(--mk-line-strong);
    border-radius: var(--mk-r);
    background: var(--mk-surface-2);
    text-align: center;
}

.makefile-v2 .mk-empty-courses i {
    font-size: 30px;
    color: var(--mk-ink-3);
}

.makefile-v2 .mk-empty-courses strong {
    font-size: 14px;
    color: var(--mk-ink);
}

.makefile-v2 .mk-empty-courses span {
    max-width: 420px;
    font-size: 12.5px;
    line-height: 2;
    color: var(--mk-ink-3);
}

.makefile-v2 #step-2.mk-has-courses .mk-empty-courses {
    display: none;
}

.makefile-v2 #step-2:not(.mk-has-courses) .courses-table-scroll,
.makefile-v2 #step-2:not(.mk-has-courses) .courses-table-scroll-hint,
.makefile-v2 #step-2:not(.mk-has-courses) .mk-course-summary {
    display: none;
}

/* --- the table --------------------------------------------------------- */
.makefile-v2 .courses-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    border: 1px solid var(--mk-line);
    border-radius: var(--mk-r);
    background: var(--mk-surface);
}

.makefile-v2 .courses-table-scroll-hint {
    display: none;
    margin: 8px 0 0;
    font-size: 11.5px;
    color: var(--mk-ink-3);
    text-align: center;
}

.makefile-v2 .courses-table {
    width: 100%;
    margin-bottom: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.makefile-v2 .courses-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 11px 6px;
    background: var(--mk-surface-3);
    border-bottom: 1px solid var(--mk-line-strong);
    color: var(--mk-ink-2);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    vertical-align: middle;
    white-space: normal;
}

.makefile-v2 .courses-table tbody tr {
    transition: background .14s ease;
}

.makefile-v2 .courses-table tbody tr:hover {
    background: var(--mk-surface-2);
}

.makefile-v2 .courses-table tbody tr:hover .tools-col {
    background: var(--mk-surface-2);
}

.makefile-v2 .courses-table td {
    padding: 9px 6px;
    border-bottom: 1px solid var(--mk-line);
    font-size: 13px;
    vertical-align: middle;
    word-break: break-word;
}

.makefile-v2 .courses-table tbody tr:last-child td {
    border-bottom: 0;
}

.makefile-v2 .courses-table .col-sort,
.makefile-v2 .courses-table td.sort {
    width: 34px;
    text-align: center;
    color: var(--mk-ink-3);
    font-weight: 700;
}

.makefile-v2 .courses-table .col-credit,
.makefile-v2 .courses-table td.credit {
    width: 52px;
    max-width: 52px;
    text-align: center;
}

.makefile-v2 .courses-table .col-hour,
.makefile-v2 .courses-table td.nazari_hour,
.makefile-v2 .courses-table td.amali_hour {
    width: 64px;
    max-width: 64px;
    text-align: center;
}

.makefile-v2 .courses-table .col-type,
.makefile-v2 .courses-table .col-category {
    width: 12%;
}

.makefile-v2 .courses-table .col-faname {
    width: 15%;
}

.makefile-v2 .courses-table .col-enname {
    width: 17%;
}

.makefile-v2 .courses-table td.faname {
    color: var(--mk-ink-2);
}

/* editable cells read as editable */
.makefile-v2 .courses-table td[contenteditable="true"] {
    border-radius: 6px;
    cursor: text;
    transition: background .14s ease, box-shadow .14s ease;
}

.makefile-v2 .courses-table td[contenteditable="true"]:hover {
    background: #eef3ff;
}

.makefile-v2 .courses-table td[contenteditable="true"]:focus {
    outline: none;
    background: var(--mk-surface);
    box-shadow: inset 0 0 0 2px var(--mk-primary);
}

.makefile-v2 .courses-table select {
    width: 100%;
    max-width: 100%;
    min-height: 34px;
    padding: 4px 6px;
    border: 1px solid var(--mk-line-strong);
    border-radius: 6px;
    background: var(--mk-surface);
    font-size: 12.5px;
    color: var(--mk-ink);
}

.makefile-v2 .courses-table select:focus {
    outline: none;
    border-color: var(--mk-primary);
    box-shadow: var(--mk-focus);
}

/* sticky tools column */
.makefile-v2 .courses-table .tools-col {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 68px;
    min-width: 68px;
    background: var(--mk-surface);
    box-shadow: 4px 0 8px rgba(16, 32, 52, .05);
    white-space: nowrap;
    vertical-align: middle;
}

.makefile-v2 .courses-table thead .tools-col {
    background: var(--mk-surface-3);
    z-index: 5;
}

.makefile-v2 .course-tool-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.makefile-v2 .dragdropbtn,
.makefile-v2 .toolbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: var(--mk-r-sm);
    font-size: 1.05rem;
    color: var(--mk-ink-2);
    transition: background .14s ease, color .14s ease;
}

.makefile-v2 .dragdropbtn {
    cursor: grab;
    touch-action: none;
}

.makefile-v2 .dragdropbtn:hover {
    background: var(--mk-primary-soft);
    color: var(--mk-primary);
}

.makefile-v2 .dragdropbtn:active {
    cursor: grabbing;
}

.makefile-v2 .toolbtn.delete:hover {
    background: var(--mk-danger-soft);
    color: var(--mk-danger);
}

/* row being dragged */
.makefile-v2 .courses-table tr.ui-sortable-helper {
    display: table;
    background: var(--mk-surface);
    box-shadow: var(--mk-shadow-3);
    border-radius: var(--mk-r-sm);
}

/* ==========================================================================
   7. Checkout (step 5)
   ========================================================================== */

.makefile-v2 .mk-checkout {
    padding: 0;
}

.makefile-v2 .file-type-picker-head,
.makefile-v2 .site-stamp-addons-head {
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid var(--mk-line);
    border-radius: var(--mk-r);
    background: var(--mk-surface-2);
    text-align: right;
}

.makefile-v2 .file-type-picker-head strong,
.makefile-v2 .site-stamp-addons-head strong {
    display: block;
    margin-bottom: 5px;
    color: var(--mk-ink);
    font-size: 15px;
    font-weight: 900;
}

.makefile-v2 .file-type-picker-head p,
.makefile-v2 .site-stamp-addons-head p {
    margin: 0;
    color: var(--mk-ink-3);
    font-size: 12.5px;
    line-height: 1.95;
}

/* --- file type cards --------------------------------------------------- */
.makefile-v2 .mk-filetype-wrap {
    margin-bottom: 18px;
}

.makefile-v2 .mk-filetype-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--mk-gap);
}

.makefile-v2 .mk-filetype-col {
    min-width: 0;
}

.makefile-v2 .file-type-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    margin-bottom: 0;
    border: 1.5px solid var(--mk-line-strong);
    border-radius: var(--mk-r-lg);
    background: var(--mk-surface);
    box-shadow: var(--mk-shadow-1);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.makefile-v2 .file-type-card:hover {
    border-color: #a9bdd8;
    box-shadow: var(--mk-shadow-2);
}

.makefile-v2 .file-type-card.is-selected,
.makefile-v2 .file-type-card:has(.filetype:checked) {
    border-color: var(--mk-success);
    background: var(--mk-success-soft);
    box-shadow: 0 6px 18px rgba(15, 122, 70, .14);
}

.makefile-v2 .file-type-card .filetype {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.makefile-v2 .file-type-card-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 16px 20px;
    margin: 0;
    text-align: center;
}

.makefile-v2 .file-type-card-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    cursor: pointer;
}

/* custom radio */
.makefile-v2 .file-type-card-box {
    position: relative;
    display: block;
    width: 26px;
    height: 26px;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid var(--mk-line-strong);
    border-radius: 50%;
    background: var(--mk-surface);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

.makefile-v2 .file-type-card:hover .file-type-card-box {
    border-color: var(--mk-primary);
}

.makefile-v2 .file-type-card.is-selected .file-type-card-box,
.makefile-v2 .file-type-card:has(.filetype:checked) .file-type-card-box {
    background: var(--mk-success);
    border-color: var(--mk-success);
}

.makefile-v2 .file-type-card.is-selected .file-type-card-box:after,
.makefile-v2 .file-type-card:has(.filetype:checked) .file-type-card-box:after {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    width: 7px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.makefile-v2 .file-type-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--mk-danger);
    color: #fff;
    font-family: BYekanBold, BYekan, Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .3px;
    box-shadow: 0 4px 10px rgba(192, 42, 55, .26);
}

.makefile-v2 .file-type-card-thumb {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    padding: 6px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--mk-line);
    border-radius: var(--mk-r);
    background: var(--mk-surface);
    cursor: zoom-in;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    transition: box-shadow .16s ease, transform .16s ease;
}

.makefile-v2 .file-type-card-thumb:hover {
    box-shadow: var(--mk-shadow-2);
    transform: translateY(-1px);
}

.makefile-v2 .file-type-card-thumb:focus-visible {
    outline: none;
    box-shadow: var(--mk-focus);
}

.makefile-v2 .file-type-card-thumb img,
.makefile-v2 .file-type-card-image {
    width: auto !important;
    height: auto !important;
    max-width: 140px !important;
    max-height: 140px !important;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent;
    border: none;
}

.makefile-v2 .file-type-card-title {
    color: var(--mk-ink);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.6;
}

.makefile-v2 .file-type-card-desc {
    min-height: 46px;
    color: var(--mk-ink-3);
    font-size: 12.5px;
    line-height: 1.95;
}

.makefile-v2 .file-type-card-price {
    font-family: BYekanBold, BYekan, Tahoma, sans-serif;
    font-weight: 900;
    font-size: 20px;
    line-height: 1.5;
    color: var(--mk-success);
}

.makefile-v2 .file-type-card-price .original-price {
    display: block;
    margin-bottom: 1px;
    color: var(--mk-ink-3);
    font-size: 14px;
    font-weight: 700;
    text-decoration: line-through;
}

.makefile-v2 .file-type-card-price .js-checkout-price {
    color: var(--mk-danger);
    font-size: 21px;
    font-weight: 900;
}

.makefile-v2 .file-type-cta,
.makefile-v2 .site-stamp-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 9px 14px;
    border-radius: var(--mk-r-sm);
    background: var(--mk-primary);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.makefile-v2 .file-type-card .cta-selected,
.makefile-v2 .site-stamp-card .cta-added {
    display: none;
    background: var(--mk-success);
}

.makefile-v2 .file-type-card.is-selected .cta-select,
.makefile-v2 .file-type-card:has(.filetype:checked) .cta-select {
    display: none;
}

.makefile-v2 .file-type-card.is-selected .cta-selected,
.makefile-v2 .file-type-card:has(.filetype:checked) .cta-selected {
    display: inline-flex;
}

/* --- currency switch partial ------------------------------------------ */
.makefile-v2 #step-5 .makefile-pay-currency .iran-card-switch-box {
    width: 100%;
    margin: 0 0 16px 0;
    box-sizing: border-box;
    border-radius: var(--mk-r);
}

/* --- stamp add-ons ---------------------------------------------------- */
.makefile-v2 .mk-stamps {
    margin-bottom: 18px;
}

.makefile-v2 .university-stamp-table {
    border: 1px solid var(--mk-line);
    border-radius: var(--mk-r);
    overflow: hidden;
}

.makefile-v2 .mk-stamp-caption {
    caption-side: top;
    padding: 12px 14px;
    background: var(--mk-surface-2);
    border-bottom: 1px solid var(--mk-line);
    color: var(--mk-ink);
    font-size: 13.5px;
    font-weight: 900;
    text-align: right;
}

.makefile-v2 .university-stamp-table td {
    padding: 12px 10px;
    border-color: var(--mk-line);
    font-size: 13px;
    vertical-align: middle;
}

.makefile-v2 .university-stamp-table .price {
    font-family: BYekanBold, BYekan, Tahoma, sans-serif;
    font-weight: 800;
    color: var(--mk-success);
}

.makefile-v2 .university-stamp-table input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--mk-success);
    cursor: pointer;
}

.makefile-v2 .site-stamp-addons {
    margin-top: 18px;
}

.makefile-v2 .site-stamp-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0 0 10px 0;
    padding: 16px 18px;
    border: 1.5px solid var(--mk-line-strong);
    border-radius: var(--mk-r);
    background: var(--mk-surface);
    box-shadow: var(--mk-shadow-1);
    cursor: pointer;
    text-align: right;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.makefile-v2 .site-stamp-card:hover {
    border-color: #a9bdd8;
    box-shadow: var(--mk-shadow-2);
}

.makefile-v2 .site-stamp-card.is-checked,
.makefile-v2 .site-stamp-card:has(.check:checked) {
    border-color: var(--mk-success);
    background: var(--mk-success-soft);
    box-shadow: 0 6px 18px rgba(15, 122, 70, .14);
}

.makefile-v2 .site-stamp-card .check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.makefile-v2 .site-stamp-card-box {
    position: relative;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border: 2px solid var(--mk-line-strong);
    border-radius: var(--mk-r-sm);
    background: var(--mk-surface);
    transition: border-color .16s ease, background .16s ease;
}

.makefile-v2 .site-stamp-card:hover .site-stamp-card-box {
    border-color: var(--mk-primary);
}

.makefile-v2 .site-stamp-card.is-checked .site-stamp-card-box,
.makefile-v2 .site-stamp-card:has(.check:checked) .site-stamp-card-box {
    background: var(--mk-success);
    border-color: var(--mk-success);
}

.makefile-v2 .site-stamp-card.is-checked .site-stamp-card-box:after,
.makefile-v2 .site-stamp-card:has(.check:checked) .site-stamp-card-box:after {
    content: '';
    position: absolute;
    left: 8px;
    top: 3px;
    width: 7px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.makefile-v2 .site-stamp-card-body {
    flex: 1;
    min-width: 0;
}

.makefile-v2 .site-stamp-card-title {
    display: block;
    color: var(--mk-ink);
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.7;
}

.makefile-v2 .site-stamp-card-desc {
    display: block;
    margin-top: 3px;
    color: var(--mk-ink-3);
    font-size: 12.5px;
    line-height: 1.9;
}

.makefile-v2 .site-stamp-card-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 124px;
}

.makefile-v2 .site-stamp-card-side .price {
    color: var(--mk-success);
    font-family: BYekanBold, BYekan, Tahoma, sans-serif;
    font-weight: 800;
    font-size: 15px;
}

.makefile-v2 .site-stamp-card.is-checked .cta-add,
.makefile-v2 .site-stamp-card:has(.check:checked) .cta-add {
    display: none;
}

.makefile-v2 .site-stamp-card.is-checked .cta-added,
.makefile-v2 .site-stamp-card:has(.check:checked) .cta-added {
    display: inline-flex;
}

/* keep the original "hide when every row is hidden" behaviour */
.makefile-v2 .university-stamp-table:not(:has(tr:not(.d-none))) {
    display: none;
}

.makefile-v2 .site-stamp-addons:not(:has(.site-stamp-card:not(.d-none))) {
    display: none;
}

.makefile-v2 .open-stamp-file-description-modal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mk-primary) !important;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --- invoice ---------------------------------------------------------- */
.makefile-v2 .mk-invoice {
    border: 1px solid var(--mk-line);
    border-radius: var(--mk-r-lg);
    background: var(--mk-surface);
    box-shadow: var(--mk-shadow-1);
    overflow: hidden;
}

.makefile-v2 .mk-invoice-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--mk-surface-2);
    border-bottom: 1px solid var(--mk-line);
    color: var(--mk-ink);
    font-size: 14px;
    font-weight: 900;
}

.makefile-v2 .mk-invoice > table {
    margin-bottom: 0;
}

.makefile-v2 .mk-invoice thead th {
    padding: 11px 14px;
    background: var(--mk-surface);
    border-bottom: 1px solid var(--mk-line);
    color: var(--mk-ink-3);
    font-size: 12px;
    font-weight: 800;
}

.makefile-v2 .mk-invoice td {
    padding: 13px 14px;
    border-top: 0;
    border-bottom: 1px solid var(--mk-line);
    font-size: 13.5px;
    vertical-align: middle;
}

.makefile-v2 .mk-invoice .total_payment,
.makefile-v2 .mk-invoice tr td.text-start {
    background: var(--mk-surface-2) !important;
    font-size: 15px;
}

.makefile-v2 .mk-invoice .total_payment .price,
.makefile-v2 .mk-invoice .total_payment .price_with_discount {
    font-family: BYekanBold, BYekan, Tahoma, sans-serif;
    font-size: 19px;
    color: var(--mk-success);
}

.makefile-v2 .mk-invoice .total_payment .price_without_discount[style*="line-through"] {
    color: var(--mk-ink-3);
    font-size: 15px;
}

.makefile-v2 .mk-invoice .price-unit {
    color: var(--mk-ink-2);
    font-size: 13px;
    font-weight: 700;
}

.makefile-v2 #step-5 .file-stamp-table .price,
.makefile-v2 #step-5 .js-file-line-price,
.makefile-v2 #step-5 .price_with_discount,
.makefile-v2 #step-5 .total_payment .price {
    font-family: BYekanBold, BYekan, Tahoma, sans-serif;
}

.makefile-v2 .js-discount-box td {
    background: var(--mk-surface) !important;
    border-bottom: 0;
}

.makefile-v2 #step-5 .discount-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.makefile-v2 #step-5 .discount-box .discount_name {
    width: 240px !important;
    max-width: 70%;
    display: inline-block;
    min-height: 44px;
}

.makefile-v2 .discount_submit {
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--mk-r-sm);
    background: var(--mk-ink);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    transition: background .16s ease;
}

.makefile-v2 .discount_submit:hover {
    background: #24384c;
}

.makefile-v2 .js-iran-card-extra.alert {
    margin: 14px 16px;
    border-radius: var(--mk-r);
    border-color: #f0dca8;
    background: var(--mk-warn-soft);
    font-size: 12.5px;
}

/* --- action bar ------------------------------------------------------- */
.makefile-v2 .mk-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    float: none !important;
    padding: 16px;
    border-top: 1px solid var(--mk-line);
    background: var(--mk-surface-2);
}

.makefile-v2 .mk-btn,
.makefile-v2 .mk-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: var(--mk-r-sm);
    border: 1.5px solid transparent;
    font-size: 14px;
    font-weight: 800;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.makefile-v2 .mk-btn--primary,
.makefile-v2 .mk-actions .btn-success.pay {
    background: var(--mk-success);
    border-color: var(--mk-success);
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 122, 70, .22);
}

.makefile-v2 .mk-btn--primary:hover,
.makefile-v2 .mk-actions .btn-success.pay:hover {
    background: #0c6b3d;
    border-color: #0c6b3d;
    transform: translateY(-1px);
}

.makefile-v2 .mk-btn--ghost {
    background: var(--mk-surface);
    border-color: var(--mk-line-strong);
    color: var(--mk-ink) !important;
}

.makefile-v2 .mk-btn--ghost:hover {
    background: var(--mk-surface-3);
    border-color: #b6c3d2;
}

/* the two secondary actions each get their own identity so they are not
   three look-alike buttons: pay = green, pay-link = blue, save = amber */
.makefile-v2 .mk-actions .pay.mk-btn--ghost,
.makefile-v2 .mk-actions .btn-primary.pay {
    background: var(--mk-primary-soft);
    border-color: var(--mk-primary);
    color: var(--mk-primary-ink) !important;
}

.makefile-v2 .mk-actions .pay.mk-btn--ghost:hover,
.makefile-v2 .mk-actions .btn-primary.pay:hover {
    background: var(--mk-primary);
    border-color: var(--mk-primary);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(29, 78, 216, .22);
}

.makefile-v2 .mk-actions .save-info {
    background: var(--mk-warn-soft);
    border-color: #e0bf74;
    color: var(--mk-warn) !important;
}

.makefile-v2 .mk-actions .save-info:hover {
    background: #fdeec6;
    border-color: #cfa94f;
    color: #7a5600 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(154, 100, 0, .18);
}

.makefile-v2 .mk-actions .btn:disabled,
.makefile-v2 .mk-actions .btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.makefile-v2 .mk-actions .loader-gif {
    float: none;
    margin: 0 4px;
}

/* ==========================================================================
   8. Wizard toolbar (prev / next / save draft)
   ========================================================================== */

.makefile-v2 .sw-theme-default .toolbar,
.makefile-v2 .toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin: 26px auto 0 auto;
    padding: 18px 0 0 !important;
    border-top: 1px solid var(--mk-line);
    direction: rtl;
    background: transparent;
}

.makefile-v2 .sw-theme-default .toolbar > .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    min-width: 128px;
    padding: 0 22px !important;
    margin: 0 !important;
    border-radius: var(--mk-r-sm) !important;
    border: 1.5px solid var(--mk-primary) !important;
    background: var(--mk-primary) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 800 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.makefile-v2 .sw-theme-default .toolbar > .btn:hover {
    background: var(--mk-primary-ink) !important;
    border-color: var(--mk-primary-ink) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(29, 78, 216, .22);
}

.makefile-v2 .sw-theme-default .toolbar > .btn:focus-visible {
    outline: none;
    box-shadow: var(--mk-focus);
}

/* previous = quiet, left; next = loud, right; draft = middle */
.makefile-v2 .sw-theme-default .toolbar > .sw-btn-prev {
    order: 1;
    background: var(--mk-surface) !important;
    border-color: var(--mk-line-strong) !important;
    color: var(--mk-ink) !important;
}

.makefile-v2 .sw-theme-default .toolbar > .sw-btn-prev:hover {
    background: var(--mk-surface-3) !important;
    border-color: #b6c3d2 !important;
    box-shadow: none;
}

.makefile-v2 .sw-theme-default .toolbar > .save-profile-draft {
    order: 2;
    background: var(--mk-surface) !important;
    border-color: var(--mk-line-strong) !important;
    color: var(--mk-ink) !important;
}

.makefile-v2 .sw-theme-default .toolbar > .save-profile-draft:hover {
    background: var(--mk-surface-3) !important;
    border-color: #b6c3d2 !important;
    box-shadow: none;
}

.makefile-v2 .sw-theme-default .toolbar > .sw-btn-next {
    order: 3;
}

/* directional arrows: in RTL "forward" points left, "back" points right.
   The glyphs come from the local line-awesome font (no extra markup needed,
   because smartwizard renders the button text itself). */
.makefile-v2 .sw-theme-default .toolbar > .sw-btn-next::after,
.makefile-v2 .sw-theme-default .toolbar > .sw-btn-prev::before {
    font-family: 'Line Awesome Free';
    font-weight: 900;
    font-size: 17px;
    line-height: 1;
}

.makefile-v2 .sw-theme-default .toolbar > .sw-btn-next::after {
    content: '\f060'; /* la-arrow-left */
}

.makefile-v2 .sw-theme-default .toolbar > .sw-btn-prev::before {
    content: '\f061'; /* la-arrow-right */
}

.makefile-v2 .sw-theme-default .toolbar > .btn.disabled,
.makefile-v2 .sw-theme-default .toolbar > .btn:disabled {
    opacity: .5 !important;
    cursor: not-allowed !important;
    background: var(--mk-surface-3) !important;
    border-color: var(--mk-line-strong) !important;
    color: var(--mk-ink-3) !important;
    transform: none;
    box-shadow: none;
}

/* the draft button keeps its own "saving" look (JS sets disabled while saving) */
.makefile-v2 .sw-theme-default .toolbar > .save-profile-draft:disabled {
    opacity: 1 !important;
    cursor: wait !important;
    background: var(--mk-surface) !important;
    border-color: var(--mk-line-strong) !important;
    color: var(--mk-ink) !important;
}

/* ==========================================================================
   9. Modals  (outside .makefile-v2 — this sheet only loads on the preview page)
   ========================================================================== */

.mk-modal .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(16, 32, 52, .22);
    overflow: hidden;
}

.mk-modal .modal-header {
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e3e9f0;
    background: #f8fafc;
}

.mk-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15.5px;
    font-weight: 900;
    color: #16222e;
}

.mk-modal .modal-body {
    padding: 20px;
    font-size: 13.5px;
    line-height: 2;
    color: #43546a;
}

.mk-modal .modal-body h6 {
    margin-top: 18px;
    font-size: 14px;
    font-weight: 900;
    color: #16222e;
}

.mk-modal .modal-body ul {
    padding-inline-start: 20px;
    list-style: disc;
}

.mk-modal .modal-body li {
    margin-bottom: 7px;
}

.mk-modal .modal-footer {
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #e3e9f0;
    background: #f8fafc;
}

.mk-modal .modal-footer .btn {
    min-height: 44px;
    padding: 0 20px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    font-size: 13.5px;
    font-weight: 800;
}

.mk-modal .modal-footer .btn-success {
    background: #0f7a46;
    border-color: #0f7a46;
}

.mk-modal .modal-footer .btn-primary {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.mk-modal .modal-footer .btn-secondary {
    background: #fff;
    border-color: #cfd8e3;
    color: #16222e;
}

.mk-modal .modal-footer .btn-warning {
    background: #f0a500;
    border-color: #f0a500;
    color: #2a1d00;
}

/* terms modal: long scrolling text */
#FirstModal .modal-body > div,
#EngineeringOrganizationModal .modal-body > div {
    max-height: min(58vh, 460px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-inline-end: 6px;
}

#FirstModal .alert,
#EngineeringOrganizationModal .alert,
#courses_list_table_empty_modal .alert,
#RestoreDataModal .alert,
#SaveInfoModal .alert {
    border-radius: 12px;
    border-width: 1px;
}

/* restore / save-info forms */
#RestoreDataModal .form-control,
#PreviewPaymentModal .form-control {
    min-height: 46px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
}

#RestoreDataModal .form-control:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .18);
    outline: none;
}

#RestoreDataModal label,
#PreviewPaymentModal label {
    font-size: 13px;
    font-weight: 800;
    color: #16222e;
}

#RestoreDataModal .modal-header,
#SaveInfoModal .modal-header {
    background: #0f7a46;
    border-bottom-color: #0f7a46;
}

#RestoreDataModal .modal-title,
#SaveInfoModal .modal-title {
    color: #fff;
}

/* file-type preview modal */
#FileTypePreviewModal .modal-body {
    padding: 12px;
    background: #10161d;
    text-align: center;
}

#file-type-preview-image {
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    border-radius: 8px;
}

/* pay link modal */
#PayLinkModal .pay-link {
    display: inline-block;
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #eef3ff;
    color: #16379c;
    font-weight: 700;
    word-break: break-all;
}

/* preview-only payment dialog */
.mk-demo-summary {
    border: 1px solid #e3e9f0;
    border-radius: 12px;
    overflow: hidden;
}

.mk-demo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid #eef2f7;
    font-size: 13px;
}

.mk-demo-row:last-child {
    border-bottom: 0;
}

.mk-demo-row span {
    color: #74869b;
}

.mk-demo-row b {
    font-family: BYekanBold, BYekan, Tahoma, sans-serif;
    color: #16222e;
}

/* jquery-confirm dialogs used by .pay and .save-info */
.jconfirm .jconfirm-box {
    border-radius: 16px !important;
    box-shadow: 0 24px 64px rgba(16, 32, 52, .22) !important;
}

.jconfirm .jconfirm-title {
    font-size: 15.5px !important;
    font-weight: 900 !important;
    color: #16222e !important;
}

.jconfirm .jconfirm-content {
    font-size: 13px !important;
    line-height: 2 !important;
    color: #43546a !important;
    text-align: justify;
}

.jconfirm .jconfirm-buttons .btn {
    min-height: 42px;
    border-radius: 8px !important;
    font-weight: 800 !important;
}

/* ==========================================================================
   10. Responsive
   ========================================================================== */

@media (max-width: 991px) {
    .makefile-v2 .mk-shell,
    .makefile-v2.mk-shell {
        width: 100% !important;
        max-width: 100%;
        margin-top: 16px;
        margin-bottom: 28px;
        padding-inline: 12px;
    }

    .makefile-v2 .mk-title {
        font-size: 21px;
    }

    .makefile-v2 .mk-pane {
        --mk-pane-pad: 18px;
        border-radius: var(--mk-r);
    }

    .makefile-v2 .mk-choices,
    .makefile-v2 .mk-grid-2,
    .makefile-v2 .mk-filetype-grid {
        grid-template-columns: 1fr;
    }

    .makefile-v2 .courses-table-scroll-hint {
        display: block;
    }
}

/* --- stepper becomes a horizontal scroller --------------------------- */
@media (max-width: 860px) {
    .makefile-v2 .sw-theme-default > .nav,
    .makefile-v2 #smartwizard > .nav {
        flex-direction: row !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 6px !important;
        margin-bottom: 16px;
    }

    .makefile-v2 #smartwizard > .nav::-webkit-scrollbar {
        height: 3px;
    }

    .makefile-v2 #smartwizard > .nav::-webkit-scrollbar-thumb {
        background: var(--mk-line-strong);
        border-radius: 999px;
    }

    .makefile-v2 .sw-theme-default > .nav > li,
    .makefile-v2 #smartwizard > .nav > li {
        flex: 0 0 auto;
        min-width: 150px;
        scroll-snap-align: start;
    }

    .makefile-v2 #smartwizard > .nav .nav-link {
        padding: 10px !important;
        font-size: 12px;
    }

    .makefile-v2 .mk-step-badge {
        width: 32px;
        height: 32px;
    }

    .makefile-v2 .mk-step-badge img {
        width: 17px !important;
        height: 17px !important;
    }
}

/* --- course table turns into stacked cards --------------------------- */
@media (max-width: 767px) {
    .makefile-v2 .courses-table-scroll {
        overflow-x: visible;
        border: 0;
        background: transparent;
    }

    .makefile-v2 .courses-table-scroll-hint {
        display: none;
    }

    .makefile-v2 .courses-table,
    .makefile-v2 .courses-table tbody,
    .makefile-v2 .courses-table tr,
    .makefile-v2 .courses-table td {
        display: block;
        width: auto;
        max-width: none;
        min-width: 0;
    }

    .makefile-v2 .courses-table thead {
        display: none;
    }

    .makefile-v2 .courses-table tbody tr.courses {
        position: relative;
        padding: 12px 14px 12px 14px;
        margin-bottom: 10px;
        border: 1px solid var(--mk-line);
        border-radius: var(--mk-r);
        background: var(--mk-surface);
        box-shadow: var(--mk-shadow-1);
    }

    .makefile-v2 .courses-table tbody tr.courses:hover {
        background: var(--mk-surface);
    }

    .makefile-v2 .courses-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: auto !important;
        max-width: none !important;
        padding: 7px 0;
        border-bottom: 1px dashed var(--mk-line);
        text-align: right !important;
        font-size: 13px;
    }

    .makefile-v2 .courses-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--mk-ink-3);
        font-size: 11.5px;
        font-weight: 800;
    }

    /* the row number becomes a badge in the card corner */
    .makefile-v2 .courses-table td.sort {
        justify-content: flex-start;
        padding: 0 0 8px;
        border-bottom: 1px solid var(--mk-line);
        color: var(--mk-primary);
        font-size: 12px;
        font-weight: 900;
    }

    .makefile-v2 .courses-table td.sort::before {
        content: 'ردیف';
    }

    .makefile-v2 .courses-table td.faname {
        padding-top: 8px;
        font-size: 14px;
        font-weight: 800;
        color: var(--mk-ink);
    }

    .makefile-v2 .courses-table td.enname,
    .makefile-v2 .courses-table td.credit,
    .makefile-v2 .courses-table td.nazari_hour,
    .makefile-v2 .courses-table td.amali_hour {
        text-align: left !important;
    }

    .makefile-v2 .courses-table td[contenteditable="true"] {
        padding-inline: 8px;
        background: var(--mk-surface-2);
        border-radius: 6px;
        border-bottom: 1px dashed var(--mk-line);
    }

    .makefile-v2 .courses-table td.type select,
    .makefile-v2 .courses-table td.category select,
    .makefile-v2 .courses-table td.type .select2-container,
    .makefile-v2 .courses-table td.category .select2-container {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 60% !important;
        font-size: 12.5px;
    }

    /* tools row: full-width, large touch targets, no longer sticky */
    .makefile-v2 .courses-table .tools-col {
        position: static;
        width: auto !important;
        min-width: 0 !important;
        padding-top: 10px;
        border-bottom: 0;
        box-shadow: none;
        background: transparent;
    }

    .makefile-v2 .courses-table .tools-col::before {
        content: none;
    }

    .makefile-v2 .course-tool-actions {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    .makefile-v2 .dragdropbtn,
    .makefile-v2 .toolbtn {
        flex: 1 1 0;
        width: auto;
        height: 42px;
        border: 1px solid var(--mk-line-strong);
        background: var(--mk-surface-2);
        font-size: 1.15rem;
    }

    .makefile-v2 .toolbtn.delete {
        color: var(--mk-danger);
    }

    /* invoice + stamp tables stack too */
    .makefile-v2 .mk-invoice table,
    .makefile-v2 .mk-invoice tbody,
    .makefile-v2 .mk-invoice tr,
    .makefile-v2 .mk-invoice td,
    .makefile-v2 .university-stamp-table,
    .makefile-v2 .university-stamp-table tbody,
    .makefile-v2 .university-stamp-table tr,
    .makefile-v2 .university-stamp-table td {
        display: block;
        width: auto;
    }

    .makefile-v2 .mk-invoice thead,
    .makefile-v2 .university-stamp-table thead {
        display: none;
    }

    .makefile-v2 .mk-invoice td,
    .makefile-v2 .university-stamp-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 11px 14px;
    }

    .makefile-v2 .mk-invoice td::before,
    .makefile-v2 .university-stamp-table td::before {
        content: attr(data-label);
        color: var(--mk-ink-3);
        font-size: 11.5px;
        font-weight: 800;
    }

    .makefile-v2 .mk-invoice td.text-start::before,
    .makefile-v2 .js-discount-box td::before {
        content: none;
    }

    .makefile-v2 .university-stamp-table tr {
        border: 1px solid var(--mk-line);
        border-radius: var(--mk-r-sm);
        margin: 0 10px 8px;
    }

    .makefile-v2 .js-discount-box td {
        display: block;
    }

    .makefile-v2 #step-5 .discount-box .discount_name {
        width: auto !important;
        max-width: none;
        flex: 1 1 auto;
    }

    .makefile-v2 .site-stamp-card {
        flex-wrap: wrap;
    }

    .makefile-v2 .site-stamp-card-side {
        width: 100%;
        min-width: 0;
        flex-direction: row;
        justify-content: space-between;
    }

    /* actions become full width, stacked, primary first */
    .makefile-v2 .mk-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .makefile-v2 .mk-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .makefile-v2 .mk-actions .loader-gif {
        align-self: center;
    }

    .makefile-v2 .sw-theme-default .toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .makefile-v2 .sw-theme-default .toolbar > .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }
}

@media (max-width: 575px) {
    .makefile-v2 .mk-shell,
    .makefile-v2.mk-shell {
        padding-inline: 8px;
    }

    .makefile-v2 .mk-pane {
        --mk-pane-pad: 14px;
    }

    .makefile-v2 .mk-title {
        font-size: 19px;
    }

    .makefile-v2 .file-type-card-thumb {
        width: 128px;
        height: 128px;
    }

    .makefile-v2 .file-type-card-thumb img,
    .makefile-v2 .file-type-card-image {
        max-width: 116px !important;
        max-height: 116px !important;
    }

    .makefile-v2 .sw-theme-default .toolbar > .btn {
        flex: 1 1 100%;
    }

    .makefile-v2 .select2-container {
        width: 100% !important;
    }

    .mk-modal .modal-body,
    .mk-modal .modal-header,
    .mk-modal .modal-footer {
        padding-inline: 14px;
    }
}

/* ==========================================================================
   11. Motion / accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .makefile-v2 *,
    .mk-modal * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .makefile-v2 .mk-validation.alert {
        animation: none;
    }
}

.makefile-v2 a:focus-visible,
.makefile-v2 button:focus-visible,
.makefile-v2 [contenteditable]:focus-visible,
.mk-modal button:focus-visible {
    outline: 2px solid var(--mk-primary, #1d4ed8);
    outline-offset: 2px;
}

/* print: keep the invoice readable, drop the chrome */
@media print {
    .makefile-v2 #smartwizard > .nav,
    .makefile-v2 .mk-progress,
    .makefile-v2 .toolbar,
    .makefile-v2 .mk-actions,
    .makefile-v2 .mk-preview-ribbon,
    .makefile-v2 .mk-help {
        display: none !important;
    }
}

/* ==========================================================================
   12. Dropdowns — native <select> and select2
   ========================================================================== */

/* --- native selects: custom chevron (inline SVG, no external asset) ------ */
.makefile-v2 select.form-control,
.makefile-v2 .courses-table select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2374869b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    cursor: pointer;
}

.makefile-v2 select.form-control {
    padding-left: 38px;
    background-position: left 14px center;
    background-size: 12px 8px;
}

.makefile-v2 .courses-table select {
    padding-left: 24px;
    background-position: left 7px center;
    background-size: 10px 7px;
}

.makefile-v2 select.form-control:hover,
.makefile-v2 .courses-table select:hover {
    border-color: var(--mk-primary);
    background-color: var(--mk-surface-2);
}

.makefile-v2 select.form-control:focus,
.makefile-v2 .courses-table select:focus {
    background-color: var(--mk-surface);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%231d4ed8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* the native option list is drawn by the OS; these are the parts we can set */
.makefile-v2 select.form-control option,
.makefile-v2 .courses-table select option {
    padding: 8px 10px;
    background: #fff;
    color: var(--mk-ink);
}

.makefile-v2 select.form-control option:disabled {
    color: #a7b4c3;
}

/* --- select2 dropdown ---------------------------------------------------
   select2 appends its dropdown to <body>, so these selectors cannot be
   scoped. This stylesheet is loaded only by this page. */
.select2-container--open .select2-dropdown {
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(16, 32, 52, .16);
    overflow: hidden;
    margin-top: 6px;
    background: #fff;
}

.select2-container--open .select2-dropdown--above {
    margin-top: 0;
    margin-bottom: 6px;
}

.select2-dropdown .select2-search--dropdown {
    padding: 10px;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}

.select2-dropdown .select2-search--dropdown .select2-search__field {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;
    font-size: 13.5px;
    color: #16222e;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.select2-dropdown .select2-search--dropdown .select2-search__field:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .18);
}

.select2-dropdown .select2-results > .select2-results__options {
    max-height: 290px;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: #cfd8e3 transparent;
}

.select2-dropdown .select2-results > .select2-results__options::-webkit-scrollbar {
    width: 8px;
}

.select2-dropdown .select2-results > .select2-results__options::-webkit-scrollbar-thumb {
    background: #cfd8e3;
    border: 2px solid #fff;
    border-radius: 999px;
}

.select2-container--default .select2-results__option {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.9;
    color: #43546a;
    transition: background .12s ease, color .12s ease;
}

.select2-container--default .select2-results__option + .select2-results__option {
    margin-top: 2px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: #eef3ff;
    color: #16379c;
    font-weight: 700;
}

.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option[data-selected="true"] {
    background-color: #eefaf3;
    color: #0f7a46;
    font-weight: 700;
}

/* loading / empty / "searching" messages */
.select2-container--default .select2-results__option.loading-results,
.select2-container--default .select2-results__option.select2-results__message {
    color: #74869b;
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
    padding: 16px 12px;
}

.select2-result-repository__title {
    display: block;
    line-height: 1.9;
}

/* the closed control's own arrow, matched to the native selects */
.makefile-v2 .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border: 0;
    width: 12px;
    height: 8px;
    margin-top: -4px;
    margin-left: -6px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2374869b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 12px 8px;
    transition: transform .16s ease;
}

.makefile-v2 .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    transform: rotate(180deg);
}

/* select2 renders its own clear "x" and placeholder — align them with the theme */
.makefile-v2 .select2-container--default .select2-selection--single .select2-selection__clear {
    margin-top: 4px;
    color: #a7b4c3;
    font-size: 18px;
}

.makefile-v2 .select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: var(--mk-danger);
}

/* the shared select2.css stripes every odd row (#f1f2f7); flatten it so the
   hover / selected states read clearly */
.select2-container--open .select2-results__option:nth-child(odd) {
    background-color: transparent;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: #eef3ff !important;
}

.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option[data-selected="true"] {
    background-color: #eefaf3 !important;
}

/* a select2-backed field in error state must win over select2's own
   focus/open styling, otherwise the red outline is overridden by blue */
.makefile-v2 .makefile-field-error + .select2-container .select2-selection,
.makefile-v2 .makefile-field-error + .select2-container--focus .select2-selection,
.makefile-v2 .makefile-field-error + .select2-container--open .select2-selection {
    border-color: var(--mk-danger) !important;
    box-shadow: 0 0 0 3px rgba(192, 42, 55, .12) !important;
}

/* --- compact select2 inside the course table ---------------------------- */
.makefile-v2 .courses-table .select2-container {
    width: 100% !important;
}

.makefile-v2 .courses-table .select2-container--default .select2-selection--single {
    height: 34px;
    padding: 2px 4px;
    border-radius: 6px;
}

.makefile-v2 .courses-table .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-inline: 4px;
    font-size: 12.5px;
    line-height: 28px;
}

.makefile-v2 .courses-table .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 32px;
}

.makefile-v2 .courses-table .select2-container--default .select2-selection--single .select2-selection__arrow b {
    width: 10px;
    height: 7px;
    margin-top: -3px;
    margin-left: -5px;
    background-size: 10px 7px;
}

.mk-row-dropdown .select2-results__option {
    padding: 9px 11px;
    font-size: 12.5px;
}

.mk-row-dropdown .select2-results > .select2-results__options {
    max-height: 220px;
}
