/* Ommesh Status — One Dark theme matching ommesh.ru */

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/plex-sans-cyrillic-400.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/plex-sans-cyrillic-500.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/plex-sans-cyrillic-600.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/plex-sans-cyrillic-700.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/plex-sans-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/plex-sans-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/plex-sans-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/plex-sans-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/plex-mono-cyrillic-400.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/plex-mono-cyrillic-500.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/plex-mono-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/plex-mono-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #17191e;
  --bg-2: #1d2026;
  --panel: #252a32;
  --line: rgba(220, 224, 229, 0.08);
  --line-2: rgba(220, 224, 229, 0.15);
  --text: #dce0e5;
  --muted: #a9afbc;
  --dim: #8a909c;
  --accent: #74ade8;
  --accent-2: #9cc6f2;
  --accent-ink: #0d1622;
  --green: #a1c181;
  --green-bg: rgba(161, 193, 129, 0.14);
  --yellow: #dec184;
  --yellow-bg: rgba(222, 193, 132, 0.14);
  --red: #d07277;
  --red-bg: rgba(208, 114, 119, 0.14);
  --blue-bg: rgba(116, 173, 232, 0.14);
  --radius: 16px;
  --wrap: 920px;
  --gutter: 20px;
  --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
.mono { font-family: var(--mono); }
.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); width: 100%; margin: 0 auto; padding: 0 var(--gutter); }
.ico { width: 18px; height: 18px; flex: none; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(23, 25, 30, 0.86);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 14px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; display: block; }
.brand-sub { font: 500 12px/1 var(--mono); color: var(--muted); padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); }

.eco { position: relative; }
.eco-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255,255,255,0.04);
  color: var(--muted); font: 500 13px/1 var(--sans); cursor: pointer;
}
.eco-btn:hover, .eco-btn[aria-expanded='true'] { color: var(--text); border-color: rgba(116,173,232,0.55); background: rgba(116,173,232,0.1); }
.eco-pop {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 80;
  width: min(340px, calc(100vw - 24px)); padding: 8px;
  border-radius: 16px; border: 1px solid var(--line-2);
  background: #1f232a; box-shadow: 0 24px 64px -16px rgba(0,0,0,0.8);
}
.eco-pop[hidden] { display: none; }
.eco-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 11px; text-decoration: none; }
.eco-item:hover { background: rgba(255,255,255,0.06); }
.eco-item.is-here { background: rgba(116,173,232,0.12); }
.eco-item b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.eco-item .eco-host { display: block; font-size: 11.5px; color: var(--accent); }
.eco-here { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: rgba(116,173,232,0.22); color: var(--accent-2); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { font: 500 12.5px/1 var(--mono); color: var(--muted); text-decoration: none; border: 1px solid var(--line-2); padding: 8px 10px; border-radius: 9px; }
.lang:hover { color: var(--text); border-color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid transparent;
  font: 600 13.5px/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.18s, border-color 0.18s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: rgba(255,255,255,0.04); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: rgba(116,173,232,0.55); background: rgba(116,173,232,0.08); }

/* Main */
main { flex: 1; padding: 28px 0 56px; }

/* Overall Banner */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: var(--bg-2); margin-bottom: 24px;
}
.banner.is-operational { border-color: rgba(161, 193, 129, 0.35); background: linear-gradient(135deg, rgba(161,193,129,0.12), var(--bg-2) 60%); }
.banner.is-degraded { border-color: rgba(222, 193, 132, 0.42); background: linear-gradient(135deg, rgba(222,193,132,0.14), var(--bg-2) 60%); }
.banner.is-outage { border-color: rgba(208, 114, 119, 0.48); background: linear-gradient(135deg, rgba(208,114,119,0.16), var(--bg-2) 60%); }
.banner.is-maintenance { border-color: rgba(116, 173, 232, 0.45); background: linear-gradient(135deg, rgba(116,173,232,0.14), var(--bg-2) 60%); }

.banner-left { display: flex; align-items: center; gap: 14px; }
.pulse {
  width: 14px; height: 14px; border-radius: 50%; flex: none; position: relative;
}
.pulse::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; opacity: 0.35;
  animation: pulse 2.2s ease-out infinite;
}
.is-operational .pulse, .is-operational .pulse::after { background: var(--green); }
.is-degraded .pulse, .is-degraded .pulse::after { background: var(--yellow); }
.is-outage .pulse, .is-outage .pulse::after { background: var(--red); }
.is-maintenance .pulse, .is-maintenance .pulse::after { background: var(--accent); }
.is-unknown .pulse, .is-unknown .pulse::after { background: var(--dim); }
@keyframes pulse { 0% { transform: scale(0.8); opacity: 0.45; } 100% { transform: scale(1.9); opacity: 0; } }

.banner h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -0.015em; }
.banner-meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.banner-right { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }

