/* Detectline Status: koyu, sade, düz; renk yalnızca durum için. */
:root {
  color-scheme: dark;
  --bg: #0e0f13;
  --card: #16181e;
  --line: #262933;
  --line-soft: #1f2129;
  --ink: #eceef3;
  --text: #c3c6d0;
  --muted: #8f94a3;
  --faint: #6c7180;
  --dark: #eceef3;
  --dark-hover: #fff;
  --on-dark: #111318;

  --ok: #22c98f;
  --ok-soft: rgba(34, 201, 143, 0.12);
  --warn: #f2b51c;
  --warn-soft: rgba(242, 181, 28, 0.12);
  --down: #f0595e;
  --down-soft: rgba(240, 89, 94, 0.13);
  --maint: #7189f5;
  --maint-soft: rgba(113, 137, 245, 0.15);
  --none: #2a2d37;
  --disabled: #3a3e4a;

  --radius: 8px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font: 12px/1.6 var(--font);
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: inherit;
}

/* ---------- Açılış: sayfa veri gelince belirir, tepede ince ilerleme çizgisi ---------- */
.shell {
  visibility: hidden;
}

.is-ready .shell {
  visibility: visible;
  animation: reveal 0.2s ease-out;
}

@keyframes reveal {
  from {
    opacity: 0;
  }
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 0;
  height: 2.4px;
  background: var(--dark);
  animation: loading 1.6s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes loading {
  to {
    width: 85%;
  }
}

.is-ready .loading {
  animation: done 0.25s ease-out forwards;
}

@keyframes done {
  from {
    width: 85%;
  }
  to {
    width: 100%;
    opacity: 0;
  }
}

/* ---------- Yerleşim ---------- */
.shell {
  width: 100%;
  max-width: 702.4px;
  margin: 0 auto;
  padding: 36.8px 12.8px 32px;
}

main {
  display: grid;
  gap: 24px;
  margin-top: 28.8px;
}

/* ---------- Üst bar ---------- */
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12.8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 43.2px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand img {
  display: block;
  height: 18.4px;
  width: auto;
}

.visit {
  display: inline-flex;
  align-items: center;
  gap: 6.4px;
  height: 36.8px;
  padding: 0 17.6px;
  border-radius: 4.8px;
  background: var(--dark);
  color: var(--on-dark);
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.visit:hover {
  background: var(--dark-hover);
}

/* ---------- Kart ---------- */
.box {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9.6px;
  padding: 17.6px 20px;
  border-bottom: 1px solid var(--line);
}

h2 {
  font-size: 15.2px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Genel durum ---------- */
.overall__band {
  display: flex;
  align-items: center;
  gap: 9.6px;
  padding: 17.6px 20px;
  background: var(--tone-soft);
}

.overall__band h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.overall__body {
  padding: 17.6px 20px;
  color: var(--text);
  font-size: 12.8px;
  line-height: 1.75;
}

.overall__incident {
  display: grid;
  gap: 11.2px;
}

.update {
  display: grid;
  gap: 2px;
}

.update__meta {
  color: var(--muted);
  font-size: 10.4px;
}

.update__meta strong {
  color: var(--ink);
  font-weight: 600;
}

/* Durum tonları */
[data-tone="operational"] {
  --tone: var(--ok);
  --tone-soft: var(--ok-soft);
}

[data-tone="degraded"] {
  --tone: var(--warn);
  --tone-soft: var(--warn-soft);
}

[data-tone="outage"] {
  --tone: var(--down);
  --tone-soft: var(--down-soft);
}

[data-tone="maintenance"] {
  --tone: var(--maint);
  --tone-soft: var(--maint-soft);
}

.dot {
  display: grid;
  flex: none;
  place-items: center;
  width: 17.6px;
  height: 17.6px;
  border-radius: 50%;
  background: var(--tone);
  color: #fff;
}

/* ---------- Tarih aralığı ---------- */
.range {
  display: flex;
  align-items: center;
  gap: 4.8px;
  color: var(--muted);
  font-size: 12.4px;
  white-space: nowrap;
}

.range__btn {
  display: grid;
  place-items: center;
  width: 22.4px;
  height: 22.4px;
  padding: 0;
  border: 0;
  border-radius: 4.8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.range__btn:hover:not(:disabled) {
  background: var(--line-soft);
  color: var(--ink);
}

.range__btn:disabled {
  color: var(--disabled);
  cursor: default;
}

/* ---------- Servisler ---------- */
.svc {
  padding: 17.6px 20px 17.6px;
}

.svc + .svc {
  border-top: 1px solid var(--line);
}

.svc__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9.6px;
}

.svc__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4.8px 8px;
  min-width: 0;
}

.svc__title {
  font-size: 13.6px;
  font-weight: 500;
}

.info {
  display: grid;
  place-items: center;
  width: 17.6px;
  height: 17.6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--faint);
  cursor: help;
}

.info:hover,
.info:focus-visible {
  color: var(--ink);
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 3.2px;
  padding: 2px 3.2px;
  border: 0;
  border-radius: 4.8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.more:hover {
  color: var(--ink);
}

.more svg {
  transition: transform 0.15s;
}

.more[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.uptime {
  flex: none;
  color: var(--text);
  font-size: 12px;
}

.bars {
  display: flex;
  gap: 2.4px;
  height: 14.4px;
  margin-top: 12.8px;
}

.bar {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--none);
  cursor: default;
}

.bar[data-s="operational"] {
  background: var(--ok);
}

.bar[data-s="degraded"] {
  background: var(--warn);
}

.bar[data-s="outage"] {
  background: var(--down);
}

.bar[data-s="maintenance"] {
  background: var(--maint);
}

.bar:hover,
.bar:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

/* Alt bileşenler */
.subs {
  margin: 14.4px 0 0;
  padding: 3.2px 0 0 14.4px;
  border-left: 2px solid var(--line-soft);
  list-style: none;
}

.sub {
  padding: 11.2px 0;
}

.sub + .sub {
  border-top: 1px solid var(--line-soft);
}

.sub .svc__title {
  font-size: 12.4px;
}

.sub .bars {
  height: 11.2px;
  margin-top: 9.6px;
}

.sub .dot {
  width: 14.4px;
  height: 14.4px;
}

/* ---------- Araç ipucu ---------- */
.tip {
  position: fixed;
  z-index: 40;
  max-width: 208px;
  padding: 6.4px 8.8px;
  border-radius: 5.6px;
  background: var(--dark);
  color: var(--on-dark);
  font-size: 10.4px;
  line-height: 1.45;
  pointer-events: none;
}

.tip strong {
  display: block;
  font-weight: 600;
}

/* ---------- Alt bilgi ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12.8px 19.2px;
  margin-top: 27.2px;
  padding-top: 22.4px;
  border-top: 1px solid var(--line);
}

.foot__brand {
  font-size: 13.6px;
  font-weight: 600;
}

.foot__brand span {
  margin-left: 4.8px;
  color: var(--faint);
  font-size: 11.2px;
  font-weight: 400;
}

.foot__tag {
  margin-top: 4.8px;
  color: var(--muted);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4.8px 16px;
}

.foot__links a {
  color: var(--muted);
  text-decoration: none;
}

.foot__links a:hover {
  color: var(--ink);
}

/* ---------- Telefon ---------- */
@media (max-width: 640px) {
  .shell {
    padding-top: 19.2px;
  }
  main {
    margin-top: 19.2px;
    gap: 16px;
  }
  .brand {
    height: 36.8px;
  }
  .brand img {
    height: 15.2px;
  }
  .visit {
    height: 33.6px;
    padding: 0 11.2px;
    font-size: 11.2px;
  }
  .box__head,
  .overall__band,
  .overall__body,
  .svc {
    padding-left: 14.4px;
    padding-right: 14.4px;
  }
  .box__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .range {
    margin-left: -4.8px;
  }
  .bars {
    gap: 2px;
  }
  /* Telefonda son 45 gün */
  .bar:nth-child(-n + 45) {
    display: none;
  }
  .svc__row {
    align-items: flex-start;
  }
}
