/* dont-work.ru — тёмный дашборд мониторинга.
   Без сборки: один файл, переменные CSS, никаких зависимостей. */

:root {
    /* Поверхности: почти чёрный с холодным отливом, как у мониторинговых панелей */
    --bg:          #0a0e13;
    --bg-soft:     #0f151d;
    --surface:     #131b25;
    --surface-2:   #18222e;
    --border:      #22303f;
    --border-soft: #1a2532;

    --text:        #e8eef5;
    --text-dim:    #9aa9b8;
    --text-faint:  #64748b;

    --brand:       #2dd4bf;
    --brand-dim:   #14b8a6;
    --brand-glow:  rgba(45, 212, 191, .18);

    /* Светофор статусов */
    --ok:       #22c55e;
    --warning:  #eab308;
    --problems: #f97316;
    --down:     #ef4444;

    --radius:    14px;
    --radius-sm: 9px;

    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
            Arial, "Noto Sans", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --wrap: 1200px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    /* Мягкое свечение сверху, чтобы фон не читался плоской заливкой */
    background-image:
        radial-gradient(900px 420px at 50% -180px, rgba(45,212,191,.10), transparent 70%),
        radial-gradient(600px 300px at 85% -80px, rgba(59,130,246,.07), transparent 70%);
    background-repeat: no-repeat;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    line-height: 1.22;
    margin: 0 0 .5em;
    letter-spacing: -.02em;
    font-weight: 650;
}
h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ------------------------------------------------------------------ шапка */

.header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 14, 19, .82);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border-soft);
}
.header__row {
    display: flex; align-items: center; gap: 20px;
    min-height: 64px;
}
.logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 750; font-size: 1.12rem; color: var(--text);
    letter-spacing: -.03em; text-decoration: none; white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo__mark {
    width: 28px; height: 28px; border-radius: 8px; flex: none;
    background: linear-gradient(135deg, var(--brand), #0ea5e9);
    display: grid; place-items: center;
    color: #04201c; font-weight: 900; font-size: 15px;
}
.logo__dim { color: var(--text-dim); font-weight: 600; }

.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
    color: var(--text-dim); padding: 8px 12px; border-radius: var(--radius-sm);
    font-size: .93rem; font-weight: 500; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a.is-active { color: var(--brand); background: var(--brand-glow); }

/* Кнопка внутри меню: без этого правила `.nav a` перебивает `.btn`
   по специфичности и красит тёмный текст кнопки в серый. */
.nav a.btn { color: #042b26; background: var(--brand); }
.nav a.btn:hover { color: #042b26; background: var(--brand); }

.burger {
    display: none; margin-left: auto;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-sm);
    width: 42px; height: 38px; cursor: pointer; font-size: 18px; line-height: 1;
}

@media (max-width: 900px) {
    .burger { display: block; }
    .nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--bg-soft); border-bottom: 1px solid var(--border);
        padding: 10px 20px 16px;
    }
    .nav.is-open { display: flex; }
    .nav a { padding: 11px 12px; }
}

/* ------------------------------------------------------------------- герой */

.hero { padding: 52px 0 28px; }
.hero h1 { margin-bottom: .35em; }
.hero__lead {
    color: var(--text-dim); font-size: clamp(1rem, 2.2vw, 1.15rem);
    max-width: 60ch; margin-bottom: 26px;
}
.hero__stats { display: flex; flex-wrap: wrap; gap: 10px; }

.stat {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 18px; min-width: 132px;
}
.stat__value {
    font-size: 1.5rem; font-weight: 700; line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--text-faint); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }

/* ------------------------------------------------------------------ поиск */

.search { display: flex; gap: 8px; margin: 22px 0 0; max-width: 560px; }
.search input {
    flex: 1; min-width: 0;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-sm);
    padding: 12px 14px; font-size: 1rem; font-family: inherit;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { outline: 2px solid var(--brand-dim); outline-offset: -1px; border-color: transparent; }

/* ------------------------------------------------------------------ кнопки */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--brand); color: #042b26;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    padding: 11px 18px; font-size: .95rem; font-weight: 650;
    font-family: inherit; cursor: pointer; text-decoration: none;
    transition: filter .15s ease, transform .05s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--ghost {
    background: var(--surface); color: var(--text); border-color: var(--border);
}
.btn--ghost:hover { background: var(--surface-2); }
.btn--block { width: 100%; }