/* Section headings */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.sec-head h2 { margin: 0; font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.sec-sub { font-size: 12.5px; color: var(--dim); }

/* Services Card */
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.svc { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.svc:last-child { border-bottom: 0; }
.svc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.svc-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.svc-name a { font-weight: 600; font-size: 15.5px; text-decoration: none; }
.svc-name a:hover { color: var(--accent); }
.svc-host { font-size: 12px; color: var(--dim); }
.svc-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; }
.badge-operational { background: var(--green-bg); color: var(--green); }
.badge-operational .badge-dot { background: var(--green); }
.badge-degraded { background: var(--yellow-bg); color: var(--yellow); }
.badge-degraded .badge-dot { background: var(--yellow); }
.badge-outage { background: var(--red-bg); color: var(--red); }
.badge-outage .badge-dot { background: var(--red); }
.badge-maintenance { background: var(--blue-bg); color: var(--accent); }
.badge-maintenance .badge-dot { background: var(--accent); }
.badge-unknown { background: rgba(255,255,255,0.06); color: var(--dim); }
.badge-unknown .badge-dot { background: var(--dim); }

/* 90-day uptime bars */
.bars {
  display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px;
  height: 30px; align-items: stretch; margin: 10px 0 6px;
}
.bar {
  border-radius: 2px; background: rgba(255,255,255,0.07);
  transition: transform 0.12s, filter 0.12s; cursor: pointer;
}
.bar:hover { transform: scaleY(1.16); filter: brightness(1.2); }
.bar.operational { background: var(--green); }
.bar.degraded { background: var(--yellow); }
.bar.outage { background: var(--red); }
.bar.nodata { background: rgba(255,255,255,0.08); }

.bars-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--dim);
}
.bars-line { flex: 1; height: 1px; background: var(--line); }
.svc-detail {
  margin-top: 8px; padding: 8px 11px; border-radius: 9px;
  background: var(--red-bg); color: var(--red); font-size: 12.5px; font-family: var(--mono);
  word-break: break-word;
}
.svc-detail.is-degraded { background: var(--yellow-bg); color: var(--yellow); }

/* Tooltip */
.tip {
  position: fixed; z-index: 100; pointer-events: none;
  background: #101216; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 8px 11px; font-size: 12px; color: var(--text);
  box-shadow: 0 14px 36px rgba(0,0,0,0.65); max-width: 240px;
}
.tip[hidden] { display: none; }
.tip-day { font-family: var(--mono); color: var(--muted); margin-bottom: 2px; }
.tip-val { font-weight: 600; }

/* Subscribe card */
.sub-card {
  padding: 22px 24px; border-radius: var(--radius);
  border: 1px solid rgba(116, 173, 232, 0.28);
  background: linear-gradient(180deg, rgba(116,173,232,0.08), var(--bg-2) 65%);
  margin-top: 24px;
}
.sub-card h2 { margin: 0 0 6px; font-size: 18px; }
.sub-card p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.sub-modes { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.mode-opt {
  flex: 1 1 220px; display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.03); cursor: pointer;
}
.mode-opt:has(input:checked) { border-color: var(--accent); background: rgba(116,173,232,0.12); }
.mode-opt input { margin-top: 3px; accent-color: var(--accent); }
.mode-opt strong { display: block; font-size: 14px; }
.mode-opt span { display: block; font-size: 12.5px; color: var(--muted); }

.sub-row { display: flex; flex-wrap: wrap; gap: 10px; }
.input, .select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 13px; font: 400 14px/1.2 var(--sans);
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); }
.sub-row .input { flex: 1 1 240px; }
.sub-msg { margin-top: 10px; font-size: 13.5px; min-height: 20px; }
.sub-msg.ok { color: var(--green); }
.sub-msg.err { color: var(--red); }

/* Incidents */
.inc { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.inc:last-child { border-bottom: 0; }
.inc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.inc-title { font-weight: 600; font-size: 15.5px; }
.inc-time { font-size: 12px; color: var(--dim); font-family: var(--mono); }
.inc-updates { display: grid; gap: 8px; margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--line-2); }
.inc-upd { font-size: 13.5px; color: var(--muted); }
.inc-upd strong { color: var(--text); font-weight: 600; }
.empty { padding: 26px; text-align: center; color: var(--dim); font-size: 14px; }

/* Notice banner (verify / unsubscribe) */
.notice {
  padding: 14px 18px; border-radius: 12px; margin-bottom: 18px;
  border: 1px solid rgba(161,193,129,0.4); background: var(--green-bg); color: var(--text);
  font-size: 14px;
}
.notice.is-err { border-color: rgba(208,114,119,0.45); background: var(--red-bg); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 22px 0; color: var(--dim); font-size: 13px; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--muted); }
.foot-links a:hover { color: var(--accent); }

/* Admin */
.admin-grid { display: grid; gap: 18px; }
.admin-form { display: grid; gap: 12px; padding: 20px; }
.admin-form label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.admin-form textarea { min-height: 76px; resize: vertical; }
.admin-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }

@media (max-width: 640px) {
  .top-in { gap: 8px; }
  .brand-sub { display: none; }
  .banner { padding: 18px; }
  .svc { padding: 15px 16px; }
  .bars { gap: 1px; height: 26px; }
}
