/* =====================================================================
 *  머니링크 — 리포트 CSS  [161차]
 *  «비용·수익»(REPORT inex_index) 과 «현금흐름표»(REPORT flow_cash) 가 쓴다. [162차] «비용·수익 플러스»(REPORT plus_index) — 담긴 항목은 비용·수익과 같은 판(아래 table.ml-inex) · 판의 장부 이름 칩 · 창의 이름표 · 담기 판 두 층은 맨 아래.
 *  둘 다 회원이 정한 같은 결이다 — **표마다 칸 너비가 같다**(table-layout:fixed + 같은 colgroup),
 *  폰에서는 이름을 … 으로 자르지 않고 낱말로 줄을 바꾸며, 1억 넘는 숫자가 있으면 표만 옆으로 민다.
 * ===================================================================== */

.ml-inex-card .card-body { padding: .9rem 1rem; }
.ml-inex-h { font-size: 15px; font-weight: 600; margin: 0 0 .4rem; }
.ml-inex-h .ri-question-line { font-size: 14px; cursor: help; vertical-align: -1px; }

table.ml-inex { font-size: 12.5px; table-layout: fixed; width: 100%; }
/* [161차 · 회원] 칸 너비는 표마다 같다 — "구분 금액 유동 고정 % 넓이가 딱 맞았으면 해".
   금액 칸은 막대(최대 64px)+숫자가 들어가야 하고, 유동·고정은 숫자만. 구분 칸이 나머지를 다 가진다. */
