/* ============================================================
   status.babadigital.com.tr — panel temasıyla bire bir uyumlu
   ============================================================ */

:root {
    --bg:           #0b1220;
    --panel:        #0f172a;
    --muted:        #94a3b8;
    --text:         #e5e7eb;
    --label:        #64748b;
    --accent:       #22c55e;
    --accent-rgb:   34,197,94;
    --sky-rgb:      56,189,248;
    --amber-rgb:    245,158,11;
    --rose-rgb:     244,63,94;
    --violet-rgb:   167,139,250;
    --shadow:       rgba(0,0,0,.35);
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.20) rgba(0,0,0,.25); }
*::-webkit-scrollbar       { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: rgba(0,0,0,.25); border-radius: 999px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28); }

html, body { height: 100%; margin: 0; }
body {
    font: 14px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(900px 420px at 20% -10%, rgba(var(--sky-rgb),.18), transparent 60%),
        radial-gradient(700px 380px at 90% 10%, rgba(var(--violet-rgb),.14), transparent 55%),
        radial-gradient(700px 380px at 50% 110%, rgba(var(--accent-rgb),.12), transparent 55%),
        linear-gradient(180deg, #0b1220 0%, #0a0f1a 100%);
    overflow-x: hidden;
}
a { color: rgb(var(--sky-rgb)); text-decoration: none; }
a:hover { text-decoration: underline; }

.sp-wrap { max-width: 960px; margin: 0 auto; padding: 60px 18px 90px; }

/* ── Header (sabit üst) ─────────────────────────────────── */
.sp-header {
    position: fixed;
    left: 0; right: 0; top: 0;
    z-index: 50;
    padding: 10px 24px;
    background: rgba(11,18,32,.78);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
}
.sp-brand        { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sp-brand img    { height: 24px; width: auto; }
.sp-brand h1     {
    margin: 0; font-size: 14px; font-weight: 600;
    color: #f1f5f9; letter-spacing: -.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-baglanti {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--muted);
}
.sp-dot {
    width: 9px; height: 9px; border-radius: 50%;
    display: inline-block;
}
.sp-dot-ok      { background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,.6); }
.sp-dot-warn    { background: #fcd34d; box-shadow: 0 0 8px rgba(252,211,77,.6); }
.sp-dot-err     { background: #f87171; box-shadow: 0 0 8px rgba(248,113,113,.6); animation: sp-pulse 1.4s ease-in-out infinite; }
.sp-dot-unknown { background: var(--muted); }

@keyframes sp-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ── Genel durum banner ──────────────────────────── */
.sp-banner {
    display: flex; align-items: center; gap: 18px;
    padding: 22px 24px;
    border-radius: 14px;
    margin-bottom: 22px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(15,23,42,.62);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 50px var(--shadow);
    transition: border-color .25s, background .25s;
}
.sp-banner-ikon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 22px;
    flex-shrink: 0;
}
.sp-banner-metin   { flex: 1; }
.sp-banner-baslik  { font-size: 18px; font-weight: 700; margin-bottom: 3px; color: #f1f5f9; }
.sp-banner-alt     { font-size: 12px; color: var(--muted); }

.sp-banner-ok       { background: rgba(34,197,94,.08);  border-color: rgba(34,197,94,.35); }
.sp-banner-ok       .sp-banner-ikon { background: rgba(34,197,94,.18); color: #4ade80; }
.sp-banner-ok       .sp-banner-baslik { color: #4ade80; }

.sp-banner-warn     { background: rgba(251,191,36,.07); border-color: rgba(251,191,36,.4); }
.sp-banner-warn     .sp-banner-ikon { background: rgba(251,191,36,.18); color: #fcd34d; }
.sp-banner-warn     .sp-banner-baslik { color: #fcd34d; }

.sp-banner-err      { background: rgba(239,68,68,.08);  border-color: rgba(239,68,68,.4); }
.sp-banner-err      .sp-banner-ikon { background: rgba(239,68,68,.18); color: #f87171; }
.sp-banner-err      .sp-banner-baslik { color: #f87171; }

.sp-banner-loading  { background: rgba(15,23,42,.55);   border-color: rgba(255,255,255,.08); }
.sp-banner-loading  .sp-banner-ikon { background: rgba(255,255,255,.05); color: var(--muted); }
.sp-banner-loading  .sp-banner-ikon i { animation: sp-spin 1s linear infinite; }

@keyframes sp-spin { to { transform: rotate(360deg); } }

/* ── Platform kartları ──────────────────────────────────── */
.sp-platform {
    background: rgba(15,23,42,.55);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    backdrop-filter: blur(8px);
}
.sp-platform-baslik {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.02);
    cursor: pointer;
    transition: background .15s;
}
.sp-platform-baslik:hover { background: rgba(255,255,255,.04); }
.sp-platform-logo {
    width: 32px; height: 32px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: rgba(var(--sky-rgb),.18);
    color: rgb(var(--sky-rgb));
    font-size: 14px; font-weight: 700;
    overflow: hidden;
}
.sp-platform-logo-img {
    background: rgba(255,255,255,.04);
    padding: 2px;
}
.sp-platform-logo img {
    width: 100%; height: 100%; object-fit: contain;
    display: block;
}
.sp-platform-ad {
    flex: 1; font-weight: 600; font-size: 14px; color: #f1f5f9;
    display: flex; flex-direction: column; gap: 2px;
}
.sp-platform-sayi {
    font-size: 11px; font-weight: 500;
    color: var(--muted);
    letter-spacing: .02em;
}
.sp-platform-ok {
    color: var(--muted);
    font-size: 11px;
    transition: transform .25s;
    opacity: .55;
}
.sp-platform.acik .sp-platform-ok {
    transform: rotate(-180deg);
    opacity: .9;
}

/* Platform detay (default görünür) */
.sp-platform-detay {
    padding: 13px 18px;
    background: rgba(255,255,255,.02);
    border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: 12.5px;
}
.sp-platform:last-child > .sp-platform-detay { border-bottom: none; }
.sp-platform-detay-tanim {
    color: #cbd5e1;
    margin-bottom: 8px;
    line-height: 1.5;
}
.sp-platform-detay-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
    color: var(--muted);
    font-size: 11.5px;
}
.sp-platform-detay-meta a {
    color: rgb(var(--sky-rgb));
    text-decoration: none;
}
.sp-platform-detay-meta a:hover { text-decoration: underline; }
.sp-platform-detay-meta .fa { margin-right: 4px; opacity: .7; }
.sp-platform-detay-bos {
    opacity: .4; font-size: 11px; font-style: italic;
}

.sp-platform.acik .sp-platform-detay {
    border-bottom: 1px solid rgba(255,255,255,.07);
}

/* Platform durum rozeti */
.sp-platform-durum {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: 5px;
    letter-spacing: .02em;
}
.sp-platform-durum-ok       { background: rgba(34,197,94,.15);  border: 1px solid rgba(34,197,94,.4);  color: #4ade80; }
.sp-platform-durum-warn     { background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.35); color: #fcd34d; }
.sp-platform-durum-err      { background: rgba(239,68,68,.13);  border: 1px solid rgba(239,68,68,.35);  color: #f87171; }
.sp-platform-durum-info     { background: rgba(56,189,248,.13); border: 1px solid rgba(56,189,248,.4);  color: #38bdf8; }
.sp-platform-durum-unknown  { background: rgba(148,163,184,.12); border: 1px solid rgba(148,163,184,.3); color: var(--muted); }

/* ── Servis satırı ──────────────────────────────────────── */
.sp-servis-liste { padding: 2px 0; }
.sp-servis {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 18px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    font-size: 13px;
}
.sp-servis:last-child { border-bottom: none; }

.sp-servis-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sp-servis-dot-ok       { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,.7); }
.sp-servis-dot-warn     { background: #fcd34d; box-shadow: 0 0 6px rgba(252,211,77,.7); }
.sp-servis-dot-err      { background: #f87171; box-shadow: 0 0 6px rgba(248,113,113,.7); animation: sp-pulse 1.4s ease-in-out infinite; }
.sp-servis-dot-info     { background: #38bdf8; box-shadow: 0 0 6px rgba(56,189,248,.7); }
.sp-servis-dot-unknown  { background: var(--muted); }

.sp-servis-ad {
    flex: 1; font-weight: 500; color: #e2e8f0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-servis-surum {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 3px;
    background: rgba(34,197,94,.15);
    border: 1px solid rgba(74,222,128,.4);
    color: #4ade80;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .02em;
    vertical-align: middle;
}
.sp-servis-detay {
    font-size: 11px; color: var(--muted);
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.sp-servis-durum-text {
    font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: 5px;
    min-width: 82px; text-align: center;
}
.sp-servis-durum-text-ok       { background: rgba(34,197,94,.15);  border: 1px solid rgba(34,197,94,.4);  color: #4ade80; }
.sp-servis-durum-text-warn     { background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.35); color: #fcd34d; }
.sp-servis-durum-text-err      { background: rgba(239,68,68,.13);  border: 1px solid rgba(239,68,68,.35);  color: #f87171; }
.sp-servis-durum-text-info     { background: rgba(56,189,248,.13); border: 1px solid rgba(56,189,248,.4);  color: #38bdf8; }
.sp-servis-durum-text-unknown  { background: rgba(148,163,184,.12); border: 1px solid rgba(148,163,184,.3); color: var(--muted); }

/* ── Duyurular (bakım / incident / bilgi) ───────────────── */
.sp-duyuru-liste {
    padding: 10px 18px;
    display: flex; flex-direction: column; gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.sp-duyuru {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    border: 1px solid;
}
.sp-duyuru-icon {
    flex-shrink: 0;
    font-size: 15px;
    margin-top: 1px;
}
.sp-duyuru-metin   { flex: 1; min-width: 0; }
.sp-duyuru-baslik  {
    font-weight: 600;
    margin-bottom: 3px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.sp-duyuru-tip {
    display: inline-block;
    font-size: 10px; font-weight: 700;
    padding: 1px 7px; border-radius: 3px;
    letter-spacing: .04em; text-transform: uppercase;
}
.sp-duyuru-icerik {
    color: #cbd5e1; font-size: 12px; line-height: 1.5;
    margin-bottom: 3px;
}
.sp-duyuru-zaman {
    font-size: 10.5px; opacity: .65;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* Tip renkleri (info/warn/err) */
.sp-duyuru-info {
    background: rgba(56,189,248,.08);  border-color: rgba(56,189,248,.35);
}
.sp-duyuru-info .sp-duyuru-icon, .sp-duyuru-info .sp-duyuru-baslik { color: #38bdf8; }
.sp-duyuru-info .sp-duyuru-tip  { background: rgba(56,189,248,.18); color: #38bdf8; }

.sp-duyuru-warn {
    background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.4);
}
.sp-duyuru-warn .sp-duyuru-icon, .sp-duyuru-warn .sp-duyuru-baslik { color: #fcd34d; }
.sp-duyuru-warn .sp-duyuru-tip  { background: rgba(251,191,36,.2); color: #fcd34d; }

.sp-duyuru-err {
    background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.4);
}
.sp-duyuru-err .sp-duyuru-icon, .sp-duyuru-err .sp-duyuru-baslik { color: #f87171; }
.sp-duyuru-err .sp-duyuru-tip   { background: rgba(239,68,68,.2); color: #f87171; }

/* Servis satırında küçük bakım/olay rozeti */
.sp-servis-bakim {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 10px; font-weight: 700;
    letter-spacing: .02em;
    vertical-align: middle;
}
.sp-servis-bakim .fa { margin-right: 3px; }
.sp-servis-bakim-warn { background: rgba(251,191,36,.18); border: 1px solid rgba(251,191,36,.4); color: #fcd34d; }
.sp-servis-bakim-err  { background: rgba(239,68,68,.18);  border: 1px solid rgba(239,68,68,.4);  color: #f87171; animation: sp-pulse 1.4s ease-in-out infinite; }

/* ── Refresh nokta — fetch sırasında yanıp söner ────────── */
.sp-refresh-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    margin-right: 8px;
    vertical-align: middle;
    transition: background .2s, box-shadow .2s;
}
.sp-refresh-dot.yenileniyor {
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74,222,128,.85);
    animation: sp-refresh-pulse .7s ease-in-out infinite;
}
@keyframes sp-refresh-pulse {
    0%, 100% { opacity: 1;    transform: scale(1.15); box-shadow: 0 0 12px rgba(74,222,128,.95); }
    50%      { opacity: .25;  transform: scale(.55);  box-shadow: 0 0 4px  rgba(74,222,128,.40); }
}

/* ── Footer (sabit alt) ────────────────────────────────── */
.sp-footer {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    padding: 12px 24px;
    background: rgba(11,18,32,.78);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11.5px;
    color: var(--label);
    flex-wrap: wrap; gap: 12px;
}
.sp-footer-sep { opacity: .4; margin: 0 6px; }
.sp-footer a   { color: var(--muted); }
.sp-footer a:hover { color: rgb(var(--sky-rgb)); }

/* ── Yükleniyor ─────────────────────────────────────────── */
.sp-yukleniyor {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 44px 20px;
    color: var(--muted);
    font-size: 13px;
}
.sp-spin {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.12);
    border-top-color: rgb(var(--sky-rgb));
    border-radius: 50%;
    animation: sp-spin .8s linear infinite;
}

/* ── 90 Günlük Uptime Çubukları + Özet ──────────────────── */
.sp-cubuk-row {
    display: flex;
    gap: 10px;
    padding: 4px 18px 12px;
    align-items: center;
    min-height: 30px;
}
.sp-cubuk-row.dar { padding: 4px 14px 10px; }
.sp-cubuk-wrap {
    flex: 1;
    display: flex;
    gap: 2px;
    align-items: flex-end;
}
.sp-90gun-ozet {
    flex-shrink: 0;
    font-size: 11px;
    text-align: right;
    line-height: 1.2;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    cursor: default;
}
.sp-90gun-ozet b { font-weight: 700; }
.sp-platform-uptime { margin-right: 4px; }
.sp-platform-uptime b { margin-right: 4px; }
.sp-platform-uptime .sp-90gun-label { display: inline; font-size: 9.5px; margin-left: 2px; }
.sp-90gun-ozet .sp-90gun-label {
    display: block;
    font-size: 9px;
    opacity: .65;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: .03em;
}
.sp-90gun-ozet-ok   { background: rgba(34,197,94,.12);  border: 1px solid rgba(34,197,94,.3);  color: #4ade80; }
.sp-90gun-ozet-warn { background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.3); color: #fcd34d; }
.sp-90gun-ozet-err  { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.3);  color: #f87171; }

.sp-cubuk {
    flex: 1;
    min-width: 2px;
    /* max-width yok → 30/60/90 ne olursa olsun tüm satırı eşit doldurur */
    height: 20px;
    border-radius: 2px;
    background: rgba(255,255,255,.06);
    transition: transform .12s, filter .12s;
    cursor: default;
}
.sp-cubuk:hover { transform: scaleY(1.15); filter: brightness(1.2); }

.sp-cubuk-ok        { background: #4ade80; }
.sp-cubuk-degraded  { background: #fcd34d; }
.sp-cubuk-down      { background: #f87171; }
.sp-cubuk-yok       { background: rgba(255,255,255,.05); }

.sp-cubuk-legend {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 18px 6px;
    font-size: 10px; color: var(--label);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .sp-wrap          { padding: 52px 12px 70px; }
    .sp-header        { padding: 8px 12px; gap: 6px; }
    .sp-brand h1      { font-size: 12.5px; }
    .sp-baglanti      { font-size: 11px; }
    .sp-banner        { padding: 16px 18px; gap: 12px; }
    .sp-banner-ikon   { width: 40px; height: 40px; font-size: 18px; }
    .sp-banner-baslik { font-size: 16px; }
    .sp-servis        { padding: 10px 14px; flex-wrap: wrap; }
    .sp-servis-detay  { font-size: 10px; }
    .sp-footer        { flex-direction: column; align-items: flex-start; padding: 10px 12px; }

    /* 90/30 gün çubuklar — mobil hizalama (kaymasın) */
    .sp-cubuk-row     { padding: 3px 12px 10px; gap: 6px; }
    .sp-cubuk-row.dar { padding: 3px 10px 8px; }
    .sp-cubuk-wrap    { gap: 1px; }
    .sp-cubuk         { min-width: 1px; height: 16px; border-radius: 1.5px; }

    /* Platform başlığı yan badge mobilde küçülsün, satıra sığsın */
    .sp-platform-baslik { flex-wrap: wrap; padding: 12px 14px; gap: 8px; }
    .sp-platform-ad     { font-size: 13px; }
    .sp-platform-sayi   { font-size: 10.5px; }
    .sp-platform-uptime { font-size: 10px; padding: 2px 6px; }
    .sp-platform-durum  { font-size: 10px; padding: 2px 7px; }
}
