
:root {
  --bg: #fafafa;
  --card: #ffffff;
  --border: #e7e7e9;
  --text: #1c1c1e;
  --muted: #6e6e76;
  --radius: 12px;

  --green: #1f9d57;
  --green-bg: #e9f7ef;
  --yellow: #c8911a;
  --yellow-bg: #fbf3e0;
  --orange: #d4722b;
  --orange-bg: #fbeede;
  --red: #d23f3f;
  --red-bg: #fcebec;
  --blue: #3266c4;
  --blue-bg: #e9f0fc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* Smooth entrance when the visitor's language isn't the Turkish default. */
.container.enter > * {
  opacity: 0;
  animation: pageEnter 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.container.enter > *:nth-child(1) { animation-delay: 0.02s; }
.container.enter > *:nth-child(2) { animation-delay: 0.08s; }
.container.enter > *:nth-child(3) { animation-delay: 0.14s; }
.container.enter > *:nth-child(4) { animation-delay: 0.20s; }
.container.enter > *:nth-child(n+5) { animation-delay: 0.24s; }
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .container.enter > * { opacity: 1; animation: none; }
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.site-header h1 { font-size: 20px; font-weight: 650; margin: 0; }
.site-header .tagline { color: var(--muted); font-size: 13px; margin-top: 2px; }
.nav-link {
  font-size: 13px; font-weight: 550; color: var(--muted);
  text-decoration: none; padding: 7px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card);
}
.nav-link:hover { color: var(--text); }

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.logo { width: 32px; height: 32px; border-radius: 8px; display: block; flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 20px; font-weight: 650; line-height: 1.15; }

.lang-dropdown {
  width: auto; font: inherit; font-size: 13px; font-weight: 550; color: var(--text);
  padding: 7px 11px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); cursor: pointer;
}

.banner {
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 600;
  border: 1px solid transparent;
}
.banner .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.banner.b-operational { background: var(--green-bg); color: var(--green); }
.banner.b-operational .dot { background: var(--green); }
.banner.b-maintenance { background: var(--blue-bg); color: var(--blue); }
.banner.b-maintenance .dot { background: var(--blue); }
.banner.b-minor { background: var(--yellow-bg); color: var(--yellow); }
.banner.b-minor .dot { background: var(--yellow); }
.banner.b-major { background: var(--orange-bg); color: var(--orange); }
.banner.b-major .dot { background: var(--orange); }
.banner.b-critical { background: var(--red-bg); color: var(--red); }
.banner.b-critical .dot { background: var(--red); }

.section-title {
  font-size: 12px; font-weight: 650; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); margin: 28px 0 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.component {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.component:last-child { border-bottom: none; }
.component .name { font-weight: 550; }
.component .desc { color: var(--muted); font-size: 13px; margin-top: 1px; }

.group-card { margin-bottom: 16px; }
.group-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #f4f4f5;
}
.group-name { font-weight: 650; font-size: 14px; }
.group-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }

