/* Пульт Алисы: mobile-first, одна колонка; на широком экране — та же колонка по центру. */
:root { --bg: #f6f6f4; --fg: #1d1d1b; --card: #fff; --line: #ddd; --ok: #1f7a3a; --bad: #b3261e; --muted: #666;
        --accent: #3557c4; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #151514; --fg: #ececea; --card: #1f1f1d; --line: #333; --ok: #5cc97a; --bad: #ff7b72;
          --muted: #999; --accent: #8aa4ff; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 40rem; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.4rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
label { display: block; margin-bottom: 12px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 12px; font: inherit; color: inherit;
        background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
button { width: 100%; min-height: 48px; padding: 12px; font: inherit; border: 0; border-radius: 8px;
         background: var(--accent); color: #fff; cursor: pointer; }
button.danger { background: var(--bad); }
.actions form + form { margin-top: 12px; }
.error { color: var(--bad); }
ul.status { list-style: none; margin: 0; padding: 0; }
ul.status li { padding: 8px 0 8px 1.6em; position: relative; border-top: 1px solid var(--line); }
ul.status li:first-child { border-top: 0; }
ul.status li::before { content: "●"; position: absolute; left: 0.2em; }
ul.status li.ok::before { color: var(--ok); }
ul.status li.bad::before { color: var(--bad); }
ul.status li.unknown::before { color: var(--muted); }
@media (min-width: 48rem) { .actions { display: flex; gap: 12px; } .actions form + form { margin-top: 0; }
                            .actions form { flex: 1; } }
/* Параметры (тикет 19 пульта) */
a { color: var(--accent); }
ul.groups { list-style: none; margin: 0; padding: 0; }
ul.groups li { border-top: 1px solid var(--line); }
ul.groups li:first-child { border-top: 0; }
ul.groups a { display: block; padding: 12px 0; text-decoration: none; }
.param { padding: 12px 0; border-top: 1px solid var(--line); }
.param:first-of-type { border-top: 0; }
.param.invalid { border-left: 3px solid var(--bad); padding-left: 10px; }
.param-head .label { font-weight: 600; }
.tag { display: inline-block; font-size: 0.8rem; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px;
       color: var(--muted); }
.tag.pending, .notice .pending { color: var(--bad); border-color: var(--bad); }
.notice .ok { color: var(--ok); }
.hint, .note, .default, .when { color: var(--muted); font-size: 0.9rem; margin: 4px 0; }
.value { margin: 4px 0; overflow-wrap: anywhere; }
textarea { resize: vertical; }
select:disabled, input:disabled, textarea:disabled { opacity: 0.6; }
.rows .row { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.rows .row input { margin-top: 4px; }
button.secondary { width: auto; min-height: 40px; margin-top: 8px; background: transparent; color: var(--accent);
                   border: 1px solid var(--line); }
.params > button[type="submit"]:last-child { margin-top: 16px; }
ul.changes { list-style: none; margin: 0; padding: 0; }
ul.changes li { padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
ul.changes li:first-child { border-top: 0; }
/* Статистика (тикет 25): итоги — таблица «подпись — число», по дням — широкая таблица с прокруткой. */
nav.periods { display: flex; gap: 8px; margin-bottom: 16px; }
nav.periods a { flex: 1; text-align: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px;
                color: var(--accent); text-decoration: none; }
nav.periods a[aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }
table.stats { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
table.stats th { text-align: left; font-weight: normal; padding: 6px 0; border-top: 1px solid var(--line); }
table.stats td { text-align: right; padding: 6px 0; border-top: 1px solid var(--line); }
table.stats.nested tr + tr th { padding-left: 1.2em; color: var(--muted); }
.scroll { overflow-x: auto; }
table.days { border-collapse: collapse; font-size: 0.9rem; white-space: nowrap; }
table.days th, table.days td { padding: 6px 8px; border-top: 1px solid var(--line); text-align: right; }
table.days td:first-child, table.days th:first-child { text-align: left; }
.muted { color: var(--muted); font-size: 0.9rem; }
