/* Shared scorecard presentation. Original controls and persistence stay intact. */
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-karne{min-width:0!important;width:100%!important;padding:14px!important;border-radius:8px!important;background:var(--ds-bg,#edf3f6)!important}
.ref-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:0 0 14px}.ref-stat{border:1px solid var(--ds-line,#cbd8e2);border-left:4px solid #2273b8;border-radius:7px;background:var(--ds-paper,#fff);padding:14px 16px;display:flex;flex-direction:column;gap:6px;min-width:0}.ref-stat:nth-child(1){border-left-color:#fa931f}.ref-stat:nth-child(2),.ref-stat:nth-child(5){border-left-color:#24995f}.ref-stat:nth-child(4){border-left-color:#d54853}.ref-stat span,.ref-stat small{font:600 12px/1.4 'Segoe UI',sans-serif;color:var(--ds-muted,#607184)}.ref-stat strong{font:750 26px/1.15 'Segoe UI',sans-serif;color:var(--ds-ink,#18334b)}.ref-stat:nth-child(2) strong{color:#24995f}
.ref-layout{display:grid;grid-template-columns:minmax(0,1fr) 224px;gap:14px;align-items:start}.ref-main{min-width:0}.ref-aside{display:grid;gap:12px}.ref-side-box{border:1px solid var(--ds-line,#cbd8e2);border-radius:7px;background:var(--ds-paper,#fff);overflow:hidden}.ref-side-box h3{padding:12px!important;margin:0!important;font:700 13px 'Segoe UI',sans-serif!important;border-bottom:1px solid var(--ds-line,#cbd8e2)}.ref-manual-link{display:flex!important;justify-content:space-between;align-items:center;width:calc(100% - 20px)!important;margin:8px 10px!important;padding:9px!important;min-height:40px!important;border:1px solid var(--ds-line,#cbd8e2)!important;border-radius:6px!important;background:var(--ds-paper,#fff)!important;color:var(--ds-ink,#18334b)!important;font:12px 'Segoe UI',sans-serif!important}.ref-side-box p{padding:12px!important;margin:10px!important;background:var(--ds-soft,#f4f8fb);border-radius:6px;line-height:1.5}.ref-side-box p small,.ref-side-box p strong{display:block;font-size:12px}.ref-side-box p strong{margin-top:5px}.ref-empty{font-size:13px!important;color:var(--ds-muted,#607184)}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-scroll{width:100%!important;min-width:0!important;max-height:72dvh!important;overflow:auto!important;border:1px solid var(--ds-line,#cbd8e2)!important;border-radius:7px!important;background:var(--ds-paper,#fff)!important;padding:0!important;overscroll-behavior:contain}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp table.ref-table{width:100%!important;max-width:none!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important;margin:0!important;background:var(--ds-paper,#fff)!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table :is(th,td){position:static!important;display:table-cell!important;min-width:0!important;padding:11px 7px!important;font:12px/1.45 'Segoe UI',sans-serif!important;border:0!important;border-bottom:1px solid var(--ds-line,#d8e3eb)!important;text-align:left!important;vertical-align:middle!important;box-shadow:none!important;white-space:normal!important;overflow-wrap:anywhere!important;background:transparent!important;color:var(--ds-ink,#16334b)!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table thead{display:table-header-group!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr{display:table-row!important;border:0!important;box-shadow:none!important;border-radius:0!important;background:var(--ds-paper,#fff)!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tbody tr:nth-child(even){background:var(--ds-soft,#f4f8fb)!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tbody tr.ref-manual{background:var(--ds-warning-soft,#fffbed)!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th{font-weight:750!important;position:sticky!important;top:0!important;z-index:4!important;background:var(--ds-soft,#f4f8fb)!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table :is(th,td)::before{display:none!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(1){width:42px!important;white-space:nowrap!important;text-align:center!important}html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(2){width:6%!important}html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(3){width:7%!important}html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(4){width:auto!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(n+5):nth-child(-n+8){width:6%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(n+9){width:6.6%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table :is(.sim-code,.sim-name){display:inline!important;font:inherit!important;margin:0!important;color:inherit!important}.ref-code{color:#1764a3!important}.ref-details{margin-top:5px}.ref-details summary{font-size:11px!important;color:var(--ds-muted,#607184)!important;cursor:pointer}.ref-details .sim-needs{margin:8px 0!important}.ref-table .ux-row-toggle{display:none!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table select{width:64px!important;min-width:0!important;max-width:100%!important;min-height:32px!important;padding:4px!important;border:1px solid var(--ds-line,#cad6e1)!important;border-radius:5px!important;background:var(--ds-paper,#fff)!important;color:var(--ds-ink,#17344b)!important;font:600 12px 'Segoe UI',sans-serif!important}
@media(min-width:1600px){html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table :is(th,td){font-size:13px!important;padding:12px 8px!important}}
@media(max-width:1550px){.ref-layout{grid-template-columns:minmax(0,1fr)}.ref-aside{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.ref-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ref-stat{padding:12px}.ref-stat:nth-child(2){grid-column:span 1}.ref-stat strong{font-size:23px}.ref-aside{grid-template-columns:1fr}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp table.ref-table{min-width:0!important;display:block!important;table-layout:auto!important}.ref-table thead{visibility:collapse!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tbody{display:grid!important;gap:12px;padding:10px!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tbody tr{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;border:1px solid var(--ds-line,#cad6e1)!important;border-radius:8px!important;padding:12px!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table td{display:block!important;padding:7px 4px!important;font-size:13px!important;border:0!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table td::before{display:block!important;content:attr(data-label)!important;font-size:10px!important;color:var(--ds-muted,#607184)!important;margin-bottom:5px!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table select{min-height:44px!important;width:100%!important;font-size:16px!important}.ref-details summary{min-height:32px;line-height:32px}
}
@media print{.ref-aside{display:none}.ref-layout{display:block}.ref-scroll{max-height:none!important;overflow:visible!important}}

@media(max-width:820px){html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table thead{display:none!important}}

html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-karne .sim-title{display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:8px!important;margin-bottom:12px!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-karne .sim-actions{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;margin:0!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-karne .sim-actions>small{display:none!important}
.ref-compass{margin-top:16px;border:1px solid var(--ds-line,#cad6e1);border-radius:8px;padding:14px}.ref-compass>summary{font-weight:650;cursor:pointer}.ref-compass[open]>summary{margin-bottom:16px}

/* Required work stays visible for all four score targets. */
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(2){width:5%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(3){width:5%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(5){width:4%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(6){width:4%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(7){width:4%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(8){width:4%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(9){width:5%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(10){width:5%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(11){width:5%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(12){width:5%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(13){width:5%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table th:nth-child(14){width:25%!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table .ref-required .sim-needs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;margin:0!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table .ref-required .sim-needs>span{min-width:0!important;padding:6px 3px!important;border:1px solid var(--ds-line,#d7e2e9)!important;border-radius:5px!important;background:var(--ds-soft,#f1f7f8)!important;text-align:center!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table .ref-required .sim-needs small{display:block!important;font-size:11px!important;line-height:1.3!important;white-space:nowrap!important;color:var(--ds-muted,#607184)!important}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table .ref-required .sim-needs b{display:block!important;font-size:13px!important;line-height:1.4!important;margin-top:3px!important;color:var(--ds-ink,#17344b)!important}
@media(min-width:1600px){html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table .ref-required .sim-needs{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:820px){html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table td.ref-required{grid-column:1/-1!important}html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table .ref-required .sim-needs{grid-template-columns:repeat(4,minmax(0,1fr))!important}}

/* Keep scorecard surfaces and status text legible in the dark theme. */
html[data-theme="dark"] body#ktApp .karne-compare .compare-values > span {
  background: #23384b;
}

html[data-theme="dark"] body#ktApp .ref-table {
  --ds-warning-soft: #382c20;
}

html[data-theme="dark"] body#ktApp :is(.exec-warn, .ui-tone-near) {
  color: var(--ds-warning, #f1ce91) !important;
}

html[data-theme="dark"] body#ktApp :is(.exec-good, .ui-tone-good) {
  color: #86e0c3 !important;
}

html[data-theme="dark"] body#ktApp :is(.exec-down, .ui-tone-low) {
  color: var(--ds-danger, #ffb4bd) !important;
}

html[data-theme="dark"] body#ktApp .unit-weight-ranking .uwr-row > strong {
  color: var(--rank-dark-color, var(--ds-ink, #e4eef5)) !important;
}

html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table td.ref-order{
  text-align:center!important;white-space:nowrap!important;font-variant-numeric:tabular-nums
}
@media(max-width:820px){
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp:not(.karne-focus) .ref-scroll{
    max-height:none!important;overscroll-behavior:auto
  }
}
@media(max-width:360px){
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table .ref-required .sim-needs{
    grid-template-columns:repeat(2,minmax(0,1fr))!important
  }
}

/* Score color applies only to the displayed value, leaving manual-row shading visible. */
.ref-table [data-ref-score="5"]{--ref-score-bg:#dcfce7;--ref-score-ink:#14532d;--ref-score-line:#86d6a1}
.ref-table [data-ref-score="4"]{--ref-score-bg:#ecfccb;--ref-score-ink:#365314;--ref-score-line:#b5d776}
.ref-table [data-ref-score="3"]{--ref-score-bg:#fef3c7;--ref-score-ink:#713f12;--ref-score-line:#dfbf65}
.ref-table [data-ref-score="2"]{--ref-score-bg:#ffedd5;--ref-score-ink:#7c2d12;--ref-score-line:#f3ae77}
.ref-table [data-ref-score="1"]{--ref-score-bg:#fee2e2;--ref-score-ink:#7f1d1d;--ref-score-line:#ec9b9b}
:root[data-theme=dark] .ref-table [data-ref-score="5"]{--ref-score-bg:#12382a;--ref-score-ink:#bbf7d0;--ref-score-line:#438365}
:root[data-theme=dark] .ref-table [data-ref-score="4"]{--ref-score-bg:#263717;--ref-score-ink:#d9f99d;--ref-score-line:#718b46}
:root[data-theme=dark] .ref-table [data-ref-score="3"]{--ref-score-bg:#3e3014;--ref-score-ink:#fde68a;--ref-score-line:#947737}
:root[data-theme=dark] .ref-table [data-ref-score="2"]{--ref-score-bg:#482615;--ref-score-ink:#fed7aa;--ref-score-line:#9d6445}
:root[data-theme=dark] .ref-table [data-ref-score="1"]{--ref-score-bg:#482228;--ref-score-ink:#fecaca;--ref-score-line:#a25a64}
html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table [data-ref-score] :is(select,.ref-score-value){
  color:var(--ref-score-ink,var(--ds-ink,#17344b))!important;
  background:var(--ref-score-bg,var(--ds-paper,#fff))!important;
  border-color:var(--ref-score-line,var(--ds-line,#cad6e1))!important;
  font-weight:750!important;font-variant-numeric:tabular-nums
}
.ref-score-value{display:inline-flex;align-items:center;justify-content:center;min-width:30px;min-height:28px;padding:3px 7px;border:1px solid;border-radius:5px}
/* Mobile scorecards use the same row data as the desktop table. */
.ref-compact-details{display:none}
@media screen and (max-width:820px){
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-karne{padding:8px!important}
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tbody{
    gap:8px!important;padding:4px!important
  }
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tbody tr.ref-row{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-areas:"code code weight" "name name name" "ratio score point" "work work work";
    align-items:start;gap:6px 8px!important;padding:10px!important
  }
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > td{
    padding:0!important
  }
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > :is(
    [data-label="Sıra"],[data-label^="Skala"],[data-label="Pay"],[data-label="Payda"]
  ){display:none!important}
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > [data-label="Hedef Kodu"]{grid-area:code!important;color:var(--ds-accent,#086d65)!important;font-weight:750!important}
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > [data-label="Hedef Ağırlığı"]{grid-area:weight!important;text-align:right!important}
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > [data-label="Hedef Adı"]{
    grid-area:name!important;font-size:calc(15px * var(--kt-readable-scale,1))!important;
    font-weight:700!important;line-height:1.35!important;overflow-wrap:break-word!important;word-break:normal!important
  }
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > :is([data-label="Hedef Kodu"],[data-label="Hedef Adı"])::before,
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > [data-label="Hedef Adı"] .ref-details{display:none!important}
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > [data-label="Oran"]{grid-area:ratio!important}
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > [data-label="Skor"]{grid-area:score!important}
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > [data-label="Puan"]{grid-area:point!important}
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > .ref-required{
    grid-area:work!important;grid-column:1/-1!important
  }
  .ref-compact-details{display:block;margin-top:4px;border-top:1px solid var(--ds-line,#cbd8e2)}
  .ref-compact-details > summary{
    min-height:40px;padding-block:9px;cursor:pointer;font-size:12px;color:var(--ds-muted,#607184)
  }
  .ref-compact-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 4px}
  .ref-compact-fields > div{padding:6px;background:var(--ds-soft,#f4f8fb);border-radius:5px}
  .ref-compact-fields dt{font-size:11px;color:var(--ds-muted,#607184)}
  .ref-compact-fields dd{margin:3px 0 0;overflow-wrap:anywhere}
}
@media screen and (max-width:820px){
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row > [data-label="Hedef Ağırlığı"]::before{
    display:inline!important;content:"Ağırlık "!important;margin:0 3px 0 0!important
  }
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row .ref-required .sim-needs{
    grid-template-columns:repeat(4,minmax(0,1fr))!important
  }
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row .ref-required .sim-needs>span{
    padding:4px 2px!important
  }
  html body#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp#ktApp .ref-table tr.ref-row .ref-required .sim-needs small{
    font-size:10px!important
  }
}

.ref-summary.ref-summary-team {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.ref-stat[data-convergence="true"] {
  border-inline-start-color: #087f78;
}
@media (max-width: 1200px) {
  .ref-summary.ref-summary-team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .ref-summary.ref-summary-team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ref-summary-team .ref-stat:nth-child(4) { border-left-color: #2273b8; }
.ref-summary-team .ref-stat:nth-child(5) { border-left-color: #d54853; }
.ref-summary-team .ref-stat:nth-child(6) { border-left-color: #24995f; }