table.ml-inex col.c-amt { width: 26%; }
table.ml-inex col.c-var { width: 16%; }
table.ml-inex col.c-fix { width: 16%; }
table.ml-inex col.c-pct { width: 3.8rem; }
table.ml-inex thead th {
    font-size: 11px; font-weight: 600; color: var(--vz-secondary-color);
    background: var(--vz-light); white-space: nowrap; padding: .35rem .5rem;
}
table.ml-inex td { padding: .38rem .5rem; vertical-align: middle; }
table.ml-inex td.nm { white-space: nowrap; }
table.ml-inex td.a, table.ml-inex th.a { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.ml-inex td.p, table.ml-inex th.p { text-align: right; white-space: nowrap; }
table.ml-inex td.nm { overflow: hidden; text-overflow: ellipsis; }
table.ml-inex td.p .pc { font-size: 10px; color: var(--vz-secondary-color); margin-left: 1px; }
table.ml-inex td.s { color: var(--vz-secondary-color); }

/* 막대 — 금액 왼쪽에 붙는다. 너비는 총계 대비(최대 64px) */
table.ml-inex .bar { display: inline-block; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
table.ml-inex .bar.exp { background: #f06548; }        /* 비용 */
table.ml-inex .bar.ns  { background: #f7b84b; }        /* 비소비성 */
table.ml-inex .bar.inc { background: #b0d94a; }        /* 수익 */
table.ml-inex .bar.net { background: #6aab3f; }        /* 당기순손익·잉여액 (+) */
table.ml-inex .bar.neg { background: #f06548; }        /* (−) */
table.ml-inex .v { font-variant-numeric: tabular-nums; }

/* 총계 줄 · 대분류 줄 · 소분류 줄 · 맨 아래 총 유동/총 고정 */
table.ml-inex tr.tot td { font-weight: 600; border-bottom: 1px solid var(--vz-border-color); }
table.ml-inex tr.sub td { font-weight: 600; }
table.ml-inex tr.sub.first td { border-top: 1px solid var(--vz-border-color); }
table.ml-inex tr.sub td.nm { padding-top: .5rem; }
/* 0 인 줄 — [161차 · 회원] "0인 항목도 모두 표시" · 숫자는 옅게, 막대는 점 하나 */
table.ml-inex tr.z td.a, table.ml-inex tr.z td.p { color: var(--vz-secondary-color); opacity: .75; }
table.ml-inex .bar.zero { opacity: .35; }
table.ml-inex tr.grp { cursor: pointer; }
table.ml-inex tr.grp:hover td { background: var(--vz-light); }
table.ml-inex tr.grp td.nm .tw { transition: transform .12s; margin-right: 1px; }
table.ml-inex tr.grp.open td.nm .tw { transform: rotate(90deg); }
table.ml-inex tr.itm td.nm { padding-left: 1.7rem; color: var(--vz-secondary-color); }
table.ml-inex tr.non td { color: var(--vz-secondary-color); font-size: 11.5px; text-align: center; padding: .8rem; }

/* 폰 — 칸 다섯을 지킨다 (360px 에서 표 ≈317px).
   · 막대는 숫자 **밑에** 가는 줄로 내려간다 → 금액 칸이 숫자 너비만 차지한다.
   · 금액·유동·고정 세 칸은 같은 너비(19.5% ≈ 62px) — 11px 에서 여덟 자리(12,345,678)까지 한 줄에 든다.
   · 구분 칸이 나머지(≈95px)를 가진다 — "총 비소비성 비용" 이 한 줄에 들고, 그보다 길면 … 이 아니라 낱말 단위로 줄을 바꾼다.
   · 아홉 자리(1억) 이상이 있으면 조각이 .ml-inex-d9/.d10 을 달아 표에 최소 너비를 주고 표만 옆으로 민다(판은 안 밀린다). */
@media (max-width: 575.98px) {
    .ml-inex-card .card-body { padding: .7rem .5rem; }
    table.ml-inex { font-size: 11px; }
    table.ml-inex td, table.ml-inex thead th { padding: .32rem .2rem; }
    table.ml-inex td.nm { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.25; }
    table.ml-inex tr.itm td.nm { padding-left: 1.1rem; }
    table.ml-inex tr.one td.nm .dot { margin: 0 5px 0 2px; }
    table.ml-inex tr.grp td.nm .tw { margin-right: 0; }
    table.ml-inex td.a { position: relative; padding-bottom: .5rem; }
    table.ml-inex td.a .bar { position: absolute; right: .2rem; bottom: 3px; height: 3px; margin: 0; max-width: calc(100% - .4rem); }
    table.ml-inex col.c-amt { width: 19.5%; }
    table.ml-inex col.c-var { width: 19.5%; }
    table.ml-inex col.c-fix { width: 19.5%; }
    table.ml-inex col.c-pct { width: 2.3rem; }
    .ml-inex-d9  table.ml-inex { min-width: 380px; }
    .ml-inex-d10 table.ml-inex { min-width: 430px; }
}

@media print {
    .ml-inex-card { break-inside: avoid; }
    table.ml-inex tr.itm[hidden] { display: none; }
}

/* [161차 · 회원] 대분류 없는 홑 계정 — 맨 윗줄에 제 이름으로 · 점 하나로 '접히지 않는 줄' 임을 보인다 */
table.ml-inex tr.one td.nm .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--vz-secondary-color); opacity: .6; vertical-align: middle; margin: 0 8px 0 5px; }

/* =====================================================================
 *  현금흐름표 (REPORT flow_cash)  [161차 · 회원 "현금흐름표도 넓이가 딱 맞았으면 좋겠어"]
 *  영업·투자·재무 세 표가 **같은 칸 나누기**를 쓴다 — 계정 | 들어옴 | 나감 | 합 | 건.
 *  비용·수익과 같은 방법: table-layout:fixed + 같은 colgroup.
 * ===================================================================== */
table.ml-cf { font-size: 12.5px; table-layout: fixed; width: 100%; }
table.ml-cf col.c-in, table.ml-cf col.c-out { width: 19%; }
table.ml-cf col.c-net { width: 21%; }
table.ml-cf col.c-n   { width: 2.8rem; }
table.ml-cf thead th {
    font-size: 11px; font-weight: 600; color: var(--vz-secondary-color);
    background: var(--vz-light); white-space: nowrap; padding: .35rem .5rem;
}
table.ml-cf td { padding: .38rem .5rem; vertical-align: middle; }
table.ml-cf td.nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.ml-cf td.a, table.ml-cf th.a { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.ml-cf td.s { color: var(--vz-secondary-color); }
table.ml-cf td.net { font-weight: 600; }
table.ml-cf td.z { color: var(--vz-secondary-color); }

/* 폰 — 「건」 칸은 접고(그 자리를 이름이 가진다), 이름은 낱말로 줄을 바꾼다.
   세 숫자 칸은 같은 너비라 표 셋이 나란히 읽힌다. 1억 넘는 숫자는 표만 옆으로(.ml-cf-d9/.d10). */
@media (max-width: 575.98px) {
    table.ml-cf { font-size: 11px; }
    table.ml-cf td, table.ml-cf thead th { padding: .32rem .25rem; }
    table.ml-cf td.nm { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.25; }
    table.ml-cf col.c-in, table.ml-cf col.c-out { width: 24%; }
    table.ml-cf col.c-net { width: 26%; }
    table.ml-cf col.c-n { width: 0; }
    .ml-cf-d9  table.ml-cf { min-width: 380px; }
    .ml-cf-d10 table.ml-cf { min-width: 430px; }
}

/* =====================================================================
 *  비용·수익 플러스 (REPORT plus_index)  [162차 · 비용·수익 플러스 · 4-129]
 *  박스 격자 · 박스 고치기 창 · 담기 판의 모양은 account.css 의 .asp-* 한 벌(자산·부채 플러스와 같이 쓴다 — #mlIxp · #mlIxpEdit · #mlIxpGrid).
 *  여기는 이 화면에만 있는 것 — 이름표 · 담기 판의 두 층(대분류 통째 › 그 안의 계정) · 자리 알림 줄 · «대분류째» 잠금.
 *  고른 박스의 담긴 항목은 비용·수익과 **같은 판**(views/inex/_panel · 위 table.ml-inex 규칙 그대로) — 여러 장부를 담은 박스만 줄에 장부 이름(.ml-inex-bk).
 * ===================================================================== */
/* 장부 이름은 이름 앞(둘째 검토 — 한 줄 이름 칸에서 뒤에 두면 먼저 잘렸다) */
table.ml-inex .ml-inex-bk { display: inline-block; margin-right: .1rem; padding: 0 5px; border-radius: .25rem; font-size: 10px; line-height: 1.5; font-weight: 400;
    vertical-align: 1px; white-space: nowrap; background: var(--vz-light); color: var(--vz-secondary-color); }
/* 창의 이름표 — «대분류 통째» · 종류(수익 · 비용 · 비소비성) · «보관» · «대분류에 들어 있음» */
#mlIxpEdit .ixp-tag, #mlIxpEdit .ixp-cov-tag {
    display: inline-block; margin-left: .35rem; padding: 0 .35rem; border-radius: .25rem; font-size: .62rem; line-height: 1.5; white-space: nowrap; vertical-align: 1px;
    background: var(--vz-primary-bg-subtle); color: var(--vz-primary); }
#mlIxpEdit .ixp-tag.is-mute, #mlIxpEdit .ixp-cov-tag { background: var(--vz-light); color: var(--vz-secondary-color); }
#mlIxpEdit .ixp-cov-tag[hidden] { display: none; }
/* 창 — 담긴 줄의 이름 칸은 이름표(종류 · 대분류 통째 · 보관 · 대분류에 들어 있음)가 붙어 길다 — 말줄임 대신 줄을 바꾼다
   (폰에서 이름표가 가려졌다 · 검토 — 자산·부채 플러스의 .rule · .shadow 줄과 같은 처리) · 지웠거나 셀 수 없는 것(저장하면 빠짐)은 긋는다 */
#mlIxpEdit .asp-pick .r .nm { white-space: normal; overflow-wrap: anywhere; }
#mlIxpEdit .asp-pick .r.off .nm { text-decoration: line-through; color: var(--vz-secondary-color); }
#mlIxpEdit .asp-pick .r .nm .text-muted { font-weight: 400; }
/* 담기 판 — 두 층: 대분류(통째) 줄은 굵게 · 그 안의 계정은 들여 쓴다 · 안의 계정 때문에만 선 대분류 줄은 흐리게(.is-ctx) ·
   대분류를 고르거나 이미 담겨 «대분류째» 로 잠긴 계정(.is-cov) · 빈 이름표(.dup)는 숨긴다 · «보관» */
#mlIxpEdit .asp-pp-list .asp-it.ixp-g .l1 .nm { font-weight: 600; }
#mlIxpEdit .asp-pp-list .asp-it.ixp-sub { padding-left: 2.35rem; }
#mlIxpEdit .asp-pp-list .asp-it.is-ctx .tx, #mlIxpEdit .asp-pp-list .asp-it.is-ctx .v { opacity: .55; }
#mlIxpEdit .asp-pp-list .asp-it.is-cov { cursor: default; }
#mlIxpEdit .asp-pp-list .asp-it.is-cov .l1, #mlIxpEdit .asp-pp-list .asp-it.is-cov .v { opacity: .55; }
#mlIxpEdit .asp-pp-list .l2 .dup:empty { display: none; }
#mlIxpEdit .asp-pp-list .l2 .ixp-arch { padding: 0 .35rem; border-radius: .2rem; background: var(--vz-light); }
@media (max-width: 575.98px) { #mlIxpEdit .asp-pp-list .asp-it.ixp-sub { padding-left: 1.9rem; } }

/* [4-130 · 기능 1] 박스 요약 — 수익 대비 비용 막대(account.css .asp-ratio 를 빌림 · 80% 넘으면 노랑 · 100% 넘으면 빨강) · 앞 기간과 견준 한 줄 */
#mlIxp .asp-card .ixp-ratio i { background: var(--vz-primary); }
#mlIxp .asp-card .ixp-ratio.is-warn i { background: var(--vz-warning); opacity: .85; }
#mlIxp .asp-card .ixp-ratio.is-over i { background: var(--vz-danger); opacity: .85; }
#mlIxp .asp-card .ixp-cmp { margin-top: .3rem; font-size: .68rem; line-height: 1.35; color: var(--vz-secondary-color); }
#mlIxp .asp-card .ixp-cmp .d { font-weight: 600; margin: 0 .1rem; color: var(--vz-body-color); }
#mlIxp .asp-card .ixp-cmp .d.is-good { color: var(--vz-success); }
#mlIxp .asp-card .ixp-cmp .d.is-bad { color: var(--vz-danger); }
#mlIxp .asp-card .ixp-cmp .v { font-family: var(--vz-font-monospace); }
/* [4-130 · 기능 2] 나눔 도넛 · 장부별 | 이름으로 합쳐 */
#mlIxp .ixp-pie { height: 240px; }
#mlIxpItems .ixp-by .btn { white-space: nowrap; }
/* [4-131 · 기능 3] 12달 추이 */
#mlIxp .ixp-trend-chart { height: 230px; }
#mlIxp .ixp-trend-sum { font-family: var(--vz-font-monospace); }
#mlIxp .ixp-trend-sum b { font-weight: 600; }
/* [4-131 · 기능 4] 달력(moneylink.css .ml-ac-* 한 벌) — 칸 아래 굵은 숫자(그날 차이)는 폰에서만(넓으면 +수익 · −나간 돈 두 줄이 이미 있다 · 폰은 두 줄을 숨긴다) */
#mlIxpCal .ixp-cal-net { display: none; }
@media (max-width: 575.98px) { #mlIxpCal .ixp-cal-net { display: block; } }
/* 하루 목록 — 분개마다 한 줄: 시각 · (장부) 제목 · 메모 · 담긴 줄(대분류 › 계정 · 줄 메모 · 금액) · 누르면 거래 내역의 그 거래 */
#mlIxpDay .ixp-day-r { border-bottom: 1px solid var(--vz-border-color); }
#mlIxpDay .ixp-day-r > a { padding: .55rem .9rem; }
#mlIxpDay .ixp-day-r > a:hover { background: var(--vz-light); }
#mlIxpDay .ixp-day .tm { flex: 0 0 2.6rem; padding-top: .1rem; font-family: var(--vz-font-monospace); font-size: .72rem; color: var(--vz-secondary-color); }
#mlIxpDay .ixp-day .bd { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
#mlIxpDay .ixp-day .tt { font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; }
#mlIxpDay .ixp-day .mm { font-size: .72rem; color: var(--vz-secondary-color); overflow-wrap: anywhere; }
#mlIxpDay .ixp-day .ln { display: flex; gap: .5rem; align-items: baseline; font-size: .74rem; }
#mlIxpDay .ixp-day .ln .nm { flex: 1 1 auto; min-width: 0; color: var(--vz-secondary-color); overflow-wrap: anywhere; }
#mlIxpDay .ixp-day .ln .nt { font-size: .7rem; }
#mlIxpDay .ixp-day .ln .v { flex: 0 0 auto; font-family: var(--vz-font-monospace); white-space: nowrap; text-align: right; }
#mlIxpDay .ixp-day .ln .v > span + span { margin-left: .4rem; }
#mlIxpDay .ixp-day .bkc { display: inline-block; margin-right: .3rem; padding: 0 5px; border-radius: .25rem; font-size: 10px; font-weight: 400; line-height: 1.5;
    vertical-align: 1px; background: var(--vz-light); color: var(--vz-secondary-color); }
#mlIxpDay :is(.ixp-day .v, .ixp-day-sum) .i { color: var(--ml-c-in, #3577f1); }
#mlIxpDay :is(.ixp-day .v, .ixp-day-sum) .o { color: var(--ml-c-out, #f06548); }
#mlIxpDay :is(.ixp-day .v, .ixp-day-sum) .n { color: var(--vz-warning); }
#mlIxpDay .ixp-day .v small { font-size: .62rem; }
/* [4-132 · 기능 5] 이번 달 예상 — 덩이마다 «약 X» 와 풀이(지금 · 이 속도라면 · 남은 고정) · 남은 고정거래 줄(날짜 · 이름 · 금액) */
#mlIxpFore .ixp-fore { display: flex; flex-wrap: wrap; gap: .45rem 1.6rem; }
#mlIxpFore .ixp-fore .it { font-size: .82rem; }
#mlIxpFore .ixp-fore .it .lb { color: var(--vz-secondary-color); }
#mlIxpFore .ixp-fore .it b { font-family: var(--vz-font-monospace); font-weight: 600; }
#mlIxpFore .ixp-fore .it .sub { display: block; font-family: var(--vz-font-monospace); font-size: .68rem; color: var(--vz-secondary-color); }
#mlIxpFore .ixp-fore .it .ri-question-line { font-size: 13px; cursor: help; vertical-align: -1px; }
#mlIxpFore .ixp-fore-up { margin-top: .5rem; padding-top: .4rem; border-top: 1px dashed var(--vz-border-color);
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .15rem 1.2rem; font-size: .74rem; }
#mlIxpFore .ixp-fore-up li { display: flex; gap: .45rem; align-items: baseline; min-width: 0; }
#mlIxpFore .ixp-fore-up .d { flex: 0 0 auto; font-family: var(--vz-font-monospace); color: var(--vz-secondary-color); }
#mlIxpFore .ixp-fore-up .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mlIxpFore .ixp-fore-up .v { flex: 0 0 auto; font-family: var(--vz-font-monospace); white-space: nowrap; }
#mlIxpFore .ixp-fore-up .i { color: var(--ml-c-in, #3577f1); }
#mlIxpFore .ixp-fore-up .o { color: var(--ml-c-out, #f06548); }
#mlIxpFore .ml-inex-bk { display: inline-block; padding: 0 5px; border-radius: .25rem; font-size: 10px; line-height: 1.5; background: var(--vz-light); color: var(--vz-secondary-color); }
/* [4-133 · 기능 6] 한 달 한도 · 목표 — 카드 막대(한도는 위 .ixp-ratio 빛깔 · 목표는 초록) · 예상 카드의 한도 한 줄(넘으면 빨강 · 이대로면 넘으면 노랑) */
#mlIxp .asp-card .ixp-goal i { background: var(--vz-success); opacity: .55; }
#mlIxp .asp-card .ixp-goal.is-done i { opacity: .9; }
#mlIxpFore .ixp-fore .it .ixp-fore-lim.is-warn { color: var(--vz-warning); }
#mlIxpFore .ixp-fore .it .ixp-fore-lim.is-over { color: var(--vz-danger); }
/* [4-175 · 선택 11] 나란히 견주기 — 이번 · 지난달(앞 기간) · 지난해 같은 달 · 그때 칸 아래 «이번이 그때보다» 차이(박스 요약 한 줄과 같은 빛깔) ·
   담긴 것 줄은 앞 여섯 뒤를 접는다(.more — 표에 is-open 이 붙으면 편다) */
#mlIxpSide .ixp-side { font-size: .8rem; }
#mlIxpSide .ixp-side :is(th, td) { white-space: nowrap; }
#mlIxpSide .ixp-side thead th { font-weight: 600; font-size: .76rem; color: var(--vz-secondary-color); vertical-align: bottom; }
#mlIxpSide .ixp-side thead .dt { font-weight: 400; font-size: .64rem; font-family: var(--vz-font-monospace); }
#mlIxpSide .ixp-side tbody th { font-weight: 400; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
#mlIxpSide .ixp-side tbody td { text-align: right; font-family: var(--vz-font-monospace); }
#mlIxpSide .ixp-side tr.tot th { font-weight: 600; }
#mlIxpSide .ixp-side .df { font-size: .64rem; color: var(--vz-secondary-color); }
#mlIxpSide .ixp-side .df.is-good { color: var(--vz-success); }
#mlIxpSide .ixp-side .df.is-bad { color: var(--vz-danger); }
#mlIxpSide .ixp-side tr.sep td { text-align: left; font-family: inherit; font-size: .68rem; color: var(--vz-secondary-color); background: var(--vz-light); padding: .15rem .5rem; }
#mlIxpSide .ixp-side tr.more { display: none; }
#mlIxpSide .ixp-side.is-open tr.more { display: table-row; }
#mlIxpSide .ixp-side .pre { color: var(--vz-secondary-color); }
#mlIxpSide .ixp-side .kd { margin-left: .3rem; font-size: .62rem; color: var(--vz-secondary-color); }
:is(#mlIxpSide, #mlIxpTop) .bkc { display: inline-block; margin-right: .3rem; padding: 0 5px; border-radius: .25rem; font-size: 10px; font-weight: 400; line-height: 1.5;
    vertical-align: 1px; background: var(--vz-light); color: var(--vz-secondary-color); }
/* [4-175 · 선택 12] 큰 비용 5 · 자주 쓴 곳 5 — 날짜 · 이름(계정 외 N) · 금액 한 줄(월 결산 두 표와 같은 것을 좁게) */
#mlIxpTop .ixp-top li { display: flex; gap: .5rem; align-items: baseline; min-width: 0; padding: .22rem 0; border-bottom: 1px dashed var(--vz-border-color); font-size: .8rem; }
#mlIxpTop .ixp-top li:last-child { border-bottom: 0; }
#mlIxpTop .ixp-top .d { flex: 0 0 auto; font-family: var(--vz-font-monospace); font-size: .72rem; color: var(--vz-secondary-color); }
#mlIxpTop .ixp-top .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mlIxpTop .ixp-top a.nm:hover { text-decoration: underline; }
#mlIxpTop .ixp-top .ac { margin-left: .35rem; font-size: .7rem; color: var(--vz-secondary-color); }
#mlIxpTop .ixp-top .n { flex: 0 0 auto; font-size: .72rem; color: var(--vz-secondary-color); }
#mlIxpTop .ixp-top .v { flex: 0 0 auto; font-family: var(--vz-font-monospace); font-weight: 600; white-space: nowrap; }

/* =====================================================================
 *  [4-423 · 회원] 연간 비용·수익(REPORT inex_year · views/inex/year.html.php) — 옛 가계부 «연간 수익/비용 분류» 를 리포트 꼴로.
 *  요약 카드는 왼쪽 색 띠 + 오른쪽 둥근 아이콘(옛 판의 KPI) · 표는 이름 칸을 왼쪽에 붙이고(sticky) 달 열두 칸은 옆으로 민다.
 *  붙은 칸의 바탕은 불투명해야 한다 — 다크 모드의 *-bg-subtle 은 반투명이라 카드 바탕 위에 겹쳐 칠한다(linear-gradient).
 * ===================================================================== */
.ml-yi { --yi-card: var(--vz-card-bg, var(--vz-secondary-bg, #fff)); }
.ml-yi .min-w-0 { min-width: 0; }
.ml-yi-kpi { border-left: 3px solid transparent; }
.ml-yi-kpi .val { line-height: 1.25; margin: .15rem 0 .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ml-yi-kpi .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.ml-yi-kpi .badge { white-space: normal; text-align: left; margin-top: .25rem; }
.ml-yi-kpi .card-body { word-break: keep-all; }   /* 폰 폭 — «연/간» 처럼 낱말 가운데서 끊지 않는다 */
.ml-yi-kpi.k-inc  { border-left-color: #0ab39c; } .ml-yi-kpi.k-inc  .ic { background: rgba(10, 179, 156, .12); color: #0ab39c; }
.ml-yi-kpi.k-exp  { border-left-color: #f06548; } .ml-yi-kpi.k-exp  .ic { background: rgba(240, 101, 72, .12); color: #f06548; }
.ml-yi-kpi.k-ns   { border-left-color: #f7b84b; } .ml-yi-kpi.k-ns   .ic { background: rgba(247, 184, 75, .15); color: #e5a43a; }
.ml-yi-kpi.k-last { border-left-color: #405189; } .ml-yi-kpi.k-last .ic { background: rgba(64, 81, 137, .12); color: #405189; }
.ml-yi-kpi.k-avg  { border-left-color: #299cdb; } .ml-yi-kpi.k-avg  .ic { background: rgba(41, 156, 219, .12); color: #299cdb; }
.ml-yi-kpi.k-peak { border-left-color: #6559cc; } .ml-yi-kpi.k-peak .ic { background: rgba(101, 89, 204, .12); color: #6559cc; }
[data-bs-theme="dark"] .ml-yi-kpi.k-last .ic { color: #7c8fd6; }

/* 달 × 분류 표 */
table.ml-yi-tb { font-size: 12px; font-variant-numeric: tabular-nums; }
table.ml-yi-tb th, table.ml-yi-tb td { padding: .32rem .45rem; text-align: right; white-space: nowrap; }
table.ml-yi-tb thead th { font-size: 11px; font-weight: 600; color: var(--vz-secondary-color); background: var(--vz-light); border-bottom-width: 1px; }
table.ml-yi-tb thead th.now { color: var(--vz-primary); }
table.ml-yi-tb .nm { text-align: left; position: sticky; left: 0; z-index: 2; min-width: 9.5rem; max-width: 13rem; overflow: hidden; text-overflow: ellipsis;
    background: var(--yi-card); box-shadow: inset -1px 0 0 var(--vz-border-color); }
table.ml-yi-tb thead th.nm { background: var(--vz-light); z-index: 3; }
table.ml-yi-tb th.ml-yi-sort { cursor: pointer; user-select: none; }
table.ml-yi-tb th.ml-yi-sort:hover { color: var(--vz-body-color); }
table.ml-yi-tb th.ml-yi-sort .ico::after { content: ""; display: inline-block; width: .55rem; margin-left: 2px; font-style: normal; }
table.ml-yi-tb th.ml-yi-sort.desc .ico::after { content: "\25BC"; font-size: 8px; }
table.ml-yi-tb th.ml-yi-sort.asc .ico::after { content: "\25B2"; font-size: 8px; }
table.ml-yi-tb td.mo.now { background: rgba(64, 81, 137, .05); }
table.ml-yi-tb td.ft { opacity: .55; }
table.ml-yi-tb td.e { color: var(--vz-secondary-color); }
table.ml-yi-tb .z { color: var(--vz-secondary-color); opacity: .45; }
table.ml-yi-tb td.sm { font-weight: 600; }
table.ml-yi-tb td.sm, table.ml-yi-tb th.sm { border-left: 1px solid var(--vz-border-color); }
table.ml-yi-tb td.av, table.ml-yi-tb td.pv { color: var(--vz-secondary-color); }
table.ml-yi-tb td.pv.text-success { color: var(--vz-success) !important; }
table.ml-yi-tb td.pv.text-danger { color: var(--vz-danger) !important; }
table.ml-yi-tb a.ml-yi-go { color: inherit; }
table.ml-yi-tb a.ml-yi-go:hover { color: var(--vz-link-color); text-decoration: underline; }
/* 덩이 합계 · 당기순손익 · 잉여액 줄 — 색 띠 */
table.ml-yi-tb tr.sec td { font-weight: 700; }
table.ml-yi-tb tr.sec.s-inc td { background-color: var(--vz-success-bg-subtle); color: #0a8f7d; border-top: 2px solid rgba(10, 179, 156, .3); }
table.ml-yi-tb tr.sec.s-exp td { background-color: var(--vz-danger-bg-subtle); color: #d4462b; border-top: 2px solid rgba(240, 101, 72, .3); }
table.ml-yi-tb tr.sec.s-ns td  { background-color: var(--vz-warning-bg-subtle); color: #b07612; border-top: 2px solid rgba(247, 184, 75, .35); }
table.ml-yi-tb tr.sec.s-net td, table.ml-yi-tb tr.sec.s-sur td { background-color: var(--vz-primary-bg-subtle); color: var(--vz-heading-color, var(--vz-body-color)); }
table.ml-yi-tb tr.sec.s-net td { border-top: 2px solid rgba(64, 81, 137, .3); }
table.ml-yi-tb tr.sec.s-inc td.nm { background: linear-gradient(var(--vz-success-bg-subtle), var(--vz-success-bg-subtle)), var(--yi-card); }
table.ml-yi-tb tr.sec.s-exp td.nm { background: linear-gradient(var(--vz-danger-bg-subtle), var(--vz-danger-bg-subtle)), var(--yi-card); }
table.ml-yi-tb tr.sec.s-ns td.nm  { background: linear-gradient(var(--vz-warning-bg-subtle), var(--vz-warning-bg-subtle)), var(--yi-card); }
table.ml-yi-tb tr.sec.s-net td.nm, table.ml-yi-tb tr.sec.s-sur td.nm { background: linear-gradient(var(--vz-primary-bg-subtle), var(--vz-primary-bg-subtle)), var(--yi-card); }
[data-bs-theme="dark"] table.ml-yi-tb tr.sec.s-inc td { color: #2fd3bb; }
[data-bs-theme="dark"] table.ml-yi-tb tr.sec.s-exp td { color: #f6876f; }
[data-bs-theme="dark"] table.ml-yi-tb tr.sec.s-ns td  { color: #f7c574; }
table.ml-yi-tb tr.sec td.text-danger { color: var(--vz-danger) !important; }
/* 대분류 · 소분류 줄 */
table.ml-yi-tb tr.grp td { font-weight: 500; }
table.ml-yi-tb tr.grp.kids td.nm { cursor: pointer; }
table.ml-yi-tb tr.grp .car { display: inline-block; width: 1rem; margin-left: -.15rem; color: var(--vz-secondary-color); transition: transform .15s; transform: rotate(-90deg); }
table.ml-yi-tb tr.grp.open .car { transform: none; }
table.ml-yi-tb tr.grp .car0 { display: inline-block; width: .85rem; }
table.ml-yi-tb tr.itm td { color: var(--vz-secondary-color); font-size: 11.5px; }
table.ml-yi-tb tr.itm td.nm { padding-left: 1.6rem; }
table.ml-yi-tb tr.itm td a.ml-yi-go { color: var(--vz-body-color); }
table.ml-yi-tb tbody tr.grp:hover td, table.ml-yi-tb tbody tr.itm:hover td { background-color: var(--vz-light); }
table.ml-yi-tb.hide0 tr.z0 { display: none; }
/* TOP5 · 한 줄 요약 */
.ml-yi-top { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px dashed var(--vz-border-color); font-size: 13px; }
.ml-yi-top:last-child { border-bottom: 0; }
.ml-yi-top .nmw { flex: 1 1 auto; min-width: 0; }
.ml-yi-top .rk { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
    background: var(--vz-light); color: var(--vz-secondary-color); }
.ml-yi-top .rk1 { background: #f7b84b; color: #fff; }
.ml-yi-top .rk2 { background: #a7b1c2; color: #fff; }
.ml-yi-top .rk3 { background: #d69a6b; color: #fff; }
.ml-yi-top .progress-bar { background-color: #f06548; }
.ml-yi-ins { height: 100%; display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .85rem; border: 1px dashed var(--vz-border-color); border-radius: .5rem;
    background: var(--yi-card); font-size: 12.5px; line-height: 1.5; }
.ml-yi-ins .ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.ml-yi-ins .i-inc { background: rgba(10, 179, 156, .12); color: #0ab39c; }
.ml-yi-ins .i-exp { background: rgba(240, 101, 72, .12); color: #f06548; }
.ml-yi-ins .i-ns { background: rgba(247, 184, 75, .15); color: #e5a43a; }
.ml-yi-ins .i-last { background: rgba(64, 81, 137, .12); color: #405189; }
@media (max-width: 575.98px) {
    table.ml-yi-tb .nm { min-width: 7rem; max-width: 8.5rem; }
    .ml-yi-kpi .val { font-size: 15px !important; }
}
@media print {
    .ml-yi .form-check, .ml-yi .btn-group, #mlYiShow { display: none !important; }
    table.ml-yi-tb { font-size: 9px; }
    table.ml-yi-tb th, table.ml-yi-tb td { padding: .15rem .25rem; }
    table.ml-yi-tb .nm { position: static; }
}

/* ── [4-493] 연간 추이 «분류별 월별»(#mlRyLine) — 분류 표시(체크 + 범례) · 말풍선 ── */
.ml-ry-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 6px 8px; align-items: center; }
.ml-ry-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--vz-border-color); background: var(--vz-secondary-bg); color: var(--vz-secondary-color);
    border-radius: 14px; padding: 3px 10px 3px 7px; font-size: 12px; line-height: 1.4; white-space: nowrap; cursor: pointer; max-width: 100%; min-width: 0; }
.ml-ry-nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }   /* [4-493b M1] 긴 이름은 말줄임(전체는 title) — 390 폭 가로 넘침 막음 */
.ml-ry-chip:hover { border-color: var(--vz-secondary-color); }
.ml-ry-chip.on { color: var(--vz-body-color); font-weight: 600; border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.ml-ry-chip:focus-visible, .ml-ry-more:focus-visible { outline: 2px solid var(--vz-primary); outline-offset: 1px; }
.ml-ry-bx { width: 13px; height: 13px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.ml-ry-bx i { width: 11px; height: 11px; border: 1.5px solid var(--vz-secondary-color); border-radius: 3px; display: block; opacity: .7; }
.ml-ry-bx svg { width: 13px; height: 13px; display: block; margin: 0; }
.ml-ry-more { border: 0; background: transparent; color: var(--vz-primary); font-size: 12px; padding: 3px 6px; border-radius: 4px; white-space: nowrap; }
.ml-ry-more:hover { background: var(--vz-primary-bg-subtle); }
.ml-ry-clear { color: var(--vz-secondary-color); }
.ml-ry-cap { font-size: 12px; color: var(--vz-danger-text-emphasis); padding: 0 8px 6px; }
.ml-ry-plot { position: relative; }
.ml-ry-empty { position: absolute; inset: 0 0 24px 40px; display: flex; pointer-events: none; align-items: center; justify-content: center; text-align: center; color: var(--vz-secondary-color); font-size: 13px; padding: 0 30px; }
.ml-ry-foot { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; padding: 4px 8px 2px; font-size: 11.5px; color: var(--vz-secondary-color); }
.ml-ry-note { display: inline-flex; align-items: center; gap: 5px; }
.ml-ry-dash { width: 20px; border-top: 2px dashed var(--vz-secondary-color); display: block; }
.ml-ry-mk { width: 11px; height: 11px; display: inline-block; vertical-align: -1px; margin-right: 5px; }
.ml-ry-tip .h { font-size: 11px; opacity: .8; margin-bottom: 2px; }
.ml-ry-tip table { border-collapse: collapse; }
.ml-ry-tip td { padding: 0 0 0 14px; vertical-align: middle; line-height: 1.6; }
.ml-ry-tip td:first-child { padding-left: 0; }
.ml-ry-tip td.v { text-align: right; font-weight: 600; }
.ml-ry-tip td.d { text-align: right; font-size: 11px; }
@media print {
    .ml-ry-chip:not(.on), .ml-ry-more, .ml-ry-cap { display: none !important; }
}
