@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;
  --soft: #f8fafc;
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --warn: #f59e0b;
  --bad: #ef4444;
  --bad-bg: #fee2e2;
  --unknown: #94a3b8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

a { color: inherit; text-decoration: none; }

.topbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 42px 20px 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.eyebrow {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

h1, h2, h3, p { margin: 0; }

h1 {
  font-size: clamp(32px, 5vw, 50px);
  letter-spacing: -0.055em;
  line-height: .96;
}

.title-desc { color: var(--muted); margin-top: 10px; }

.top-actions {
  color: var(--muted);
  font-size: 14px;
  padding-top: 12px;
  white-space: nowrap;
  display: flex;
  gap: 14px;
  align-items: center;
}

.lang-link, .back-link {
  color: var(--text);
  font-weight: 800;
}

.back-link { display: inline-block; margin-bottom: 14px; }

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px 42px;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: none;
}

.hero {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
}

.hero-status { display: flex; gap: 18px; align-items: center; }

.hero h2 {
  font-size: 24px;
  letter-spacing: -0.035em;
  margin-bottom: 6px;
}

.hero p, .section-head p {
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  flex: 0 0 auto;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: 13px;
  background: #fff;
  border-radius: 999px;
}

.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 8px var(--ok-bg); }
.status-dot.bad { background: var(--bad); box-shadow: 0 0 0 8px var(--bad-bg); }
.status-dot.unknown { background: var(--unknown); box-shadow: 0 0 0 8px var(--soft); }

.hero-metric { text-align: right; min-width: 160px; }
.hero-metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}
.hero-metric strong { font-size: 30px; letter-spacing: -0.04em; }

.service-section {
  margin-bottom: 18px;
  padding: 24px;
}

.section-head { margin-bottom: 18px; }
.section-head h2 {
  font-size: 21px;
  letter-spacing: -0.035em;
  margin-bottom: 5px;
}

.service-list { display: grid; gap: 12px; }

.service-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr 150px 54px;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.service-row:hover {
  transform: none;
  box-shadow: none;
}

.service-main { display: flex; gap: 12px; align-items: center; }

.small-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  margin: 0;
}

.small-dot.ok, .ok { color: var(--ok); }
.small-dot.ok { background: var(--ok); }
.small-dot.bad, .bad { color: var(--bad); }
.small-dot.bad { background: var(--bad); }
.small-dot.unknown, .unknown { color: var(--unknown); }
.small-dot.unknown { background: var(--unknown); }

.service-name { font-weight: 800; letter-spacing: -0.02em; }
.service-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }

.service-meta { text-align: right; }
.service-meta strong { display: block; font-size: 14px; margin-bottom: 3px; }
.service-meta span { color: var(--muted); font-size: 13px; }

.history-bars {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 3px;
  height: 28px;
  align-items: end;
}
.history-bars span {
  height: 24px;
  border-radius: 5px;
  background: #e2e8f0;
}
.history-bars span.ok { background: var(--ok); }
.history-bars span.warn { background: var(--warn); }
.history-bars span.bad { background: var(--bad); }

.service-arrow {
  justify-self: end;
  align-self: center;
  width: 42px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #0f172a;
  opacity: .52;
  transition: opacity .18s ease, transform .18s ease;
}

.service-arrow svg {
  width: 30px;
  height: 20px;
  overflow: visible;
}
.service-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-row:hover .service-arrow {
  opacity: 1;
  transform: translateX(3px) scale(1.18);
}

.detail-card {
  padding: 28px;
  margin-bottom: 18px;
}

.detail-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: none;
  padding: 18px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.metric-card strong {
  font-size: 26px;
  letter-spacing: -0.045em;
}

.check-list { display: grid; gap: 8px; }

.check-row {
  display: grid;
  grid-template-columns: 130px 90px 1fr 180px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  font-size: 13px;
}

.check-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.check-msg {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted { color: var(--muted); }

.empty-state {
  padding: 26px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.incident-card,
.page > .card:not(.hero):not(.service-section):not(.detail-card) {
  padding: 24px;
  margin-bottom: 18px;
}

.footer {
  color: var(--muted);
  text-align: center;
  padding: 0 22px 38px;
  font-size: 13px;
}

.install-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.install-card {
  width: min(720px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: none;
  padding: 32px;
}

.install-brand {
  color: var(--ok);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 10px;
}

.install-card h1 { font-size: 34px; margin-bottom: 10px; }
.install-card h2 { font-size: 18px; margin: 24px 0 12px; }

.install-form { margin-top: 22px; display: grid; gap: 12px; }

.install-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.install-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.install-form input:focus {
  outline: 3px solid rgba(34, 197, 94, .16);
  border-color: rgba(22, 163, 74, .55);
}

.install-form button {
  margin-top: 12px;
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  font: inherit;
  font-weight: 900;
  background: var(--text);
  color: #fff;
  cursor: pointer;
}

.alert {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
}
.alert.error { background: var(--bad-bg); color: #991b1b; }

@media (max-width: 860px) {
  .topbar, .hero, .detail-top { flex-direction: column; }
  .top-actions { align-items: flex-start; }
  .hero-metric, .service-meta { text-align: left; }
  .service-row { grid-template-columns: 1fr 44px; }
  .service-history, .service-meta { grid-column: 1 / -1; }
  .service-arrow { grid-column: 2; grid-row: 1; }
  .metric-grid { grid-template-columns: 1fr; }
  .check-row { grid-template-columns: 1fr; }
}
