/* 부모 체인: 수축 허용 (스크롤/겹침 방지) */
.main, .main-wrap, .widget, .w-chart {
    min-height: 0;           
}
  

.flex1 {
    flex: 1;
}

.main-wrap {
    /* flex: 1.5; */
    flex: 1.6; 
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.main {
    padding: 10px;
    display: flex;
    gap: 10px;
    background: #f4f6fa;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.widget {
    border-radius: 8px;
    padding: 10px;  
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-height: 0;
}


.w-chart {
    display: flex;
    flex-direction: column;
  }

.w-chart .title-box,
.w-chart .select-box {
flex: 0 0 auto;
}

.section-status {
    height: 100%;
}

.select-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.each-select {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select {
    border-color: #e0e0e0;
    border-radius: 4px;
    padding: 4px;
    outline: none;
}

.title-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-dot-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 4px;
    gap: 10px;
}

.dot {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dot:before {
    content: '';
    width: 14px;
    height: 14px;
    transform: translateY(1px);
    border-radius: 50%;
}

.dot.normal:before {
    background-color: #34D399;
}

.dot.minor:before {
    background-color: #FBBF24;
}

.dot.critical:before {
    background-color: #F43F5E;
}

.service-table-wrap {
    display: flex;
    gap: 10px;
    flex: 1;
}

.service-table {
    flex: 1;
    width: 100%;
    border-collapse: collapse;
    border-radius: 4px;
}

.service-table th {
    text-align: center;
    padding: 4px 8px;
    color: #888;
    font-weight: 500;
    line-height: 1;
}

.service-table thead th {
    background: #f4f6fa;
    font-size: 14px;
}

.service-table thead tr th:first-of-type,
.service-table tbody tr:nth-of-type(even) td:first-of-type {
    border-radius: 4px 0 0 4px;
}

.service-table thead tr th:last-of-type,
.service-table tbody tr:nth-of-type(even) td:last-of-type {
    border-radius: 0 4px 4px 0;
}

.service-table tbody tr:nth-of-type(even) {
    background: #f4f6fa;
}

.service-table td {
    line-height: 1;
    padding: 4px 8px;
    text-align: center;
    width: 20%;
}

.service-table td:first-of-type {
    text-align: center;
    width: 40%;
}

.table-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.table-dot.normal {
    background-color: #34D399;
}

.table-dot.minor {
    background-color: #FBBF24;
}

.table-dot.critical {
    background-color: #F43F5E;
}

.channel-status-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.channel-status-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.incoming-box {
    display: flex;
    height: 100%;
    align-items: center;
    gap: 4px
}

.channel-label {
    background: #f4f6fa;
    border-radius: 8px;
    width: 70px;
    padding: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-align: center;
}

.incoming-line {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    border: 1px solid #f4f6fa;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    gap: 2px;
    padding-bottom: 6px;

    > img {
        width: 24px;
        height: 24px;
        transform: translateX(-2px);
    }
}

.status-card {
    padding: 2px 8px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    height: 100%;
    background: #fff;
}

.card-title {
    font-weight: 500;
    padding-bottom: 2px;
    margin-bottom: 2px;
    border-bottom: 1px solid black;
    text-align: center;
}

.card-meta {
    display: flex;
    align-items: center;
    flex-direction: column;
    flex: 1;
    justify-content: space-around;
}

.process-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;               
    align-items: center;        
    justify-content: center;     
    place-items: center;
    border-radius: 6px;
    border: 0px none;
    /* background: #f1f3f5; */
    /* color: #868e96; */
}

.process-icon.time {
    background: #ebebeb;
}

.process-icon.success {
    background: #dde8ff;
}

.process-icon.error {
    background: #ffdee4;
}

.process-icon.running {
    background: #ebebeb;
}

.icon {
    width: 14px;
    height: 14px;
}

.icon.time {
    background: url("../assets/ic_time.svg") center no-repeat;
    /* background: url("../assets/ic_schedule.svg") center no-repeat; */
    background-size: contain;
}

.icon.success {
    background: url("../assets/ic_success.svg") center no-repeat;
    /* background: url("../assets/ic_check_circle.svg") center no-repeat; */
    background-size: contain;
}

.icon.error {
    background: url("../assets/ic_error.svg") center no-repeat;
    /* background: url("../assets/ic_error_circle.svg") center no-repeat; */
    background-size: contain;
}

.icon.running {
    background: url("../assets/ic_running.svg") center no-repeat;
    /* background: url("../assets/ic_progress_activity.svg") center no-repeat; */
    background-size: contain;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 75px;
    justify-content: space-between;
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.stat-item {
    background: #f4f6fa;
    border-radius: 8px;
    padding: 6px 8px;
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.in-progress {
    display: flex;
    justify-content: flex-end;
    font-weight: 600;
}

.completed {
    display: flex;
    justify-content: flex-end;
    font-weight: 600;
    color: #2563EB;
}

.failed {
    display: flex;
    justify-content: flex-end;
    font-weight: 600;
    color: #F43F5E;
}

.divider {
    width: 1px;
    height: 12px;
    background-color: #e0e0e0;
    margin: 0 8px;
}

.status-list-item,
.status-list-item-result {
    flex: 1;          
    align-self: stretch;
    min-width: 0;   
    width: 100%;    
}

.status-card {
    width: 100%;    
    box-sizing: border-box; 
}

.status-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: url("../assets/ic_arrow_w.svg") -4.5px / 35px 35px no-repeat;
}

.status-arrow.normal {
    border: 3px solid #b6ecd9;
    background-color: #34D399;
}

.status-arrow.minor {
    border: 3px solid #ffe6b0;
    background-color: #FBBF24;
}

.status-arrow.critical {
    border: 3px solid #f6b1be;
    background-color: #F43F5E;
}

.w-chart .chart {
    flex: 1 1 auto;
    min-height: 60%;      
    width: 100%;
    padding: 0;            
    margin: 0;
    position: relative;
    overflow: hidden;       
    box-sizing: border-box;
    contain: layout style paint;
    isolation: isolate;
    z-index: 1;
  }

.w-chart .chart > div,
.w-chart .chart canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
}


/* table.html 관련 스타일 - table.css로 이동됨 */

.table-main {
    padding: 16px;
    background: #f4f6fa;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.title {
    margin-bottom: 4px;
    font-size: 24px;
    line-height: 1;
}

.search-box {
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    background: #fff;
    display: flex;
    gap: 24px;
}

.search-left-box {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.search-label {
    margin-right: 12px;
    transform: translateY(-1px);
}

.datepicker-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-date[type="date"] {
    border: 1px solid #e0e0e0;
    outline: none;
    box-shadow: none;
    background-color: white;
    border-radius: 4px;
    padding: 4px 8px;
    appearance: none;
    -webkit-appearance: none; 
    -moz-appearance: none;
    min-width: 200px;
    font-family: 'Pretendard !important', sans-serif;
    font-size: 14px;
}

.input-date[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    width: 16px;
    height: 16px;
    background: url("../assets/ic_calendar_bk.svg") center no-repeat;
}

.search-date {
    display: flex;
    align-items: center;
}

.select-search {
    border-color: #e0e0e0;
    border-radius: 4px;
    padding: 4px 8px;
    outline: none;
    min-width: 200px;
    font-size: 14px;
    height: 32px;
}

.chanel-search {
    display: flex;
    align-items: center;
}

.btn-search {
    border-radius: 4px;
    width: 100px;
    background: #001D50;
    border: none;
    color: #fff;
    padding: 8px 16px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.search-bottom-box {
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    background: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;

    height: auto;
}

.end-box {
    display: flex;
    justify-content: flex-end;
}

.detail-search-table {
    width: 100%;
    border-collapse: collapse;
}

.table-body-scroll-container {
    overflow-y: auto;
    max-height: calc(70vh - 120px);
    border: 1px solid #e0e0e0;
    border-top: none; 
    border-radius: 0 0 8px 8px;
    background: #fff;
    margin-top: -1px;
}

.detail-search-table-body-table {
    width: 100%;
    border-collapse: collapse;
}



.table-body-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.table-body-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-body-scroll-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-body-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


.detail-search-table-head {
    background: #ddd;
    position: sticky;
    top: 0;
    z-index: 10;
}



.detail-search-table-head tr:first-of-type th:first-of-type {
    border-radius: 8px 0 0 8px;
}

.detail-search-table-head tr:first-of-type > th:last-of-type {
    border-right: 0;
    border-radius: 0 8px 8px 0;
}




.detail-search-table-head th {
    border-right: 1px solid #fff;
    font-weight: 400;
    padding: 5px;
    font-size: 14px;
}

.detail-search-table-head th[colspan="2"] {
    border-bottom: 1px solid #fff;
}



.detail-search-table-body tr {
    background: #fff;
    height: 40px;
    line-height: 24px; 
}

.detail-search-table-body tr:nth-of-type(even) {
    background: #f4f6fa;
}

.detail-search-table-body tr:nth-of-type(even) td:first-of-type {
    border-radius: 8px 0 0 8px;
}

.detail-search-table-body tr:nth-of-type(even) td:last-of-type {
    border-radius: 0 8px 8px 0;
}

.detail-search-table-body td {
    text-align: center;
    font-size: 14px;
    padding: 8px 4px; 
}

.detail-search-table-body .table-failed {
    color: #F43F5E;
}



.count-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.excel-icon {
    padding: 3px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    display: flex;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.excel-icon > img {
    transform: translateX(1px)
}




.debug-area {
    position: fixed;
    top: 0;
    left: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    padding: 10px;
    overflow-y: auto;
    display: none;

    &.active {
        display: block;
    }
}

.debug-area p {
    margin-bottom: 10px;
}

.debug-area .debug-button-area {
    display: flex;
    align-items: center;
    gap: 4px;
}

.debug-area .debug-button-area button {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
}

.debug-area .debug-button-area button:hover {
    background: #f4f6fa;
}


/* 테이블과 차트 영역 확장을 위한 새로운 CSS 추가 */
.service-table-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.service-table {
    flex: 1;
    width: 100%;
    min-height: 0;
}

.service-table-wrap {
    flex-direction: row;  
    flex-wrap: wrap;  
    gap: 20px;
    justify-content: center;
}

.service-table {
    flex: 1;  
    min-width: 250px; 
    max-width: none; 
}

.channel-status-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.channel-status-list {
    flex: 1;
    min-height: 0;
}

.main-wrap .widget {
    flex: 1;
    min-height: 200px;  
}

.main-wrap .widget:first-child {
    flex: 1.2;  
}

.main-wrap .widget:nth-child(2),
.main-wrap .widget:nth-child(3),
.main-wrap .widget:nth-child(4) {
    flex: 1; 
}

.detail-widget{
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}


.detail-chart {
    min-height: 150px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.detail-chart.big {
    min-height: 300px;
}

