/* ===== Mobile base (company panel first) ===== */
@media (max-width: 767px) {
    body.ct-mobile {
        background: #f2f3f5 !important;
        padding: 0;
    }

    body.ct-mobile .dashboard-title {
        display: none;
    }

    body.ct-mobile .dashboard-user-info {
        display: none;
    }

    body.ct-mobile .dashboard-logo {
        display: flex;
        width: 44px;
        height: 44px;
        margin-inline-start: 8px;
        padding: 4px;
    }

    body.ct-mobile a.dashboard-logo--home:active {
        transform: scale(0.95);
    }

    body.ct-mobile .navbar.navbar-custum.banner {
        min-height: 56px;
        height: 56px;
        padding: 0 12px;
        position: sticky;
        top: 0;
        z-index: 1040;
    }

    body.ct-mobile .navbar .dashboard-navbar-user .nav-item.dropdown.show {
        position: relative;
        z-index: 1042;
    }

    body.ct-mobile .right.col.just-right {
        position: fixed;
        top: 56px;
        bottom: 0;
        width: 260px !important;
        max-width: 85vw;
        right: -260px;
        z-index: 1050;
        transition: right 0.28s ease;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    }

    body.ct-mobile .right.col.just-right.is-open {
        right: 0;
    }

    body.ct-mobile .main.pane {
        position: relative !important;
        height: 100vh !important;
        min-height: 100vh !important;
        overflow: hidden !important;
    }

    body.ct-mobile .left.col {
        position: absolute !important;
        top: 56px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: hidden !important;
        border: 0;
        margin: 0;
    }

    body.ct-mobile .body.row.content {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        overflow: hidden !important;
        border: 0;
        margin: 0;
    }

    /* پن فعال = کانتینر اسکرول (مثل دسکتاپ) */
    body.ct-mobile .main.pane .pane.active.scroll-y,
    body.ct-mobile .main.pane .pane.active.scroll-y-form {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    body.ct-mobile-company .insuranceCertificateList.pane.scroll-y.active {
        background: #f2f3f5;
        padding: 0;
    }

    body.ct-mobile-company .insuranceCertificateEdit.pane.scroll-y-form.active {
        padding-top: var(--ic-wizard-nav-h, 0px);
        padding-bottom: calc(var(--ic-wizard-footer-h, 140px) + 20px);
        box-sizing: border-box;
        background: #f2f3f5;
    }

    body.ct-mobile-company.ic-wizard-visible .insuranceCertificateEdit.pane.scroll-y-form.active {
        padding-top: var(--ic-wizard-nav-h, 188px);
    }

    /* breadcrumb/title دسکتاپ روی ویزارد نمی‌افتد */
    body.ct-mobile-company .left.col #page-wrapper,
    body.ct-mobile-company .left.col .section-header {
        display: none !important;
    }

    /* فقط وقتی لیست موبایل آماده شد گرید مخفی شود — جلوگیری از صفحه سفید هنگام رفرش */
    body.ct-mobile-company.ic-mobile-list-ready .insuranceCertificateList.pane.scroll-y .k-grid {
        display: none !important;
    }

    body.ct-mobile .body.menu.row {
        height: calc(100vh - 56px);
    }

    .ct-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 56px 0 0 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1045;
        opacity: 0;
        transition: opacity 0.28s ease;
    }

    .ct-sidebar-overlay.is-visible {
        display: block;
        opacity: 1;
    }
}

/* ===== Home dashboard (company mobile) ===== */
.ic-home__legacy {
    margin-right: 50px;
    margin-top: 1px;
    padding: 10px 10px 10px 50px;
    font-size: 14px;
}

.ic-home__legacy p {
    padding: 10px;
    font-size: 13px;
    line-height: 25px;
    margin: 0;
}

.ic-home-dashboard {
    display: none;
}

