/* ============================= */
/* common header */
/* ============================= */

.responsive-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-right: 0.75rem !important;
}

.tabs-container,
.search-container {
    display: flex;
    align-items: center;
}
.filter-btn-wrapper {
    height: 40px !important;
}


@media (max-width: 550px) {

    .global-add-btn {
        height: 44px !important;
    }

    .responsive-header {
        flex-direction: column;
        align-items: stretch;
    }

    .tabs-container {
        order: 2;
        width: 100%;
    }

    .search-container {
        order: 1;
        width: 100%;
    }
}

/* ============================= */
/* rental creater */
/* ============================= */

.rental-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
}

.header-actions-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scroller-wrapper {
    flex: 0 0 450px;
    max-width: 100%;
}

@media (max-width: 550px) {

    /* Step 1: When active, force the title and actions to separate lines */
    .rental-header.has-dropdown-active {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Step 2: Ensure the wrapper expands to full width on the second line */
    .rental-header.has-dropdown-active .header-actions {
        width: 100%;
        margin-top: 10px;
    }

    /* Step 3: Make the inner container take full space */
    .header-actions-inner.active {
        width: 100%;
        gap: 8px;
    }

    /* Step 4: Dropdown fills all space except the refresh button */
    .header-actions-inner.active .scroller-wrapper {
        flex: 1;
        min-width: 0;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: inline-flex !important;
    }

    .search-btn-mobile {
        flex: 0 0 40px;
        height: 40px;
    }
}

/* ============================= */
/* settings  */
/* ============================= */

/* spare settings */
.add-circle-btn {
    background-color: #e8f7ef;
    color: #45b369;
    width: 40px;
    height: 40px;
}

.search-circle-btn {
    background-color: #e7f1ff;
    color: #4a5bdc;
    width: 40px;
    height: 40px;
}

.add-btn-desktop,
.search-btn-desktop {
    display: inline-flex !important;
}

.add-btn-mobile,
.search-btn-mobile {
    display: none !important;
}

.claim-logo-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-top: 10px;
}

.description-card .ant-card-body {
    padding: 10px;
}

@media (max-width :768px) {

    .settings-page>.card>.settings-ant-tabs>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab {
        margin-left: 16px !important;
    }

    .settings-field {
        margin-top: 10px;
    }

    .settings-field .form-label {
        margin-bottom: 5px;
    }

    .claim-logo-preview {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 4px;
        border: 1px solid #ddd;
        margin-top: 5px;
    }
}

