/* ===================== Site durumu ve kapsami — uygulama ici sekme (status.css, /durum) ===================== */
#viewSt { min-height: 0; }
.stp { height: 100%; display: flex; flex-direction: column; }
.stp-scroll { flex: 1; min-height: 0; overflow: auto; }

/* --- durum renkleri --- */
.stp-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.stp-dot.up { background: var(--profit); box-shadow: 0 0 0 3px var(--profit-tint); }
.stp-dot.slow { background: var(--warm); box-shadow: 0 0 0 3px var(--warm-tint); }
.stp-dot.degraded { background: var(--warm); box-shadow: 0 0 0 3px var(--warm-tint); }
.stp-dot.down { background: var(--loss); box-shadow: 0 0 0 3px var(--loss-tint); }
.stp-dot.pending { background: var(--ink-3); }

/* --- baslik ve ozet --- */
.stp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: end; padding: 16px 16px 12px; }
.stp-title { margin: 0; font-size: var(--t4); font-weight: 600; letter-spacing: -.015em; }
.stp-sub { margin: 4px 0 0; max-width: 620px; color: var(--ink-2); font-size: var(--t2); line-height: 1.5; }
.stp-stats { margin: 6px 0 0; color: var(--ink-3); font-size: var(--t1); font-variant-numeric: tabular-nums; }
/* durum sayilari: kutusuz, sade; yalniz sifirdan buyuk gecikme/sorun renklenir */
.stp-kpi { display: flex; gap: 28px; margin: 0; }
.stp-kpi div { text-align: right; }
.stp-kpi dt { color: var(--ink-3); font-size: var(--t0); white-space: nowrap; }
.stp-kpi dd { margin: 2px 0 0; font-size: var(--t4); font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stp-kpi dd.nil { color: var(--ink-3); font-weight: 500; }
.stp-kpi dd.warm { color: var(--warm); }
.stp-kpi dd.dn { color: var(--loss); }

/* --- arac cubugu --- */
.stp-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.stp-seg { display: inline-flex; padding: 2px; border-radius: var(--r-sm); background: var(--sunk); }
.stp-seg button { height: 26px; padding: 0 10px; border: 0; border-radius: calc(var(--r-sm) - 2px); background: none; color: var(--ink-3); font: 500 var(--t1) var(--font); cursor: pointer; white-space: nowrap; }
.stp-seg button:hover { color: var(--ink); }
.stp-seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); }
.stp-find { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); color: var(--ink-3); }
.stp-find .ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.stp-find input { width: 130px; border: 0; outline: 0; background: none; color: var(--ink); font: var(--t1) var(--font); }
.stp-sel { height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); color: var(--ink); font: var(--t1) var(--font); }
.stp-chk { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: var(--t1); cursor: pointer; }
.stp-find:focus-within, .stp-sel:focus-visible { outline: 2px solid var(--focus); outline-offset: -1px; }

/* --- govde --- */
.stp-body { padding: 8px 16px 0; }
.stp-empty { margin: 0; padding: 18px 0; color: var(--ink-3); font-size: var(--t1); }
.stp-foot { max-width: 760px; margin: 0; padding: 12px 16px 24px; color: var(--ink-3); font-size: var(--t0); line-height: 1.5; }