@media (max-width: 767px) {
    body.ct-mobile-company .first-page.first.pane.scroll-y {
        background: #f2f3f5 !important;
        padding: 0;
    }

    body.ct-mobile-company .first-page.first.pane.scroll-y.active {
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.ct-mobile-company .ic-home__legacy {
        display: none;
    }

    body.ct-mobile-company .ic-home-dashboard {
        display: block;
        max-width: 520px;
        margin: 0 auto;
        min-height: 100%;
    }

    .ic-home-hero {
        position: relative;
        padding: 24px 16px 28px;
        background:
            linear-gradient(165deg, rgba(30, 67, 97, 0.92) 0%, rgba(45, 95, 138, 0.82) 45%, rgba(30, 67, 97, 0.65) 100%),
            url(../images/first-page-background.png) center center / cover no-repeat;
        border-radius: 0 0 24px 24px;
        box-shadow: 0 8px 24px rgba(30, 67, 97, 0.18);
    }

    .ic-home-hero__content {
        position: relative;
        z-index: 1;
        color: #fff;
        text-align: center;
        padding: 8px 4px 0;
    }

    .ic-home-hero__badge {
        display: inline-block;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.02em;
        padding: 5px 12px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.28);
        margin-bottom: 14px;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .ic-home-hero__title {
        font-size: 22px;
        font-weight: 700;
        margin: 0 0 8px;
        line-height: 1.35;
    }

    .ic-home-hero__subtitle {
        font-size: 13px;
        line-height: 1.65;
        margin: 0;
        opacity: 0.92;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    .ic-home-dashboard__body {
        padding: 20px 16px 28px;
    }

    .ic-home-dashboard__heading {
        font-size: 13px;
        font-weight: 600;
        color: #6b7c8f;
        margin: 0 0 12px;
        text-transform: none;
    }

    .ic-home-tiles {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .ic-home-tile {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px;
        border-radius: 14px;
        text-decoration: none;
        background: #fff;
        border: 1px solid #e8edf2;
        box-shadow: 0 2px 10px rgba(30, 67, 97, 0.07);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .ic-home-tile:active {
        transform: scale(0.985);
        box-shadow: 0 1px 6px rgba(30, 67, 97, 0.1);
    }

    .ic-home-tile__icon {
        flex-shrink: 0;
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        line-height: 1;
    }

    .ic-home-tile--issue .ic-home-tile__icon {
        background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
        color: #2e7d32;
    }

    .ic-home-tile--report .ic-home-tile__icon {
        background: linear-gradient(135deg, #e3edf7, #d0e0f0);
        color: #1e4361;
    }

    .ic-home-tile__body {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
        text-align: right;
    }

    .ic-home-tile__title {
        font-size: 15px;
        font-weight: 600;
        color: #1a2b3c;
        line-height: 1.3;
    }

    .ic-home-tile__desc {
        font-size: 12px;
        color: #8fa1b4;
        line-height: 1.4;
    }

    .ic-home-tile__chevron {
        flex-shrink: 0;
        font-size: 16px;
        color: #b8c9d8;
    }

    .ic-home-dashboard__hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin: 20px 0 0;
        padding: 12px;
        font-size: 12px;
        color: #8fa1b4;
        text-align: center;
        line-height: 1.5;
    }

    .ic-home-dashboard__hint .bi {
        font-size: 14px;
        opacity: 0.85;
    }
}

/* ===== Mobile certificate list ===== */
body:not(.ct-mobile-company) #insuranceCertificateMobileList,
body:not(.ct-mobile-company) .ic-mobile-pagination {
    display: none !important;
}

.ic-mobile-list {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 12px 12px 16px;
    box-sizing: border-box;
}

body.ic-mobile-list-visible {
    padding-bottom: 0;
}

body.ic-mobile-list-visible .ic-mobile-list__inner {
    padding-bottom: calc(var(--ic-mobile-pagination-h, 76px) + 16px);
}

.ic-mobile-list__inner {
    width: 100%;
}

.ic-mobile-list__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ic-mobile-list__title {
    font-size: 16px;
    font-weight: 600;
    color: #1e4361;
}

.ic-mobile-list__count {
    font-size: 12px;
    color: #6b7c8f;
}

.ic-mobile-search {
    position: relative;
    margin-bottom: 10px;
}

.ic-mobile-search__input {
    width: 100%;
    height: 44px;
    border: 1px solid #d5dfe7;
    border-radius: 10px;
    padding: 0 40px 0 12px;
    font-size: 14px;
    background: #fff;
}

.ic-mobile-search__icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8fa1b4;
    pointer-events: none;
}

.ic-mobile-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}

.ic-mobile-filter-chip {
    flex-shrink: 0;
    border: 1px solid #d5dfe7;
    background: #fff;
    color: #4a5d70;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.ic-mobile-filter-chip.is-active {
    background: #1e4361;
    border-color: #1e4361;
    color: #fff;
}

.ic-mobile-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-bottom: 14px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #2e9e4f, #248a42);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(46, 158, 79, 0.28);
}

.ic-mobile-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(30, 67, 97, 0.08);
    border: 1px solid #e8edf2;
}

