/* Dashboard kinerja (charts.js) — SALINAN IDENTIK di sales.arizkatech.com/assets/css/viz.css. Token warna sama dengan app.css; angka grafik proporsional, tabular hanya di tabel. */
.viz-root { display: grid; gap: 14px; transition: opacity .15s; }
.viz-root.loading { opacity: .55; pointer-events: none; }
.viz-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.viz-filters .chip { min-height: 40px; }
.viz-sub { font-size: 11px; color: var(--navy-400); margin: -6px 2px 0; }

.viz-label { font-size: 12px; font-weight: 600; color: var(--navy-400); }
.viz-caption { font-size: 11px; color: var(--navy-400); margin-top: 6px; line-height: 1.4; }
.viz-hero, .viz-tile, .viz-card { background: #fff; border: 1px solid var(--navy-100); border-radius: 16px; box-shadow: 0 1px 2px rgba(16,25,59,.04), 0 8px 24px -14px rgba(16,25,59,.14); }
.viz-hero { padding: 18px 18px 16px; }
.viz-hero-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.viz-hero-value { font: 800 48px/1.05 var(--font-display); letter-spacing: -.02em; color: var(--navy-900); margin: 6px 0 8px; white-space: nowrap; }
.viz-hero-value.long { font-size: 38px; }

.viz-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.viz-tile { padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.viz-value-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.viz-value { font: 800 24px/1.1 var(--font-display); color: var(--navy-900); letter-spacing: -.01em; overflow-wrap: anywhere; }
.viz-spark { flex-shrink: 0; }

.viz-delta { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.viz-delta .vs { font-weight: 500; color: var(--navy-400); }
.viz-delta.good { color: #047857; }
.viz-delta.bad { color: #B91C1C; }
.viz-delta.flat { color: var(--navy-400); }
.viz-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; width: fit-content; }
.viz-status.good { color: #047857; background: #ECFDF5; }
.viz-status.warn { color: #B45309; background: #FFFBEB; }
.viz-status.bad { color: #B91C1C; background: #FEF2F2; }

.viz-card { padding: 14px 14px 12px; }
.viz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.viz-titles h3 { margin: 0; font: 700 15px/1.25 var(--font-display); color: var(--navy-900); }
.viz-titles p { margin: 3px 0 0; font-size: 12px; color: var(--navy-400); line-height: 1.4; }
.viz-toggle { width: 40px; height: 40px; flex-shrink: 0; border: none; border-radius: 12px; background: var(--navy-50); color: var(--navy-500); font-size: 15px; display: flex; align-items: center; justify-content: center; margin: -4px -4px 0 0; }
.viz-toggle:active { transform: scale(.94); }
.viz-toggle[aria-pressed="true"] { background: var(--accent-100); color: var(--accent-700); }

.viz-chart, .viz-hbars, .viz-stack { position: relative; }
.viz-svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-tick { font: 500 10px var(--font-sans); fill: var(--navy-400); }
.viz-val { font: 700 10px var(--font-sans); fill: var(--navy-900); }
.viz-mark { outline: none; cursor: default; }
.viz-mark:hover .viz-bar, .viz-mark:focus .viz-bar { opacity: .78; }
.viz-mark:focus-visible .viz-bar { stroke: var(--navy-900); stroke-width: 1.5; }
.viz-empty-note { position: absolute; left: 0; right: 0; top: 38%; text-align: center; font-size: 12px; color: var(--navy-400); pointer-events: none; }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--navy-900); color: #fff; padding: 6px 10px; border-radius: 10px; font-size: 12px; line-height: 1.3; white-space: nowrap; box-shadow: 0 10px 24px -8px rgba(16,25,59,.5); display: flex; flex-direction: column; }
.viz-tip[hidden] { display: none; }
.viz-tip strong { font-size: 13px; }
.viz-tip span { color: rgba(255,255,255,.75); }

.viz-hbars { display: grid; gap: 12px; }
.hb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hb-label { font-size: 13px; font-weight: 600; color: var(--navy-900); min-width: 0; overflow-wrap: anywhere; }
.hb-value { font: 700 13px var(--font-sans); color: var(--navy-900); flex-shrink: 0; }
.hb-track { height: 12px; margin-top: 5px; border-radius: 4px; background: #EEF1F8; }
.hb-fill { height: 100%; border-radius: 0 4px 4px 0; outline: none; }
.hb-fill:hover, .hb-fill:focus { opacity: .8; }
.hb-fill:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy-900); }
.hb-note { font-size: 11px; color: var(--navy-400); margin-top: 4px; }

.stack-bar { display: flex; gap: 2px; height: 14px; }
.stack-seg { min-width: 4px; outline: none; }
.stack-seg:first-child { border-radius: 4px 0 0 4px; }
.stack-seg:last-child { border-radius: 0 4px 4px 0; }
.stack-seg:only-child { border-radius: 4px; }
.stack-seg:hover, .stack-seg:focus { opacity: .8; }
.viz-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.viz-legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.viz-legend .swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.viz-legend .lg-label { color: var(--navy-400); min-width: 0; }
.viz-legend strong { margin-left: auto; color: var(--navy-900); }
.viz-legend i.fa-solid { font-size: 12px; color: var(--navy-400); }

.viz-meter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.meter-track { flex: 1 1 140px; height: 10px; border-radius: 999px; background: #EEF1F8; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; }
.meter-fill.good { background: #059669; }
.meter-fill.warn { background: #D97706; }
.meter-fill.bad { background: #EF4444; }

.viz-table-wrap { overflow-x: auto; }
.viz-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.viz-table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--navy-400); padding: 6px 8px; border-bottom: 1px solid var(--navy-100); }
.viz-table td { padding: 7px 8px; color: var(--navy-900); border-bottom: 1px solid var(--navy-50); }
.viz-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.viz-empty { text-align: center; color: var(--navy-400); font-size: 13px; padding: 20px 8px; }

.viz-work { display: grid; gap: 14px; }
.viz-work-item { display: block; width: 100%; text-align: left; border: none; background: none; padding: 0; color: inherit; }
.viz-work-item:active { opacity: .7; }
