:root {
  --ink: #1b241c;
  --paper: #f3ecdc;
  --panel: #243028;
  --line: #c9b896;
  --copper: #c46b3a;
  --moss: #6f8f62;
  --bad: #9b3b32;
  --mute: #8a7f6a;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }
body { display: grid; grid-template-columns: 240px 1fr; }
.rail {
  background: var(--panel);
  color: var(--paper);
  min-height: 100vh;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.brand { color: var(--paper); text-decoration: none; font-size: 28px; letter-spacing: .04em; display: flex; gap: 8px; align-items: center; }
.mark { color: var(--copper); }
.whisper { color: var(--mute); font-size: 13px; line-height: 1.45; }
.rail .whisper { color: #c9b896; }
nav { display: flex; flex-direction: column; gap: 6px; }
nav a { color: #efe6d2; text-decoration: none; padding: 6px 8px; border-radius: 6px; }
nav a.on, nav a:hover { background: #314338; }
main { padding: 32px 40px 80px; }
h1 { font-weight: 600; letter-spacing: -.02em; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 28px 0 12px; }
.hero { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 28px; }
.hero p { max-width: 46rem; line-height: 1.5; }
.pipe { display: flex; gap: 8px; list-style: none; padding: 0; }
.pipe li { background: #e7dcc4; padding: 8px 12px; border-radius: 999px; font-size: 13px; }
.pipe .bad { background: #ead0c8; color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 20px 0 32px; }
.stats article { background: #fffaf0; border: 1px solid var(--line); padding: 14px; border-radius: 10px; }
.stats b { display: block; font-size: 28px; }
.stats .warn { border-color: #d9a39a; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.person {
  display: flex; flex-direction: column; gap: 4px;
  background: #fffaf0; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; text-decoration: none; color: inherit;
}
.person.zzz { opacity: .55; }
.person em { color: var(--mute); font-style: normal; font-size: 12px; }
.tag { display: inline-block; background: #dfe8d4; padding: 1px 8px; border-radius: 999px; font-size: 12px; width: max-content; }
.tag.night { background: #d9d3e8; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
table { width: 100%; border-collapse: collapse; background: #fffaf0; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eadfca; font-size: 14px; }
a { color: #4d6a40; }
.card { background: #fffaf0; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.card.slim { max-width: 360px; margin: 12vh auto; }
form p, form label { display: block; margin: 8px 0; }
input, select, textarea, button {
  font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid #c9b896; background: #fff;
}
button { background: var(--ink); color: var(--paper); border: 0; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button.danger { background: var(--bad); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.bar-actions { display: flex; gap: 8px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.raw { background: #1b241c; color: #e7dcc4; padding: 14px; overflow: auto; border-radius: 10px; font-size: 12px; }
.shot { max-width: 360px; border-radius: 16px; border: 8px solid #1b241c; }
.live-link { display: inline-block; margin: 8px 0 16px; font-size: 18px; }
button.live-link { font: inherit; }
button.live-link:disabled { opacity: .45; cursor: default; }
.phone-state { font-size: 18px; margin: 4px 0 10px; }
.phone-state.wait { color: var(--mute); }
.phone-state.on { color: var(--moss); }
.live-frame { width: min(420px, 100%); height: 740px; border: 8px solid #1b241c; border-radius: 16px; background: #111; }
.shots { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0 28px; }
.shots figure { margin: 0; }
.shots figcaption { font-size: 12px; color: var(--mute); margin-top: 6px; }
.flashes { list-style: none; padding: 0; }
.flashes li { padding: 8px 12px; background: #e7dcc4; border-radius: 8px; }
.flashes .error { background: #ead0c8; }
.pill { margin-top: auto; font-size: 12px; padding: 6px 10px; border-radius: 999px; background: #314338; }
.pill.ghost { background: #5a4038; }
.out button { background: transparent; color: #c9b896; }
.grid { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; }
.packs pre { white-space: pre-wrap; background: #efe6d2; padding: 8px; }
.stats .ok { border-color: var(--moss); }
.stats.slim-stats { grid-template-columns: repeat(6, 1fr); }
.board { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.camp-list { list-style: none; padding: 0; }
.camp-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.queue { padding-left: 1.2rem; }
.queue li { margin: 8px 0; }
.queue .now { font-weight: 600; }
.tag.google { background: #e8dcc0; }
.tag.yandex { background: #f3d4b0; }
.tag.on { background: #cfe3c4; }
.tag.move-graze { background: #dfe8d4; }
.tag.move-boost, .tag.move-ready { background: #e7dcc4; }
.tag.move-burned { background: #ead0c8; color: var(--bad); }
.tag.move-sleep { background: #d9d3e8; }
.person.live { border-color: var(--moss); }
.person .nums, .person .why { font-size: 12px; color: var(--mute); }
.callout { background: #ead0c8; padding: 10px 14px; border-radius: 8px; }
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.camp-card h3 { margin: 12px 0 6px; font-size: 15px; }
.camp-card h3 small { color: var(--mute); font-weight: 400; }
.key-list { margin: 0; padding-left: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-link { display: inline-block; padding: 8px 10px; }
form.inline { display: inline; }
.nav-k { color: #c9b896; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin: 12px 0 4px; }
.people { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.campaign-edit textarea { width: 100%; }
.next-line { margin: 0 0 20px; }
.fleet .mute { font-size: 12px; }
.persona-edit { margin: 24px 0 32px; }
.habits { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px 16px; }
.habits p { margin: 6px 0; }
.habits label small { display: block; color: var(--mute); font-size: 12px; font-weight: 400; }
.habits input, .habits select { width: 100%; }
@media (max-width: 960px) {
  body { grid-template-columns: 1fr; }
  .rail { min-height: auto; }
  .stats, .split, .hero, .board, .camp-grid, .habits { display: block; }
}

/* Расписание дня: кто спит, кто вот-вот выйдет, кто уже отработал */
.sched { margin-top: 2px; font-variant-numeric: tabular-nums; }
.tag.sched-sleep, .sched-sleep { color: #7c8ba1; }
.tag.sched-due, .sched-due { color: #2f855a; font-weight: 600; }
.tag.sched-wait, .sched-wait { color: #4a5568; }
.tag.sched-done, .sched-done { color: #8a94a6; }
.tag.sched-idle, .sched-idle { color: #a0aec0; }

/* Нагул: здоровье ротации и список проблем. Цвет несёт смысл, но не один:
   рядом всегда слово, иначе на монохромном экране таблица нечитаема. */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; border: 1px solid var(--line); background: #efe6d2;
  white-space: nowrap;
}
.badge.ok   { border-color: var(--moss); background: #e4ecdd; color: #3d5733; }
.badge.slow { border-color: var(--copper); background: #f3e2d4; color: #8a4521; }
.badge.thin { border-color: var(--mute); background: #ece5d6; color: #6b6150; }
.badge.bad  { border-color: var(--bad); background: #ead0c8; color: var(--bad); }
.badge.off  { border-color: var(--bad); background: var(--bad); color: #f3ecdc; }

.alarm {
  border: 1px solid var(--bad); background: #f7e3dc; border-radius: 10px;
  padding: 14px 18px; margin: 0 0 24px;
}
.alarm h3 { margin: 0 0 8px; font-size: 16px; color: var(--bad); }
.alarm ul { margin: 0; padding-left: 1.1rem; }
.alarm li { margin: 4px 0; line-height: 1.45; }
.calm {
  border: 1px solid var(--moss); background: #e4ecdd; border-radius: 10px;
  padding: 12px 18px; margin: 0 0 24px; color: #3d5733;
}
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0 18px; }
table td.tight { white-space: nowrap; }

/* /warm/ — бусты и сводка портов */
.warm-hero { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.boost-create { margin: 16px 0 28px; border-color: var(--moss); background: #f4f8f0; }
.boost-create-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin-bottom: 12px;
}
.boost-create-grid .full { grid-column: 1 / -1; }
.boost-create-grid textarea, .boost-create-grid input, .boost-create-grid select { width: 100%; }
.boost-card { margin-bottom: 18px; }
.boost-card.is-run { border-color: #9bb58d; }
.boost-card.is-pause { opacity: .92; }
.boost-card-head {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  align-items: flex-start; margin-bottom: 8px;
}
.boost-card-head h3 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.boost-card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.boost-card .meter {
  background: #e7dcc4; border-radius: 4px; height: 8px; margin-top: 4px; max-width: 220px;
}
.boost-card .meter > div {
  background: var(--copper); height: 8px; border-radius: 4px; max-width: 100%;
}
.boost-card tr.today { font-weight: 600; }
.boost-idle { margin: 18px 0 28px; }
.boost-settings { margin-top: 12px; }
@media (max-width: 900px) {
  .boost-create-grid { grid-template-columns: 1fr; }
}