.ic-mobile-card.is-unprinted {
    border-right: 3px solid #5bc0f7;
}

.ic-mobile-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.ic-mobile-card__serial {
    font-size: 14px;
    font-weight: 600;
    color: #1a2b3c;
}

.ic-mobile-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    line-height: 1.5;
    white-space: nowrap;
    border: none;
    cursor: default;
}

.ic-mobile-status--final {
    background: #e8f5e9;
    color: #2e7d32;
}

.ic-mobile-status--draft {
    background: #fff8e1;
    color: #f57f17;
}

.ic-mobile-status--cancel {
    background: #ffebee;
    color: #c62828;
}

.ic-mobile-status--other {
    background: #eceff1;
    color: #546e7a;
}

.ic-mobile-card__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    font-size: 12px;
    color: #5a6b7d;
    margin-bottom: 10px;
}

.ic-mobile-card__grid strong {
    display: block;
    color: #8fa1b4;
    font-weight: 500;
    font-size: 11px;
}

.ic-mobile-card__actions {
    display: flex;
    align-items: center;
    border-top: 1px solid #eef2f6;
    padding-top: 10px;
    gap: 0;
}

.ic-mobile-card__action {
    flex: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    font-size: 13px;
    padding: 8px 4px;
    color: #1e4361;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    min-width: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.ic-mobile-card__action:hover {
    background: #f5f8fa;
}

.ic-mobile-card__action-icon {
    font-size: 18px;
    line-height: 1;
}

.ic-mobile-card__action-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.ic-mobile-card__action--danger {
    color: #c62828;
}

.ic-mobile-card__action--danger:hover {
    background: #fff5f5;
}

.ic-mobile-card__action + .ic-mobile-card__action {
    border-right: 1px solid #eef2f6;
}

.ic-mobile-pagination {
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e3eaf0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-shadow: 0 -4px 20px rgba(30, 67, 97, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.ct-mobile-company .ic-mobile-pagination.ic-mobile-pagination--dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
}

.ic-mobile-pagination__center {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.ic-mobile-pagination__meta {
    font-size: 12px;
    font-weight: 600;
    color: #1e4361;
    margin-bottom: 4px;
}

.ic-mobile-pagination__nums {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-bottom: 2px;
}

.ic-mobile-page-num {
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 4px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
}

.ic-mobile-page-num.is-active {
    background: #1e4361 !important;
    border-color: #1e4361 !important;
    color: #fff !important;
}

.ic-mobile-page-ellipsis {
    display: inline-flex;
    align-items: center;
    padding: 0 2px;
    color: #8fa1b4;
    font-size: 12px;
    line-height: 30px;
}

.ic-mobile-pagination__arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 1px solid #d5dfe7;
    border-radius: 12px;
    background: #fff;
    color: #1e4361;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.ic-mobile-pagination__arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ic-mobile-pagination__btn {
    min-width: 30px;
    height: 30px;
    border: 1px solid #d5dfe7;
    border-radius: 8px;
    background: #fff;
    color: #1e4361;
    font-size: 12px;
    padding: 0 6px;
}

.ic-mobile-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ic-mobile-pagination__info {
    text-align: center;
    font-size: 11px;
    color: #8fa1b4;
    line-height: 1.3;
}

.ic-mobile-empty {
    text-align: center;
    padding: 40px 16px;
    color: #8fa1b4;
    font-size: 14px;
}

/* ===== Wizard (edit form) ===== */
.ic-wizard-nav {
    display: none;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.ic-wizard-nav.ic-wizard-nav--dock {
    display: block;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 1020;
    max-width: none;
    margin: 0;
    background: #f2f3f5;
    padding: 10px 12px 12px;
    border-bottom: 1px solid #e8edf2;
    box-shadow: 0 2px 12px rgba(30, 67, 97, 0.08);
    box-sizing: border-box;
}

body.ct-mobile-company .insuranceCertificateEdit.pane .ic-wizard-nav:not(.ic-wizard-nav--dock) {
    display: block;
}

.ic-wizard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.ic-wizard-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: auto;
    min-height: 36px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #1e4361;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
}

.ic-wizard-back-btn:hover {
    background: #eef2f6;
}

.ic-wizard-back-btn .bi {
    font-size: 16px;
    line-height: 1;
}

.ic-wizard-page-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e4361;
    line-height: 1.3;
}

