/* ERP › Özet Panosu (js/erp-charts.js): KPI kartları, grafikler, en çok satanlar. Koyu/açık temada erp.html değişkenleriyle uyumlu. */
.dash-root { display: grid; gap: 16px; margin-bottom: var(--space-6, 24px); }

.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.dash-kpi { position: relative; display: grid; gap: 8px; padding: 16px 18px 14px; border-radius: 16px; border: 1px solid var(--border-color); background: var(--bg-surface); overflow: hidden; --tone: #38bdf8; }
.dash-kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--tone), transparent); }
.dash-kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--tone), transparent 70%); opacity: .10; pointer-events: none; }
.dk-blue { --tone: #38bdf8; } .dk-green { --tone: #34d399; } .dk-violet { --tone: #a78bfa; } .dk-amber { --tone: #fbbf24; }
.dk-top { display: flex; align-items: center; gap: 10px; }
.dk-ico { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--tone); background: color-mix(in srgb, var(--tone) 16%, transparent); }
.dk-ico .ui-ico { margin: 0; width: 18px; height: 18px; }
.dk-label { color: var(--text-muted); font-size: .84rem; font-weight: 600; letter-spacing: .01em; }
.dk-val { font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; color: var(--text-primary); line-height: 1.1; font-variant-numeric: tabular-nums; }
.dk-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 36px; }
.dk-delta { display: inline-flex; align-items: baseline; gap: 5px; font-size: .8rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.dk-delta small { font-weight: 500; opacity: .85; font-size: .72rem; }
.dk-up { color: #059669; background: rgba(16, 185, 129, .14); } .dk-down { color: #dc2626; background: rgba(239, 68, 68, .14); } .dk-flat { color: var(--text-muted); background: rgba(127, 127, 127, .12); }
.spark { position: absolute; right: 16px; top: 14px; width: 84px; height: 30px; pointer-events: none; }
.dash-card:has(.dash-don) { display: flex; flex-direction: column; } .dash-card .dash-don { flex: 1; }

.dash-strip { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--border-color); color: var(--text-muted); font-size: .88rem; }
.dash-strip span { display: inline-flex; align-items: center; gap: 4px; }
.dash-strip b { color: var(--text-primary); margin-left: 4px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-card { padding: 16px 18px 14px; border-radius: 16px; border: 1px solid var(--border-color); background: var(--bg-surface); min-width: 0; }
.dash-wide { grid-column: 1 / -1; }
.dash-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dash-card h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.dash-leg { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--text-muted); }
.dash-leg span, .dash-legend li { display: inline-flex; align-items: center; gap: 6px; }
.dash-leg i, .dash-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.dash-svg { width: 100%; height: auto; display: block; overflow: visible; }
.g-grid { stroke: var(--border-subtle, rgba(127, 127, 127, .25)); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.g-ax { fill: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.g-hit { fill: transparent; }
.g-bar { cursor: default; outline: none; }
.g-bar:hover .g-hit, .g-bar:focus-visible .g-hit { fill: rgba(127, 127, 127, .12); }
.g-bar:hover rect:not(.g-hit), .g-bar:focus-visible rect:not(.g-hit) { filter: brightness(1.18); }

.dash-don { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dash-donut { flex-shrink: 0; color: var(--text-primary); }
.g-c1 { fill: var(--text-primary); font-size: 22px; font-weight: 800; }
.g-c2 { fill: var(--text-muted); font-size: 10px; }
.dash-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1 1 180px; min-width: 0; }
.dash-legend li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; font-size: .88rem; color: var(--text-secondary, var(--text-muted)); }
.dash-legend b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.dash-legend small { color: var(--text-muted); min-width: 34px; text-align: right; }

.dash-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.dash-top li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.tp-rank { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 14%, transparent); }
.tp-body { min-width: 0; display: grid; gap: 4px; }
.tp-row { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.tp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--text-primary); }
.tp-row b { color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tp-bar { height: 7px; border-radius: 99px; background: rgba(127, 127, 127, .15); overflow: hidden; }
.tp-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3b82f6, #22d3ee); }
.dash-top small { color: var(--text-muted); font-size: .76rem; }

.dash-empty { display: grid; gap: 4px; place-items: center; text-align: center; padding: 38px 16px; border-radius: 16px; border: 1px dashed var(--border-color); color: var(--text-muted); }
.dash-empty strong { color: var(--text-primary); font-size: 1.05rem; }

@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } .dash-wide { grid-column: auto; } .dk-val { font-size: 1.45rem; } }
@media (prefers-reduced-motion: no-preference) { .dash-kpi { transition: transform .15s, box-shadow .15s; } .dash-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); } }
@media (max-width: 600px) {
  .dash-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-kpi { padding: 12px 12px 10px; gap: 6px; }
  .dk-val { font-size: 1.2rem; } .dk-label { font-size: .78rem; } .dk-ico { width: 28px; height: 28px; }
  .dk-foot { min-height: 0; } .spark { display: none; } .dk-delta small { display: none; }
  .dash-card { padding: 14px 12px 12px; }
}
