/* Inter — те же файлы, что отдавал Google Fonts (сохранены у себя): вид
   один в один, а адрес посетителя не уходит в Google. */
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('inter-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('inter-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('inter-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('inter-latin.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('inter-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('inter-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('inter-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('inter-latin.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('inter-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('inter-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('inter-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('inter-latin.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('inter-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('inter-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('inter-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('inter-latin.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 {
  --c-bg: #080808;
  --c-card: #1a1a1a;
  --c-text: #FFFFFF;
  --c-text-muted: rgba(255, 255, 255, 0.6);
  --c-divider: rgba(255, 255, 255, 0.1);
  --status-up: #4ade80;
  --status-warn: #fbbf24;
  --status-down: #f87171;
  --status-maintenance: #60a5fa;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.6;
}

/* Текстурный фон */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    repeating-linear-gradient(15deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px);
  pointer-events: none;
  z-index: 1;
}

body > * {
  position: relative;
  z-index: 2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Хедер — без лого */
.hdr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  text-align: center;
}
.hdr h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.hdr .sub {
  color: var(--c-text-muted);
  font-size: 18px;
  font-weight: 400;
}

/* Общий статус */
.overall-status {
  background: transparent;
  border: none;
  padding: 20px 0;
  margin-bottom: 28px;
  text-align: center;
}
.overall-status .status-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 20px;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}
.status-dot.up { background: var(--status-up); }
.status-dot.up::after { border: 2px solid var(--status-up); }
.status-dot.warn { background: var(--status-warn); }
.status-dot.warn::after { border: 2px solid var(--status-warn); }
.status-dot.down { background: var(--status-down); }
.status-dot.down::after { border: 2px solid var(--status-down); }
.status-dot.maintenance { background: var(--status-maintenance); }
.status-dot.maintenance::after { border: 2px solid var(--status-maintenance); }
.status-dot.loading { background: rgba(255,255,255,0.25); }

.status-text.up { color: var(--status-up); }
.status-text.warn { color: var(--status-warn); }
.status-text.down { color: var(--status-down); }
.status-text.maintenance { color: var(--status-maintenance); }
.status-text.loading { color: var(--c-text-muted); }

@keyframes pulse{0%{transform:scale(1);opacity:.5}100%{transform:scale(2);opacity:0}}

/* Группы */
.grp { margin-bottom: 24px; }
.gt {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 12px;
  padding-left: 4px;
  text-align: center;
}

/* Сетка */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 12px;
}

/* Карточки */
.card {
  background: var(--c-card);
  border: none;
  border-radius: 0;
  padding: 16px;
  transition: all 0.2s ease;
}
.card:hover {
  background: #222222;
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}

.cd {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cd.operational { background: var(--status-up); box-shadow: 0 0 8px rgba(74,222,128,0.3); }
.cd.degraded { background: var(--status-warn); box-shadow: 0 0 8px rgba(251,191,36,0.3); }
.cd.major_outage { background: var(--status-down); box-shadow: 0 0 8px rgba(248,113,113,0.3); }
.cd.maintenance { background: var(--status-maintenance); box-shadow: 0 0 8px rgba(96,165,250,0.3); }

/* Бейдж — % доступности */
.badge {
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 0;
  display: inline-block;
  border: 1px solid;
}
.badge.operational {
  background-color: rgba(74, 222, 128, 0.1);
  color: var(--status-up);
  border-color: var(--status-up);
}
.badge.degraded {
  background-color: rgba(251, 191, 36, 0.1);
  color: var(--status-warn);
  border-color: var(--status-warn);
}
.badge.major_outage {
  background-color: rgba(248, 113, 113, 0.1);
  color: var(--status-down);
  border-color: var(--status-down);
}
.badge.maintenance {
  background-color: rgba(96, 165, 250, 0.1);
  color: var(--status-maintenance);
  border-color: var(--status-maintenance);
}

/* Uptime квадратики */
.uptimebar {
  display: flex;
  gap: 2px;
  margin-top: 10px;
}
.uday {
  flex: 1;
  height: 24px;
  border-radius: 3px;
  transition: opacity 0.15s;
  position: relative;
  cursor: default;
}
.uday:hover { opacity: 0.7; }
.uday.ok { background: var(--status-up); }
.uday.warn { background: var(--status-warn); }
.uday.down { background: var(--status-down); }
.uday.no { background: rgba(255,255,255,0.06); }
.uday .tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #2a2a2a;
  color: var(--c-text);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
.uday:hover .tooltip { display: block; }
.bar-info {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--c-text-muted);
}

/* Футер */
.ft {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--c-divider);
  text-align: center;
  font-size: 16px;
  color: var(--c-text-muted);
}
.ft a {
  color: var(--c-text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.ft a:hover { opacity: 0.7; }
.ft .sp { margin: 0 8px; opacity: 0.3; }
.ft .ts { margin-top: 8px; font-size: 14px; opacity: 0.5; }

a { color: var(--c-text); text-decoration: none; transition: opacity 0.2s ease; }
a:hover { opacity: 0.7; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-card); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #222222; }

@keyframes sh{0%{background-position:-200% 0}100%{background-position:200% 0}}
.sk{background:linear-gradient(90deg,var(--c-card) 25%,rgba(255,255,255,0.05) 50%,var(--c-card) 75%);background-size:200% 100%;animation:sh 1.5s ease-in-out infinite;border-radius:0;height:100px}

@media (max-width: 768px) {
  .container { padding: 16px; }
  .card { padding: 16px; }
  .grid { grid-template-columns: 1fr; }
  .uday { height: 18px; }
}

@media (min-width: 1920px) {
  .container { max-width: 1400px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Состояние «нет данных» (свежих проверок нет) — серое, как «загрузка». */
.cd.unknown { background: rgba(255,255,255,0.25); }
.badge.unknown { background: rgba(255,255,255,0.06); color: var(--c-text-muted); }

/* Длинное имя — одна строка с многоточием; процент справа не сжимается.
   Короткие имена выглядят как прежде. */
.card-name { min-width: 0; margin-right: 8px; }
.card-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-top .badge { flex-shrink: 0; }
.grid > .card { min-width: 0; }