/* --- site listesi --- */
.stp-tbl { display: grid; }
.stp-r { display: grid; grid-template-columns: minmax(150px, 1.3fr) 150px 84px 56px minmax(0, 2.4fr) 112px 16px; align-items: center; gap: 0 14px; min-height: 48px; padding: 4px 6px; border-bottom: 1px solid var(--line-soft); font-size: var(--t1); }
.stp-hd { min-height: 32px; color: var(--ink-3); font-size: var(--t0); font-weight: 500; border-bottom-color: var(--line); }
.stp-r .u { display: none; }
.stp-row { cursor: pointer; }
.stp-row:hover, .stp-row.open { background: var(--hover); }
.stp-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.stp-r .num { display: grid; justify-items: end; text-align: right; font-variant-numeric: tabular-nums; }
.stp-r .num b { font-weight: 500; }
.stp-r .num em, .stp-r .c-st em { color: var(--ink-3); font-size: var(--t0); font-style: normal; white-space: nowrap; }
.stp-r .num em.live { color: var(--loss); }
.stp-r .bk { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stp-r .bk .logo { flex: none; }
/* dar sutunda ad kesilmez, iki satira iner (ulke eki "(FR)" okunur kalsin) */
.stp-r .bk b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: break-word; line-height: 1.25; font-weight: 500; }
.stp-r .c-st { display: grid; gap: 1px; }
.stp-st { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; white-space: nowrap; }
.stp-st.slow, .stp-st.degraded { color: var(--warm); }
.stp-st.down { color: var(--loss); }
.stp-st.pending { color: var(--ink-3); }
.stp-r .c-sp { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.stp-chip { display: inline-flex; gap: 4px; padding: 2px 7px; border-radius: var(--r-pill); background: var(--sunk); color: var(--ink-2); font-size: var(--t0); white-space: nowrap; }
.stp-chip b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.stp-chip.on { background: var(--action-tint); color: var(--ink); }
.stp-chip.more { color: var(--ink-3); }
.stp-r .c-x { display: grid; place-items: center; color: var(--ink-3); }
.stp-r .c-x .ic { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.stp-row.open .c-x .ic { transform: rotate(180deg); }

/* pazar gruplari: bes ince sutun, yukseklik = kapsanan mac orani */
.stp-gr { display: inline-flex; align-items: flex-end; gap: 4px; height: 22px; }
.stp-gr i { position: relative; width: 14px; height: 100%; border-radius: 2px; background: var(--sunk); overflow: hidden; }
.stp-gr i::after { content: ""; position: absolute; inset: auto 0 0; height: calc(var(--v) * 1%); background: var(--action); opacity: .85; }

/* satir detayi */
.stp-dt { padding: 12px 6px 16px; border-bottom: 1px solid var(--line-soft); background: var(--hover); }
.stp-dt-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 12px; color: var(--ink-3); font-size: var(--t1); }
.stp-dt-meta b { color: var(--ink); font-weight: 500; }
.stp-err { color: var(--loss); }
.stp-dt-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px 32px; }
.stp-dt h4 { margin: 0 0 6px; font-size: var(--t1); font-weight: 600; }
.stp-mini { width: 100%; max-width: 440px; border-collapse: collapse; font-size: var(--t1); font-variant-numeric: tabular-nums; }
.stp-mini th { color: var(--ink-3); font-size: var(--t0); font-weight: 500; text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.stp-mini td { text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--line-soft); }
.stp-mini th:first-child, .stp-mini td:first-child { text-align: left; padding-left: 0; }
.stp-gl { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; max-width: 380px; font-size: var(--t1); }
.stp-gl li { display: grid; grid-template-columns: 150px minmax(0, 1fr) 40px; align-items: center; gap: 10px; }
.stp-gl span { color: var(--ink-2); }
.stp-gl i { position: relative; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.stp-gl i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 1%); background: var(--action); }
.stp-gl b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

/* --- kapsam matrisi --- */
.stp-mx-wrap { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 4px; }
.stp-mx { border-collapse: separate; border-spacing: 0; font-size: var(--t1); font-variant-numeric: tabular-nums; }
.stp-mx th, .stp-mx td { padding: 0 8px; height: 32px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.stp-mx thead th { position: sticky; top: 0; z-index: 2; height: auto; padding: 8px; background: var(--panel); border-bottom: 1px solid var(--line); text-align: right; vertical-align: bottom; font-weight: 500; }
.stp-mx thead th span { display: block; color: var(--ink); }
.stp-mx thead th em { display: block; color: var(--ink-3); font-size: var(--t0); font-style: normal; font-weight: 400; }
.stp-mx th.bk { position: sticky; left: 0; z-index: 1; min-width: 160px; background: var(--panel); text-align: left; font-weight: 500; border-right: 1px solid var(--line); }
.stp-mx th.bk .stp-dot { margin-right: 8px; vertical-align: 1px; }
.stp-mx thead th.bk { z-index: 3; }
.stp-mx td { min-width: 64px; text-align: right; color: var(--ink); background: color-mix(in srgb, var(--action) calc(var(--k, 0) * 38%), transparent); }
.stp-mx td.z { color: var(--ink-3); background: none; text-align: center; }
.stp-mx tbody tr:hover th.bk, .stp-mx tbody tr:hover td.z { background: var(--hover); }

/* --- yukleme iskeleti --- */
.stp-sk { display: grid; }
.stp-sk-r { display: grid; grid-template-columns: 1.3fr 150px 84px 2.4fr; gap: 14px; align-items: center; height: 48px; border-bottom: 1px solid var(--line-soft); }
.stp-sk-r i { height: 10px; border-radius: 4px; background: var(--sunk); animation: stp-pulse 1.2s ease-in-out infinite; }
@keyframes stp-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .stp-sk-r i { animation: none; } .stp-r .c-x .ic { transition: none; } }

