/* ==========================================================================
   Yonetici Paneli Analitigi (AA) - stiller
   ========================================================================== */
#aa-root { margin: 8px 0 28px; }
.aa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.aa-head h2 { margin: 0; font-size: 1.5rem; font-weight: 900; color: var(--navy, #132751); letter-spacing: -.02em; }
.aa-head p { margin: 3px 0 0; font-size: .84rem; color: var(--text-muted, #64748b); }
.aa-ico { border: 1px solid var(--border, #e2e8f0); background: #fff; width: 38px; height: 38px; border-radius: 12px; cursor: pointer; font-size: 1.05rem; color: var(--navy, #132751); transition: transform .3s cubic-bezier(.16,1,.3,1), background .2s; display: grid; place-items: center; }
.aa-ico:hover { background: #f1f5f9; transform: rotate(20deg); }

.aa-sum-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: .88rem; color: var(--text-muted, #64748b); }
.aa-sum-h b { color: var(--navy, #132751); font-size: .95rem; }
.aa-seg { display: inline-flex; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; overflow: hidden; background: #fff; }
.aa-seg button { border: 0; background: transparent; padding: 8px 14px; font-size: .78rem; font-weight: 700; color: var(--text-muted, #64748b); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.aa-seg button + button { border-left: 1px solid var(--border, #e2e8f0); }
.aa-seg button:hover { background: #f8fafc; }
.aa-seg button.on { background: var(--navy, #132751); color: #fff; }

.aa-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.aa-kpi { background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 16px; padding: 14px 16px; min-width: 0; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.aa-kpi-l { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted, #64748b); }
.aa-kpi-v { margin-top: 8px; font-size: 1.45rem; font-weight: 900; color: var(--navy, #132751); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aa-kpi-s { margin-top: 2px; font-size: .76rem; color: var(--text-muted, #64748b); }
.aa-skel { height: 96px; background: linear-gradient(90deg, #f1f5f9, #e8edf3, #f1f5f9); background-size: 200% 100%; animation: aaShimmer 1.4s infinite; }
@keyframes aaShimmer { to { background-position: -200% 0; } }
.aa-delta { font-size: .66rem; font-weight: 800; padding: 2px 7px; border-radius: 99px; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.aa-delta.up { background: #e6f7f0; color: #0f8a68; }
.aa-delta.down { background: #fdebec; color: #d6283a; }

.aa-card { background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 18px; box-shadow: 0 1px 2px rgba(15,23,42,.03); min-width: 0; display: flex; flex-direction: column; }
.aa-card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px 6px; }
.aa-card-h h3 { margin: 0; font-size: 1rem; font-weight: 800; color: var(--navy, #132751); }
.aa-card-h p { margin: 3px 0 0; font-size: .76rem; color: var(--text-muted, #64748b); }
.aa-card-b { padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.aa-h-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.aa-chip { font-size: .7rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: #eef2ff; color: #3b4fc4; }
.aa-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; margin-top: 16px; }
.aa-empty { padding: 26px 12px; text-align: center; color: var(--text-muted, #64748b); font-size: .86rem; line-height: 1.5; background: #f8fafc; border-radius: 12px; }
.aa-big { font-size: 1.7rem; font-weight: 900; color: var(--navy, #132751); letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aa-big small { font-size: .9rem; font-weight: 700; color: var(--text-muted, #64748b); }
.aa-mini { font-size: .78rem; color: var(--text-muted, #64748b); margin-top: -6px; }
.aa-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .74rem; color: var(--text-muted, #64748b); border-top: 1px dashed var(--border, #e2e8f0); padding-top: 10px; margin-top: auto; }
.aa-foot button { border: 1px solid var(--border, #e2e8f0); background: #fff; border-radius: 8px; padding: 4px 10px; font-size: .72rem; font-weight: 700; cursor: pointer; color: var(--navy, #132751); }

/* Cizgi grafigi */
.aa-chart { position: relative; }
.aa-svg { width: 100%; height: 190px; display: block; overflow: visible; }
.aa-grid { stroke: #e9edf3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.aa-ax { font-size: 11px; fill: #94a3b8; }
.aa-cursor { stroke: #cbd5e1; stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; vector-effect: non-scaling-stroke; }
.aa-tip { position: absolute; top: -4px; background: #0f172a; color: #fff; border-radius: 10px; padding: 6px 10px; font-size: .74rem; display: flex; flex-direction: column; gap: 1px; opacity: 0; pointer-events: none; transition: opacity .15s; white-space: nowrap; z-index: 3; }
.aa-tip b { font-size: .7rem; color: #94a3b8; font-weight: 700; }

/* Listeler */
.aa-list { display: flex; flex-direction: column; }
.aa-li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.aa-li:last-child { border-bottom: 0; }
.aa-li > div { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.aa-li b { font-size: .84rem; color: var(--navy, #132751); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.aa-li b u { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: 0 0 auto; }
.aa-li span { font-size: .72rem; color: var(--text-muted, #64748b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aa-li strong { font-size: .86rem; color: var(--navy, #132751); font-weight: 800; white-space: nowrap; }
.aa-li strong em { font-style: normal; font-size: .7rem; color: var(--text-muted, #64748b); font-weight: 700; margin-left: 4px; }
.aa-li .bad { color: #d6283a; font-style: normal; font-weight: 700; }
.aa-prod { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.aa-prod:last-child { border-bottom: 0; }
.aa-prod img { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: #f8fafc; border: 1px solid #eef2f6; flex: 0 0 auto; padding: 3px; }
.aa-prod-t { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.aa-prod-t b { font-size: .83rem; color: var(--navy, #132751); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aa-prod-t span { font-size: .7rem; color: var(--text-muted, #64748b); font-family: ui-monospace, monospace; }
.aa-prod-r { text-align: right; display: flex; flex-direction: column; flex: 0 0 auto; }
.aa-prod-r b { font-size: .8rem; color: var(--navy, #132751); }
.aa-prod-r span { font-size: .7rem; color: var(--text-muted, #64748b); }

/* Gunluk cubuklar, huni, yigin cubuk */
.aa-days { display: flex; align-items: flex-end; gap: 3px; height: 54px; }
.aa-days i { flex: 1; background: #e8edf3; border-radius: 3px 3px 0 0; min-height: 3px; }
.aa-days i.on { background: linear-gradient(180deg, #4c63d9, #1b2a6b); }
.aa-funnel { display: flex; flex-direction: column; gap: 14px; }
.aa-fn-l { display: flex; justify-content: space-between; font-size: .82rem; color: var(--navy, #132751); margin-bottom: 5px; }
.aa-fn-bar { height: 14px; background: #eef2f6; border-radius: 99px; overflow: hidden; }
.aa-fn-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3b5bdb, #1b2a6b); transition: width .8s cubic-bezier(.16,1,.3,1); }
.aa-fn:nth-child(2) .aa-fn-bar i { background: linear-gradient(90deg, #f59f00, #e8590c); }
.aa-fn:nth-child(3) .aa-fn-bar i { background: linear-gradient(90deg, #12b886, #0b7a5c); }
.aa-fn-s { font-size: .72rem; color: var(--text-muted, #64748b); margin-top: 4px; }
.aa-stack { display: flex; height: 16px; border-radius: 99px; overflow: hidden; gap: 2px; }
.aa-stack i { display: block; height: 100%; }

/* Harita */
.aa-mapcard { margin-bottom: 0; }
.aa-map-wrap { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1fr); gap: 18px; padding: 0 18px 8px; align-items: start; }
.aa-map { position: relative; background: linear-gradient(180deg, #fbfcfe, #f4f6fb); border-radius: 14px; padding: 8px; min-height: 280px; }
.aa-map-svg { width: 100%; height: auto; display: block; }
.aa-il { stroke: #fff; stroke-width: .7; transition: fill .25s, filter .2s; cursor: pointer; }
.aa-il:hover { filter: brightness(.82) saturate(1.2); stroke: #f59f00; stroke-width: 1.3; }
.aa-il-t { font-size: 13px; font-weight: 800; fill: #fff; pointer-events: none; paint-order: stroke; stroke: rgba(15,28,78,.55); stroke-width: 2.5px; }
.aa-map-tip { display: none; position: absolute; z-index: 5; background: #0f172a; color: #fff; padding: 10px 12px; border-radius: 12px; font-size: .78rem; min-width: 150px; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.aa-map-tip b { display: block; margin-bottom: 5px; font-size: .86rem; }
.aa-map-tip div { display: flex; justify-content: space-between; gap: 14px; padding: 1px 0; }
.aa-map-tip span { color: #94a3b8; }
.aa-map-side { min-width: 0; max-height: 470px; overflow-y: auto; padding-right: 4px; }
.aa-side-t { font-weight: 800; color: var(--navy, #132751); font-size: .95rem; }
.aa-side-s { font-size: .74rem; color: var(--text-muted, #64748b); margin-bottom: 10px; }
.aa-bar-row { margin-bottom: 11px; }
.aa-bar-top { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; color: var(--navy, #132751); }
.aa-bar { height: 7px; background: #eef2f6; border-radius: 99px; margin: 4px 0; overflow: hidden; }
.aa-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7c93f0, #0f1c4e); }
.aa-bar-s { font-size: .7rem; color: var(--text-muted, #64748b); }
.aa-legend { display: flex; align-items: center; gap: 8px; padding: 6px 20px 16px; font-size: .72rem; color: var(--text-muted, #64748b); flex-wrap: wrap; }
.aa-legend i { width: 120px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, rgb(199,210,235), rgb(15,28,78)); }
.aa-legend em { font-style: normal; margin-left: auto; }
.aa-mapcard.aa-full { position: fixed; inset: 0; z-index: 9000; border-radius: 0; overflow: auto; background: #fff; }
.aa-mapcard.aa-full .aa-map-wrap { grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); }
body.aa-noscroll { overflow: hidden; }

@media (max-width: 1100px) { .aa-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .aa-map-wrap { grid-template-columns: 1fr; } .aa-map-side { max-height: none; } }
@media (max-width: 768px) {
  .aa-kpis { grid-template-columns: repeat(2, 1fr); }
  .aa-kpi-v { font-size: 1.15rem; }
  .aa-cards { grid-template-columns: 1fr; }
  .aa-seg { max-width: 100%; overflow-x: auto; }
  .aa-seg button { padding: 7px 10px; font-size: .72rem; }
  .aa-card-h { flex-direction: column; }
  .aa-h-right { justify-content: flex-start; width: 100%; }
  .aa-legend em { margin-left: 0; width: 100%; }
}