.component-block {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.component-block:last-child { border-bottom: none; }
.component-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.component-top .name { font-weight: 700; font-size: 15px; }
.component-top .desc { color: var(--muted); font-size: 13px; margin-top: 2px; }

.uptime-bars {
  display: flex; gap: 2px; align-items: stretch;
  height: 34px;
}
.uptime-bars .bar {
  flex: 1 1 0; min-width: 0; border-radius: 2px;
  background: var(--green); opacity: 0.9;
  transition: opacity .12s; cursor: pointer;
}
.uptime-bars .bar:hover { opacity: 1; }
.uptime-bars .bar.s-operational { background: var(--green); }
.uptime-bars .bar.s-degraded_performance { background: var(--yellow); }
.uptime-bars .bar.s-partial_outage { background: var(--orange); }
.uptime-bars .bar.s-major_outage { background: var(--red); }
.uptime-bars .bar.s-maintenance { background: var(--blue); }

.uptime-legend {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 7px; color: var(--muted); font-size: 12px;
}
.uptime-legend .uptime-pct { font-weight: 600; color: var(--text); }

.bar-tip {
  position: absolute; z-index: 60; pointer-events: none;
  background: #1c1c1e; color: #fff; border-radius: 10px;
  padding: 10px 12px; max-width: 280px;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  font-size: 13px; line-height: 1.4;
}
.bar-tip-date { color: #9a9aa2; font-size: 12px; margin-bottom: 5px; }
.bar-tip-row { display: flex; align-items: flex-start; gap: 8px; font-weight: 550; }
.bar-tip-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; }
.bar-tip-dot.s-operational { background: var(--green); }
.bar-tip-dot.s-degraded_performance { background: var(--yellow); }
.bar-tip-dot.s-partial_outage { background: var(--orange); }
.bar-tip-dot.s-major_outage { background: var(--red); }
.bar-tip-dot.s-maintenance { background: var(--blue); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.s-operational { background: var(--green-bg); color: var(--green); }
.s-operational .dot { background: var(--green); }
.s-degraded_performance { background: var(--yellow-bg); color: var(--yellow); }
.s-degraded_performance .dot { background: var(--yellow); }
.s-partial_outage { background: var(--orange-bg); color: var(--orange); }
.s-partial_outage .dot { background: var(--orange); }
.s-major_outage { background: var(--red-bg); color: var(--red); }
.s-major_outage .dot { background: var(--red); }
.s-maintenance { background: var(--blue-bg); color: var(--blue); }
.s-maintenance .dot { background: var(--blue); }

.incident {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.incident.i-critical { border-left-color: var(--red); }
.incident.i-major { border-left-color: var(--orange); }
.incident.i-minor { border-left-color: var(--yellow); }
.incident.i-maintenance { border-left-color: var(--blue); }

.incident-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 4px;
}
.incident-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.incident-head a { text-decoration: none; }
.incident-head a:hover h3 { text-decoration: underline; }
.incident-meta { color: var(--muted); font-size: 12px; margin-bottom: 12px; }

.update { padding: 10px 0; border-top: 1px solid var(--border); }
.update:first-of-type { border-top: none; }
.update .label { font-weight: 600; font-size: 13px; }
.update .body { margin: 3px 0; white-space: pre-wrap; }
.update .time { color: var(--muted); font-size: 12px; }

.affected { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.affected .tag {
  font-size: 11px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px;
}

.empty { color: var(--muted); padding: 18px; text-align: center; }

.pager { display: flex; justify-content: space-between; margin-top: 20px; }
.pager a, .pager span {
  font-size: 13px; font-weight: 550; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  text-decoration: none;
}
.pager span { color: var(--muted); opacity: 0.5; }

.footer {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.footer-nav { display: flex; align-items: center; gap: 14px; }
.footer-nav a {
  font-size: 13px; font-weight: 550; color: var(--muted); text-decoration: none;
}
.footer-nav a:hover { color: var(--text); }
.footer-support {
  color: var(--muted); font-size: 12px; text-align: center; max-width: 480px;
  line-height: 1.5;
}
.footer-support a { color: var(--text); font-weight: 550; text-decoration: none; }
.footer-support a:hover { text-decoration: underline; }
.footer-meta { color: var(--muted); font-size: 12px; }

/* ---------- Admin ---------- */
.admin-bar {
  display: flex; gap: 16px; align-items: center; margin-bottom: 24px;
  font-size: 13px;
}
.admin-bar a { color: var(--muted); text-decoration: none; font-weight: 550; }
.admin-bar a:hover { color: var(--text); }
.admin-bar .spacer { flex: 1; }

label { display: block; font-size: 13px; font-weight: 550; margin: 14px 0 5px; }
input[type=text], textarea, select {
  width: 100%; padding: 9px 11px; font: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
}
textarea { min-height: 90px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.checks label {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  font-weight: 450; border: 1px solid var(--border); padding: 7px 11px; border-radius: 8px;
}
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--text);
  background: var(--text); color: #fff; cursor: pointer; text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.secondary { background: var(--card); color: var(--text); border-color: var(--border); }
.btn.danger { background: var(--card); color: var(--red); border-color: var(--red-bg); }
.btn.small { padding: 6px 11px; font-size: 13px; }

.admin-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.admin-form h2 { margin: 0 0 4px; font-size: 16px; }
.admin-actions { margin-top: 18px; display: flex; gap: 10px; align-items: center; }
.inline-form { display: inline; }
