/* ARWY Admin — Büyüme modülü: İstatistikler, Play Store, Reklam geliri,
   Duyuru, Test APK, Canlı harita. Renkler YALNIZ base.css değişkenlerinden. */

/* ── Bölüm başlıkları ve açıklama satırı ── */
.g-section { margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-section:first-child { margin-top: 0; }
.g-section h2 { font-size: 16px; font-weight: 750; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.g-section h2 svg { color: var(--orange); }
.g-section .g-section-sub { color: var(--muted); font-size: 12.5px; flex-basis: 100%; }
.g-caption { color: var(--muted); font-size: 12px; margin-top: 10px; line-height: 1.5; }
.g-cardhead { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; margin-bottom: 12px; }
.g-cardhead .card-title { margin-bottom: 0; }
.g-meta { color: var(--faint); font-size: 11.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Dikey çubuk grafik (bq-bars üstüne) ── */
.g-chart { position: relative; }
.g-chart .bq-bars { height: 150px; }
.g-chart-top { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; margin-bottom: 2px; }
.g-axis { display: flex; gap: 4px; margin-top: 4px; }
.g-axis span { flex: 1; text-align: center; font-size: 9.5px; color: var(--faint); white-space: nowrap; overflow: visible; }
.bq-bar.green { background: var(--green); }
.bq-bar.red { background: var(--red); }
.bq-bar.yellow { background: var(--yellow); }
.bq-bar.blue { background: var(--blue); }
.bq-bar.last { opacity: .55; }
.bq-bar-col:hover .bq-bar { filter: brightness(1.12); }
.tier-bar-fill.red { background: var(--red); }
.tier-bar-fill.green { background: var(--green); }
.tier-bar-fill.blue { background: var(--blue); }
.g-wide-label .tier-bar-label { width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Geri dönüş tablosu ── */
.g-ret td.num, .g-ret th.num { text-align: right; }
.g-ret .ret-cell { min-width: 110px; }
.g-ret .ret-bar.d7 { background: color-mix(in srgb, var(--blue) 30%, transparent); }
.g-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.g-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 5px; background: var(--faint); }
.g-dot.green { background: var(--green); } .g-dot.red { background: var(--red); }
.g-dot.blue { background: var(--blue); } .g-dot.yellow { background: var(--yellow); }
.g-dot.orange { background: var(--orange); } .g-dot.muted { background: var(--faint); }
.g-dot.ring { background: none; border: 2px solid var(--muted); }
.g-dot.dash { background: none; border: 2px dashed var(--muted); }

/* ── Play: sağlık ── */
.g-health { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.g-health .kpi-val { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.g-health .badge { font-size: 11.5px; }
.g-thresh { display: flex; align-items: center; gap: 0; height: 8px; border-radius: 6px; overflow: hidden; margin-top: 12px; background: var(--sunken); position: relative; }
.g-thresh .z { height: 100%; }
.g-thresh .z.good { background: color-mix(in srgb, var(--green) 45%, transparent); }
.g-thresh .z.warn { background: color-mix(in srgb, var(--yellow) 45%, transparent); }
.g-thresh .z.bad { background: color-mix(in srgb, var(--red) 45%, transparent); }
.g-thresh .mk { position: absolute; top: -3px; width: 3px; height: 14px; border-radius: 2px; background: var(--text); }

/* ── Play: yorum kartları ── */
.g-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.g-review { display: flex; flex-direction: column; gap: 10px; margin-bottom: 0; }
.g-review-head { display: flex; align-items: flex-start; gap: 10px; }
.g-review-head .who { flex: 1; min-width: 0; }
.g-review-head .who b { display: block; font-size: 13.5px; }
.g-stars { display: inline-flex; gap: 1px; color: var(--orange); }
.g-stars svg { width: 15px; height: 15px; }
.g-stars .off { color: var(--border-strong); }
.g-review.low { border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.g-review-text { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.g-reply { background: var(--green-soft); border-left: 3px solid var(--green); border-radius: 8px; padding: 8px 11px; font-size: 13px; line-height: 1.5; }
.g-reply .lbl { color: var(--green); font-size: 11.5px; font-weight: 650; display: block; margin-bottom: 2px; }
.g-reply-box { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--border); padding-top: 10px; }
.g-reply-box textarea { min-height: 70px; }
.g-reply-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.g-counter { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.g-counter.over { color: var(--red); font-weight: 650; }

/* ── Duyuru: adım adım form ── */
.g-push { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.g-step { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.card-title + .g-step { padding-top: 2px; }
.g-step:last-child { border-bottom: none; padding-bottom: 0; }
.g-step-n { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 750;
  background: var(--accent-soft); color: var(--orange); border: 1px solid var(--accent-line); }
.g-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.g-step-title { font-size: 13.5px; font-weight: 700; }
.g-step-hint { font-size: 12px; color: var(--muted); margin-top: -4px; }
.g-field-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; color: var(--muted); }
.g-notif { background: var(--raised); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; gap: 11px; align-items: flex-start; }
.g-notif img { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; object-fit: cover; }
.g-notif .t { font-weight: 700; font-size: 13.5px; word-break: break-word; }
.g-notif .b { font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 2px; word-break: break-word; white-space: pre-wrap; }
.g-notif .a { font-size: 11px; color: var(--faint); margin-bottom: 3px; display: flex; justify-content: space-between; }
.g-reach { border-radius: 10px; padding: 12px 14px; background: var(--sunken); font-size: 13px; color: var(--muted); }
.g-reach.ok { background: var(--blue-soft); color: var(--text); }
.g-reach b { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.g-reach.ok .g-reach-nums { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.g-sendbar { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }

/* ── Test APK ── */
.g-apk-name { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; color: var(--muted); word-break: break-all; }
.g-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }

/* ── Canlı harita ── */
.g-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.g-map-box { height: calc(100vh - 230px); min-height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--sunken); }
.g-map-side { display: flex; flex-direction: column; gap: 0; max-height: calc(100vh - 230px); overflow-y: auto; }
.g-map-side .card { margin-bottom: 12px; }
.g-filters { display: flex; flex-direction: column; gap: 10px; }
.g-filters .tabs { display: flex; }
.g-filters .chip { flex: 1 1 auto; }
.g-filters .daterow { display: flex; gap: 6px; align-items: center; }
.g-filters .daterow .input { min-width: 0; }
.g-people { display: flex; flex-direction: column; gap: 2px; }
.g-person { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 7px; font-size: 12.5px; }
.g-person.clickable { cursor: pointer; }
.g-person.clickable:hover { background: var(--raised); }
.g-person .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-person .ct { color: var(--faint); font-size: 11.5px; white-space: nowrap; }

/* Haritadaki kişi işaretleri (Leaflet divIcon, ana belgede → değişkenler çalışır) */
.arwy-pp-marker { background: none; border: none; }
.g-pin { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--red); background-color: var(--faint); background-size: cover; background-position: center;
  box-shadow: 0 0 0 2px var(--surface), 0 2px 6px rgba(0,0,0,.35); cursor: pointer; display: grid; place-items: center; color: var(--surface); font-weight: 700; font-size: 15px; }
.g-pin.online { border-color: var(--green); }
.g-pin.offline { border-color: var(--red); }
.g-pin.deleted { border-color: var(--faint); filter: grayscale(1); opacity: .75; }
.g-pin.ip { border-style: dashed; }
.g-map-box .leaflet-popup-content-wrapper, .g-map-box .leaflet-popup-tip { background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.g-map-box .leaflet-popup-content { margin: 12px 14px; font-size: 12.5px; line-height: 1.55; }
.g-map-box .leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.g-pop b { font-size: 13.5px; }
.g-pop .s { color: var(--muted); }
.g-pop a { color: var(--orange); font-weight: 700; }
[data-theme="dark"] .g-map-box .leaflet-tile-pane { filter: brightness(.82) contrast(1.05) saturate(.85); }

@media (max-width: 1100px) {
  .g-push { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .g-map-layout { grid-template-columns: 1fr; }
  .g-map-box { height: 58vh; min-height: 300px; }
  .g-map-side { max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
  .g-reviews { grid-template-columns: 1fr; }
  .g-wide-label .tier-bar-label { width: 100px; }
  .g-axis span:nth-child(even) { visibility: hidden; }
}

/* KPI ızgarası: 4'ten fazla kutu olduğunda kendiliğinden sarar */
.hero-stats.g-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
@media (max-width: 640px) { .hero-stats.g-kpis { grid-template-columns: 1fr 1fr; } }
.g-neg { color: var(--red); } .g-pos { color: var(--green); }
