/* Mobile-first labeled graph and Google Pay upload features */
.graph-mode-control{display:flex;align-items:center;gap:6px;margin:12px 0 6px;flex-wrap:wrap}
.mode-chip{border:1px solid var(--line);background:var(--surface);color:var(--muted);border-radius:999px;padding:8px 13px;font:inherit;font-size:12px;cursor:pointer}
.mode-chip.active{background:#2063d8;border-color:#2063d8;color:#fff}
.labeled-chart{min-width:0;width:100%;padding:5px 0 10px}
.labeled-chart[hidden],.donut-wrap[hidden],#importPreview[hidden],#importOverlay[hidden]{display:none!important}
.labeled-chart svg{display:block;width:100%;height:auto;max-height:395px;overflow:visible}
.pie-label{fill:var(--ink);font-family:inherit;font-size:19px;font-weight:700}
.pie-percent{fill:var(--muted);font-family:inherit;font-size:16px}
.graph-empty{text-align:center;color:var(--muted);padding:50px 12px}
.import-modal{width:min(720px,100%);max-height:min(94dvh,880px);overflow-y:auto}
.import-modal-content{padding:2px 23px 24px}
.import-intro{font-size:13px;line-height:1.7;color:var(--muted);margin-bottom:16px}
.upload-drop{border:2px dashed #80a6ef;border-radius:17px;background:rgba(54,122,245,.055);min-height:142px;padding:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;cursor:pointer;color:var(--ink)}
.upload-drop .icon{width:27px;height:27px;color:#3975f6}
.upload-drop small,.import-filename{font-size:12px;color:var(--muted)}
#importOverlay input[type=file]{position:absolute;width:1px;height:1px;opacity:0}
.import-filename{min-height:16px;overflow-wrap:anywhere}
.import-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:16px 0}
.import-kpis>div{border:1px solid var(--line);border-radius:11px;padding:12px 10px;min-width:0;background:var(--surface)}
.import-kpis small{display:block;color:var(--muted);font-size:10px;margin-bottom:7px}
.import-kpis strong{font-size:21px;font-weight:800;color:var(--ink)}
.import-sums{display:flex;flex-wrap:wrap;gap:7px 20px;font-size:12px;color:var(--muted)}
.import-sums b{color:var(--ink)}
.import-good{color:#0da682;font-size:12px;font-weight:650;margin-block:12px}
.import-warning{color:#d38a19;font-size:12px;margin-block:12px}
.import-blockers{background:rgba(250,73,108,.08);color:#e06c79;padding:12px;border-radius:12px;font-size:12px;margin:10px 0}
.import-blockers ul{margin:7px 0 0;padding-left:20px}
.import-preview-scroll{overflow-x:auto;max-height:245px;overflow-y:auto;border:1px solid var(--line);border-radius:10px;margin-top:14px}
.import-preview-scroll .ledger-table{min-width:490px;width:100%;font-size:11px}
.import-preview-scroll .ledger-table th,.import-preview-scroll .ledger-table td{padding:10px}
#importOverlay .modal-actions{position:sticky;bottom:-24px;background:var(--surface);padding:15px 0 0;flex-wrap:wrap}
.gpay-setting{border-color:#79a9f5!important}
@media (max-width:600px){
 .import-modal{width:100%;max-height:calc(100dvh - 32px);border-radius:18px}
 .import-modal-content{padding:4px 15px 15px}
 .import-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 .import-preview-scroll .ledger-table{display:table!important;width:100%!important;min-width:490px!important}
 .import-preview-scroll .ledger-table thead{display:table-header-group!important}
 .import-preview-scroll .ledger-table tbody{display:table-row-group!important}
 .import-preview-scroll .ledger-table tr{display:table-row!important}
 .import-preview-scroll .ledger-table td{display:table-cell!important}
 .labeled-chart svg{max-height:none}
 .pie-label{font-size:11.5px}.pie-percent{font-size:11px}
}

.pie-inside,.pie-inside-percent{font-family:inherit;font-size:12px;font-weight:800;fill:#fff;paint-order:stroke;stroke:rgba(0,0,0,.18);stroke-width:2px;stroke-linejoin:round}
.pie-inside-percent{font-size:11px;font-weight:700}
@media(max-width:620px){.labeled-chart svg{width:min(100%,320px);margin-inline:auto}.breakdown-panel .breakdown-legend{font-size:12px}.breakdown-legend-item{font-size:11px!important}}

.banner-actions,.section-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.banner-actions .review-link{min-height:39px;white-space:nowrap;margin:0}
.section-actions .button{min-height:39px;padding:9px 12px}
@media(max-width:600px){.banner-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.banner-actions .review-link{min-width:0;width:100%;padding:9px 7px;gap:5px;font-size:11px}.section-actions{width:100%}.section-actions .button{margin-left:auto}}
@media(max-width:320px){.banner-actions{grid-template-columns:minmax(0,1fr)}}
/* Import account mapping proposal: no changes occur before confirmation */
.import-account-notice{margin:12px 0;padding:14px;border:1px solid rgba(43,144,255,.35);border-radius:14px;background:rgba(47,132,230,.09);color:var(--ink);overflow-wrap:anywhere}
.import-account-notice strong{display:block;margin-bottom:8px}
.import-account-notice ul{margin:0 0 9px 0;padding-left:21px}
.import-account-notice li{padding:3px 0}
.import-account-notice li span{opacity:.75}
.import-account-notice p{font-size:13px;line-height:1.5;margin:0;opacity:.85}