.ic-wizard-steps {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    padding: 0 4px;
}

.ic-wizard-step-dot {
    flex: 1;
    text-align: center;
    position: relative;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.ic-wizard-step-dot__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0 auto 4px;
    border-radius: 50%;
    border: 2px solid #cfd8e3;
    background: #fff;
    color: #8fa1b4;
    font-size: 12px;
    font-weight: 600;
}

.ic-wizard-step-dot.is-active .ic-wizard-step-dot__num {
    border-color: #1e4361;
    background: #1e4361;
    color: #fff;
}

.ic-wizard-step-dot.is-done .ic-wizard-step-dot__num {
    border-color: #2e9e4f;
    background: #2e9e4f;
    color: #fff;
}

.ic-wizard-step-dot.is-error .ic-wizard-step-dot__num {
    border-color: #c62828;
    background: #ffebee;
    color: #c62828;
    font-size: 14px;
    line-height: 1;
}

.ic-wizard-step-dot.is-error .ic-wizard-step-dot__label {
    color: #c62828;
    font-weight: 600;
}

.ic-wizard-step-title.ic-wizard-step-title--error {
    color: #c62828;
}

.ic-wizard-step-dot__label {
    font-size: 10px;
    color: #8fa1b4;
    display: block;
}

.ic-wizard-step-dot.is-active .ic-wizard-step-dot__label {
    color: #1e4361;
    font-weight: 600;
}

