/* Main — дневные отчёты (28.09.2026): в стиле «Серий», цвета — из переменных темы. */
.main-page { max-width: 1180px; margin: 0 auto; padding: 22px 32px 40px; color: var(--text); display: flex; flex-direction: column; gap: 14px; }
.main-page .card { border-radius: 10px; }
.main-page .btn { min-height: 36px; padding: 7px 14px; font-size: 13px; border-radius: 7px; }

/* Шапка: заголовок и переключатель Серии / Регулярки */
.mh { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.mh h1 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: -.4px; }
.mh-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.mh-sub::first-letter { text-transform: uppercase; }
.mh-switch { display: inline-flex; padding: 3px; gap: 2px; background: var(--chip); border-radius: 9px; }
.mh-switch button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px;
                    font-weight: 600; padding: 7px 14px; border-radius: 7px; cursor: pointer; }
.mh-switch button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mh-switch b { font-size: 11px; min-width: 18px; padding: 1px 6px; border-radius: 99px; background: var(--primary); color: #fff; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn, .dot.stale { background: var(--warn); } .dot.bad { background: var(--danger); } .dot.run { background: var(--primary); animation: mainpulse 1.4s infinite; }

/* Карточка управления */
.mc { padding: 18px 22px; }
.mc-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mc-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.mc-title h2 { margin: 0; font-size: 16px; font-weight: 650; }
.mc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--chip); color: var(--muted); }
.mc-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mc-pill.ok { color: var(--ok); } .mc-pill.warn, .mc-pill.stale { color: var(--warn); } .mc-pill.bad { color: var(--danger); }
.mc-pill.run { color: var(--primary); } .mc-pill.run i { animation: mainpulse 1.4s infinite; }
.mc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-sub { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.mc-rooms { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.mc-rooms .room-btn { font-size: 12px; padding: 4px 10px; }
.mc-steps { margin-top: 14px; }
.mc-bar { display: flex; gap: 3px; height: 6px; }
.mc-bar i { flex: 1; border-radius: 3px; background: var(--line); }
.mc-bar i.done { background: var(--ok); } .mc-bar i.failed { background: var(--danger); } .mc-bar i.running { background: var(--primary); animation: mainpulse 1.4s infinite; }
.mc-steps-label { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 7px; }
.mc-fail { margin-top: 8px; padding: 8px 12px; border-radius: 7px; background: var(--danger-soft, #fce8e6); color: var(--danger); font-size: 12px; line-height: 1.5; }
.mc-list { margin-top: 8px; font-size: 12px; }
.mc-list > summary { cursor: pointer; color: var(--primary); padding: 3px 0; width: max-content; }
.mc-step { display: flex; gap: 8px; padding: 4px 0; color: var(--muted); }
.mc-step span { width: 14px; text-align: center; }
.mc-step em { margin-left: auto; font-style: normal; font-variant-numeric: tabular-nums; }
.mc-step.done span { color: var(--ok); } .mc-step.failed { color: var(--danger); } .mc-step.running { color: var(--primary); }
.mc-error { margin-top: 10px; color: var(--danger); font-size: 12px; }

/* Результат */
.mr { display: flex; flex-direction: column; gap: 14px; }
.mr-note { padding: 10px 14px; border-radius: 8px; font-size: 12px; line-height: 1.5; background: #fef3e2; color: var(--warn); }
html[data-theme="dark"] .mr-note { background: #3a2f1c; }
.mr-empty { padding: 28px 22px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.mr-hint { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Что сделать */
.mr-todo { padding: 16px 22px 10px; }
.mr-todo h3, .mr-upload h3 { margin: 0 0 8px; font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.mr-todo-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mr-todo-row:first-of-type { border-top: 0; }
.mr-todo-row i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.mr-todo-row.t-act i { background: var(--primary); } .mr-todo-row.t-warn i { background: var(--warn); } .mr-todo-row.t-bad i { background: var(--danger); }
.mr-todo-row b { font-size: 18px; min-width: 34px; font-variant-numeric: tabular-nums; }
.mr-todo-row.t-bad { color: var(--danger); }
.mr-todo-row span { flex: 1; min-width: 0; }
.mr-todo-row em { font-style: normal; color: var(--muted); font-size: 12px; }
.mr-clean { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 10px; background: #e6f4ea; color: #0d652d; border: 1px solid #b7dfc2; }
.mr-clean > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ok); color: #fff; font-weight: 700; flex: none; }
.mr-clean b { font-size: 15px; } .mr-clean div div { font-size: 12px; margin-top: 2px; opacity: .85; }
html[data-theme="dark"] .mr-clean { background: #173325; color: #9be3bd; border-color: #2c5a40; }

/* Счётчики разделов */
.mr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mr-tile { position: relative; text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px;
           padding: 12px 14px 12px 16px; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-start; font: inherit; overflow: hidden; transition: border-color .12s, box-shadow .12s; }
.mr-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line); }
.mr-tile.t-act::before { background: var(--primary); } .mr-tile.t-warn::before { background: var(--warn); }
.mr-tile b { display: block; font-size: 24px; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mr-tile span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.mr-tile.zero b { color: var(--muted); font-weight: 500; }
.mr-tile:hover { border-color: var(--primary); }
.mr-tile.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }

/* Поиск и румы */
.mr-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; background: var(--bg); }
.mr-bar input { flex: 0 1 280px; min-width: 180px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; font-size: 13px; }
.mr-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.mr-chips button, .mr-reset { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 99px; padding: 4px 11px; font: inherit; font-size: 12px; cursor: pointer; }
.mr-chips em { font-style: normal; color: var(--muted); margin-left: 5px; }
.mr-chips button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.mr-chips button.on em { color: #fff; opacity: .8; }
.mr-reset { border-color: var(--primary); color: var(--primary); }

/* Разделы со списками */
.mr-sec { padding: 0; overflow: hidden; }
.mr-sec-head { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer;
               padding: 13px 22px; text-align: left; }
.mr-sec-head i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.mr-sec.t-act .mr-sec-head i { background: var(--primary); } .mr-sec.t-warn .mr-sec-head i { background: var(--warn); }
.mr-sec-head span { font-size: 15px; font-weight: 650; }
.mr-sec-head b { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--chip); padding: 1px 8px; border-radius: 99px; }
.mr-sec-head::after { content: ''; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.mr-sec.closed .mr-sec-head::after { transform: rotate(-45deg); }
.mr-sec-head:hover span { color: var(--primary); }
.mr-rows { border-top: 1px solid var(--line); }
.mr-row { display: grid; grid-template-columns: 58px 58px minmax(0, 1fr); gap: 12px; padding: 9px 22px; border-top: 1px solid var(--line); align-items: start; }
.mr-row:first-child { border-top: 0; }
.mr-row:hover { background: var(--subtle); }
.mr-when { font-variant-numeric: tabular-nums; line-height: 1.3; }
.mr-when b { display: block; font-size: 13px; font-weight: 600; }
.mr-when small { display: block; font-size: 11px; color: var(--muted); }
.mr-room { justify-self: start; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--chip); color: var(--text); white-space: nowrap; margin-top: 1px; }
.mr-name { font-size: 13px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.mr-meta { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.mr-meta > span { margin: 0 6px; opacity: .6; }
.mr-more { margin-top: 3px; font-size: 12px; }
.mr-more > summary { cursor: pointer; color: var(--primary); width: max-content; }
.mr-more > div { white-space: pre-line; color: var(--muted); line-height: 1.5; padding: 6px 0 2px; overflow-wrap: anywhere; }
.mr-page a, .mr a { color: var(--primary); }
.mr-show { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); background: var(--subtle); color: var(--primary); padding: 9px; font: inherit; font-size: 12px; cursor: pointer; }
.mr-upload { padding: 16px 22px; }
.mr-upload .mr-rows { border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; max-height: 360px; overflow: auto; }

/* Источники и полные отчёты */
.mr-sources { padding: 0; }
.mr-sources > summary { cursor: pointer; padding: 13px 22px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mr-sources-body { padding: 0 22px 16px; font-size: 12px; color: var(--muted); }
.mr-sources-body p { margin: 0 0 6px; line-height: 1.5; }
.mr-sources-body .mr-rows { border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.mr-table { overflow: auto; max-height: 520px; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.mr-table table { border-collapse: collapse; width: 100%; font-size: 12px; color: var(--text); }
.mr-table td { padding: 6px 10px; border-top: 1px solid var(--line); white-space: pre-wrap; vertical-align: top; }
.mr-table tr:first-child td { font-weight: 600; background: var(--subtle); border-top: 0; }
.mr-pages { display: flex; gap: 12px; align-items: center; padding: 8px 0; }

/* Окно подтверждения заводки */
.main-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 2000; display: grid; place-items: center; padding: 20px; }
.main-modal-content { background: var(--card); color: var(--text); border-radius: 12px; padding: 22px; width: min(820px, 95vw); max-height: 85vh; overflow: auto;
                      box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.main-modal-content h2 { margin: 0 0 6px; font-size: 18px; }
.main-modal-content .mr-rows { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; max-height: 50vh; overflow: auto; }
.main-modal-content .mc-actions { justify-content: flex-end; }

.main-pulse { animation: mainpulse 1.4s ease-in-out infinite; }
@keyframes mainpulse { 50% { opacity: .4; } }
@media (max-width: 760px) {
  .main-page { padding: 16px 16px 32px; }
  .mc, .mr-todo { padding: 14px 16px; }
  .mr-row { grid-template-columns: 48px minmax(0, 1fr); padding: 9px 16px; }
  .mr-when { grid-row: 1 / 3; }
  .mr-room { grid-column: 2; grid-row: 1; margin-bottom: 2px; }
  .mr-main { grid-row: 2; }
  .mr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mr-todo-row { flex-wrap: wrap; }
  .mr-bar input { flex-basis: 100%; }
}

/* Сквозной поиск по сайту (28.09.2026) */
.ms { position: relative; }
.ms-box { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--muted);
          transition: border-color .12s, box-shadow .12s; }
.ms-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.ms-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; padding: 13px 0; }
.ms-box kbd { font: inherit; font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.ms-res { margin-top: 8px; padding: 6px 0 8px; max-height: 70vh; overflow: auto; }
.ms-status { font-size: 12px; color: var(--muted); padding: 6px 18px; }
.ms-status.bad { color: var(--danger); }
.ms-group { padding: 4px 0; border-top: 1px solid var(--line); }
.ms-group:first-of-type { border-top: 0; }
.ms-group h4 { display: flex; align-items: center; gap: 8px; margin: 8px 18px 4px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.ms-group h4 b { font-weight: 600; background: var(--chip); padding: 0 7px; border-radius: 99px; letter-spacing: 0; }
.ms-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 18px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px;
          text-align: left; cursor: pointer; text-decoration: none; box-sizing: border-box; }
.ms-row:hover, .ms-row:focus-visible { background: var(--subtle); outline: 0; }
.ms-row .mr-room { margin-top: 0; }
.ms-ic { width: 22px; text-align: center; color: var(--muted); flex: none; }
.ms-time { width: 42px; flex: none; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12px; }
.ms-t { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ms-t small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 1px; }
.ms-t small.ms-inl { display: inline; }
.ms-s { flex: none; max-width: 38%; font-size: 12px; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-s a { color: var(--primary); text-decoration: none; }
.ms-s a:hover { text-decoration: underline; }
.ms-badge { flex: none; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--chip); color: var(--muted); }
.ms-badge.on { background: #e6f4ea; color: var(--ok); }
html[data-theme="dark"] .ms-badge.on { background: #173325; }
.ms-more, .ms-empty { font-size: 12px; color: var(--muted); padding: 4px 18px 6px 52px; }
.ms-empty { padding: 14px 18px; }
.ms mark { background: color-mix(in srgb, var(--warn) 28%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
@media (max-width: 760px) { .ms-s { display: none; } .ms-box kbd { display: none; } }
.ms-link { display: block; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 12px; color: var(--primary); text-align: left; }
.ms-link:hover { text-decoration: underline; }
