/* --------------------------------------------------------------------------
 * 리포트 차트 — 서버에서 그린 막대. 한 계열은 병원 파랑, 지각만 주의 색(범례 + 툴팁으로 색에만 기대지 않는다).
 * 막대 끝 4px 둥글게, 쌓인 막대 사이 2px 틈, 격자 · 축은 흐리게. 두 색은 라이트 · 다크 모두 색각 검증을 통과했다.
 * -------------------------------------------------------------------------- */
.report-filters .card-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.report-filters .form-select {
    width: 12rem;
}
.report-filters input[type="date"] {
    width: 10rem;
}
.report-quick {
    display: flex;
    gap: 0.25rem;
    margin-right: auto;
}
.report-quick-link {
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    color: var(--tx-muted);
    font-size: 0.8125rem;
    text-decoration: none;
}
.report-quick-link:hover {
    background: var(--sf-hover);
    color: var(--tx-strong);
}
.report-quick-link.active {
    background: var(--tx-strong);
    color: var(--sf-card);
}
.report-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
}
.report-tile-value {
    margin: 0.125rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tx-strong);
    font-variant-numeric: tabular-nums;
}
.fs-12 {
    font-size: 0.75rem;
}
.report-download {
    display: flex;
    gap: 0.375rem;
}
.report-download .form-select {
    width: 11rem;
}
.report-table td {
    font-variant-numeric: tabular-nums;
}

.chart-legend {
    display: flex;
    gap: 0.875rem;
    font-size: 0.8125rem;
    color: var(--tx-muted);
}
.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.chart-swatch {
    display: inline-block;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 2px;
    background: var(--hospital-blue);
}
.chart-swatch.is-late {
    background: var(--st-warning-fill);
}
.chart-swatch.is-second {
    background: var(--chart-second);
}

/* 세로 막대 — 날짜(주)별 출근 인원, 지각은 아래에 쌓는다. */
.column-chart {
    display: flex;
    gap: 0.5rem;
    height: 14rem;
}
.column-chart-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    font-size: 0.6875rem;
    color: var(--tx-muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.column-chart-plot {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
    gap: 2px;
    min-width: 0;
    border-top: 1px dashed var(--ln-soft);
    background: linear-gradient(to top, transparent calc(1.25rem - 1px), var(--ln) calc(1.25rem - 1px), var(--ln) 1.25rem, transparent 1.25rem);
}
.column-chart-col {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 4px 4px 0 0;
    outline: none;
}
.column-chart-col:hover,
.column-chart-col:focus-visible {
    background: var(--sf-hover);
}
.column-chart-col.is-weekend .column-chart-label {
    color: var(--st-danger);
}
.column-chart-stack {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 2px;
    padding: 0 12%;
}
.column-chart-bar {
    display: block;
    width: 100%;
    min-height: 2px;
    background: var(--hospital-blue);
}
.column-chart-stack > .column-chart-bar:last-child {
    border-radius: 4px 4px 0 0;
}
.column-chart-bar.is-late {
    background: var(--st-warning-fill);
}
.column-chart-bar.is-second {
    background: var(--chart-second);
}
/* 두 계열 나란히(물품 통계 입고 · 사용) — 막대마다 위 모서리만 둥글게 */
.column-chart-stack.is-pair {
    flex-direction: row;
    align-items: flex-end;
    padding: 0 10%;
}
.column-chart-stack.is-pair > .column-chart-bar {
    flex: 1 1 0;
    width: auto;
    border-radius: 3px 3px 0 0;
}
.column-chart-stack.is-pair > .column-chart-bar[style*="height: 0%"] {
    min-height: 0;
}
.column-chart-label {
    height: 1.25rem;
    line-height: 1.25rem;
    overflow: hidden;
    font-size: 0.625rem;
    color: var(--tx-muted);
    text-align: center;
    white-space: nowrap;
}

/* 가로 막대 목록 — 부서 · 휴가 종류 · 사람 */
.bar-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.bar-list-row {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
}
.bar-list-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--tx);
}
.bar-list-track {
    position: relative;
    height: 0.75rem;
}
.bar-list-bar {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 0 4px 4px 0;
    background: var(--hospital-blue);
    outline: none;
}
.bar-list-bar:focus-visible {
    box-shadow: 0 0 0 2px var(--sf-card), 0 0 0 4px var(--hospital-blue);
}
.bar-list-value {
    min-width: 4.5rem;
    color: var(--tx-strong);
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 막대 툴팁 — data-tip 에 올리거나 초점을 주면 위에 뜬다. */
[data-tip]:hover::after,
[data-tip]:focus-visible::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    z-index: 5;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: var(--tx-strong);
    color: var(--sf-card);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
}
.bar-list-bar[data-tip]:hover::after,
.bar-list-bar[data-tip]:focus-visible::after {
    left: auto;
    right: 0;
    transform: translateX(50%);
}

/* 일정 달력 · 미니달력의 공휴일 — 숫자는 일요일처럼 빨갛게, 옆에 이름. */
.schedule-day-head {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}
.schedule-day.is-holiday .schedule-day-number {
    color: var(--st-danger);
}
.schedule-day.is-holiday.is-today .schedule-day-number {
    color: var(--sf-card);
}
.schedule-holiday {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--st-danger);
}
/* 미니달력을 새로 받는 동안 — 잠깐 흐리게(깜빡이지 않게 짧게). */
.dashboard-calendar.is-loading .card-body {
    opacity: 0.6;
    transition: opacity 0.12s ease 0.08s;
}