/* --- dar ekran --- */
@media (max-width: 1100px) {
  .stp-r { grid-template-columns: minmax(140px, 1.3fr) 140px 76px 50px minmax(0, 2fr) 16px; }
  .stp-r .c-gr { display: none; }
}
@media (max-width: 760px) {
  .stp-head { grid-template-columns: minmax(0, 1fr); }
  .stp-kpi { gap: 24px; }
  .stp-kpi div { text-align: left; }
  .stp-find { flex: 1; } .stp-find input { width: 100%; }
  .stp-hd { display: none; }
  /* satir kart olur: ust satirda site + durum, altta sayilar ve sporlar */
  .stp-r { grid-template-columns: minmax(0, 1fr) auto 16px; grid-template-areas: "bk st x" "num lg x" "sp sp sp"; gap: 6px 10px; padding: 10px 4px; }
  .stp-r .bk { grid-area: bk; } .stp-r .c-st { grid-area: st; justify-items: end; }
  .stp-r .num:nth-of-type(3) { grid-area: num; justify-items: start; text-align: left; display: flex; gap: 6px; align-items: baseline; }
  .stp-r .num:nth-of-type(4) { grid-area: lg; }
  .stp-r .num:nth-of-type(4) { display: flex; gap: 4px; align-items: baseline; }
  .stp-r .u { display: inline; }
  .stp-r .c-sp { grid-area: sp; } .stp-r .c-x { grid-area: x; }
  .stp-dt-grid { grid-template-columns: minmax(0, 1fr); }
  .stp-gl li { grid-template-columns: 120px minmax(0, 1fr) 40px; }
  .stp-sk-r { grid-template-columns: 1fr 80px; } .stp-sk-r i:nth-child(n+3) { display: none; }
}

/* ---------- panelin geri kalani (status.js): ust cubuk baglantisi ve secili sitede kesinti uyarisi ---------- */
.bar-ctx .bar-st { order: 9; display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 2px; color: var(--ink-3); font-size: 12px; font-weight: 500;
  font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.bar-ctx .bar-st[hidden] { display: none; }
.bar-ctx .bar-st .stp-dot { width: 6px; height: 6px; box-shadow: none; }
.bar-ctx .bar-st:hover { color: var(--ink); }
.bar-ctx .bar-st.bad { color: var(--loss); }
.bar-ctx .bar-st:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.st-note { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2); font-size: var(--t1); line-height: 1.45; }
.st-note[hidden] { display: none; }
.st-note b { color: var(--ink); font-weight: 500; }
.st-note span { flex: 1; min-width: 0; }
.st-note a { flex: none; color: var(--action); font-weight: 500; text-decoration: none; white-space: nowrap; }
.st-note a:hover { text-decoration: underline; text-underline-offset: 3px; }
.st-note-x { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--r-sm, 6px); background: none; color: var(--ink-3); cursor: pointer; }
.st-note-x:hover { background: var(--hover); color: var(--ink); }
.st-note-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 760px) { .st-note { align-items: flex-start; flex-wrap: wrap; padding: 8px 8px 8px 12px; } .st-note .stp-dot { margin-top: 6px; } }
