/* Statistics visual layer: no changes to calculations, query events or exports. */
#reports{font-family:EverycallPretendard,"Malgun Gothic",sans-serif;color:#172b4d;}
#reports :is(button,input,select,table){font-family:inherit;}
#workspace #reports .report-reference-filters{background:white;border:0;box-shadow:none;padding:12px 0 16px;display:flex;flex-direction:column;gap:12px;}
#workspace #reports :is(.report-filter-primary,.report-filter-secondary){display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0;padding:0;background:transparent;}
#workspace #reports .report-reference-filters :is(input,select,button){height:40px;min-height:40px;box-sizing:border-box;margin:0;border:1px solid #8590a2;border-radius:6px;background:white;color:#172b4d;font-size:14px;padding:8px 12px;}
#workspace #reports .report-reference-filters button.primary{background:#0c66e4;color:white;border-color:#0c66e4;}
#workspace #reports .report-filter-primary .quick-dates{display:flex!important;flex-wrap:wrap;gap:4px;}
#workspace #reports .report-filter-primary .quick-dates button{height:32px;min-height:32px;padding:4px 10px;font-size:13px;border-color:#dfe1e6;background:#f7f8f9;}
#reports .report-filter-primary>span{font-size:13px;color:#44546f;}
#workspace #reports .report-view-tabs{display:flex;gap:20px;border-bottom:2px solid #dfe1e6;background:white;margin:0 0 16px;padding:0;}
#workspace #reports .report-view-tabs button{background:transparent;color:#44546f;border:0;border-bottom:3px solid transparent;border-radius:0;margin-bottom:-2px;padding:12px 2px;font-size:14px;min-height:44px;box-shadow:none;}
#workspace #reports .report-view-tabs button[aria-selected=true]{color:#0c66e4;border-bottom-color:#0c66e4;font-weight:700;}
#reports .statistics-total-line{background:#f7f8f9;border:1px solid #dfe1e6;border-radius:6px;padding:12px 16px;margin:0 0 16px;color:#172b4d;font-size:14px;line-height:1.8;}
#reports .table-wrap{overflow:auto;max-height:65vh;border:1px solid #dfe1e6;border-radius:8px;}
#reports table{border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums;}
#reports table th{position:sticky!important;top:0!important;z-index:2;background:#f7f8f9!important;color:#44546f!important;border:0!important;border-bottom:1px solid #dfe1e6!important;padding:10px 12px!important;font-size:13px!important;font-weight:600!important;white-space:nowrap;}
#reports table td{background:white!important;color:#172b4d!important;border:0!important;border-bottom:1px solid #dfe1e6!important;padding:10px 12px!important;font-size:14px!important;line-height:1.5!important;}
#reports table tr:hover td{background:#f7f8f9!important;}
#reports .reference-statistics-table table,#reports table.reference-statistics-table{table-layout:auto!important;min-width:1500px;width:100%;}
#reports .reference-statistics-table :is(th,td){overflow:visible;text-overflow:clip;white-space:nowrap;}
#reports .stats-section thead th:first-child{z-index:4;}
#reports .stats-section tbody td:first-child:not([colspan]){z-index:1;}
#reports .stats-section td{white-space:nowrap;}
#reports .stats-section h2,#reports .everycall-statistics h2{font-size:16px;color:#172b4d;margin:20px 0 12px;}
#reports .chart-card{border:1px solid #dfe1e6;border-radius:8px;padding:20px;box-shadow:none;background:white;}
#reports .chart-card h2{font-size:16px;color:#172b4d;}
#reports .chart-card h2 :is(small,span){margin-left:8px;color:#626f86;font-weight:400;}
#reports .reference-scope,#reports .chart-description{font-size:13px;color:#626f86;line-height:1.6;}
#reports .pagination{padding:12px 0;gap:12px;align-items:center;}
#reports .pagination button,#reports .everycall-statistics>button{border:1px solid #dfe1e6;border-radius:6px;background:white;color:#172b4d;padding:8px 12px;min-height:36px;}
#reports .everycall-statistics>button{margin-top:8px;}
#reports :is(button,input,select,summary):focus-visible{outline:2px solid #0c66e4;outline-offset:2px;}
#reports [hidden]{display:none!important;}
@media(max-width:900px){#workspace #reports .report-reference-filters input{max-width:100%;}#workspace #reports .report-view-tabs{gap:12px;flex-wrap:wrap;}}
#workspace #reports .report-filter-primary{justify-content:flex-start;}
#workspace #reports .report-filter-secondary{justify-content:flex-start;}
#workspace #reports .report-filter-primary input[type=datetime-local]{width:180px;}
#workspace #reports .report-filter-primary select{width:130px;}
#workspace #reports .report-filter-primary input[type=search]{width:160px;min-width:120px;}
#workspace #reports .report-filter-primary .quick-dates{display:grid!important;grid-template-columns:repeat(3,60px)!important;gap:4px;}
#workspace #reports .report-filter-primary .quick-dates button{padding:4px;}
/* Chart.js uses parent height when maintainAspectRatio is false. */
#reports .reference-mixed-charts .reference-canvas-wrap{position:relative;width:100%;height:400px;min-width:0;}
#reports .reference-mixed-charts .reference-timeseries .reference-canvas-wrap{height:440px;}
#reports .reference-mixed-charts canvas{display:block;max-width:100%;}
#reports .reference-mixed-charts .chart-card h2{margin-bottom:16px;}
@media(max-width:700px){#reports .reference-mixed-charts .reference-canvas-wrap,#reports .reference-mixed-charts .reference-timeseries .reference-canvas-wrap{height:340px;}}

/* Detailed operations tables: compact, with explicit stage grouping. */
#reports .report-stage-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:13px;color:#44546f;margin:12px 0;}
#reports .reference-statistics-table :is(th,td){padding:8px 9px!important;font-size:12px!important;}
#reports .reference-statistics-table .metric-handoff{background:#e5f3eb!important;color:#185c37!important;}
#reports .reference-statistics-table .metric-black{background:#fcebea!important;color:#9f2525!important;}
#reports .reference-statistics-table .metric-db{background:#eaf3ff!important;}
#reports .reference-statistics-table .metric-secondary{background:#f3f4f7!important;}
#reports .reference-statistics-table .statistics-subtotal td{font-weight:700!important;border-bottom:2px solid #8590a2!important;}
#reports .reference-statistics-table .metric-label{white-space:normal;min-width:100px;max-width:260px;overflow-wrap:anywhere;text-align:left;}
#reports .reference-statistics-table .metric-zero{color:#8590a2!important;}
#reports .stats-section .statistics-total-line{margin-top:12px;}

/* At-a-glance statistics, scoped to the reporting screen. */
#reports .statistics-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0;}
#reports .statistics-kpi{border:1px solid #dfe1e6;border-radius:8px;background:#fff;padding:14px 18px;}
#reports .statistics-kpi span{display:block;color:#626f86;font-size:13px;}
#reports .statistics-kpi strong{display:block;font-size:27px;color:#172b4d;margin:7px 0;font-variant-numeric:tabular-nums;}
#reports .statistics-kpi:nth-child(3){border-top:3px solid #0c66e4;padding-top:12px;}
#reports .statistics-kpi:nth-child(3) strong{color:#0c66e4;}
#reports .statistics-kpi small{color:#626f86;font-size:12px;}
#reports .statistics-display-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0;}
#reports .statistics-display-tools button{padding:7px 12px;border:1px solid #dfe1e6;border-radius:5px;background:#fff;color:#44546f;}
#reports .statistics-display-tools button[aria-pressed=true]{color:#0c66e4;background:#e9f2ff;border-color:#85b8ff;}
#reports .statistics-display-tools span{font-size:12px;color:#626f86;margin-left:auto;}
#reports .statistics-compact .metric-optional{display:none!important;}
#reports .reference-statistics-table table,#reports table.reference-statistics-table{min-width:1250px;}
#reports .statistics-compact .reference-statistics-table table,#reports .statistics-compact table.reference-statistics-table{min-width:900px;}
#reports .reference-statistics-table .metric-label:first-child{position:sticky;left:0;background:#fff!important;z-index:2;min-width:140px;max-width:240px;border-right:1px solid #dfe1e6!important;}
#reports .reference-statistics-table th.metric-label:first-child{background:#f7f8f9!important;z-index:5;}
#reports .reference-statistics-table .statistics-subtotal td{background:#edf2fa!important;}
#reports #report-view-groups h2{margin:22px 0 10px;font-size:17px;}
#reports #report-view-groups h3{font-size:14px;margin:14px 0 8px;}
#reports .statistics-method{margin:16px 0;border:1px solid #dfe1e6;border-radius:6px;padding:12px;color:#626f86;font-size:12px;line-height:1.8;}
#reports .statistics-method p{margin-bottom:0;}
@media(max-width:900px){#reports .statistics-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}}

#reports .statistics-rate-bar{display:inline-block;width:64px;height:6px;margin-left:9px;vertical-align:middle;background:#dfe6f0;border-radius:4px;overflow:hidden;}
#reports .statistics-rate-bar i{display:block;height:100%;background:#0c66e4;border-radius:4px;}
#reports .metric-db .statistics-rate-bar i{background:#16805d;}

#reports .statistics-refresh-tools{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap;margin:8px 0;font-size:13px;}
#reports .statistics-refresh-tools label{display:flex;gap:6px;align-items:center;}
#reports .statistics-refresh-tools :is(button,select){padding:7px 10px;border:1px solid #dfe1e6;border-radius:5px;background:#fff;color:#44546f;}
#reports .statistics-refresh-tools span{color:#626f86;font-size:12px;}

/* Keep report controls compact despite global form width/direction rules. */
#workspace #reports .report-reference-filters{background:#f7f8fa;border:1px solid #dfe4ec;border-radius:8px;padding:14px 16px;gap:12px;margin:0 0 10px;}
#workspace #reports :is(.report-filter-primary,.report-filter-secondary){display:flex!important;justify-content:flex-start!important;align-items:center!important;width:100%;gap:8px;}
#workspace #reports .report-filter-secondary{padding-top:12px;border-top:1px solid #e3e7ee;}
#workspace #reports .report-reference-filters :is(input,select,button){height:36px;min-height:36px;font-size:13px;flex:0 0 auto;}
#workspace #reports .report-filter-primary input[type=datetime-local]{width:180px;min-width:0;}
#workspace #reports .report-filter-primary input[type=search]{width:170px;min-width:120px;}
#workspace #reports .report-filter-primary select{width:120px;}
#workspace #reports .report-filter-primary .quick-dates{display:flex!important;flex-wrap:wrap;max-width:220px;gap:4px;}
#workspace #reports .report-filter-primary .quick-dates button{height:29px;min-height:29px;padding:3px 8px;font-size:12px;}
#workspace #reports .report-filter-secondary select{width:155px;min-width:0;max-width:100%;}
#workspace #reports .report-filter-secondary select[aria-label="DB 제목 선택"]{width:240px;}
#workspace #reports .report-filter-secondary select[aria-label="통계 자료 구분"]{width:190px;}
#workspace #reports .report-filter-secondary>button{margin-left:auto;}
#workspace #reports .statistics-refresh-tools{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:wrap;gap:8px;width:100%;padding:8px 0;margin:0;min-height:48px;}
#workspace #reports .statistics-refresh-tools>label{display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:6px;width:auto!important;flex:0 0 auto;margin:0;padding:0;white-space:nowrap;}
#workspace #reports .statistics-refresh-tools input[type=checkbox]{width:16px!important;height:16px!important;min-height:0!important;margin:0!important;flex:0 0 16px;}
#workspace #reports .statistics-refresh-tools>select{width:86px!important;min-width:86px!important;max-width:86px!important;flex:0 0 86px;}
#workspace #reports .statistics-refresh-tools>button{width:auto!important;flex:0 0 auto;white-space:nowrap;}
#workspace #reports .statistics-refresh-tools :is(button,select){height:34px!important;min-height:34px!important;margin:0;padding:5px 10px;font-size:13px;}
#workspace #reports .statistics-refresh-tools>span{width:auto!important;flex:0 0 auto;white-space:nowrap;margin-left:4px;}
@media(max-width:800px){#workspace #reports .statistics-refresh-tools{justify-content:flex-start!important;}#workspace #reports .report-filter-secondary>button{margin-left:0;}}