/* ------------------------------------------------------------------ секции */

.section { padding: 34px 0; }
.section__head {
    display: flex; align-items: baseline; gap: 14px;
    margin-bottom: 18px; flex-wrap: wrap;
}
.section__head h2 { margin: 0; }
.section__more { margin-left: auto; font-size: .92rem; }

/* ------------------------------------------------------------- статус-бейдж */

.status {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: .8rem; font-weight: 600; white-space: nowrap;
    padding: 3px 10px 3px 8px; border-radius: 999px;
    border: 1px solid transparent;
}
.status__dot {
    width: 7px; height: 7px; border-radius: 50%; flex: none;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}
.status--ok       { color: var(--ok);       background: color-mix(in srgb, var(--ok) 12%, transparent);       border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.status--warning  { color: var(--warning);  background: color-mix(in srgb, var(--warning) 12%, transparent);  border-color: color-mix(in srgb, var(--warning) 28%, transparent); }
.status--problems { color: var(--problems); background: color-mix(in srgb, var(--problems) 13%, transparent); border-color: color-mix(in srgb, var(--problems) 30%, transparent); }
.status--down     { color: var(--down);     background: color-mix(in srgb, var(--down) 14%, transparent);     border-color: color-mix(in srgb, var(--down) 32%, transparent); }

/* Пульсация только у настоящего сбоя — иначе страница мельтешит */
.status--down .status__dot { animation: pulse 1.7s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
    50%      { box-shadow: 0 0 0 7px color-mix(in srgb, currentColor 4%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
    .status--down .status__dot { animation: none; }
}

/* --------------------------------------------------------- сетка сервисов */

.grid {
    display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.card {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 13px 14px;
    color: var(--text); text-decoration: none;
    transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.card:hover {
    text-decoration: none; background: var(--surface-2);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
    transform: translateY(-1px);
}
.card__logo {
    width: 40px; height: 40px; border-radius: 10px; flex: none;
    background: #fff; object-fit: contain; padding: 3px;
}
.card__logo--empty {
    background: var(--surface-2); color: var(--text-faint);
    display: grid; place-items: center; font-weight: 700; font-size: 15px;
    border: 1px solid var(--border);
}
.card__body { min-width: 0; flex: 1; }
.card__name {
    font-weight: 600; font-size: .97rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card__meta {
    display: flex; align-items: center; gap: 8px;
    margin-top: 3px; font-size: .8rem; color: var(--text-faint);
}
.card__count { font-variant-numeric: tabular-nums; }

/* Полоска слева выдаёт состояние, даже когда бейдж не помещается */
.card[data-status="down"]     { border-left: 3px solid var(--down); }
.card[data-status="problems"] { border-left: 3px solid var(--problems); }
.card[data-status="warning"]  { border-left: 3px solid var(--warning); }

/* -------------------------------------------------------------- панели */

.panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.panel + .panel { margin-top: 12px; }
.panel__title {
    font-size: .82rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--text-faint); margin: 0 0 14px; font-weight: 600;
}

.cols {
    display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.cols--2 { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 900px) { .cols--2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- список с долей */

.bars { list-style: none; margin: 0; padding: 0; }
.bars li + li { margin-top: 11px; }
.bars__row {
    display: flex; justify-content: space-between; gap: 12px;
    font-size: .9rem; margin-bottom: 5px;
}
.bars__name { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars__val { color: var(--text-dim); font-variant-numeric: tabular-nums; flex: none; }
.bars__track { height: 5px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; }
.bars__fill {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--brand-dim), var(--brand));
}

/* ------------------------------------------------------------------ лента */

.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
    padding: 13px 0; border-top: 1px solid var(--border-soft);
    display: flex; gap: 12px;
}
.feed li:first-child { border-top: 0; padding-top: 0; }
.feed__logo { width: 30px; height: 30px; border-radius: 8px; background: #fff; flex: none; object-fit: contain; padding: 2px; }
.feed__body { min-width: 0; flex: 1; }
.feed__head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.feed__service { font-weight: 600; font-size: .93rem; }
.feed__time { color: var(--text-faint); font-size: .78rem; }
.feed__text { color: var(--text-dim); font-size: .9rem; margin: 3px 0 0; overflow-wrap: anywhere; }
.feed__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.tag {
    font-size: .74rem; color: var(--text-dim);
    background: var(--bg-soft); border: 1px solid var(--border-soft);
    padding: 2px 8px; border-radius: 99px;
}

/* ------------------------------------------------------------------ график */

.chart { position: relative; }
.chart__svg { width: 100%; height: 190px; display: block; overflow: visible; }
.chart__tabs { display: flex; gap: 6px; margin-left: auto; }
.chart__tab {
    font-size: .82rem; padding: 5px 12px; border-radius: 99px;
    background: var(--bg-soft); border: 1px solid var(--border-soft);
    color: var(--text-dim); text-decoration: none;
}
.chart__tab.is-active { background: var(--brand-glow); border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--brand); }
.chart__tab:hover { text-decoration: none; color: var(--text); }
.chart__empty {
    display: grid; place-items: center; height: 190px;
    color: var(--text-faint); font-size: .9rem; text-align: center;
}

/* --------------------------------------------------------- карточка сервиса */

.service-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 6px; }
.service-head__logo {
    width: 68px; height: 68px; border-radius: 16px; background: #fff;
    object-fit: contain; padding: 6px; flex: none;
}
.service-head__main { min-width: 240px; flex: 1; }
.service-head h1 { margin-bottom: .25em; }

.metrics { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.metric {
    background: var(--bg-soft); border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm); padding: 12px 14px;
}
.metric__value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.metric__label { color: var(--text-faint); font-size: .78rem; }

/* ------------------------------------------------------------------ формы */

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .88rem; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%; background: var(--bg-soft); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-sm);
    padding: 11px 13px; font-size: .97rem; font-family: inherit;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid var(--brand-dim); outline-offset: -1px; border-color: transparent;
}
.field__hint { color: var(--text-faint); font-size: .8rem; margin-top: 5px; }

/* Ловушка для ботов: человек это поле не увидит */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
    border-radius: var(--radius-sm); padding: 12px 15px; margin-bottom: 18px;
    font-size: .93rem; border: 1px solid transparent;
}
.notice--ok    { background: color-mix(in srgb, var(--ok) 12%, transparent);   border-color: color-mix(in srgb, var(--ok) 30%, transparent);   color: #86efac; }
.notice--error { background: color-mix(in srgb, var(--down) 12%, transparent); border-color: color-mix(in srgb, var(--down) 30%, transparent); color: #fca5a5; }

/* ------------------------------------------------------- хлебные крошки */

.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0 0; margin: 0; font-size: .84rem; color: var(--text-faint); }
.crumbs li::after { content: "/"; margin-left: 6px; color: var(--border); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--text-dim); }

/* ------------------------------------------------------------------ проза */

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.25em; color: var(--text-dim); }
.prose li { margin-bottom: .4em; }
.prose p { color: var(--text-dim); }
.prose strong { color: var(--text); }

