/* Sistem Durumu sayfası (01.12.2026) - yalnızca /sistem-durumu'da yüklenir (header.tpl).
   Şablon: pages/sistem-durumu.tpl, etkileşim: js/sistem-durumu.js.
   CSS paketlerine (sm-bundle-*, purged) dahil DEĞİLDİR; bu dosyayı düzenlemek onları bozmaz. */

.sm-st {
  --st-navy: #001841;
  --st-teal: #00c9b7;
  --st-text: #1e293b;
  --st-muted: #64748b;
  --st-line: #e2e8f0;
  --st-bg: #f5f7fb;
  --st-ok: #16a34a;
  --st-degraded: #eab308;
  --st-partial: #f97316;
  --st-outage: #dc2626;
  --st-maintenance: #3b82f6;
  --st-nodata: #cbd5e1;
  background: var(--st-bg);
  color: var(--st-text);
  padding-bottom: 64px;
}
.sm-st h1, .sm-st h2, .sm-st h3 { color: var(--st-navy); margin: 0; }

/* --- Başlık --- */
.sm-st-hero {
  background: radial-gradient(1200px 400px at 85% -10%, rgba(0, 201, 183, .25), transparent 60%), var(--st-navy);
  color: #fff;
  padding: 56px 0 110px;
}
.sm-st-hero .sm-st-title { color: #fff; font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.02em; margin: 14px 0 10px; }
.sm-st-lead { color: rgba(255, 255, 255, .78); font-size: 17px; max-width: 640px; margin: 0; }
.sm-st-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--st-teal);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  padding: 7px 14px; border-radius: 999px;
}

/* Yanıp sönen nokta (sayfa ve header ortak görünüm) */
.sm-st-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--st-ok); flex: none; }
.sm-st-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: inherit; opacity: .45; animation: sm-st-ping 1.6s ease-out infinite; }
.sm-st-dot--maintenance { background: var(--st-maintenance); }
.sm-st-dot--degraded { background: var(--st-degraded); }
.sm-st-dot--partial { background: var(--st-partial); }
.sm-st-dot--outage { background: var(--st-outage); }
@keyframes sm-st-ping { 0% { transform: scale(.6); opacity: .55; } 80%, 100% { transform: scale(2); opacity: 0; } }

.sm-st-body { margin-top: -72px; position: relative; }

/* --- Genel durum bandı --- */
.sm-st-banner {
  background: #fff; border-radius: 18px; padding: 26px 28px;
  box-shadow: 0 18px 50px rgba(0, 24, 65, .10);
  border-top: 5px solid var(--st-ok);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.sm-st-banner--maintenance { border-top-color: var(--st-maintenance); }
.sm-st-banner--degraded { border-top-color: var(--st-degraded); }
.sm-st-banner--partial { border-top-color: var(--st-partial); }
.sm-st-banner--outage { border-top-color: var(--st-outage); }
.sm-st-banner__main { display: flex; gap: 18px; align-items: flex-start; }
.sm-st-banner__icon {
  width: 54px; height: 54px; border-radius: 14px; flex: none;
  display: grid; place-items: center; color: #fff; background: var(--st-ok);
  box-shadow: 0 8px 20px rgba(22, 163, 74, .3);
}
.sm-st-banner--maintenance .sm-st-banner__icon { background: var(--st-maintenance); box-shadow: 0 8px 20px rgba(59, 130, 246, .3); }
.sm-st-banner--degraded .sm-st-banner__icon { background: var(--st-degraded); box-shadow: 0 8px 20px rgba(234, 179, 8, .3); }
.sm-st-banner--partial .sm-st-banner__icon { background: var(--st-partial); box-shadow: 0 8px 20px rgba(249, 115, 22, .3); }
.sm-st-banner--outage .sm-st-banner__icon { background: var(--st-outage); box-shadow: 0 8px 20px rgba(220, 38, 38, .3); }
.sm-st-banner__title { font-size: 22px; font-weight: 800; }
.sm-st-banner__text { margin: 6px 0 0; color: var(--st-muted); }
.sm-st-banner__meta { margin: 8px 0 0; font-size: 13px; color: var(--st-muted); }
.sm-st-stats { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 10px; margin: 0; }
.sm-st-stats > div { background: var(--st-bg); border: 1px solid var(--st-line); border-radius: 12px; padding: 12px 14px; }
.sm-st-stats dt { font-size: 12px; font-weight: 600; color: var(--st-muted); }
.sm-st-stats dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; color: var(--st-navy); font-variant-numeric: tabular-nums; }

