/* Gündoğdu - Raporlar */
.rpage { --c-closed: #1D1D1B; --c-open: #FFCE06; --c-good: #1baf7a; --c-prog: #2a78d6; --c-todo: #B9B7AE; }
.rp-head { margin-bottom: 14px; }
.rp-actions { gap: 8px; flex-wrap: wrap; }
.rp-preset { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #D6D4CB; border-radius: 8px; padding: 0 4px 0 10px; background: #fff; }
.rp-preset select { border: 0; padding: 8px 6px; background: transparent; font-weight: 600; min-width: 150px; outline: none; box-shadow: none; }
.rp-printhead { display: none; }

.rp-tabs { display: inline-flex; gap: 4px; background: #EAE8E0; padding: 4px; border-radius: 10px; margin-bottom: 14px; }
.rp-tabs button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 8px 16px; border-radius: 7px; font-weight: 600; color: var(--muted); cursor: pointer; }
.rp-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(29,29,27,.12); }

.rp-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; margin-bottom: 16px; }
.rp-ranges { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--bg); border-radius: 9px; padding: 3px; }
.rp-ranges button { border: 0; background: none; padding: 6px 11px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.rp-ranges button:hover { color: var(--ink); }
.rp-ranges button.on { background: var(--dark); color: #fff; }
.rp-dates { display: inline-flex; align-items: center; gap: 6px; }
.rp-dates[hidden] { display: none; }
.rp-dates input { width: auto; padding: 6px 8px; }
.rp-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rp-sel select { width: auto; min-width: 140px; max-width: 200px; padding: 7px 9px; }
.rp-live { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }

#rpbody { transition: opacity .15s; }
#rpbody.loading { opacity: .55; pointer-events: none; }
.rp-skel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rp-skel div { height: 220px; border-radius: var(--radius); background: linear-gradient(90deg, #ECEAE3 0%, #F6F5F0 50%, #ECEAE3 100%); background-size: 200% 100%; animation: rpsh 1.2s linear infinite; }
.rp-skel div:first-child { grid-column: 1 / -1; height: 110px; }
@keyframes rpsh { to { background-position: -200% 0; } }

.rpgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.rpgrid > .wide, .rpgrid > .rpkpis, .rpgrid > .rpnote { grid-column: 1 / -1; }
.rpcard { overflow: hidden; break-inside: avoid; }
.rpcard > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px 18px 0; flex-wrap: wrap; }
.rpcard > header h3 { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.rpcard > header h3 .ic { color: #9a7b00; }
.rpsub { color: var(--muted); font-size: 12px; }
.rpc { padding: 14px 18px 18px; }
.rpc > .tablewrap { margin: 0 -18px -18px; }
.rpnone { color: var(--muted); padding: 18px 0; display: flex; align-items: center; gap: 8px; }
.rpnote { color: var(--muted); font-size: 12px; margin: -4px 0 0; }
.rpc .rpnote { margin: 12px 0 0; }
.rpmore { color: var(--muted); font-size: 12px; padding-top: 10px; }

/* göstergeler */
.rpkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.rpk { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rpk .k { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.rpk b { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.rpk .s { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 18px; }
.rpk.hl { background: var(--dark); border-color: var(--dark); color: #fff; }
.rpk.hl .k { color: var(--yellow); }
.rpk.hl .s { color: #BDBDB5; }
.rpk.warn { border-color: #F2C9A8; background: #FFF8F1; }
.rpk.warn b { color: #B4461A; }
.dl { font-weight: 700; font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: #EEEDE7; color: #55554F; white-space: nowrap; }
.dl.good { background: #E1F5EC; color: #0E6B47; }
.dl.bad { background: #FBE7E4; color: #A3291F; }
.rpk.hl .dl { background: #3A3A36; color: #E6E6E0; }
.rpk.hl .dl.good { background: #1F4D3B; color: #9FE6C6; }
.rpk.hl .dl.bad { background: #5A2722; color: #FFB4A9; }
.warnchip { display: inline-block; background: #FFF1D6; color: #8A5300; border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }

/* oran çubuğu */
.rate { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.rbar { display: inline-block; width: 46px; height: 6px; border-radius: 99px; background: #ECEAE3; overflow: hidden; }
.rbar > span { display: block; height: 100%; background: var(--c-good); border-radius: 99px; }
.rbar.big { width: 70px; }

/* yığılmış çubuklar */
.rpstack { display: flex; flex-direction: column; }
.rpstack-h, .rprow { display: grid; grid-template-columns: minmax(110px, 1.1fr) 2fr 50px 92px 76px; gap: 12px; align-items: center; }
.rprow.noavg, .rpstack-h:has(+ .noavg) { grid-template-columns: minmax(110px, 1.1fr) 2fr 50px 92px; }
.rpstack.j .rpstack-h, .rpstack.j .rprow { grid-template-columns: minmax(130px, 1.1fr) 2fr 50px 92px; }
.rpstack-h { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.rpstack-h > span:nth-child(n+3) { text-align: right; }
.rpstack-h > span:nth-child(4) { text-align: left; }
.rpkey { display: inline-flex; align-items: center; gap: 5px; text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.rpkey { flex-wrap: wrap; gap: 2px 10px; }
.rpkey > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.rpkey i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rpcard:not(.all) tr.rpextra { display: none; }
.rpkey i.c { background: var(--c-closed); } .rpkey i.o { background: var(--c-open); }
.rpkey i.p { background: var(--c-prog); } .rpkey i.t { background: var(--c-todo); } .rpkey i.d { background: var(--c-good); }
.rprow { padding: 7px 0; border-bottom: 1px solid #F1EFE9; font-size: 13px; cursor: default; }
.rprow:last-of-type { border-bottom: 0; }
.rprow:hover { background: #FFFCEB; }
.rprow .nm { display: flex; align-items: center; gap: 7px; min-width: 0; }
.rprow .nm > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rprow .nm small { color: var(--muted); font-size: 11.5px; }
.rprow .nm .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.rprow .trk { display: flex; gap: 2px; height: 14px; align-items: stretch; }
.rprow .seg { display: block; min-width: 0; border-radius: 0; }
.rprow .seg:first-child { border-radius: 4px 0 0 4px; }
.rprow .seg:last-child { border-radius: 0 4px 4px 0; }
.rprow .seg[style*="width:0.00%"] { display: none; }
.rprow .seg.c { background: var(--c-closed); } .rprow .seg.o { background: var(--c-open); }
.rprow .seg.p { background: var(--c-prog); } .rprow .seg.t { background: var(--c-todo); } .rprow .seg.d { background: var(--c-good); }
.rprow .num { text-align: right; font-size: 14px; }
.rprow .avg { text-align: right; color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* halka grafik */
.rpdonut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.rpdonut svg { flex-shrink: 0; }
.rpdonut path { stroke: #fff; stroke-width: 1; cursor: default; transition: opacity .12s; }
.rpdonut svg:hover path { opacity: .55; }
.rpdonut svg path:hover { opacity: 1; }
.rpdonut .dn { font-size: 24px; font-weight: 800; fill: var(--ink); letter-spacing: -.5px; }
.rpdonut .dlab { font-size: 11px; fill: var(--muted); }
.rplegend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 7px; }
.rplegend li { display: grid; grid-template-columns: 12px 1fr auto 42px; gap: 8px; align-items: center; font-size: 13px; }
.rplegend i { width: 12px; height: 12px; border-radius: 3px; }
.rplegend .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rplegend .p { color: var(--muted); font-size: 12px; text-align: right; }

/* sütunlar */
.rpcols { display: flex; align-items: flex-end; gap: 14px; min-height: 186px; padding-top: 6px; }
.rpcols .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.rpcols .bar { width: 100%; max-width: 64px; border-radius: 4px 4px 0 0; background: var(--dark); flex: none; }
.rpcols .bar.ok { background: var(--c-good); } .rpcols .bar.mid { background: var(--c-open); }
.rpcols .bar.warn { background: #eb6834; } .rpcols .bar.bad { background: #C62828; }
.rpcols .v { font-weight: 700; font-size: 14px; }
.rpcols .k { font-size: 12px; color: var(--muted); text-align: center; border-top: 1px solid var(--line); width: 100%; padding-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* çizgi grafik */
.rplegend-h { display: flex; gap: 16px; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.rplegend-h span { display: inline-flex; align-items: center; gap: 6px; }
.rplegend-h i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.rptrend { width: 100%; overflow: hidden; }
.rpsvg { display: block; max-width: 100%; height: auto; }
.rpsvg .g { stroke: #ECEAE3; stroke-width: 1; }
.rpsvg .ax { font-size: 11px; fill: var(--muted); }
.rpsvg .l-created { fill: none; stroke: #1D1D1B; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rpsvg .a-created { fill: rgba(255, 206, 6, .22); stroke: none; }
.rpsvg .l-closed { fill: none; stroke: #1baf7a; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rpsvg .d-created { fill: #1D1D1B; stroke: #fff; stroke-width: 1.5; }
.rpsvg .d-closed { fill: #1baf7a; stroke: #fff; stroke-width: 1.5; }
.rpsvg .cross { stroke: #8f8d85; stroke-width: 1; stroke-dasharray: 3 3; }
.rpsvg .hit { fill: transparent; }
.rpsvg .cross[hidden] { display: none; }

/* ipucu */
.rptip { position: fixed; z-index: 200; pointer-events: none; background: #1D1D1B; color: #fff; border-radius: 8px; padding: 8px 11px; font-size: 12.5px; line-height: 1.55; box-shadow: 0 6px 22px rgba(0,0,0,.22); max-width: 280px; }
.rptip b { color: #fff; }
.rptip > b:first-child { display: block; color: var(--yellow); margin-bottom: 2px; }
.rptip i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; border: 1px solid rgba(255,255,255,.35); }

/* tablolar */
.rptable td.n, .rptable th.n { text-align: right; }
.rptable td { padding: 9px 14px; }
.rptable td:nth-child(2) b, .rptable td:nth-child(3) { white-space: nowrap; }
.rptable .jkey { display: inline-flex; align-items: center; gap: 5px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); margin-right: 4px; white-space: nowrap; }
.rptable .overdue { color: #B4461A; font-weight: 600; }
table.rptable td:nth-child(4) { white-space: normal; }

/* özelleştir penceresi */
.rpwlist { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.rpw { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px 9px 12px; background: #fff; }
.rpw.off { background: #FAFAF7; }
.rpw.off b { color: var(--muted); }
.rpw .check span { display: flex; flex-direction: column; }
.rpw small { color: var(--muted); font-size: 12px; }
.rpw-mv { display: inline-flex; gap: 4px; flex-shrink: 0; }
.rpw-mv .btn { padding: 3px 8px; font-size: 10px; }
.rp-savesum { margin-top: 12px; display: flex; gap: 7px; align-items: center; font-size: 12.5px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 8px 10px; }

@media (max-width: 960px) {
  .rpgrid, .rp-skel { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .rp-actions { width: 100%; }
  .rp-preset { flex: 1; }
  .rp-preset select { min-width: 0; width: 100%; }
  .rp-sel select { flex: 1 1 140px; max-width: none; }
  .rpstack-h, .rprow { grid-template-columns: minmax(80px, 1fr) 1.4fr 36px 64px; }
  .rprow .avg, .rpstack-h > span:nth-child(5) { display: none; }
  .rbar { width: 26px; }
  .rpcols { gap: 6px; }
  .rpkpis { grid-template-columns: repeat(2, 1fr); }
  .rpk b { font-size: 24px; }
}

/* yazdırma / PDF: patronlara sunulacak sade çıktı */
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; font-size: 12px; }
  .topbar, .foot, .announce, .rp-actions, .rp-tabs, #rpfilters, .rp-head p, .env-ribbon, #toast { display: none !important; }
  main { padding: 0 !important; max-width: none !important; }
  .rp-head { margin: 0; }
  .rp-head h1 { display: none; }
  .rp-printhead { display: flex; align-items: center; gap: 16px; border-bottom: 3px solid #FFCE06; padding-bottom: 10px; margin-bottom: 14px; }
  .rp-printhead img { height: 34px; }
  .rp-printhead div { display: flex; flex-direction: column; }
  .rp-printhead b { font-size: 18px; }
  .rp-printhead span { color: #6B6B66; font-size: 11px; }
  .card, .rpk { box-shadow: none !important; }
  .rpgrid { gap: 10px; grid-template-columns: 1fr; }
  .rpsvg { width: 100%; height: auto; }
  .rpcard, .rpk, tr { break-inside: avoid; page-break-inside: avoid; }
  .rpkpis { grid-template-columns: repeat(3, 1fr); }
  .rptable tr.click:hover td, .rprow:hover { background: none; }
  .rpcard:not(.all) tr.rpextra { display: table-row; }
  .rpmore button { display: none; }
  #rpbody.loading { opacity: 1; }
}