/* Mobile */
@media (max-width: 500px) {

    .settings-desc-mobile {
        flex-wrap: nowrap;
    }

    .settings-desc-mobile .form-control {
        min-width: 0;
    }

    .add-btn-desktop,
    .search-btn-desktop {
        display: none !important;
    }

    .add-btn-mobile,
    .search-btn-mobile {
        display: inline-flex !important;
    }

    .settings-ant-tabs .ant-tabs-content-holder {
        padding: 10px;
    }

    .settings-no-gutter>* {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    /* desc tabs */
    .description-card .ant-card-body {
        padding: 12px;
    }

    .description-tabs {
        padding: 0.2rem 0.35rem;
    }

    .description-tabs .ant-tabs-nav {
        margin-left: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Remove content padding */
    .description-tabs .ant-tabs-content-holder {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ============================= */
/* notifiction  */
/* ============================= */
/* Tablet */
@media (max-width: 991.98px) {
    .dropdown-menu.dropdown-menu-lg {
        width: 360px !important;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .dropdown-menu.dropdown-menu-lg {
        width: 300px !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .dropdown-menu.dropdown-menu-lg {
        width: 90vw !important;
        /* right: 10px !important; */
    }
}


/* ========================= */
/*  CLAIMS  430px width*/
/* ========================= */

/* ====================================== */
/*  top header (common title and claim ID */
/* ====================================== */

.claim-header-compact {
    gap: 16px;
}

@media (max-width: 420px) {

    .claim-header-compact span.claim-case-id {
        font-size: 12px !important;
    }

    .claim-header-compact h6 {
        font-size: 18px !important;
    }

    .claim-header-compact {
        gap: 6px !important;
    }
}

@media (max-width: 380px) {

    .claim-header-compact span.claim-case-id {
        font-size: 12px !important;
    }

    .claim-header-compact h6 {
        font-size: 15px !important;
    }

    .claim-header-compact {
        gap: 6px !important;
    }
}

/* ========================= */
/*  header bar*/
/* ========================= */

@media (max-width: 1200px) {

    .claim-header {
        padding: 14px;
    }

    .claim-status-container {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding-bottom: 8px;
        gap: 8px;
    }

    .step-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 6px;
        min-width: auto;
    }

    .step-label {
        display: none;
    }

    /* Bigger step circle (40 x 40) */
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 14px;
        z-index: 2;
    }

    /* Bigger connecting line */
    .step-line {
        display: block;
        width: 70px;
        height: 3px;
        background-color: #ccc;
        margin: 0 6px;
    }
}

@media (max-width: 768px) {

    .claim-header {
        padding: 14px;
    }

    .claim-status-container {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding-bottom: 8px;
        gap: 8px;
    }

    .step-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 6px;
        min-width: auto;
    }

    .step-label {
        display: none;
    }

    /* Bigger step circle (40 x 40) */
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 14px;
        z-index: 2;
    }

    /* Bigger connecting line */
    .step-line {
        display: block;
        width: 70px;
        height: 3px;
        background-color: #ccc;
        margin: 0 6px;
    }
}

@media (max-width: 520px) {

    .claim-header {
        padding: 10px;
    }

    .claim-status-container {
        padding-bottom: 5px;
        gap: 0;
    }

    /* step circle size - (30 * 30) */
    .step-circle {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .step-line {
        width: 29px;
        height: 2px;
        margin: 0 4px;
    }
}

@media(max-width:420px) {
    .step-line {
        width: 30px;
    }
}

@media(max-width:415px) {
    .step-line {
        width: 24px;
    }
}

@media(max-width:400px) {
    .step-line {
        width: 20px;
    }
}

@media(max-width:390px) {
    .claim-header {
        padding: 10px;
    }

    .claim-status-container {
        padding-bottom: 3px;
    }

    .step-wrapper {
        gap: 0;
    }

    /* step circle size - (28 * 28) */
    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .step-line {
        width: 32px;
        margin: 0 1px;
    }
}

@media(max-width:375px) {
    .step-line {
        width: 28px;
    }
}

/* ========================= */
/*  main content*/
/* ========================= */

/* for all input fields */
.claim-grid .form-control {
    height: 46px;
}


.step-title {
    font-size: 19px !important;
    /* 🔥 fixed desktop size */
    font-weight: 600 !important;
    color: #1a3353 !important;
    flex-shrink: 0 !important;
    /* prevent shrinking */
    white-space: nowrap !important;
    /* prevent wrapping */
}

.section-header {
    font-size: 16px !important;
    margin-bottom: 16px;
}

/* Shared Base Styles for all Modal Buttons */
.custom-modal-btn {
    font-weight: 500 !important;
    border-radius: 4px !important;
    height: auto !important;
    padding: 6px 20px !important;
    transition: all 0.3s ease;
}

/* Primary "Continue" Button */
.custom-claim-confirm-btn.ant-btn-primary {
    background-color: #1a3673 !important;
    border-color: #1a3673 !important;
    color: white !important;
}

.custom-claim-confirm-btn.ant-btn-primary:hover {
    background-color: #172554 !important;
    border-color: #172554 !important;
}

/* Secondary "Back" Button */
.custom-cancel-btn {
    border-color: #d9d9d9 !important;
    color: #595959 !important;
}

.custom-cancel-btn:hover {
    color: #1a3673 !important;
    border-color: #1a3673 !important;
    background-color: #fff !important;
}

/* Red Delete Button Class */
.custom-delete-btn.ant-btn-primary {
    background-color: #d53128 !important;
    border-color: #d53128 !important;
    color: #fff !important;
}

.custom-delete-btn.ant-btn-primary:hover {
    background-color: #b32720 !important;
    border-color: #b32720 !important;
}

@media (max-width: 768px) {
    .claim-details-container {
        width: 100%;
        max-width: 1100px;
        margin: 0 auto;
        padding-bottom: 10px;
    }

    .claim-details-container .step-header {
        margin-top: 12px;
    }

    .step-header {
        margin-bottom: 12px;
    }

    .sub-section {
        padding: 15px;
    }

    .claim-document-upload-grid {
        gap: 8px;
    }

    .claim-grid {
        grid-template-columns: 1fr;
        /* gap: 16px; */
        gap: 8px;
    }

}

@media (max-width: 480px) {

    .claim-details-container {
        max-width: 430px;
        margin: 0 auto;
        padding: 0 12px;
        padding-bottom: 10px;
    }

    .sub-section {
        width: 100%;
    }

    .step-header {
        font-size: 18px !important;
    }

    .step-header {
        font-size: 18px !important;
    }

    .step-title {
        font-size: 18px !important;
    }

}

/* ========================= */
/* step 1 - pri*/
/* ========================= */

/* section 1  */
.claim-receipt-circle-btn {
    width: 40px;
    height: 40px;
}

/* Hide by default */
.receipt-row-separator {
    display: none;
    border: none;
    border: 1px solid #bfbfbf;
    margin: 11px 0;
}

/* Show only for mobile/tablet */
@media (max-width: 1024px) {
    .receipt-row-separator {
        display: block;
    }
}

@media (min-width: 769px) and (max-width: 1450px) {

    .receipt-row {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
    }

    .receipt-row>div:first-child,
    .receipt-row>div:nth-child(2) {
        flex: 0 0 49%;
        width: 49%;
    }

    .receipt-row .receipt-amount {
        flex: 0 0 100%;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 6px;
    }

    .receipt-row input[type="file"] {
        width: 100%;
    }

    .receipt-row .receipt-amount input {
        width: 230px;
    }

    .receipt-row .receipt-amount button {
        width: 40px;
        height: 40px;
    }

    .claim-receipt-circle-btn {
        width: 38px;
        height: 38px;
    }
}


@media (max-width: 768px) {

    .claim-receipt-circle-btn {
        width: 30px;
        height: 30px;
    }

    .receipt-row input[type="file"] {
        width: 350px;
    }

    /* .receipt-wrapper {
        flex-direction: column;
    } */

    .receipt-left {
        width: 100%;
    }

    .receipt-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .receipt-row>div:first-child,
    .receipt-row input[type="file"],
    .receipt-amount input {
        width: 100% !important;
        max-width: 100%;
    }

    .receipt-amount {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        width: auto;
    }

    .receipt-amount input {
        width: 130px !important;
        min-width: 130px;
        height: 40px;
        flex-shrink: 0;
    }

    .receipt-amount button,
    .claim-receipt-circle-btn {
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0;
    }

    .receipts-btn,
    .receipt-add-button {
        width: auto;
    }
}

/* section 2  */
.claim-document-upload-lable {
    font-weight: 500;
    margin-bottom: 10px;
}

.claim-document-upload-grid {
    display: grid;
    /* grid-template-columns: repeat(3, 1fr); */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.file-status-bar {
    width: 100%;
    overflow: hidden;
}

.file-status-bar .file-info {
    width: 100%;
    height: 46px;
}

.file-info-left {
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.file-info-left span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info-right {
    gap: 6px;
    flex-shrink: 0;
}


@media (min-width: 769px) and (max-width: 1200px) {

    .file-status-bar {
        min-height: 38px;
        padding: 0 10px;
    }

    .file-info-left span {
        font-size: 13px;
        max-width: 150px;
    }

    .action-btn {
        width: 28px;
        height: 28px;
    }

    .action-btn svg {
        font-size: 14px;
    }
}


@media (max-width: 768px) {

    .claim-document-upload-lable {
        max-width: 240px;
        text-align: center;
    }

    .claim-document-upload-grid {
        grid-template-columns: 1fr;
    }

    .drop-zone.small-zone {
        width: 100%;
        max-width: 100%;
    }

    .drop-text {
        font-size: 13px;
    }

    .file-status-bar.compact {
        /* min-height: 36px; */
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
        gap: 8px;
        width: 100%;
    }

    .file-status-bar.compact .file-info-left {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        flex-shrink: 1;
    }

    .file-status-bar.compact .file-info-right {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .file-status-bar.compact .file-info span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
        font-size: 13px;
        line-height: 1;
    }

    .file-status-bar.compact .action-btn {
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .file-status-bar.compact .action-btn svg {
        font-size: 15px;
    }
}

@media (max-width: 480px) {

    .claim-document-upload-lable {
        max-width: 342px;
        text-align: center;
    }

    /* .drop-zone.small-zone {
        max-width: 342px;
        padding: 14px;
    } */

    .drop-zone.small-zone {
        width: 100%;
        padding: 14px;
    }

    .cloud-icon {
        font-size: 18px;
    }

    .drop-text {
        font-size: 12px;
    }

    .file-status-bar.compact {
        width: 100%;
    }

    .file-status-bar.compact .file-info span {
        max-width: 120px;
        font-size: 12px;
    }

    .file-status-bar.compact .action-btn {
        width: 30px;
        height: 30px;
    }

    .file-status-bar.compact .action-btn svg {
        font-size: 13px;
    }

    .claim-document-upload-grid {
        gap: 6px;
    }

}

/* section 3  */
.claim-insurance-res-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width :768px) {
    .claim-insurance-res-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .claim-insurance-res-form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .claim-insurance-res-form-group input {
        font-size: 14px;
        padding: 9px 10px;
    }
}

@media (max-width: 480px) {
    .claim-insurance-res-grid {
        gap: 12px;
    }
}

/* section 4 - towing amount */
.towing-section-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.towing-section-row .form-control,
.towing-section-row input[type="file"],
.towing-section-row input {
    width: 320px;
    height: 46px;
    min-height: 46px;
}

.towing-section-row .file-status-bar {
    width: 320px;
}

@media (min-width: 769px) and (max-width: 1200px) {

    .towing-section-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        align-items: end;
    }

    .towing-section-row.has-file {
        grid-template-columns: repeat(2, 1fr);
    }

    .towing-section-row.has-file>div:last-child {
        grid-column: 1 / 2;
    }

    /* Remove fixed 320px width in this range */
    .towing-section-row .form-control,
    .towing-section-row input[type="file"],
    .towing-section-row input,
    .towing-section-row .file-status-bar {
        width: 100% !important;
        max-width: 100%;
    }
}

@media (max-width: 768px) {

    .towing-section-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .towing-section-row .form-control,
    .towing-section-row input[type="file"],
    .towing-section-row input,
    .towing-section-row .file-status-bar {
        width: 100% !important;
        max-width: 100%;
    }

    .towing-section-row .file-status-bar.compact {
        /* min-height: 36px; */
        min-height: 46px;
    }
}

@media (max-width: 480px) {

    .towing-section-row {
        gap: 12px;
    }

}

/* section 5 - documents */

@media (max-width: 850px) {
    .document-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .document-item-card {
        width: 100%;
        min-height: 50px;
        padding: 10px 14px;
        border-radius: 10px;
    }

    .doc-info {
        gap: 10px;
        font-size: 14px;
        min-width: 0;
    }

    .doc-name {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .doc-actions {
        gap: 8px;
    }

    .action-btn {
        width: 28px;
        height: 28px;
    }

}

@media (max-width: 768px) {

    .document-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .document-item-card {
        width: 100%;
        min-height: 52px;
        padding: 10px 14px;
        border-radius: 10px;
    }

    .doc-info {
        gap: 10px;
        font-size: 14px;
        min-width: 0;
    }

    .doc-name {
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .doc-actions {
        gap: 8px;
    }

    .action-btn {
        width: 30px;
        height: 30px;
    }

    .action-btn svg {
        font-size: 14px;
    }
}

@media (max-width: 480px) {

    .document-grid {
        gap: 12px;
    }

    .document-item-card {
        padding: 8px 12px;
        min-height: 46px;
    }

    .doc-info {
        gap: 8px;
        font-size: 13px;
    }

    .doc-name {
        max-width: 120px;
        font-size: 13px;
    }

    .action-btn {
        width: 30px;
        height: 30px;
    }

    .action-btn svg {
        font-size: 12px;
    }
}

/* ========================= */
/* step 2 - details*/
/* ========================= */


@media (max-width: 768px) {

    .form-group label {
        margin-bottom: 5px;
    }

}


/* ========================= */
/* step 3 - rental*/
/* ========================= */
.rental-input,
.rental-input input {
    width: 25% !important;
    height: 46px;
}

.rental-creater-upload {
    width: 500px;
    margin-top: 10px;
}

@media (max-width: 768px) {

    .sub-section .radio-row {
        margin-top: 8px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }


    .rental-input,
    .rental-input input {
        width: 100% !important;
    }

    .rental-creater-upload {
        width: 100%;
    }

    .sign-btn {
        width: 125px;
    }
}


@media (max-width: 500px) {
    .hide-info-md {
        display: none;
    }
}

/* for custom antd datepicker which contains (calender with time info) */
@media (max-width: 500px) {
    .custom-datepicker-popup {
        width: auto !important;
        min-width: 280px;
        max-width: 90vw;
        left: 50% !important;
        transform: translateX(-50%) !important;
        /* center popup */
    }

    /* Calendar panel (left side) */
    .custom-datepicker-popup .ant-picker-panel-container .ant-picker-panel {
        width: calc(100% - 80px) !important;
        /* take most of the width */
        min-width: 200px;
    }

    /* Time picker panel (right side) */
    .custom-datepicker-popup .ant-picker-time-panel {
        width: 80px !important;
        /* slightly more for proper layout */
        max-width: 90px !important;
        display: flex !important;
        /* use flex to keep AM/PM inline */
        flex-direction: column;
    }

    /* Time columns inside right panel */
    .custom-datepicker-popup .ant-picker-time-panel-column {
        width: auto !important;
        /* let flex manage widths */
        min-width: 25px;
    }

    /* Time input inside columns */
    .custom-datepicker-popup .ant-picker-time-panel-cell-inner {
        font-size: 12px;
        padding: 2px 0;
        white-space: nowrap;
        /* prevent wrapping */
    }

    /* Footer (OK/Cancel) */
    .custom-datepicker-popup .ant-picker-footer {
        padding: 4px 8px;
    }
}

@media (max-width: 380px) {
    .custom-datepicker-popup .ant-picker-panel-container .ant-picker-panel {
        width: calc(100% - 45px) !important;
    }

    .custom-datepicker-popup .ant-picker-time-panel {
        width: 70px !important;
        max-width: 75px !important;
    }

    .custom-datepicker-popup .ant-picker-time-panel-column {
        min-width: 22px;
    }

    .custom-datepicker-popup .ant-picker-time-panel-cell-inner {
        font-size: 11px;
    }
}


/* ========================= */
/* Step 4 - Estimate */
/* ========================= */

.estimate-top-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    font-size: 16px;
    margin-right: 6px;
}

.estimate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-preview-card {
    display: none;
}

@media (min-width: 768px) and (max-width: 1200px) {
    .form-row {
        display: flex;
        gap: 16px;
        margin-bottom: 12px;
        flex-wrap: wrap;
    }

    .form-group {
        min-width: 0;
        /* 🔥 prevents react-select collapse */
    }

    .form-group.flex-1 {
        flex: 1 1 48%;
        /* 2 columns */
        min-width: 260px;
        /* prevent too small collapse */
    }

    .claim-spare-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        /* reduce right side */
        gap: 16px;
    }

    /* Reduce RIGHT preview width */
    .claim-spare-right {
        flex: 0 0 320px;
        /* fixed smaller width */
        max-width: 320px;
    }

    /* Let LEFT side take remaining space */
    .claim-spare-left {
        flex: 1;
        min-width: 0;
    }

    /* Slightly reduce preview image */
    .claim-spare-right .preview-img-container img {
        max-width: 220px;
        height: 170px;
    }

    /* Reduce padding slightly */
    .part-preview-card {
        padding: 14px;
    }
}

/* Only affect DOWNLOAD button */
@media (max-width: 900px) {

    .inspec-download-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 8px;
    }

    .inspec-download-btn .inspec-download-text {
        display: none;
        /* hide only download text */
    }

    .inspec-download-btn .inspec-footer-icon {
        margin: 0;
        font-size: 18px;
    }
}

@media (min-width: 769px) and (max-width: 825px) {

    /* Reduce gap so icons don't float far */
    .estimate-top-actions {
        gap: 8px;
    }

    /* Icon buttons */
    .estimate-top-actions button {
        width: 34px;
        height: 34px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hide text */
    .estimate-top-actions .btn-text {
        display: none;
    }

    /* Remove icon margin */
    .estimate-top-actions .btn-icon {
        margin-right: 0;
        font-size: 18px;
    }
}

@media (max-width: 768px) {

    body,
    .claim-spare-layout {
        overflow-x: hidden;
    }

    .claim-spare-layout {
        display: block;
        padding: 14px;
    }

    /* Hide desktop right preview */
    .claim-spare-right {
        display: none !important;
    }

    /* Show mobile/tab preview */
    .mobile-preview-card {
        display: block;
    }

    .part-preview-card {
        padding: 16px;
    }

    .mobile-preview-card .preview-img-container {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 14px;
    }

    .mobile-preview-card .preview-img-container img {
        width: 100%;
        max-width: 280px;
        height: 200px;
        object-fit: contain;
        border-radius: 10px;
    }

    /* Form rows stack */
    .form-row {
        flex-direction: column;
        gap: 14px;
    }

    .form-group.flex-1 {
        width: 100%;
    }

    /* Inputs full width */
    .form-input,
    .year-select__control,
    .react-select__control {
        width: 100% !important;
    }

    /* Quantity + price + button stack */
    .form-row.align-items-start {
        flex-direction: column;
    }

    .add-invoice-btn {
        width: 100% !important;
        margin-top: 8px !important;
    }

    /* Invoice tables scroll nicely */
    .invoice-table-container {
        overflow-x: auto;
    }

    /* generate btn */
    .claim-spare-footer {
        justify-content: flex-end;
        gap: 10px;
    }

    .footer-main-actions {
        justify-content: flex-end;
    }

    .claim-spare-footer button {
        width: 208px;
        padding: 8px 16px;
        font-size: 13px;
        height: 40px;
    }

    /* download button */
    .claim-spare-footer .inspec-download-btn {
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        border-radius: 8px;
        gap: 0;
    }

    .claim-spare-footer .inspec-download-btn .inspec-download-text {
        display: none;
    }

    .claim-spare-footer .inspec-download-btn .footer-icon {
        margin: 0;
        font-size: 18px;
    }

    /* price + unit same row */
    .spare-field-sm {
        display: flex !important;
        flex-wrap: wrap;
        flex-direction: row !important;
        gap: 12px;
    }

    .spare-field-sm .form-group.flex-1 {
        flex: 1 1 45% !important;
        min-width: 140px;
    }

    .spare-field-sm .form-group.flex-1.d-flex {
        flex: 1 1 100% !important;
    }
}

@media (max-width: 520px) {

    .estimate-header {
        justify-content: space-between;
    }

    /* Reduce gap so icons don't float far */
    .estimate-top-actions {
        gap: 8px;
    }

    /* Icon buttons */
    .estimate-top-actions button {
        width: 34px;
        height: 34px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hide text */
    .estimate-top-actions .btn-text {
        display: none;
    }

    /* Remove icon margin */
    .estimate-top-actions .btn-icon {
        margin-right: 0;
        font-size: 18px;
    }

    .mobile-preview-card .preview-img-container {
        margin-bottom: 12px;
    }

    .mobile-preview-card .preview-img-container img {
        max-width: 220px;
        height: 160px;
        border-radius: 8px;
    }

    .recommended-container {
        margin-top: 6px;
    }

    .recommended-label {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .recommended-tags-wrapper {
        gap: 6px;
    }

    .recommended-container .price-tag {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }

    .claim-spare-footer {
        justify-content: flex-end;
        gap: 8px;
    }

    /* .claim-spare-footer .footer-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    } */

    /* Hide text */
    /* .claim-spare-footer .footer-text {
        display: none;
    } */

    /* Remove spacing */
    .claim-spare-footer .footer-icon {
        margin-right: 0;
        font-size: 18px;
    }

    .spare-field-sm {
        gap: 10px;
    }

    .spare-field-sm .form-group.flex-1 {
        min-width: 120px;
    }

    .spare-field-sm .form-group.flex-1.d-flex {
        margin-top: 8px;
    }

}

@media (max-width: 460px) {

    html,
    body {
        overflow-x: hidden;
    }

    .estimate-top-actions button {
        width: 32px;
        height: 32px;
    }

    .claim-spare-layout {
        display: block !important;
        width: 100%;
        max-width: 100%;
        padding: 10px;
        margin-top: 12px;
    }

    .claim-spare-left,
    .claim-spare-right {
        width: 100% !important;
        max-width: 100% !important;
    }

    .spare-card {
        width: 100%;
        max-width: 100%;
    }

    /* Kill any 420px preview limit */
    .claim-spare-right {
        position: relative;
        top: unset;
    }

    /* Prevent any grid leftovers */
    .claim-spare-layout>* {
        min-width: 0;
    }

    .spare-field-sm {
        gap: 8px;
    }

    .spare-field-sm .form-group.flex-1 {
        min-width: 0;
    }

    .spare-field-sm .form-group.flex-1.d-flex {
        margin-top: 6px;
    }
}

/* ------supplier modal------- */

/* Under 500px → enable horizontal scroll */
@media (max-width: 500px) {

    .supplier-table {
        min-width: 650px;
        /* force horizontal scroll */
        border-collapse: collapse;
    }

    /* Make company name wider */
    .supplier-th:nth-child(2),
    .supplier-td:nth-child(2) {
        min-width: 250px;
    }

    .supplier-th,
    .supplier-td {
        white-space: nowrap;
        /* prevent squeezing */
    }
}


/* ========================= */
/*  EDIT LOD DOCUMENT*/
/* ========================= */
.lod-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.lod-label {
    width: 180px;
    font-weight: bold;
}

.lod-input {
    flex: 1;
}

/* height of modal */
.lod-edit-modal .ant-modal-body {
    max-height: 75vh;
    overflow-y: auto;
}

.full-width {
    grid-column: 1 / -1;
}

.grand-total-row {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 25px;
    font-size: 16px;
    font-weight: 700;
    border-top: 2px solid #d9d9d9;
    padding-top: 12px;
}

.grand-total-label {
    min-width: 150px;
    text-align: right;
}

.grand-total-value {
    min-width: 180px;
    text-align: right;
}

.invoice-page {
    width: 210mm;
    min-height: 297mm;
    padding: 7mm;
    font-family: Arial, sans-serif;
    font-size: 13px;
}


@media (max-width: 500px) {

    #invoice-pdf {
        width: 100% !important;
        min-height: auto !important;
        padding: 4px !important;
    }

    .lod-row {
        flex-direction: column;
        gap: 6px;
    }

    .lod-label {
        width: 100%;
    }

    .lod-input {
        width: 100%;
        flex: unset;
    }

    .lod-edit-modal .ant-modal-body {
        max-height: 50vh;
    }

    .grand-total-row {
        margin-top: 15px;
        gap: 20px;
        padding-top: 8px;
    }

    .grand-total-label {
        min-width: 140px;
    }

    .grand-total-value {
        min-width: 160px;
    }

}


/* ========================= */
/*  footer bar*/
/* ========================= */

@media (max-width: 768px) {

    .claim-footer {
        background: #fff;
        padding: 12px;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    }

    .button-group {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .button-group button {
        width: 100%;
        justify-content: center;
        font-weight: 600;
    }

    .save-button,
    .back-button {
        padding: 12px;
        font-size: 14px;
    }
}