.ic-wizard-progress-track {
    height: 4px;
    background: #e8edf2;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.ic-wizard-progress-fill {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: var(--ic-wizard-progress-pct, 0%);
    background: linear-gradient(270deg, #1e4361, #7092be);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.ic-wizard-step-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e4361;
    margin-bottom: 4px;
}

.ic-wizard-step-subtitle {
    font-size: 12px;
    color: #8fa1b4;
    margin-bottom: 0;
}

body.ct-mobile-company .insuranceCertificateEdit .ic-wizard-panel {
    display: none;
}

body.ct-mobile-company.ic-wizard-scroll .insuranceCertificateEdit .ic-wizard-panel {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 16px 14px 12px;
    margin-top: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(30, 67, 97, 0.08);
    border: 1px solid #e8edf2;
    position: relative;
    z-index: 1;
    scroll-margin-top: calc(var(--ic-wizard-nav-h, 188px) + 10px);
}

body.ct-mobile-company.ic-wizard-scroll .insuranceCertificateEdit .ic-wizard-panel:first-of-type {
    margin-top: 4px;
}

.ic-wizard-panel__heading {
    display: none;
    align-items: center;
    gap: 10px;
    margin: -4px 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8edf2;
}

body.ct-mobile-company.ic-wizard-scroll .ic-wizard-panel__heading {
    display: flex;
}

.ic-wizard-panel__heading-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1e4361;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.ic-wizard-panel__heading-text {
    font-size: 15px;
    font-weight: 600;
    color: #1e4361;
    line-height: 1.3;
}

body:not(.ct-mobile-company) .insuranceCertificateEdit .ic-wizard-panel {
    display: block;
}

body:not(.ct-mobile-company) .insuranceCertificateEdit .ic-wizard-nav,
body:not(.ct-mobile-company) .ic-wizard-footer {
    display: none !important;
}

body.ct-mobile-company .insuranceCertificateEdit .command-bar.ic-desktop-actions {
    display: none !important;
}

.ic-wizard-footer {
    display: none;
}

.ic-wizard-footer.ic-wizard-footer--dock {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1010;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #e3eaf0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(30, 67, 97, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
}

.ic-wizard-footer__inner {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

body.ct-mobile-company .insuranceCertificateEdit.pane.is-visible .ic-wizard-footer.ic-wizard-footer--dock {
    display: block;
}

.ic-wizard-footer__nav {
    display: flex;
    gap: 10px;
}

.ic-wizard-footer__btn {
    flex: 1;
    min-height: 46px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    padding: 0 16px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.ic-wizard-footer__btn--primary {
    background: linear-gradient(135deg, #1e4361, #2d5f8a);
    border-color: #1e4361;
    color: #fff;
    box-shadow: 0 3px 10px rgba(30, 67, 97, 0.22);
}

.ic-wizard-footer__btn--primary:hover {
    background: linear-gradient(135deg, #2d5f8a, #1e4361);
}

.ic-wizard-footer__btn--secondary {
    background: #fff;
    border-color: #d5dfe7;
    color: #1e4361;
}

.ic-wizard-footer__btn--secondary:hover:not(:disabled) {
    background: #f5f8fa;
    border-color: #b8c9d8;
}

.ic-wizard-footer__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ic-wizard-footer__save {
    display: none;
}

.ic-wizard-footer.is-final .ic-wizard-footer__nav {
    display: flex;
    margin-bottom: 10px;
}

.ic-wizard-footer.is-final #icWizardNext {
    display: none;
}

.ic-wizard-footer.is-final .ic-wizard-footer__save {
    display: block;
}

/* دکمه‌های ثبت نهایی داخل فوتر موبایل */
.ic-wizard-command-bar {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.ic-wizard-command-bar .ic-wizard-btn {
    flex: 1;
    min-height: 46px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    margin: 0 !important;
    border: 0;
}

.ic-wizard-command-bar .ic-wizard-btn--draft {
    background: #fff !important;
    border: 1px solid #d5dfe7 !important;
    color: #1e4361 !important;
    box-shadow: none !important;
}

.ic-wizard-command-bar .ic-wizard-btn--submit {
    background: linear-gradient(135deg, #2e9e4f, #248a42) !important;
    box-shadow: 0 3px 10px rgba(46, 158, 79, 0.28) !important;
}

.ic-wizard-command-bar .ic-wizard-btn--back {
    min-height: 40px;
    background: transparent !important;
    border: 0 !important;
    color: #8fa1b4 !important;
    font-size: 13px;
    font-weight: 500;
    box-shadow: none !important;
    width: 100%;
    text-align: center;
    padding: 8px;
}

.ic-wizard-footer.is-final .ic-wizard-command-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
}

.ic-wizard-footer.is-final .ic-wizard-command-bar .ic-wizard-btn--draft {
    grid-column: 1;
    grid-row: 1;
}

.ic-wizard-footer.is-final .ic-wizard-command-bar .ic-wizard-btn--submit {
    grid-column: 2;
    grid-row: 1;
}

.ic-wizard-footer.is-final .ic-wizard-command-bar .ic-wizard-btn--back,
.ic-wizard-footer.is-final .ic-wizard-command-bar .ic-wizard-btn--pdf {
    grid-column: 1 / -1;
}

.ic-wizard-footer.is-final .ic-wizard-command-bar .ic-wizard-btn--pdf {
    background: linear-gradient(135deg, #1e4361, #2d5f8a) !important;
    color: #fff !important;
    min-height: 46px;
    border-radius: 10px;
    width: 100%;
}

/* Mobile form controls in wizard */
body.ct-mobile-company .insuranceCertificateEdit .form-control,
body.ct-mobile-company .insuranceCertificateEdit .form-select {
    min-height: 44px;
    max-height: 44px;
    font-size: 14px;
    border-radius: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
}

body.ct-mobile-company .insuranceCertificateEdit textarea.form-control {
    min-height: 88px;
    max-height: none;
}

body.ct-mobile-company .insuranceCertificateEdit .k-dropdown-wrap,
body.ct-mobile-company .insuranceCertificateEdit .dropdown-with-add .k-dropdown-wrap {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

body.ct-mobile-company .insuranceCertificateEdit .dropdown-with-add {
    display: flex;
    align-items: center !important;
    gap: 8px;
}

body.ct-mobile-company .insuranceCertificateEdit .dropdown-with-add .form-select,
body.ct-mobile-company .insuranceCertificateEdit .dropdown-fluid .form-select {
    width: 100%;
}

body.ct-mobile-company .insuranceCertificateEdit .select2-container {
    flex: 1;
    min-width: 0 !important;
    max-width: 100% !important;
}

body.ct-mobile-company .insuranceCertificateEdit .select2-container .select2-selection--single,
body.ct-mobile-company .insuranceCertificateEdit .select2-container .select2-selection--multiple {
    min-height: 44px !important;
    max-height: 44px !important;
    border-radius: 10px !important;
    border-color: #ced4da !important;
    display: flex;
    align-items: center;
}

body.ct-mobile-company .insuranceCertificateEdit .select2-container .select2-selection--multiple {
    overflow: hidden;
}

body.ct-mobile-company .insuranceCertificateEdit .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    max-height: 40px;
    overflow: hidden;
}

body.ct-mobile-company .insuranceCertificateEdit .button-icon-add {
    flex-shrink: 0;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border: 0;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #1e4361, #2d5f8a);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(30, 67, 97, 0.25);
    cursor: pointer;
    padding: 0;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
}

body.ct-mobile-company .insuranceCertificateEdit .button-icon-add:hover {
    background: linear-gradient(135deg, #2d5f8a, #1e4361);
}

body.ct-mobile-company .insuranceCertificateEdit .time-dropdown .form-select {
    min-height: 40px;
    max-height: 40px;
}

body.ct-mobile-company .insuranceCertificateEdit .col-12.col-md-6 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
}

body.ct-mobile-company .insuranceCertificateEdit .k-window1.edit-form {
    box-shadow: none;
    border: 0;
    background: transparent;
}

body.ct-mobile-company .insuranceCertificateEdit .container-fluid {
    padding: 12px 12px 8px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

body.ct-mobile-company .insuranceCertificateEdit .form-label {
    font-size: 13px;
    font-weight: 500;
    color: #4a5d70;
    margin-bottom: 6px;
}

body.ct-mobile-company .insuranceCertificateEdit .numberInLetter {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f5f8fa;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    font-size: 13px;
    color: #1a2b3c;
}

/* ===== Desktop layout fallback on phone-sized devices ===== */
body.ct-desktop-phone .right.col.just-right {
    position: fixed;
    top: 72px;
    bottom: 0;
    width: 225px !important;
    max-width: 85vw;
    right: -225px;
    z-index: 1050;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
}

body.ct-desktop-phone .right.col.just-right.is-open {
    right: 0;
}

body.ct-desktop-phone .left.col {
    right: 0 !important;
}

body.ct-desktop-phone .body.menu.row {
    height: calc(100vh - 72px);
}

body.ct-desktop-phone .main.pane .pane.active.scroll-y,
body.ct-desktop-phone .main.pane .pane.active.scroll-y-form {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

body.ct-desktop-phone .ct-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 72px 0 0 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1045;
    opacity: 0;
}

body.ct-desktop-phone .ct-sidebar-overlay.is-visible {
    display: block;
    opacity: 1;
}

body.ct-desktop-phone.ic-desktop-phone-actions .insuranceCertificateEdit.pane.scroll-y-form.active {
    padding-bottom: calc(var(--ic-wizard-footer-h, 160px) + 16px);
    box-sizing: border-box;
}

body.ct-desktop-phone.ic-desktop-phone-actions .ic-wizard-footer.is-desktop-phone-actions {
    display: block !important;
}

body.ct-desktop-phone.ic-desktop-phone-actions .ic-wizard-footer.is-desktop-phone-actions .ic-wizard-footer__nav {
    display: none;
}

body.ct-desktop-phone.ic-desktop-phone-actions .ic-wizard-footer.is-desktop-phone-actions .ic-wizard-footer__save {
    display: block;
}
