/* ---------- Журналы ХАССП (.jr-*) ---------- */

/* чек-лист «Журналы на сегодня» */
.jr-check { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 4px; }
.jr-ci { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); }
.jr-ci:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.jr-mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 15px; background: var(--paper2); color: var(--muted); }
.jr-ci.ok .jr-mark { background: var(--oks); color: var(--ok); }
.jr-ci.bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: color-mix(in srgb, var(--bads) 45%, var(--paper)); }
.jr-ci.bad .jr-mark { background: var(--bad); color: #fff; }
.jr-ct { min-width: 0; }
.jr-ct b { display: block; font-size: 14px; font-weight: 800; line-height: 1.2; }
.jr-ct span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.jr-ci.bad .jr-ct span { color: var(--bad); }
.jr-home .jr-hh { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.jr-home .jr-hh a { color: var(--acc); font-weight: 800; font-size: 14px; }

/* главная раздела */
.jr-setup { border-color: color-mix(in srgb, var(--sec) 55%, var(--line)); background: color-mix(in srgb, var(--secs) 55%, var(--paper)); }
.jr-kind { display: flex; flex-direction: column; gap: 10px; }
.jr-kh { display: flex; gap: 12px; align-items: center; }
.jr-kh h2 { font-size: 16.5px; }
.jr-kh .muted { font-size: 13.5px; font-weight: 600; }
.jr-ki { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accs); color: var(--acc); flex: none; }
.jr-hint { font-size: 14px; color: var(--ink2); }
.jr-kind .form-actions { margin-top: auto; }

/* журнал за день */
.jr-days { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 16px; }
.jr-today { display: flex; flex-direction: column; }
.jr-eq { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.jr-eq:first-child { border-top: 0; }
.jr-eqn { flex: 1; min-width: 0; }
.jr-eqn b { display: block; font-weight: 800; overflow-wrap: anywhere; }
.jr-eqn span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.jr-slot { width: 76px; flex: none; text-align: center; border-radius: 12px; padding: 6px 4px; background: var(--paper2); }
.jr-slot small { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.jr-slot b { display: block; font-size: 17px; font-weight: 800; }
.jr-slot.ok { background: var(--oks); color: var(--ok); }
.jr-slot.bad { background: var(--bad); color: #fff; }
.jr-slot.bad small { color: color-mix(in srgb, #fff 80%, transparent); }
.jr-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.jr-seg label { cursor: pointer; }
.jr-seg input { position: absolute; opacity: 0; pointer-events: none; }
.jr-seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 700; background: var(--paper); }
.jr-seg input:checked + span { border-color: var(--acc); background: var(--accs); color: var(--acch); }
.jr-seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--acc) 55%, transparent); outline-offset: 2px; }
fieldset.field { border: 0; }
.jr-t .input { max-width: 220px; font-size: 20px; font-weight: 800; }
.jr-live { font-weight: 800; font-size: 14px; }
.jr-live.bad { color: var(--bad); }
.jr-live.ok { color: var(--ok); }
.jr-ta { min-height: 84px; padding: 10px 14px; resize: vertical; }
.jr-3 { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 599px) { .jr-3 { grid-template-columns: 1fr; } }
.jr-quick .row { min-height: 56px; }
.jr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.jr-chips form { margin: 0; }
.jr-chips .chip { height: 40px; padding: 0 14px; border: 0; cursor: pointer; font-size: 13.5px; }
.jr-chips .chip:disabled { cursor: default; }
.jr-member { cursor: pointer; }
.jr-member input { width: 22px; height: 22px; accent-color: var(--acc); flex: none; }

/* записи */
.jr-entries .row { align-items: flex-start; }
.jr-entries .tm { width: 48px; flex: none; font-weight: 800; padding-top: 1px; }
.jr-entries .rm > span { margin-top: 2px; }
.jr-entries .rm .jr-val { display: inline-flex; width: auto; font-weight: 800; margin-left: 8px; padding: 0 8px; border-radius: 8px; font-size: 14px; line-height: 24px; vertical-align: 1px; }
.jr-entries .rm .jr-val.ok { background: var(--oks); color: var(--ok); }
.jr-entries .rm .jr-val.bad { background: var(--bad); color: #fff; }
.jr-warn { background: linear-gradient(to right, color-mix(in srgb, var(--bads) 70%, transparent), transparent 70%); border-radius: 12px; padding-left: 8px !important; padding-right: 8px !important; }
.jr-ca { color: var(--bad) !important; }
.jr-who { display: flex !important; flex-wrap: wrap; gap: 6px; align-items: center; }
.jr-who .chip { height: 22px; font-size: 11.5px; }
.jr-addca { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; padding-left: 60px; }
.jr-addca .input { flex: 1 1 220px; min-height: 44px; }
@media (max-width: 599px) { .jr-addca { padding-left: 0; } }

/* настройки */
.jr-eqgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.jr-eqrow { display: block; }
.jr-eqrow > summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.jr-eqrow > summary::-webkit-details-marker { display: none; }
.jr-eqform { padding: 12px 0 4px; }
.jr-roles { border: 0; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 0 18px; }
.jr-roles legend { width: 100%; }

/* датчики */
.jr-newtoken { border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); }
.jr-newtoken .copyline { margin: 12px 0 16px; }
.jr-sensors { display: grid; gap: 14px; margin-top: 16px; }
@media (min-width: 760px) { .jr-sensors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .jr-sensors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.jr-sensors > .card + .card { margin-top: 0; }
.jr-sensor { display: flex; flex-direction: column; gap: 10px; }
.jr-sh { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.jr-sh h3 { overflow-wrap: anywhere; }
.jr-sh .muted { font-size: 13px; font-weight: 600; }
.jr-sv b { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; }
.jr-sv b.bad { color: var(--bad); }
.jr-sv span { font-size: 13px; color: var(--muted); font-weight: 600; }
.jr-spark svg { display: block; width: 100%; height: 56px; background: var(--paper2); border-radius: 10px; }
.jr-spark path { fill: none; stroke: var(--acc); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.jr-spark .band { fill: color-mix(in srgb, var(--ok) 16%, transparent); }
.jr-spark figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.jr-nospark { font-size: 13.5px; }
.jr-sedit > summary { list-style: none; width: fit-content; cursor: pointer; }
.jr-sedit > summary::-webkit-details-marker { display: none; }
.jr-sedit .form { margin-top: 10px; gap: 10px; }
.jr-sedit .form + .form { border-top: 1px solid var(--line); padding-top: 10px; }

/* инструкция подключения */
.jr-connect { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.jr-connect code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--paper2); border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }
.jr-connect pre { background: #2E2530; color: #F4ECE2; border-radius: 12px; padding: 12px 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; margin: 8px 0; max-width: 100%; }
.jr-connect pre code { background: none; color: inherit; padding: 0; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.jr-howto { border-top: 1px solid var(--line); padding: 4px 0; }
.jr-howto > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 800; }
.jr-howto p { margin: 6px 0; }
.jr-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.jr-steps a, .jr-connect a { color: var(--acc); font-weight: 700; }
