@charset "UTF-8";

#supply_parts .tbody-scroll {
    max-height: calc(100vh - 570px);
    min-height: 120px;
    overflow: auto;
}

/* ===== 상세 모달: 좌(기본정보) / 우(자산이력) 2단 레이아웃 ===== */
#supply_parts_div_modal .sp-detail-dialog {
    width: 820px;
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
#supply_parts_div_modal .modal-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
#supply_parts_div_modal .sp-detail-layout {
    display: flex;
    align-items: stretch;
    max-height: 400px;
    overflow: hidden;
}
#supply_parts_div_modal .sp-detail-left {
    flex: 0 0 350px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
#supply_parts_div_modal .sp-detail-right {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #eef0f3;
    padding-left: 20px;
}
/* 좌/우 내부 카드가 컬럼 높이를 꽉 채워 좌우 높이를 일치시킨다 (이력이 없어도 동일 높이) */
#supply_parts_div_modal .sp-detail-left .section_content,
#supply_parts_div_modal .sp-detail-right .section_content {
    flex: 1 1 auto;
}
/* 좌측 기본정보 카드: 제목 고정 + 입력행이 남은 높이를 채움 */
#supply_parts_div_modal .sp-detail-left .section_content {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#supply_parts_div_modal .sp-detail-scroll {
    min-height: 0;
    display: flex;
    flex-direction: column;
}
@media (max-width: 720px) {
    #supply_parts_div_modal .sp-detail-layout {
        flex-direction: column;
    }
    #supply_parts_div_modal .sp-detail-right {
        border-left: none;
        border-top: 1px solid #eef0f3;
        padding-left: 0;
        padding-top: 16px;
    }
}

/* ===== 상세 모달 내부 요소 (system_hist 모달 디자인 참고) ===== */
#supply_parts_div_modal .section_content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}
#supply_parts_div_modal .section-title {
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    font-size: 17px;
    font-weight: 600;
    color: #047bb6;
    border-bottom: 1px solid #e5e7eb;
}
/* appAdm 상세 정보(.appAdm-detail-list) 디자인 차용: 점선 구분 행 + 박스 없는 값 */
#supply_parts_div_modal .form.view-mode {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    justify-content: space-between;
}
#supply_parts_div_modal .form-group-view {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #eef0f3;
    font-size: 14px;
}
#supply_parts_div_modal .form-group-view:last-child {
    border-bottom: 0;
}
#supply_parts_div_modal .form-label {
    flex: 0 0 110px;
    font-weight: 500;
    color: #6b7480;
}
#supply_parts_div_modal .form-value {
    flex: 1 1 auto;
    color: #1d1d1d;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* ===== 상세 모달 자산이력 (supply_device 의 sd-asset-* 디자인 재사용) ===== */
#supply_parts_div_modal .sd-asset-block {
    margin-bottom: 18px;
}
#supply_parts_div_modal .sd-asset-block:last-child {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
#supply_parts_div_modal .sd-asset-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eef0f3;
}
#supply_parts_div_modal .sd-asset-parts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#supply_parts_div_modal .sd-asset-part {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    color: #6b7280;
    background: #f9fafb;
}
#supply_parts_div_modal .sd-asset-part.is-used {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}
#supply_parts_div_modal .sd-asset-part__name {
    font-weight: 500;
}
#supply_parts_div_modal .sd-asset-part__badge {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    background: #e5e7eb;
    color: #6b7280;
}
#supply_parts_div_modal .sd-asset-part__badge.is-used {
    background: #22c55e;
    color: #fff;
}
#supply_parts_div_modal .sp-asset-hist-scroll {
    flex: 1 1 auto;
    min-height: 0;
}
#supply_parts_div_modal .sd-asset-timeline {
    list-style: none;
    margin: 0;
    padding: 2px 0 0;
}
#supply_parts_div_modal .sd-asset-timeline__item {
    position: relative;
    padding: 0 0 18px 22px;
    margin-left: 5px;
    border-left: 2px solid #e5e7eb;
}
#supply_parts_div_modal .sd-asset-timeline__item:last-child {
    padding-bottom: 2px;
    border-left-color: transparent;
}
#supply_parts_div_modal .sd-asset-timeline__item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #047bb6;
    box-sizing: border-box;
}
#supply_parts_div_modal .sd-asset-timeline__head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
#supply_parts_div_modal .sd-asset-timeline__title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}
#supply_parts_div_modal .sd-asset-timeline__meta {
    margin-top: 3px;
    font-size: 12px;
    color: #9ca3af;
}
/* 작업지시별 부품 설치/교체 내역 */
#supply_parts_div_modal .sd-asset-timeline__parts {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
#supply_parts_div_modal .sd-asset-timeline__part {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f9fafb;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    font-size: 12px;
}
#supply_parts_div_modal .sd-asset-timeline__part-name {
    color: #374151;
    font-weight: 500;
}
#supply_parts_div_modal .sd-asset-timeline__part-action {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    background: #e5e7eb;
    color: #6b7280;
}
#supply_parts_div_modal .sd-asset-timeline__part-action[data-action="1"] {
    background: #dbeafe;
    color: #1d4ed8;
}
#supply_parts_div_modal .sd-asset-timeline__part-action[data-action="2"] {
    background: #ffedd5;
    color: #c2410c;
}
#supply_parts_div_modal .sd-asset-empty {
    padding: 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    border: none;
    background: none;
}