/* Оформление Norwaldi. Шапка и подвал: фирменный тёмный стиль, не менять без согласования. */
:root {
  --bg: #eef2f6;
  --card: #fff;
  --line: #d5dee6;
  --line2: #e1e8ef;
  --ink: #16212e;
  --mut: #5b6b7c;
  --teal: #0b7a69;
  --navy: #0e2a47;
  --g1: #c9edda;
  --g2: #14633e;
  --a1: #fff1d6;
  --a2: #7a4b00;
  --b1: #e1ecfa;
  --b2: #1b4f9c;
  --r1: #f9dada;
  --r2: #8a1f1f;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
::placeholder {
  text-transform: none;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
:focus-visible {
  outline: 2px solid #1b4f9c;
  outline-offset: 2px;
}
header {
  height: 64px;
  flex: none;
  background: #36454f; /* антрацит Norwaldi */
  border-bottom: 1px solid #2b373f;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
}
.logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #2b373f; /* подложка знака Norwaldi, как у значка вкладки */
  border: 1px solid rgba(0, 196, 204, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.brand {
  white-space: nowrap;
}
.brand b {
  font-size: 20px;
}
.wordmark {
  letter-spacing: 0.02em;
  font-weight: 800;
}
.brand small {
  display: none;
  font-size: 12.5px;
  color: #94a3b8;
}
@media (min-width: 1560px) {
  .brand small {
    display: block;
  }
}
.tag {
  font-size: 12px;
  color: #5ee3e8;
  border: 1px solid rgba(0, 196, 204, 0.5);
  background: rgba(0, 196, 204, 0.14);
  padding: 2px 9px;
  border-radius: 99px;
  margin-left: 8px;
}
.hpill {
  padding: 7px 13px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.hp-amber {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.hp-green {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.hp-red {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.nav {
  height: 40px;
  padding: 0 12px;
  white-space: nowrap;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: transparent;
  color: #e2e8f0;
  font-weight: 600;
  position: relative;
}
.nav.on {
  background: #00c4cc;
  color: #032a2c;
  border-color: #00c4cc;
}
.badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.user {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #f1f5f9;
  font-size: 13.5px;
}
.ava {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ava.o {
  background: #5c7088;
}
.ava.big {
  width: 30px;
  height: 30px;
  font-size: 12.5px;
  background: #00c4cc;
  color: #032a2c;
}
main {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 16px;
  padding: 16px 18px 14px;
  overflow: hidden;
}
footer {
  height: 30px;
  flex: none;
  background: #2b373f; /* антрацит Norwaldi, чуть темнее шапки */
  border-top: 1px solid #222c33;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: #b8c4cc;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.list {
  flex: 1;
  min-width: 0;
  gap: 10px;
}
.list .scroll {
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}
.side {
  width: 360px;
  flex: none;
  gap: 10px;
  overflow: auto;
}
.bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.seg {
  display: flex;
  border: 1px solid #9aaab8;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  flex: none;
}
.seg button {
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid #9aaab8;
  background: #fff;
  white-space: nowrap;
}
.seg button:first-child {
  border-left: 0;
}
.seg button[aria-pressed='true'] {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}
.seg.t button[aria-pressed='true'] {
  background: var(--teal);
}
.btn {
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}
.btn.o {
  background: #fff;
  color: var(--teal);
  border: 1px solid var(--teal);
  font-weight: 600;
}
.btn.n {
  background: #fff;
  color: var(--ink);
  border: 1px solid #9aaab8;
  font-weight: 600;
}
.btn.d {
  background: #fff;
  color: var(--r2);
  border: 1px solid #b23a3a;
  font-weight: 600;
}
.btn.s {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}
input[type='text'],
input[type='password'],
input[type='datetime-local'],
input[type='time'],
input[type='search'],
input[type='number'],
select {
  height: 42px;
  border: 1px solid #9aaab8;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  min-width: 0;
}
.tar {
  border: 1px solid #cbd6e0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  flex: none;
}
.tar.catching {
  border-color: #9db7e0;
}
.tar.good {
  border-color: #a9dcc1;
}
.tar.bad {
  border-color: #e6b5b5;
}
.need {
  border: 1px dashed #7c93a8;
  background: #fff;
  border-radius: 8px;
  height: 30px;
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  color: inherit;
}
.need:hover {
  border-color: #0e7c66;
  background: #f0fbf7;
}
.need.p {
  border-style: solid;
  border-color: #b45309;
  background: #fff7e6;
}
.t-need {
  overflow: visible !important;
}
.th > [hidden] {
  display: none !important;
}
.th {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 44px 112px 136px 136px 82px 100px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 14px;
  background: #e3eaf1;
}
.th > * {
  min-width: 0;
}
.t-name {
  font-size: 15.5px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.t-tar {
  flex: none;
  min-width: 104px;
}
.t-term {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: #33475b;
}
.t-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.t-r {
  text-align: right;
  white-space: nowrap;
  display: flex;
  justify-content: flex-end;
}
.tar.catching .th {
  background: #e1ecfa;
}
.tar.good .th {
  background: #ddf3e7;
}
.tar.bad .th {
  background: #f9e4e4;
}
.th b {
  white-space: nowrap;
}
.slot {
  font-size: 17px;
}
.ok {
  color: #0b6b5b;
}
.late {
  color: var(--a2);
}
.cols {
  display: grid;
  grid-template-columns: 132px 96px 132px 1fr 104px;
  gap: 8px;
  align-items: center;
}
.row {
  min-height: 40px;
  padding: 4px 14px;
  border-top: 1px solid var(--line2);
  font-size: 14.5px;
  cursor: pointer;
  background: #fff;
}
.row:hover {
  background: #f3f7fb;
}
.row.sel {
  background: var(--b1);
  box-shadow: inset 3px 0 0 var(--b2);
}
.row.rej {
  background: #fdf0f0;
}
.row > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  white-space: normal !important;
}
.chip {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 99px;
  white-space: nowrap;
  display: inline-block;
}
.c-g {
  background: var(--g1);
  color: var(--g2);
}
.c-a {
  background: var(--a1);
  color: var(--a2);
}
.c-b {
  background: var(--b1);
  color: var(--b2);
}
.c-r {
  background: var(--r1);
  color: var(--r2);
}
.c-catch {
  background: var(--b2);
  color: #fff;
  font-weight: 700;
}
.c-done {
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}
.c-x {
  background: #e8edf2;
  color: #44586b;
}
.mut {
  color: var(--mut);
}
.sm {
  font-size: 12.5px;
}
.sp {
  flex: 1;
}
.facts {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 4px 10px;
  font-size: 14px;
}
.facts span {
  color: var(--mut);
}
.sec {
  border-top: 1px solid var(--line2);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sec > b:first-child,
.sech b {
  font-size: 15px;
}
.sw {
  width: 46px;
  height: 26px;
  border: 0;
  border-radius: 99px;
  background: #9aaab8;
  padding: 3px;
  display: flex;
  flex: none;
}
.sw[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.sw[aria-checked='true'] {
  background: var(--teal);
  justify-content: flex-end;
}
.sw span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
}
.note {
  font-size: 12.5px;
  color: var(--a2);
  background: var(--a1);
  border-radius: 8px;
  padding: 6px 9px;
  line-height: 1.4;
}
.note.r {
  background: var(--r1);
  color: var(--r2);
}
.note.g {
  background: var(--g1);
  color: var(--g2);
}
.chk {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 4px 6px;
  font-size: 14px;
  align-items: start;
}
.mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.m-ok {
  background: var(--g1);
  color: var(--g2);
}
.m-no {
  background: var(--r1);
  color: var(--r2);
}
.m-q {
  background: #e8edf2;
  color: #44586b;
}
.empty {
  padding: 40px 10px;
  text-align: center;
  color: var(--mut);
}
.ov {
  position: fixed;
  inset: 0;
  background: rgba(14, 42, 71, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 5;
}
.modal {
  width: 780px;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
label.f {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13.5px;
  color: #44586b;
}
.err {
  color: var(--r2);
  font-weight: 600;
  min-height: 18px;
}
.toasts {
  position: fixed;
  right: 18px;
  bottom: 44px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9;
  width: 360px;
  max-width: calc(100% - 36px);
}
.toast {
  background: #0e2a47;
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  line-height: 1.4;
  border-left: 5px solid #19c08f;
}
.toast.e {
  border-left-color: #ef4444;
}
.toast.st {
  background: #0b5d4f;
  border-left-color: #6ee7b7;
  font-size: 15px;
  font-weight: 600;
}
.toast.st.e {
  background: #7f1d1d;
  border-left-color: #fca5a5;
}
body.busy main .btn,
body.busy #modal .btn:not([data-act='closeModal']) {
  cursor: progress;
  opacity: 0.6;
}
.opbox {
  border: 1.5px solid #f59e0b;
  background: #fffbeb;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.opbox .op {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13.5px;
  border-top: 1px solid #fde68a;
  padding-top: 8px;
}
.login {
  margin: auto;
  width: 440px;
  max-width: 100%;
  gap: 16px;
  padding: 32px;
}
table {
  border-collapse: collapse;
  width: 100%;
}
th {
  text-align: left;
  font-size: 12px;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px;
}
td {
  padding: 8px;
  border-top: 1px solid var(--line2);
  vertical-align: middle;
}
.ev {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 7px 4px;
  border-top: 1px solid var(--line2);
}
@media (max-width: 1000px) {
  .th {
    display: flex;
    flex-wrap: wrap;
  }
  main {
    flex-direction: column;
    overflow: auto;
  }
  .side {
    width: 100%;
  }
  .cols {
    grid-template-columns: 120px 1fr 100px;
  }
  .cols .h2 {
    display: none;
  }
  header {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px;
  }
  .g2 {
    grid-template-columns: 1fr;
  }
}
/* Таблица пользователей: все поля строки на одной линии и одной высоты; подпись «логин» под именем */
.utab td {
  vertical-align: top;
  padding: 10px 8px;
}
.utab input[type='text'],
.utab input[type='time'],
.utab select {
  width: 100%;
  height: 40px;
}
.utab .btn {
  height: 40px;
}
.utab .btn.s {
  height: 34px;
}
.utab .acts {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  white-space: nowrap;
}
.utab .cap {
  display: block;
  margin-top: 4px;
}
/* Отчёт по Auto Update */
.rep td {
  padding: 9px 8px;
  vertical-align: middle;
}
.rep .rrow {
  cursor: pointer;
}
.rep .rrow:hover {
  background: #f2f6fa;
}
#repDate {
  height: 38px;
  border: 1px solid #9aaab8;
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}
/* Сигнал «слот изменился, но ещё не тот»: жёлтый */
.toast.w {
  border-left-color: #fbbf24;
}
.toast.st.w {
  background: #fde68a;
  color: #3b2a05;
  border-left-color: #b45309;
}
.toast.st.w button {
  background: #3b2a05;
  color: #fde68a;
}
.c-y {
  background: #fef3c7;
  color: #92400e;
}