.faq details {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 14px 16px; margin-bottom: 8px; background: var(--surface);
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { color: var(--text-dim); margin: 0; }

/* ------------------------------------------------------------------ подвал */

.footer {
    border-top: 1px solid var(--border-soft); margin-top: 50px;
    padding: 34px 0 40px; color: var(--text-faint); font-size: .9rem;
    background: var(--bg-soft);
}
.footer__cols { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 26px; }
.footer h4 { color: var(--text); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 7px; }
.footer a { color: var(--text-dim); }
.footer__bottom { border-top: 1px solid var(--border-soft); padding-top: 18px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ----------------------------------------------------------- cookie-баннер */

.cookie {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
    max-width: 560px; margin: 0 auto;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px 18px; font-size: .9rem; color: var(--text-dim);
    display: none;
}
.cookie.is-visible { display: block; }
.cookie__row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ прочее */

.muted { color: var(--text-dim); }
.small { font-size: .87rem; }
.empty { color: var(--text-faint); font-size: .92rem; padding: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips a {
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-dim); padding: 6px 12px; border-radius: 99px; font-size: .86rem;
}
.chips a:hover { color: var(--text); border-color: var(--brand-dim); text-decoration: none; }

.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
.table th { color: var(--text-faint); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table-scroll { overflow-x: auto; }

@media (max-width: 640px) {
    .hero { padding: 34px 0 22px; }
    .panel { padding: 16px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
    .card { padding: 11px; gap: 10px; }
    .card__logo { width: 34px; height: 34px; }
}