/* --- Etiketler --- */
.sm-st-pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 12px; font-weight: 700; line-height: 1; padding: 6px 10px; border-radius: 999px;
  color: var(--st-ok); background: rgba(22, 163, 74, .1);
}
.sm-st-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sm-st-pill--maintenance { color: #2563eb; background: rgba(59, 130, 246, .1); }
.sm-st-pill--degraded { color: #a16207; background: rgba(234, 179, 8, .14); }
.sm-st-pill--partial { color: #c2410c; background: rgba(249, 115, 22, .12); }
.sm-st-pill--outage { color: var(--st-outage); background: rgba(220, 38, 38, .1); }
.sm-st-pill--done { color: var(--st-muted); background: #eef2f7; }

/* --- Devam eden olaylar --- */
.sm-st-now { display: grid; gap: 12px; margin-top: 18px; }
.sm-st-event { background: #fff; border-radius: 14px; padding: 18px 20px; border-left: 5px solid var(--st-maintenance); box-shadow: 0 6px 20px rgba(0, 24, 65, .06); }
.sm-st-event--degraded { border-left-color: var(--st-degraded); }
.sm-st-event--partial { border-left-color: var(--st-partial); }
.sm-st-event--outage { border-left-color: var(--st-outage); }
.sm-st-event__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sm-st-event__head h3 { font-size: 17px; font-weight: 700; }
.sm-st-event__meta { margin: 8px 0 0; font-size: 13px; color: var(--st-muted); }
.sm-st-event__text { margin: 8px 0 0; font-size: 14px; }

/* --- Servisler --- */
.sm-st-services, .sm-st-history { margin-top: 40px; }
.sm-st-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.sm-st-section-head h2 { font-size: 24px; font-weight: 800; }
.sm-st-toggle, .sm-st-tabs { display: inline-flex; background: #fff; border: 1px solid var(--st-line); border-radius: 999px; padding: 4px; }
.sm-st-toggle button, .sm-st-tabs button {
  border: 0; background: transparent; color: var(--st-muted); font-weight: 700; font-size: 13px;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
.sm-st-toggle button.is-active, .sm-st-tabs button.is-active { background: var(--st-navy); color: #fff; }
.sm-st-toggle button:focus-visible, .sm-st-tabs button:focus-visible, .sm-st-month select:focus-visible { outline: 2px solid var(--st-teal); outline-offset: 2px; }

.sm-st-group { background: #fff; border: 1px solid var(--st-line); border-radius: 16px; padding: 6px 20px 14px; margin-bottom: 16px; }
.sm-st-group__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0 10px; border-bottom: 1px solid var(--st-line); }
.sm-st-group__head h3 { font-size: 17px; font-weight: 800; }
.sm-st-list { list-style: none; margin: 0; padding: 0; }
.sm-st-item { padding: 14px 0; border-bottom: 1px dashed var(--st-line); }
.sm-st-item:last-child { border-bottom: 0; }
.sm-st-item__top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sm-st-item__name { font-weight: 700; color: var(--st-navy); margin-right: auto; }
.sm-st-item__pct { font-size: 13px; font-weight: 700; color: var(--st-muted); min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }

.sm-st-bars { display: flex; gap: 2px; height: 34px; }
.sm-st-bar { flex: 1 1 0; min-width: 0; border-radius: 3px; background: var(--st-ok); transition: transform .15s ease, opacity .15s ease; }
.sm-st-bars .sm-st-bar:hover { transform: scaleY(1.12); opacity: .85; }
.sm-st-bar--maintenance { background: var(--st-maintenance); }
.sm-st-bar--degraded { background: var(--st-degraded); }
.sm-st-bar--partial { background: var(--st-partial); }
.sm-st-bar--outage { background: var(--st-outage); }
.sm-st-bar--nodata { background: var(--st-nodata); }
.sm-st[data-range="30"] .sm-st-bars .sm-st-bar:nth-child(-n+60) { display: none; }

.sm-st-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--st-muted); padding-top: 4px; }
.sm-st-axis__d30 { display: none; }
.sm-st[data-range="30"] .sm-st-axis__d90 { display: none; }
.sm-st[data-range="30"] .sm-st-axis__d30 { display: inline; }

.sm-st-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 20px; padding: 0; margin: 18px 0 0; font-size: 13px; color: var(--st-muted); }
.sm-st-legend li { display: inline-flex; align-items: center; gap: 8px; }
.sm-st-legend .sm-st-bar { flex: none; width: 12px; height: 12px; }
.sm-st-note { margin: 10px 0 0; font-size: 13px; color: var(--st-muted); }

/* --- Geçmiş --- */
.sm-st-history__filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sm-st-month select {
  border: 1px solid var(--st-line); border-radius: 999px; background: #fff; color: var(--st-navy);
  font-weight: 700; font-size: 13px; padding: 8px 14px; cursor: pointer;
}
.sm-st-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sm-st-hitem { display: flex; gap: 14px; background: #fff; border: 1px solid var(--st-line); border-radius: 14px; padding: 16px 18px; }
.sm-st-hitem__mark { flex: none; width: 6px; border-radius: 6px; }
.sm-st-hitem__body { flex: 1; min-width: 0; }
.sm-st-hitem__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.sm-st-hitem__head h3 { font-size: 16px; font-weight: 700; }
.sm-st-empty {
  background: #fff; border: 1px dashed var(--st-line); border-radius: 14px;
  padding: 26px; text-align: center; color: var(--st-muted); margin: 0;
}

/* --- Destek --- */
.sm-st-help { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.sm-st-help__card {
  display: flex; gap: 14px; align-items: center; text-decoration: none !important;
  background: var(--st-navy); color: #fff !important; border-radius: 16px; padding: 18px 20px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.sm-st-help__card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 24, 65, .25); }
.sm-st-help__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 201, 183, .16); color: var(--st-teal); flex: none; }
.sm-st-help__card strong { display: block; font-size: 15px; }
.sm-st-help__card small { display: block; color: rgba(255, 255, 255, .7); font-size: 13px; margin-top: 2px; }

/* --- Duyarlı --- */
@media (max-width: 991.98px) {
  .sm-st-banner { grid-template-columns: 1fr; }
  .sm-st-stats { grid-template-columns: repeat(2, 1fr); }
  .sm-st-help { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .sm-st-hero { padding: 36px 0 96px; }
  .sm-st-lead { font-size: 15px; }
  .sm-st-banner { padding: 20px 18px; border-radius: 16px; }
  .sm-st-banner__icon { width: 44px; height: 44px; }
  .sm-st-banner__title { font-size: 19px; }
  .sm-st-stats dd { font-size: 19px; }
  .sm-st-group { padding: 4px 14px 12px; }
  .sm-st-item__top { flex-wrap: wrap; row-gap: 6px; }
  .sm-st-item__name { flex: 1 0 100%; }
  .sm-st-item__pct { margin-left: auto; }
  .sm-st-bars { height: 28px; }
  /* Telefonda 90 çubuk sığmaz: her zaman son 30 gün */
  .sm-st-toggle { display: none; }
  .sm-st .sm-st-bars .sm-st-bar:nth-child(-n+60) { display: none; }
  .sm-st .sm-st-axis__d90 { display: none; }
  .sm-st .sm-st-axis__d30 { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .sm-st-dot::after { animation: none; }
}
